query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
CharSequence widgetText = context.getString(R.string.appwidget_text); Construct the RemoteViews object
@RequiresApi(api = Build.VERSION_CODES.ICE_CREAM_SANDWICH) static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.baking_recipes_widget); Intent intent = new Intent(context, RecipesActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.widget_toolbar, pendingIntent); // Instruct the widget manager to update the widget Intent intnt = new Intent(context, WidgetService.class); views.setRemoteAdapter(R.id.widget_ingredients_list_view, intnt); Intent ingListIntent = new Intent(context, RecipeListActivity.class); PendingIntent ingPendingIntent = PendingIntent.getActivity(context, 0, ingListIntent, PendingIntent.FLAG_UPDATE_CURRENT); views.setPendingIntentTemplate(R.id.widget_ingredients_list_view, ingPendingIntent); appWidgetManager.updateAppWidget(appWidgetId, views); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void setTextInWidget(String message,Context context){\n RemoteViews remoteViews = new RemoteViews(context.getPackageName(),\n R.layout.widget_layout);\n remoteViews.setTextViewText(R.id.sadness_button, message);\n AppWidgetManager.getInstance(context).updateAppWidget(\n new ComponentName(context, DarknessProvider.class),remoteViews);\n }", "public RemoteViews buildUpdate(Context context) \n\t\t{\n\t\t\tRemoteViews updateViews = new RemoteViews(this.getPackageName(),\n\t\t\t\t\t\n\t\t\t\t\tR.layout.widget_layout);\n\t\t\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * opening the database and retrieving the word to be displayed on the widget\n\t\t\t\t\t */\n\t\t\t\t\ttry{\n\t\t\t\t\t SQLiteDatabase db;\n\t\t\t\t db = openOrCreateDatabase(\n\t\t\t\t \t\t\"vocab.db\"\n\t\t\t\t \t\t, SQLiteDatabase.CREATE_IF_NECESSARY\n\t\t\t\t \t\t, null\n\t\t\t\t \t\t);\n\t\t\t\t db.setVersion(1);\n\t\t\t\t db.setLocale(Locale.getDefault());\n\t\t\t\t db.setLockingEnabled(true);\n\t\t\t\t Random randomGenerator2 = new Random();\n\t\t\t\t int bb = randomGenerator2.nextInt(866);\n\t\t\t\t //Toast.makeText(getApplicationContext(), String.valueOf(bb),Toast.LENGTH_LONG).show();\n\t\t\t\t Cursor cur=db.query(\"words\",null,null,null,null,null,null);\n\t\t\t\t cur.moveToFirst();\n\t\t\t\t cur.moveToPosition(bb);\n\t\t\t\t String a=cur.getString(1);\n\t\t\t\t String b=cur.getString(2);\n\t\t\t\t //Toast.makeText(getApplicationContext(), a,Toast.LENGTH_LONG).show();\n\t\t\t\t updateViews.setTextViewText(R.id.widgetword,a.toUpperCase());\n\t\t\t\t updateViews.setTextViewText(R.id.widgetmeaning,b);\n\t\t\t\t Intent intent5=new Intent(context,Search1.class);\n\t\t\t\t\t\t Bundle bundle = new Bundle(); \n\t\t\t\t\t\t bundle.putString(\"wo\",a );\n\t\t\t\t\t\t intent5.putExtras(bundle);\n\t\t\t\t\t\t intent5.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t/**\n\t\t\t\t\t * setting the onclick activity for the widget\t \n\t\t\t\t\t */\n\t\t\t\t\t\tPendingIntent pendingIntent = PendingIntent.getActivity(context,0, intent5, PendingIntent.FLAG_CANCEL_CURRENT ); \n\t\t\t\t\t\tupdateViews.setOnClickPendingIntent(R.id.widget, pendingIntent);\n\t\t\t\t\tdb.close();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\t Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn updateViews;\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\r\n\t\t\r\n//\t\tTextView textView;// = (TextView) context.getResources().findView\r\n\r\n\t}", "@Override\n public void onEnabled(Context context) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);\n CharSequence widgetText = context.getString(R.string.appwidget_text);\n RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.my_widget);\n remoteViews.setTextViewText(R.id.widgetText, widgetText);\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT);\n remoteViews.setOnClickPendingIntent(R.id.widgetLogo, pendingIntent);\n ComponentName componentName = new ComponentName(context, MyWidget.class);\n appWidgetManager.updateAppWidget(componentName, remoteViews);\n }", "private void updateAppWidget(Context context,\r\n\t\t\tAppWidgetManager appWidgetManager, int appWidgetId) {\n\t\tCharSequence text;\r\n\t\ttext = \"my test\";\r\n\r\n\t\tRemoteViews views = new RemoteViews(context.getPackageName(),\r\n\t\t\t\tR.layout.widget);\r\n\t\tviews.setTextViewText(R.id.HelloTextView01, text);\r\n\r\n\t\tappWidgetManager.updateAppWidget(appWidgetId, views);\r\n\t}", "java.lang.String getView();", "public void setTitleFromActivityLabel (int textViewId)\n{\n TextView tv = (TextView) findViewById (textViewId);\n if (tv != null) tv.setText (getTitle ());\n}", "@Override\n\tpublic void onUpdate(Context context, AppWidgetManager appWidgetManager,int[] appWidgetIds) {\n\t\tString title = \"Seleccione: \";\n\t\tRemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);\n\t\t\n\t\tviews.setTextViewText(R.id.txtMessage, title);\n\n\t\tint contador = 11;\n\t\t\n\t\tIntent startActivityIntent = new Intent(context, ResponseWidgetActivity.class);\n startActivityIntent.putExtra(WIDGET_KEY, contador);\n\t\tPendingIntent startActivityPendingIntent = PendingIntent.getActivity(context, 0, startActivityIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setOnClickPendingIntent(R.id.imageButton1, startActivityPendingIntent);\n\t\t\n\t\tComponentName myWidget = new ComponentName(context, WidgetProvider.class);\n\t AppWidgetManager manager = AppWidgetManager.getInstance(context);\n\t manager.updateAppWidget(myWidget, views);\n\t}", "private RemoteViews getCustomDesign(String title, String message) {\n Log.d(\"Icon1\", \"icon:\");\n RemoteViews remoteViews = new RemoteViews(getApplicationContext().getPackageName(), R.layout.notification);\n remoteViews.setTextViewText(R.id.title, title);\n remoteViews.setTextViewText(R.id.message, message);\n remoteViews.setImageViewResource(R.id.icon, getNotificationIcon());\n return remoteViews;\n }", "private void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId)\n {\n RemoteViews views=new RemoteViews(context.getPackageName(), R.layout.new_app_widget);\n\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }", "interface View extends BaseView {\n void onTextLoaded(String text);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n // Construct the RemoteViews object\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.app_widget_top3);\n\n //klikken op widget titel TextView opent de app\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.titelTextView, pendingIntent);\n\n //update de UI\n String[] taaknamen = new TakenlijstDB(context).getWidgetTaken(3);\n views.setTextViewText(R.id.taak1TextView,\n taaknamen[0] == null ? \"\" : taaknamen[0]);\n views.setTextViewText(R.id.taak2TextView,\n taaknamen[1] == null ? \"\" : taaknamen[1]);\n views.setTextViewText(R.id.taak3TextView,\n taaknamen[2] == null ? \"\" : taaknamen[2]);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }", "static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Integer color) {\n\n Log.d(TAG, \"updateAppWidget() \"+mybroadcast.isOrderedBroadcast());\n if(!mybroadcast.isOrderedBroadcast()){\n Log.d(TAG, \"registerReceiver()\");\n IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);\n filter.addAction(Intent.ACTION_SCREEN_OFF);\n context.getApplicationContext().registerReceiver(mybroadcast, filter);\n }\n\n // Construct the RemoteViews object\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.main_frame);\n\n // PINTAR RELOJ Y MANTENER UN MINUTO\n\n\n Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(paint.getStrokeWidth() + 8);\n paint.setColor(color);\n\n Bitmap bmp = Bitmap.createBitmap(110, 55, Bitmap.Config.ARGB_4444);\n Canvas canvas = new Canvas(bmp);\n canvas.drawCircle(canvas.getWidth() / 2, canvas.getHeight() / 2, canvas.getHeight() / 3, paint);\n\n views.setImageViewBitmap(R.id.image_view, bmp);\n //views.setTextViewText(R.id.appwidget_text, widgetText);\n ComponentName component = new ComponentName( context, MainFrame.class);\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.image_view);\n appWidgetManager.updateAppWidget(component, views);\n\n }", "@Override\n public RemoteViews getViewAt(int position) {\n RemoteViews views = new RemoteViews(context.getPackageName(), android.R.layout.simple_list_item_1);\n// views.setTextViewText(android.R.id.text1, String.format(context.getString(R.string.ingredients_detail)\n// , ingredient.getQuantity(), ingredient.getMeasure(), ingredient.getIngredient()));\n views.setTextViewText(android.R.id.text1, remoteViewingredientsList.get(position));\n Log.d(TAG, \"getViewAt: \"+position+ingredientforwidget);\n return views; }", "static void setWidget(Context context, RemoteViews views, int widget) {\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n int state = adapter.getState();\n \n int image = R.drawable.grey;\n if (state == BluetoothAdapter.STATE_OFF)\n image = R.drawable.grey;\n else if (state == BluetoothAdapter.STATE_ON)\n image = R.drawable.blue;\n else\n image = R.drawable.orange;\n\n views.setImageViewResource(widget, image);\n }", "@Override\r\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString lrcMessageString=intent.getStringExtra(\"lrcMessage\");\r\n\t\t\tlrcText.setText(lrcMessageString);\r\n\t\t}", "@Override\n protected void onHandleIntent(Intent intent) {\n if (intent != null) {\n\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(\n new ComponentName(this, MyRedditWidget.class));\n\n Cursor data = getContentResolver().query(\n MainActivity.CONTENT_URI,\n null,\n null,\n null,\n null);\n\n data.moveToFirst();\n String subr = \"\";\n try {\n while (data.moveToNext()) {\n subr += data.getString(0) + \",\";\n }\n } finally {\n data.close();\n }\n\n for (int appWidgetId : appWidgetIds) {\n Intent launchIntent = new Intent(this, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);\n\n // Construct the RemoteViews object\n RemoteViews views = new RemoteViews(this.getPackageName(), R.layout.myreddit_widget);\n views.setTextViewText(R.id.appwidget_text, subr );\n views.setOnClickPendingIntent(R.id.appwidget_text, pendingIntent);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }\n }", "public abstract String getView();", "@Override\r\n\t public void onReceive(Context context, Intent intent) {\r\n\t final String action = intent.getAction();\r\n\t if (action.equals(AppWidgetManager.ACTION_APPWIDGET_DELETED)) {\r\n\t final int appWidgetId = intent.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);\r\n\t if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {\r\n\t this.onDeleted(context, new int[] { appWidgetId });\r\n\t }\r\n\t } else if (action.equals(ACTION_WIDGET_CONTROL)) {\r\n\t \tUri uri = intent.getData();\r\n\t \tRect widget_pos = intent.getSourceBounds();\r\n\t \tint widget_id = Integer.parseInt(uri.getQueryParameter(\"widget_id\"));\r\n\t if (widget_id != AppWidgetManager.INVALID_APPWIDGET_ID) {\r\n\t \tmake_widget_action(context, widget_id, widget_pos);\r\n\t }\t\r\n\t } else if (action.equals(ACTION_UPDATE_WIDGET_CONTEXT)) {\r\n\t \tUri uri = intent.getData();\r\n\t \tint widget_id = Integer.parseInt(uri.getQueryParameter(\"widget_id\"));\r\n\t if (widget_id != AppWidgetManager.INVALID_APPWIDGET_ID) { \t\r\n\t \tRemoteViews remote_views = new RemoteViews(context.getPackageName(), R.layout.widget);\r\n\t \tWidgetInstanceManager wim = get_instance(widget_id);\r\n\t \twim.ReinitializeWidgetBitmap(context);\r\n\t \t\tupdate_widget_view(AppWidgetManager.getInstance(context), widget_id, remote_views);\r\n\t } else super.onReceive(context, intent);\t\r\n\t } else {\r\n\t super.onReceive(context, intent);\r\n\t }\r\n\t }", "private void updateRemoteViews(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId, ArrayList<String> supplicationList)\n {\n intent = new Intent(context, WidgetService.class);\n openAppIntent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, openAppIntent, 0);\n Bundle extrasBundle = new Bundle();\n extrasBundle.putStringArrayList(WIDGET_LIST,supplicationList);\n extrasBundle.putInt(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.putExtra(WIDGET_BUNDLE_STRING, extrasBundle);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.stories_widget);\n rv.setRemoteAdapter(R.id.list, intent);\n rv.setOnClickPendingIntent(R.id.widget_container, pendingIntent);\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.list);\n appWidgetManager.updateAppWidget(appWidgetId, rv);\n\n }", "private static void updateAppWidget(Context context, AppWidgetManager\r\n appWidgetManager, int appWidgetId, int [] appWidgetIds) {\r\n RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.astro_app_widget);\r\n\r\n AppWidgetTarget appWidgetTarget = new AppWidgetTarget(context, R.id.widget_image, remoteViews, appWidgetIds) {\r\n @Override\r\n public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {\r\n super.onResourceReady(resource, transition);\r\n }\r\n };\r\n\r\n /* Create a new intent that launches the MainActivity.class, as well as a pending Intent*/\r\n Intent intent = new Intent(context, MainActivity.class);\r\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n if (PhotoFragment.photo != null && PhotoFragment.photoUrl != null && PhotoFragment.videoUri == null) {\r\n /* If the photo exists, load it into the widget_image remote view */\r\n Uri photoUri = Uri.parse(PhotoFragment.photoUrl);\r\n\r\n if (photoUri != null) {\r\n GlideApp.with(context.getApplicationContext())\r\n .asBitmap()\r\n .load(photoUri)\r\n .placeholder(R.mipmap.ic_launcher)\r\n .transition(BitmapTransitionOptions.withCrossFade())\r\n .centerCrop()\r\n .into(appWidgetTarget);\r\n\r\n /* Set the text of the widget_image_title TextView to the photoTitle and make all\r\n * views visible */\r\n if (PhotoFragment.photoTitle != null) {\r\n remoteViews.setTextViewText(R.id.widget_image_title, PhotoFragment.photoTitle);\r\n }\r\n remoteViews.setViewVisibility(R.id.widget_image_title, View.VISIBLE);\r\n remoteViews.setViewVisibility(R.id.widget_image_label, View.VISIBLE);\r\n remoteViews.setViewVisibility(R.id.widget_image, View.VISIBLE);\r\n } else {\r\n remoteViews.setViewVisibility(R.id.widget_image_label, View.GONE);\r\n remoteViews.setViewVisibility(R.id.widget_image_title, View.GONE);\r\n remoteViews.setViewVisibility(R.id.widget_image, View.VISIBLE);\r\n remoteViews.setImageViewResource(R.id.widget_image, R.mipmap.ic_launcher);\r\n }\r\n } else {\r\n /* In case there is no photo, hide the image label and title, and show only the\r\n * ic_launcher logo */\r\n remoteViews.setViewVisibility(R.id.widget_image_label, View.GONE);\r\n remoteViews.setViewVisibility(R.id.widget_image_title, View.GONE);\r\n remoteViews.setViewVisibility(R.id.widget_image, View.VISIBLE);\r\n remoteViews.setImageViewResource(R.id.widget_image, R.mipmap.ic_launcher);\r\n }\r\n /* Set an OnClickPendingIntent to the widget */\r\n remoteViews.setOnClickPendingIntent(R.id.widget_layout,pendingIntent);\r\n appWidgetManager.updateAppWidget(appWidgetId,remoteViews);\r\n}", "private TextView getTextView(String content) {\n TextView textView = new TextView(this.getContext());\n textView.setEms(30);\n textView.setTextColor(getResources().getColor(R.color.ldstools_black));\n if(content != null && !content.isEmpty()) {\n textView.setText(content);\n }\n return textView;\n }", "@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void onReceive(Context context, Intent intent) {\n\r\n mOutputTextView.setText(intent.getExtras().getString(Intent.EXTRA_TEXT));\r\n }", "abstract TextView getTextView();", "public String getView();", "public String getView();", "public void displayMessage(View view) {\n // I got the following line of code from StackOverflow: http://stackoverflow.com/questions/5620772/get-text-from-pressed-button\n String s = (String) ((Button)view).getText();\n CharSequence msg = new StringBuilder().append(\"This button will launch my \").append(s.toString()).append(\" app\").toString();\n Toast.makeText(view.getContext(),msg, Toast.LENGTH_SHORT).show();\n }", "static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.recipe_app_widget);\n\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.appwidget_name, pendingIntent);\n\n RecipeDatabase db = RecipeDatabase.getInstance(context);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n List<RecipeEntry> entries = db.recipeDao().getAllRecipes();\n if(entries != null && !entries.isEmpty()){\n RecipeEntry randomRecipe = entries.get(new Random().nextInt(entries.size()));\n StringBuilder fullIngredients = new StringBuilder(randomRecipe.getName() + \"\\n\\nIngredients\\n\");\n for(Ingredient ingredient : randomRecipe.getIngredients()){\n fullIngredients.append(context.getString(R.string.list_ingredients,\n String.valueOf(ingredient.getQuantity()),\n ingredient.getMeasure(),\n ingredient.getIngredient()));\n }\n\n views.setTextViewText(R.id.appwidget_name, fullIngredients);\n } else {\n views.setTextViewText(R.id.appwidget_name, context.getString(R.string.lbl_check_new_recipe_in_app));\n }\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_myo_control);\n textRcvData = (TextView) findViewById(R.id.textReceiveData);\n isTextRcvData = true;\n }", "public abstract android.widget.RemoteViewsService.RemoteViewsFactory onGetViewFactory(android.content.Intent intent);", "public TextView getTextView() {\n\n return (TextView) findViewById(R.id.sendToLogin);\n }", "private TextView m25227b(Context context) {\n TextView textView = new TextView(context);\n textView.setLayoutParams(new LayoutParams(-1, -1));\n textView.setGravity(17);\n textView.setText(this.options.getMessageText());\n textView.setTextColor(this.options.getMessageColor());\n textView.setTextSize(2, 18.0f);\n return textView;\n }", "private static RemoteViews createViewPleaseRate(RemoteViews rv, Context context, int appWidgetId) {\n Resources res = context.getResources();\n Configuration conf = res.getConfiguration();\n String currentLang = conf.locale.getLanguage();\n\n\n //get settings lang\n String settingLang = SettingsActivity.loadPrefLang(context, appWidgetId);\n if (settingLang == null || settingLang.isEmpty()) {\n settingLang = currentLang;\n }\n\n String settingTheme = SettingsActivity.loadPrefTheme(context, appWidgetId);\n if (settingTheme == null || settingTheme.isEmpty()) {\n settingTheme = SettingsActivity.THEME_LIGHT;\n }\n\n int bgColor = -1;\n int headerBgColor = -1;\n int textColor = -1;\n if (SettingsActivity.THEME_LIGHT.equals(settingTheme)) {\n\n bgColor = ContextCompat.getColor(context, R.color.bgColor);\n headerBgColor = ContextCompat.getColor(context, R.color.headerBgColor);\n textColor = ContextCompat.getColor(context, R.color.textColor);\n } else {\n bgColor = ContextCompat.getColor(context, R.color.bgBlackColor);\n headerBgColor = ContextCompat.getColor(context, R.color.headerBgBlackColor);\n textColor = ContextCompat.getColor(context, R.color.textBlackColor);\n }\n\n\n rv.setInt(R.id.plz_rate_ViewGroup, \"setBackgroundColor\", bgColor);\n\n\n String plzInstallString = LocalizationUtils.getLocalizedString(R.string.plz_rate_otd, settingLang, context);\n rv.setTextViewText(R.id.plz_rate_otd_TextView, plzInstallString);\n rv.setInt(R.id.plz_rate_otd_TextView, \"setTextColor\", textColor);\n\n plzInstallString = LocalizationUtils.getLocalizedString(R.string.rate, settingLang, context);\n rv.setTextViewText(R.id.rateButton, plzInstallString);\n //rv.setInt(R.id.installButton, \"setTextColor\", textColor);\n\n\n // Create an Intent to launch Play Market\n\n PendingIntent rateIntent = getRefreshIntent(context, ACTION_RATE, appWidgetId, new Date(), settingLang);\n rv.setOnClickPendingIntent(R.id.rateButton, rateIntent);\n PendingIntent rateNoIntent = getRefreshIntent(context, ACTION_RATE_NO, appWidgetId, new Date(), settingLang);\n rv.setOnClickPendingIntent(R.id.rateNoButton, rateNoIntent);\n\n return rv;\n\n }", "void setText(@StringRes int resId) {\n setText(getContext().getText(resId));\n }", "public void bindDEAppWidget(Sentence latestSentence, int widgetType) {\n RemoteViews views = new RemoteViews(mContext.getPackageName(), R.layout.widget);\n views.setTextViewText(R.id.content, latestSentence.getContent());\n views.setTextViewText(R.id.day, latestSentence.getDateline());\n\n Intent launchIntent = new Intent(mContext, MainActivity.class);\n launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n launchIntent.setAction(\"launch list\");\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, launchIntent, 0);\n views.setOnClickPendingIntent(R.id.launcher_icon, pendingIntent);\n if (latestSentence.getId() != null) {\n Intent detailIntent = new Intent(mContext, MainActivity.class);\n detailIntent.putExtra(Constants.KEY_WIDGET_SENTENCE_ID, latestSentence.getId());\n detailIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n detailIntent.setAction(\"launch detail\");\n pendingIntent = PendingIntent.getActivity(mContext, 0, detailIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n }\n views.setOnClickPendingIntent(R.id.right_part, pendingIntent);\n AppWidgetManager.getInstance(mContext).updateAppWidget(new ComponentName(mContext,\n widgetType == TYPE_4_1 ? DEAppWidgetProvider41.class : DEAppWidgetProvider51.class), views);\n }", "private RemoteViews setupViews(Context context, VigilanceState state) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.emergency_button_widget);\n\n Intent intent = EmergencyNotificationService.getStartIntent(context)\n \t.putExtra(EmergencyNotificationService.SHOW_NOTIFICATION_WITH_DISABLE, true);\n PendingIntent pendingIntent = PendingIntent.getService(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.EmergencyButton, pendingIntent);\n\n // Create ImNowOk intent\n Intent iAmNowOkIntent = EmergencyNotificationService.getStopIntent(context);\n PendingIntent pendingIAmNowOkIntent = PendingIntent.getService(context, 0, iAmNowOkIntent, 0);\n views.setOnClickPendingIntent(R.id.ImNowOKButton, pendingIAmNowOkIntent);\n\n Intent stopEmergency = EmergencyNotificationService.getCancelIntent(context);\n PendingIntent pendingStopIntent = PendingIntent.getService(context, 0, stopEmergency, 0);\n views.setOnClickPendingIntent(R.id.CancelEmergencyButton, pendingStopIntent);\n\n views.setViewVisibility(R.id.ImNowOKButton, View.INVISIBLE);\n views.setViewVisibility(R.id.CancelEmergencyButton, View.INVISIBLE);\n views.setViewVisibility(R.id.EmergencyButton, View.INVISIBLE);\n\n switch (state) {\n case NORMAL_STATE:\n views.setViewVisibility(R.id.EmergencyButton, View.VISIBLE);\n break;\n case WAITING_STATE:\n views.setViewVisibility(R.id.CancelEmergencyButton, View.VISIBLE);\n break;\n case EMERGENCY_STATE:\n views.setViewVisibility(R.id.ImNowOKButton, View.VISIBLE);\n break;\n }\n return views;\n }", "void onMessageToast(String string);", "@SuppressLint(\"ShowToast\")\r\n\tpublic void createVrToast(String text) {\r\n\t\tif ( text == null ) {\r\n\t\t\ttext = \"null toast text!\";\r\n\t\t}\r\n\t\tLog.v(TAG, \"createVrToast \" + text);\r\n\r\n\t\t// If we haven't set up the surface / surfaceTexture yet,\r\n\t\t// do it now.\r\n\t\tif (toastTexture == null) {\r\n\t\t\ttoastTexture = nativeGetPopupSurfaceTexture(appPtr);\r\n\t\t\tif (toastTexture == null) {\r\n\t\t\t\tLog.e(TAG, \"nativePreparePopup returned NULL\");\r\n\t\t\t\treturn; // not set up yet\r\n\t\t\t}\r\n\t\t\ttoastSurface = new Surface(toastTexture);\r\n\t\t}\r\n\r\n\t\tToast toast = Toast.makeText(this.getApplicationContext(), text,\r\n\t\t\t\tToast.LENGTH_SHORT);\r\n\r\n\t\tthis.createVrToast( toast.getView() );\r\n\t}", "TextView getDescriptionView();", "@TargetApi(Build.VERSION_CODES.HONEYCOMB)\n @Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager,\n int[] appWidgetIds) {\n for (int i = 0; i < appWidgetIds.length; ++i) {\n\n // Instantiate the RemoteViews object for the app widget layout.\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.widget_detail);\n\n // Create an Intent to launch MainActivity\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n rv.setOnClickPendingIntent(R.id.widget, pendingIntent);\n\n // Set up the RemoteViews object to use a RemoteViews adapter.\n // This adapter connects\n // to a RemoteViewsService through the specified intent.\n // This is how you populate the data.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n setRemoteAdapter(context, rv);\n } else {\n setRemoteAdapterV11(context, rv);\n }\n\n //This flag is false for tablet, check sw600dp/bools.xml\n boolean useDetailActivity = context.getResources().getBoolean(R.bool.use_detail_activity);\n // Here we setup the a pending intent template. Individuals items of a collection\n // cannot setup their own pending intents, instead, the collection as a whole can\n // setup a pending intent template, and the individual items can set a fillInIntent\n // to create unique before on an item to item basis.\n Intent clickIntentTemplate = useDetailActivity ? new Intent(context, DetailActivity.class)\n : new Intent(context, MainActivity.class);\n PendingIntent clickPendingIntentTemplate = TaskStackBuilder.create(context)\n .addNextIntentWithParentStack(clickIntentTemplate)\n .getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n rv.setPendingIntentTemplate(R.id.widget_list_view, clickPendingIntentTemplate);\n\n // The empty view is displayed when the collection has no items.\n // It should be in the same layout used to instantiate the RemoteViews\n // object above.\n rv.setEmptyView(R.id.widget_list_view, R.id.widget_list_empty_view);\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetIds[i], rv);\n }\n }", "private void setStrings(){\n ip = context.getResources().getString(R.string.ip);\n port = context.getResources().getString(R.string.port);\n dbName = context.getResources().getString(R.string.db_name);\n user = context.getResources().getString(R.string.masterUser);\n pass = context.getResources().getString(R.string.masterPass);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n\n textView.setText(message);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_hosted_events, container, false);\n textView = rootView.findViewById(R.id.hostedtext);\n Log.d(\"flashchat\",\"CURR TEXT : \" + textView.getText().toString());\n //textView.setText(\"WELL GOT IN\");\n mListView = rootView.findViewById(R.id.hostlist);\n getHostEvents();\n Log.d(\"flashchat\",\"ListView should be set\");\n mContext = container.getContext();\n return rootView;\n }", "public String getViewText() {\n \t\treturn \"featured-partner-view_text_t\";\n \t}", "static void updateAppWidget(final Context context, AppWidgetManager appWidgetManager,\n final int appWidgetId) {\n Intent intent = new Intent(context, RecipesActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n // Construct the RemoteViews object\n final RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.baking_widget_provider);\n Recipe recipe = RecipeDetailFragment.mSelectedRecipe;\n if(recipe!=null) {\n views.setTextViewText(R.id.widgetTitleLabel, recipe.getName());\n }\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }", "public static ViewAction setTextInTextView(final String value){\n return new ViewAction() {\n @SuppressWarnings(\"unchecked\")\n @Override\n public Matcher<View> getConstraints() {\n return allOf(isDisplayed(), isAssignableFrom(TextView.class));\n }\n\n @Override\n public void perform(UiController uiController, View view) {\n ((TextView) view).setText(value);\n }\n\n @Override\n public String getDescription() {\n return \"replace text\";\n }\n };\n }", "private static View createTabView(final Context context, final String text) {\r\n\t\tView view;\r\n\t\tview = LayoutInflater.from(context).inflate(\r\n\t\t\t\tR.layout.generic_tabs_custom_layout, null);\r\n\t\tTextView tv = (TextView) view.findViewById(R.id.tabsText);\r\n\t\ttv.setText(text);\r\n\t\treturn view;\r\n\t}", "@Override\n\tprotected AppWidgetHostView onCreateView(Context context, int appWidgetId, AppWidgetProviderInfo appWidget)\n\t{\n\t\tLauncherAppWidgetHostView appWidgetHostView = new LauncherAppWidgetHostView(context);\n\t\tappWidgetHostView.setId(appWidgetId);\n\t\treturn appWidgetHostView;\n\n\t}", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "public static void setDialogViewMessage(Context context, AlertDialog.Builder alert, String message1, String message2){\n// Log.e(\"setDialogViewMessage\", \"setDialogViewMessage\");\n LinearLayout ll=new LinearLayout(context);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\n layoutParams.setMargins(20, 10, 20, 10);\n\n ll.setOrientation(LinearLayout.VERTICAL);\n ll.setLayoutParams(layoutParams);\n TextView messageView1 = new TextView(context);\n TextView messageView2 = new TextView(context);\n TextView messageView3 = new TextView(context);\n messageView1.setLayoutParams(layoutParams);\n messageView2.setLayoutParams(layoutParams);\n messageView3.setLayoutParams(layoutParams);\n messageView1.setText(message1);\n messageView2.setText(message2);\n PackageInfo pInfo = null;\n String version = \"\";\n try {\n pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n version = pInfo.versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n\n messageView3.setText(\"Card Safe Version \" + version);\n ll.addView(messageView1);\n ll.addView(messageView2);\n ll.addView(messageView3);\n alert.setView(ll);\n\n }", "static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Recipe recipe) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.ingredients_widget);\n\n //set Recipe title\n views.setTextViewText(R.id.widget_recipe_name,recipe.getmName());\n\n //set Ingredients\n StringBuilder ingredientsString = new StringBuilder();\n for (Ingredient current : recipe.getmIngredients()) {\n ingredientsString.append(\" - \");\n ingredientsString.append(current.getmMeasure());\n ingredientsString.append(\" \");\n ingredientsString.append(current.getmQuantity());\n ingredientsString.append(\" \");\n ingredientsString.append(current.getmName());\n ingredientsString.append(\"\\n\");\n }\n views.setTextViewText(R.id.widget_ingredients_list,ingredientsString);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }", "public static RemoteViews buildUpdate(Context context, int photoCount) {\n\t\tRemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);\n\t\t\n\t\tremoteViews.setTextViewText(R.id.widget_textview_flickr, String.valueOf(photoCount) );\n\t\t\n\t\treturn remoteViews;\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Log.d(TAG,\"onCreate\");\n setContentView(R.layout.main);\n app = (SignalFinderApp) getApplication();\n mainText = (TextView) findViewById(R.id.main_text);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n\n for (int appWidgetId : appWidgetIds) {\n views = new RemoteViews(context.getPackageName(), R.layout.mywidget);\n //views.setProgressBar(R.id.progress_bar2, 100,0,true);\n updateAppWidget(context, appWidgetManager, appWidgetId);\n appWidgetManager2=appWidgetManager;\n contextt=context;\n appWidgetId2=appWidgetId;\n SetAlarm(context,1,mywidget.class);\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n }", "private void setInfo(String info) {\n// TextView textView = (TextView) findViewById(R.id.info);\n// textView.setText(info);\n }", "private void initVar() {\n tvHello.setText(stringFromJNI());\n }", "public native String editTextFromJNI(String str);", "public int onCreateContentView() {\n return R.layout.activity_network_diagnostics;\n }", "@Override\n public void onClick(View v) {\n if (tvHello.getText().equals(getText(R.string.helloWorld)))\n {\n tvHello.setText(R.string.agur);\n }\n\n else\n {\n tvHello.setText(R.string.helloWorld);\n }\n }", "void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.yotacast);\n\n // Start/Stop\n PendingIntent pendingIntent;\n Intent intent = new Intent(context, MainActivity.class);\n intent.setAction(ACTION_UPDATE_CLICK);\n pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.buttonPlay, pendingIntent);\n\n // PREV\n PendingIntent pendingIntentPrev;\n Intent intentPrev = new Intent(context, MainActivity.class);\n intentPrev.setAction(ACTION_PREV_CLICK);\n pendingIntentPrev = PendingIntent.getActivity(context, 0, intentPrev, 0);\n views.setOnClickPendingIntent(R.id.buttonPrev, pendingIntentPrev);\n\n // FWD\n PendingIntent pendingIntentFwd;\n Intent intentFwd = new Intent(context, MainActivity.class);\n intentFwd.setAction(ACTION_FWD_CLICK);\n pendingIntentFwd = PendingIntent.getActivity(context, 0, intentFwd, 0);\n views.setOnClickPendingIntent(R.id.buttonFwd, pendingIntentFwd);\n\n // BACK\n PendingIntent pendingIntentBack;\n Intent intentBack = new Intent(context, MainActivity.class);\n intentBack.setAction(ACTION_BACK_CLICK);\n pendingIntentBack = PendingIntent.getActivity(context, 0, intentBack, 0);\n views.setOnClickPendingIntent(R.id.buttonBack, pendingIntentBack);\n\n\n // Toggle alert\n PendingIntent pendingIntentAlarm;\n Intent intentAlarm = new Intent(context, MainActivity.class);\n intentAlarm.setAction(ACTION_ALARM_CLICK);\n pendingIntentAlarm = PendingIntent.getActivity(context, 0, intentAlarm, 0);\n views.setOnClickPendingIntent(R.id.alarm, pendingIntentAlarm);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }", "private void init(Context context, AttributeSet attrs, int defStyleAttr) {\n LayoutInflater.from(context).inflate(R.layout.empty_placeholder, this, true);\n ButterKnife.bind(this);\n\n final TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.EmptyPlaceholderView, defStyleAttr, 0);\n if (typedArray != null) {\n\n initialText = typedArray.getText(R.styleable.EmptyPlaceholderView_initialText);\n noSearchResultsText = typedArray.getText(R.styleable.EmptyPlaceholderView_noSearchResultsText);\n\n textView.setText(initialText);\n\n Drawable drawable = typedArray.getDrawable(R.styleable.EmptyPlaceholderView_android_src);\n setDrawableTop(drawable);\n\n typedArray.recycle();\n }\n }", "static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.api_news_stand_widget);\n\n Intent intent = new Intent(context, WidgetService.class);\n\n String categoryValue = ApiNewsStandWidgetConfigureActivity.loadCategoryPref(context, appWidgetId);\n String sortByValue = ApiNewsStandWidgetConfigureActivity.loadSortByPref(context, appWidgetId);\n\n intent.putExtra(context.getString(R.string.category), categoryValue);\n intent.putExtra(context.getString(R.string.sortBy), sortByValue);\n\n intent.setData(Uri.fromParts(\"content\", String.valueOf(appWidgetId), null));\n\n views.setRemoteAdapter(R.id.widget_listView, intent);\n views.setTextViewText(R.id.Category, categoryValue);\n views.setTextViewText(R.id.SortBy, sortByValue);\n\n Intent appIntent = new Intent(context, WebViewActivity.class);\n PendingIntent appPendingIntent = PendingIntent.getActivity(context, 0,\n appIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n views.setPendingIntentTemplate(R.id.widget_listView, appPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setText(\"Android is AWESOME!!\");\n }", "@Override\n\tprotected void initContentView() {\n\t\t\n\t}", "@Override\n\tpublic void widgetClick(View v) {\n\n\t}", "private void findViews() {\n\n serverText = (TextView) findViewById(R.id.txt_server_ip);\n portText = (TextView) findViewById(R.id.txt_port);\n startServerButton = (Button) findViewById(R.id.btnStartServer);\n stopServerButton = (Button) findViewById(R.id.btnStopSerer);\n messageButton = (Button) findViewById(R.id.btnMessage);\n clientList = (TextView) findViewById(R.id.textClientList);\n getListButton = (Button) findViewById(R.id.btnGetList);\n messageText = (TextView) findViewById(R.id.textClientMessage);\n startScreenShareButton = (Button) findViewById(R.id.btnStartScreenShare);\n stopScreenShareButton = (Button) findViewById(R.id.btnStopScreenShare);\n\n\n /*** disable some startUp Button **/\n disableSomeButton();\n\n\n /** Get Client List From The Service **/\n getListButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n\n String clientListString = MainActivity.this.serverService.getClientList().toString();\n if (clientListString != null) {\n clientList.setText(clientListString);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n });\n\n messageButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n MainActivity.this.serverService.sendMessage(\" A Sample Text To Send .....\");\n }\n });\n\n\n /** Listen onclick event of StartScreenShare Button **/\n startScreenShareButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n startScreenShare();\n }\n\n\n });\n\n /** Listen onclick event of stop Screen Share Button **/\n stopScreenShareButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n stopScreenShare();\n }\n });\n\n\n }", "private View onRealCreateView(Context context, String name, AttributeSet attrs) {\n View view = null;\n try {\n if (-1 == name.indexOf('.')) {\n if (\"View\".equals(name)) {\n view = LayoutInflater.from(context).createView(name, \"android.view.\", attrs);\n }\n if (view == null) {\n view = LayoutInflater.from(context).createView(name, \"android.widget.\", attrs);\n }\n if (view == null) {\n view = LayoutInflater.from(context).createView(name, \"android.webkit.\", attrs);\n }\n } else {\n view = LayoutInflater.from(context).createView(name, null, attrs);\n }\n\n LogUtils.i(\"about to create \" + name);\n\n } catch (Exception e) {\n LogUtils.e(\"error while create 【\" + name + \"】 : \" + e.getMessage());\n view = null;\n }\n return view;\n }", "public static void text(final String sender, final String nachricht)\n {\n act.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n\n i=-i;\n String text=\"<br />\";\n text+=sender + \": \" + nachricht+\"\";\n RelativeLayout rel = new RelativeLayout(act.getApplicationContext());\n TextView textview=new TextView(act.getApplicationContext());\n textview.setTextSize(17);\n textview.setTextColor(Color.parseColor(\"#131313\"));\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);\n params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT,1);\n\n RelativeLayout.LayoutParams params2=params;\n params2.setMargins(5,5,5,0);\n rel.setLayoutParams(params2);\n textview.setWidth(layout.getWidth()/2);\n textview.setLayoutParams(params);\n textview.setId(chatid);\n if(sender.equals(name))\n {\n rel.setGravity(Gravity.RIGHT);\n if(i==1)\n {\n textview.setBackgroundResource(R.drawable.rounded_corner2);\n }\n else\n {\n textview.setBackgroundResource(R.drawable.rounded_corner);\n }\n }\n else\n {\n rel.setGravity(Gravity.LEFT);\n if(i==1)\n {\n textview.setBackgroundResource(R.drawable.rounded_corner2);\n }\n else\n {\n textview.setBackgroundResource(R.drawable.rounded_corner);\n }\n\n }\n textview.append(Html.fromHtml((text)));\n textview.append(Html.fromHtml((\"<br />\")));\n\n rel.addView(textview);\n layout.addView(rel);\n\n final ScrollView scroll = (ScrollView) vi.findViewById(R.id.chatscroll);\n scroll.post(new Runnable() {\n @Override\n public void run() {\n scroll.fullScroll(View.FOCUS_DOWN);\n }\n });\n\n chatid=chatid+1;\n }\n });\n\n }", "@Override\n public void setWidget(Object arg0)\n {\n \n }", "static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.baking_new_app_widget);\n\n int lastClickedMealIndex = Prefs.getsInstance(context).getLastClickedIngredient();\n\n if (lastClickedMealIndex < 0) {\n views.setViewVisibility(R.id.rl_empty_state, View.VISIBLE);\n views.setViewVisibility(R.id.ll_filled_state, View.GONE);\n\n //set pending intent on the empty state prompt\n views.setOnClickPendingIntent(R.id.tv_empty_state_prompt, getOpenMainActivityPendingIntent(context));\n } else {\n views.setViewVisibility(R.id.rl_empty_state, View.GONE);\n views.setViewVisibility(R.id.ll_filled_state, View.VISIBLE);\n\n //set header text\n views.setTextViewText(R.id.tv_widget_header, context.getString(R.string.widget_header_text, DataUtil.getMealNameAt(context, lastClickedMealIndex)));\n\n //set pending intent on the widget header\n views.setOnClickPendingIntent(R.id.tv_widget_header, getOpenMainActivityPendingIntent(context));\n\n //set up the ListView\n setupGridListView(views, context);\n }\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }", "void m18524a(Context context) {\n View inflate = ((LayoutInflater) context.getSystemService(\"layout_inflater\")).inflate(C4689R.layout.tw__media_badge, this, true);\n this.f16536a = (TextView) inflate.findViewById(C4689R.id.tw__video_duration);\n this.f16537b = (ImageView) inflate.findViewById(C4689R.id.tw__gif_badge);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n Intent intent = new Intent(context, AppWidgetService.class);\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.app_widget);\n views.setTextViewText(R.id.appwidget_text, Util.getAppWidgetRecipeNamePreference(context));\n views.setEmptyView(R.id.appwidget_ingredient_list, R.id.empty_view);\n views.setRemoteAdapter(appWidgetId, R.id.appwidget_ingredient_list, intent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n setText();\n }", "@Override\n\tpublic String getText(Object object) {\n\t\tString label = ((Widget)object).getElementFormName();\n\t\treturn label == null || label.length() == 0 ?\n\t\t\tgetString(\"_UI_Widget_type\") :\n\t\t\tgetString(\"_UI_Widget_type\") + \" \" + label;\n\t}", "public native String stringFromJNI(Activity activity, String data);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n TextView textView = new TextView(getActivity());\n textView.setText(R.string.hello_blank_fragment);\n return textView;\n }", "@Override\n\tpublic void onUpdate(Context context, AppWidgetManager appWidgetManager,\n\t\t\tint[] appWidgetIds) {\n\t\tIntent intent_mainactivity = new Intent(context, StartActivity.class);\n\t\tPendingIntent pendingintent_mainactivity = PendingIntent.getActivity(context, 0, intent_mainactivity, 0);\n\t\t\n\t\tComponentName componentName = new ComponentName(context, PlayWidget.class);\n\t\twidget_view = new RemoteViews(context.getPackageName(), R.layout.widget);\n\t\twidget_view.setOnClickPendingIntent(R.id.widget_imageView, pendingintent_mainactivity);\n\t\t\n\t\t\n\t\tif(!MainService.isPlay){\n\t\t\twidget_view.setOnClickPendingIntent(R.id.ic_media_play, \n\t\t\t\t\tPendingIntent.getBroadcast(context, 1, new Intent(MainService.NOTIFY_PLAY), 0));\n\t\t\twidget_view.setViewVisibility(R.id.ic_media_stop, View.GONE);\n\t\t\twidget_view.setViewVisibility(R.id.ic_media_play, View.VISIBLE);\n\t\t} else {\n\t\t\twidget_view.setOnClickPendingIntent(R.id.ic_media_stop, \n\t\t\t\t\tPendingIntent.getBroadcast(context, 1, new Intent(MainService.NOTIFY_STOP), 0));\n\t\t\twidget_view.setViewVisibility(R.id.ic_media_play, View.GONE);\n\t\t\twidget_view.setViewVisibility(R.id.ic_media_stop, View.VISIBLE);\n\t\t}\n\t\t\n\t\twidget_view.setOnClickPendingIntent(R.id.ic_media_next, \n\t\t\t\tPendingIntent.getBroadcast(context, 1, new Intent(MainService.NOTIFY_NEXT), 0));\n\t\twidget_view.setOnClickPendingIntent(R.id.ic_media_previous, \n\t\t\t\tPendingIntent.getBroadcast(context, 1, new Intent(MainService.NOTIFY_PRE), 0));\n\n\t\tIntent intent = new Intent(context, RemoteViewService.class);\n\t\tintent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds);\n\t\twidget_view.setRemoteAdapter(R.id.widget_listview, intent);\n\n\t\tintent.setAction(COLLECTION_VIEW_ACTION);\n\t\tintent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // 设置intent模板\n widget_view.setPendingIntentTemplate(R.id.widget_listview, pendingIntent);\n\n\t\tupdate(list.get(listitem));\n\n\t\tappWidgetManager.updateAppWidget(componentName, widget_view);\n\t\t\n\t}", "static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int requestedRecipe, int totalRecipes, int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.recipe_widget_provider);\n\n //Setup button intent\n Intent buttonIntent = new Intent(context, UpdateWidgetService.class);\n buttonIntent.putExtra(RECIPE_TAG, requestedRecipe);\n buttonIntent.setAction(UpdateWidgetService.ACTION_UPDATE_WIDGET);\n PendingIntent buttonPendingIntent = PendingIntent.getService(context, 0, buttonIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setOnClickPendingIntent(R.id.next_button_widget, buttonPendingIntent);\n\n //Setup the WidgetService intent to act as the adapter for the ListView\n Intent intent = new Intent(context, WidgetService.class);\n //Add the id of the recipe we want to display as a ListView\n intent.putExtra(WidgetService.REQUESTED_RECIPE, requestedRecipe);\n //Send off to have the Widget Service to create the adapter\n intent.putExtra(WidgetService.TOTAL_RECIPES, totalRecipes);\n views.setRemoteAdapter(R.id.widget_lv_steps, intent);\n\n //Set the RecipeDetails activity to launch when clicked\n Intent appLaunchIntent = new Intent(context, RecipeDetails.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0 , appLaunchIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setPendingIntentTemplate(R.id.widget_lv_steps, pendingIntent);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }", "public static RemoteViews getTimeView(Context context){\r\n\t\t\t\t //String path = \"http://news.yahoo.com/rss/sports/\";\r\n\t\t\t\t //String path = \"http://chinatimes.feedsportal.com/c/33012/f/537199/index.rss\";\r\n\t\t\t\t String path = \"http://rss.5286phone.com/5.xml\";\r\n\t\t\t /* ����getRss()ȡ�ý������List */\r\n\t\t\t\t//CharSequence ch=DateFormat.format(\"hh:mm:ss\", time.toMillis(false));\r\n\t\t\t getRss(path);\r\n\t\t\t \r\n\t\t\tRemoteViews views=new RemoteViews(context.getPackageName(), R.layout.newswidget);\r\n\t\t\t//time.setToNow();\r\n\t\t\t//ʱ���ʽ��\r\n\t\t \r\n\t\t\tString currentInfo1 = null;\r\n\t\t\tString currentInfo2 = null;\r\n\t\t\tString currentInfo3 = null;\r\n\t\t\tString currentlink1 = null;\r\n\t\t\tString currentlink2 = null;\r\n\t\t\tString currentlink3 = null;\r\n\t\t\tif(li!=null&&li.size()>0)\r\n\t\t\t{\t\r\n\t\t\t int i = new java.util.Random().nextInt(li.size()-4);\r\n\t\t\t //zdd eboda 20120714 \r\n\t\t\t // int i = new java.util.Random().nextInt(li.size()-4)+1;\r\n\t\t\t currentInfo1 = li.get(i).getTitle();\r\n\t\t\t currentInfo2 = li.get(i+1).getTitle();\r\n\t\t\t currentInfo3 = li.get(i+2).getTitle();\r\n\t\t\t /*zdd eboda 20120714 \r\n\t\t\t currentInfo1 = li.get(0).getTitle();\r\n\t\t\t currentInfo2 = li.get(i).getTitle();\r\n\t\t\t currentInfo3 = li.get(i+1).getTitle();\r\n\t\t\t */\r\n\t\t\t currentlink1 = li.get(i).getLink();\r\n\t\t\t currentlink2 = li.get(i+1).getLink();\r\n\t\t\t currentlink3 = li.get(i+2).getLink();\r\n\r\n\t\t\t Uri uri1 = Uri.parse(currentlink1);\r\n\t\t\t Intent intent1 = new Intent(Intent.ACTION_VIEW,uri1);\r\n\t\t PendingIntent pendingIntent1 = PendingIntent.getActivity(context, 0, intent1, 0);\r\n\t\t\t views.setOnClickPendingIntent(R.id.newstitle1, pendingIntent1);\r\n\t\t\t Uri uri2 = Uri.parse(currentlink2);\r\n\t\t\t Intent intent2 = new Intent(Intent.ACTION_VIEW,uri2);\r\n\t\t PendingIntent pendingIntent2 = PendingIntent.getActivity(context, 0, intent2, 0);\r\n\t\t\t views.setOnClickPendingIntent(R.id.newstitle2, pendingIntent2);\r\n\t\t\t Uri uri3 = Uri.parse(currentlink3);\r\n\t\t\t Intent intent3 = new Intent(Intent.ACTION_VIEW,uri3);\r\n\t\t PendingIntent pendingIntent3 = PendingIntent.getActivity(context, 0, intent3, 0);\r\n//\t\t\t views.setOnClickPendingIntent(R.id.newstitle1, pendingIntent1);\r\n//\t\t\t views.setOnClickPendingIntent(R.id.newstitle2, pendingIntent2);\r\n\t\t\t views.setOnClickPendingIntent(R.id.newstitle3, pendingIntent3);\r\n\t\t\t views.setTextViewText(R.id.newstitle1, currentInfo1);\r\n\t\t \t views.setTextViewText(R.id.newstitle2, currentInfo2);\r\n\t\t\t views.setTextViewText(R.id.newstitle3, currentInfo3);\r\n\t\t\t \r\n\t\t\t}\r\n\t\t\treturn views;\r\n\t\t}", "private void displayToast(CharSequence text){\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "public void updateText(String s){\n TextView articleText = (TextView) findViewById(R.id.article_text);\n articleText.setText(s);\n }", "public SurfaceView createRemoteUI(Context context, final int uid) {\n SurfaceView surfaceV = RtcEngine.CreateRendererView(context);\n mRtcEngine.setupRemoteVideo(new VideoCanvas(surfaceV, VideoCanvas.RENDER_MODE_HIDDEN, uid));\n surfaceV.layout(0, 0, 20, 10);\n return surfaceV;\n }", "static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, Recipe recipe, int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.recipe_app_widget);\n\n views.setTextViewText(R.id.recipe_name, context.getString(R.string.widget_recipe_name, recipe.getName()));\n\n Intent intent = new Intent(context, GridWidgetService.class);\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n Bundle bundle = new Bundle();\n bundle.putParcelable(EXTRA_RECIPE, recipe);\n intent.putExtra(BUNDLE, bundle);\n views.setRemoteAdapter(R.id.list_view_ingredients, intent);\n\n views.setEmptyView(R.id.list_view_ingredients, R.id.empty_view);\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }", "Observable<String> messageBodySenderTextViewText();", "static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = getGardenGridRemoteView(context, appWidgetId);\n views.setTextViewText(R.id.widget_title, String.format(context.getString(R.string.widget_recipe_title), getTitle(context, appWidgetId)));\n\n // broadcast to update widget id in RemoveViewFactory\n new RecipePreference().setWidgetToUpdateId(context, appWidgetId);\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.gv_widget);\n }", "private void setText(View view, String text) {\n\t\t((TextView) view.findViewById(android.R.id.text1)).setText(text);\n\t}", "protected abstract int getContentView();", "private TextView m25232e(Context context) {\n View textView = new TextView(context);\n context = new LayoutParams(-2, -2);\n context.addRule(12, -1);\n context.addRule(14, -1);\n context.setMargins(0, 0, 0, SizeUtil.dp5);\n textView.setPadding(SizeUtil.dp20, SizeUtil.dp5, SizeUtil.dp20, SizeUtil.dp5);\n textView.setLayoutParams(context);\n textView.setText(this.options.getAcceptButtonText());\n textView.setTextColor(this.options.getAcceptButtonTextColor());\n textView.setTypeface(null, 1);\n BitmapUtil.stateBackgroundDarkerByPercentage(textView, this.options.getAcceptButtonBackgroundColor(), 30);\n textView.setTextSize(2, 18.0f);\n textView.setOnClickListener(new C57457(this));\n return textView;\n }", "public void showApps(View v){\n }", "public interface FriendView {\n void updateUserInfoTextView(String info);\n}", "public java.lang.String getView() {\n return view;\n }", "public java.lang.String getView() {\n return view;\n }", "public java.lang.String getView() {\n return view;\n }", "@Override\n public void run() {\n if (mToast == null) {\n mToast = Toast.makeText(getApplicationContext(), text,\n Toast.LENGTH_SHORT);\n } else {\n mToast.setText(text);\n }\n mToast.show();\n }", "TextView getTagView();", "@Override\n protected void initView() {\n pushTxt = (TextView) findViewById(R.id.push_txt);\n pushActivity = (TextView)findViewById(R.id.push_activity);\n pushArticle = (TextView)findViewById(R.id.push_article);\n pushProduce = (TextView)findViewById(R.id.push_produce);\n\n\n pushTxt.setOnClickListener(this);\n pushActivity.setOnClickListener(this);\n pushArticle.setOnClickListener(this);\n pushProduce.setOnClickListener(this);\n }", "protected abstract void initContentView(View view);", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n views.setEmptyView(R.id.list , R.id.empty_view);\n\n }", "private void loadMessengerView(String recipeintUsername)\n {\n\n //create new intent\n Intent intent = new Intent(getContext(), MyIntentService.class);\n //set load messenger action (convo)\n intent.setAction(MyIntentService.LOAD_CONVO_ACTION);\n //add recipeint username to intent\n intent.putExtra(\"recipeintUsername\", recipeintUsername);\n //start the intent service\n getActivity().startService(intent);\n\n }", "public abstract JLabel createUserWidget(String userName, String host, String chatMessage);" ]
[ "0.6856903", "0.6499639", "0.618216", "0.6139441", "0.6127469", "0.60165924", "0.59022796", "0.5729261", "0.5718681", "0.5713844", "0.57053936", "0.56669563", "0.5609086", "0.5568787", "0.5550729", "0.554914", "0.5543816", "0.5487024", "0.54860026", "0.54767025", "0.54545194", "0.54465973", "0.54454994", "0.5437919", "0.539502", "0.5372464", "0.5372464", "0.53639394", "0.5348035", "0.5343816", "0.53415847", "0.53005373", "0.52956015", "0.52467257", "0.52439564", "0.5236354", "0.5217364", "0.5206559", "0.51983225", "0.5188449", "0.5182002", "0.51690286", "0.5162401", "0.516173", "0.51611", "0.51522", "0.51489884", "0.514422", "0.5129384", "0.5106306", "0.5105127", "0.510394", "0.5101009", "0.50992525", "0.50966966", "0.50963855", "0.50857437", "0.5063502", "0.50508773", "0.5048355", "0.5044404", "0.503905", "0.5038818", "0.5036705", "0.5029269", "0.5027535", "0.5026342", "0.50207686", "0.5017384", "0.5016736", "0.50143963", "0.50056446", "0.50032586", "0.4998446", "0.4984085", "0.49834207", "0.4982599", "0.49821815", "0.49788576", "0.49775898", "0.497172", "0.49691284", "0.49639547", "0.49626324", "0.4961286", "0.49609044", "0.49575153", "0.49526316", "0.49435714", "0.49409413", "0.49366856", "0.49362335", "0.49362335", "0.49362335", "0.49353755", "0.49341917", "0.49258316", "0.49255335", "0.49237648", "0.49231455", "0.49174362" ]
0.0
-1
There may be multiple widgets active, so update all of them
@RequiresApi(api = Build.VERSION_CODES.ICE_CREAM_SANDWICH) @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { for (int appWidgetId : appWidgetIds) { updateAppWidget(context, appWidgetManager, appWidgetId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateAllWidgets(){\n AppWidgetManager widgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = widgetManager.getAppWidgetIds(new ComponentName(this,EasyBakeWidget.class));\n for (int i: appWidgetIds){\n widgetManager.notifyAppWidgetViewDataChanged(i,R.id.widget_ingredients_list);\n EasyBakeWidget.updateAppWidget(this,widgetManager,i);\n }\n }", "public void update()\n {\n for (Container container : containers)\n container.update(false);\n\n Gui.update(BanksGUI.class);\n Gui.update(BankGUI.class);\n Gui.update(ItemsGroupsGUI.class);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager,\n int[] appWidgetIds)\n {\n // There may be multiple widgets active, so update all of them.\n for (int appWidgetId : appWidgetIds)\n {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tString state = _avTab.get( \"state\" ) ;\n\t\tif( state == null )\n\t\t\t_obsState.setText( \"Not in Active Database\" ) ;\n\t\telse\n\t\t\t_obsState.setText( state ) ;\n\n\t\tignoreActions = true ; // MFO\n\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\t\n\t\t// Set the priority\n\t\tint pri = obs.getPriority() ;\n\t\t_w.jComboBox1.setSelectedIndex( pri - 1 ) ;\n\n\t\t// Set whether or not this is a standard\n\t\t_w.standard.setSelected( obs.getIsStandard() ) ;\n\n\t\t// Added for OMP (MFO, 7 August 2001)\n\t\t_w.optional.setValue( obs.isOptional() ) ;\n\n\t\tint numberRemaining = obs.getNumberRemaining();\n\t\t_w.setRemainingCount(numberRemaining);\n\n\t\t_w.unSuspendCB.addActionListener( this ) ;\n\n\t\tignoreActions = false ;\n\n\t\t_w.estimatedTime.setText( OracUtilities.secsToHHMMSS( obs.getElapsedTime() , 1 ) ) ;\n\n\t\t_updateMsbDisplay() ;\n\t}", "void updateControls();", "public void updateAllButtons(){\n updateStartButton();\n updateResetButton();\n }", "protected void updateWidgets() {\n if (!isVisible()) {\n return;\n }\n if (myTopPanel != null) {\n // if we have a top panel, then we have a grid display there\n boolean gridOn = viewer.getGridVisible();\n GLGridPlane grid = viewer.getGrid();\n if ((myGridDisplay != null) != gridOn) {\n if (gridOn) {\n myGridDisplay =\n GridDisplay.createAndAdd (\n grid, myTopPanel, myGridDisplayIndex);\n }\n else {\n GridDisplay.removeAndDispose (\n myGridDisplay, myTopPanel, myGridDisplayIndex);\n myGridDisplay = null;\n }\n }\n if (myGridDisplay != null) {\n myGridDisplay.updateWidgets();\n }\n }\n }", "@Override\r\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\r\n// updateAppWidget(context, appWidgetManager, appWidgetId);\r\n }\r\n }", "private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }", "protected void updatePanelContent() {\n updating = true;\n jTextFieldName.setText(bulb.getName());\n jTextFieldName.setToolTipText(bulb.getType());\n jSlider1.setValue(bulb.getIntensity());\n jToggleButton1.setSelected(bulb.isOn());\n if (bulb.getColor() != null) {\n jRadioCold.setEnabled(true);\n jRadioNormal.setEnabled(true);\n jRadioWarm.setEnabled(true);\n switch(bulb.getColor()) {\n case TradfriConstants.COLOR_NORMAL: jRadioNormal.setSelected(true); break;\n case TradfriConstants.COLOR_WARM: jRadioWarm.setSelected(true); break;\n case TradfriConstants.COLOR_COLD: jRadioCold.setSelected(true); break;\n }\n }\n else {\n jRadioCold.setEnabled(false);\n jRadioNormal.setEnabled(false);\n jRadioWarm.setEnabled(false);\n }\n \n \n if (bulb.isOnline()) {\n jToggleButton1.setEnabled(true);\n jRadioCold.setEnabled(true);\n jRadioNormal.setEnabled(true);\n jRadioWarm.setEnabled(true);\n jSlider1.setEnabled(true);\n jLabelDates.setText(\"Installed: \"+bulb.getDateInstalled()+\" - Last seen: \"+bulb.getDateLastSeen()+\" - Firmware: \" + bulb.getFirmware() + \" [online]\");\n }\n else {\n jToggleButton1.setEnabled(false);\n jRadioCold.setEnabled(false);\n jRadioNormal.setEnabled(false);\n jRadioWarm.setEnabled(false);\n jSlider1.setEnabled(false);\n jLabelDates.setText(\"Installed: \"+bulb.getDateInstalled()+\" - Last seen: \"+bulb.getDateLastSeen()+\" - Firmware: \" + bulb.getFirmware() + \" [offline]\");\n }\n \n updating = false;\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n ComponentName watchWidget = new ComponentName(context, AbsenMainWidget.class);\n updateAppWidget(context, appWidgetManager, watchWidget);\n }", "@Override\r\n public void updateUI() {\r\n }", "private void updateGUIStatus() {\r\n\r\n }", "public void updateUI(){}", "public void updateWidgets() {\n int i;\n if (this.mTransitionHelper.isTransitioning()) {\n this.mTransitionHelper.pendingUpdateWidgets();\n return;\n }\n int i2 = 0;\n int selectedZen = getSelectedZen(0);\n boolean z = true;\n boolean z2 = selectedZen == 1;\n boolean z3 = selectedZen == 2;\n boolean z4 = selectedZen == 3;\n if ((!z2 || this.mPrefs.mConfirmedPriorityIntroduction) && ((!z3 || this.mPrefs.mConfirmedSilenceIntroduction) && (!z4 || this.mPrefs.mConfirmedAlarmIntroduction))) {\n z = false;\n }\n this.mZenButtons.setVisibility(this.mHidden ? 8 : 0);\n this.mZenIntroduction.setVisibility(z ? 0 : 8);\n if (z) {\n if (z2) {\n i = R$string.zen_priority_introduction;\n } else if (z4) {\n i = R$string.zen_alarms_introduction;\n } else if (this.mVoiceCapable) {\n i = R$string.zen_silence_introduction_voice;\n } else {\n i = R$string.zen_silence_introduction;\n }\n this.mConfigurableTexts.add(this.mZenIntroductionMessage, i);\n this.mConfigurableTexts.update();\n this.mZenIntroductionCustomize.setVisibility(z2 ? 0 : 8);\n }\n String computeAlarmWarningText = computeAlarmWarningText(z3);\n TextView textView = this.mZenAlarmWarning;\n if (computeAlarmWarningText == null) {\n i2 = 8;\n }\n textView.setVisibility(i2);\n this.mZenAlarmWarning.setText(computeAlarmWarningText);\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\r\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\r\n\r\n\r\n for (int appWidgetId : appWidgetIds) {\r\n updateAppWidget(context, appWidgetManager, appWidgetId, appWidgetIds);\r\n }\r\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n\n\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\n for (int i = 0; i < N; i++) {\n updateAppWidget(context, appWidgetManager, appWidgetIds[i], Color.MAGENTA);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\n for (int i = 0; i < N; i++)\n {\n updateAppWidget(context, appWidgetManager, appWidgetIds[i]);\n }\n }", "public void updateComponents(){\n adapter.updateItems();\n }", "private void updateButtonsState() {\r\n ISelection sel = mTableViewerPackages.getSelection();\r\n boolean hasSelection = sel != null && !sel.isEmpty();\r\n\r\n mUpdateButton.setEnabled(mTablePackages.getItemCount() > 0);\r\n mDeleteButton.setEnabled(hasSelection);\r\n mRefreshButton.setEnabled(true);\r\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\n for (int i=0; i<N; i++) {\n updateAppWidget(context, appWidgetManager, appWidgetIds[i]);\n }\n }", "protected void updateEnabled() {\n\t\tFieldGroup control = getUIControl();\n\t\tif (control != null) {\n\t\t\tCollection<? extends IRidget> ridgets = getRidgets();\n\t\t\tfor (IRidget ridget : ridgets) {\n\t\t\t\tridget.setEnabled(isEnabled());\n\t\t\t}\n\t\t\tcontrol.setEnabled(isEnabled());\n\t\t}\n\t}", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n\n for (int appWidgetId : appWidgetIds) {\n views = new RemoteViews(context.getPackageName(), R.layout.mywidget);\n //views.setProgressBar(R.id.progress_bar2, 100,0,true);\n updateAppWidget(context, appWidgetManager, appWidgetId);\n appWidgetManager2=appWidgetManager;\n contextt=context;\n appWidgetId2=appWidgetId;\n SetAlarm(context,1,mywidget.class);\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n }", "public void UpdateCommandsUI(){\n Button B;\n try{\n for (int i = 0; i < f.getNumComp(); i++) {\n B = (Button) findViewById(300000 + i); //Buy Button\n if(dayOpen & (p.getMoney()>0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(dayOpen & (p.getLevel()>= 4)){\n B.setEnabled(true);\n B.setTextColor(0xffff0000);\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n\n B = (Button) findViewById(400000 + i); //Sell Button\n if (dayOpen & (f.getSharesOwned(i) > 0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(p.getLevel()>=4 & !f.isShorted(i) & dayOpen){\n B.setEnabled(true);\n B.setTextColor(0xffff0000); //Red Color for short positions\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager,\n int[] appWidgetIds) {\n LogHelper.log(String.format(\"Widget ID Count:%d\", appWidgetIds.length));\n\n // loop through existing widgets\n for (int index = 0; index < appWidgetIds.length; index++) {\n int appWidgetId = appWidgetIds[index];\n LogHelper.log(String.format(\"Widget ID:%d\", appWidgetId));\n\n RemoteViews appWidgetViews = getWidgetRemoteViews(context, appWidgetId);\n appWidgetManager.updateAppWidget(appWidgetId, appWidgetViews);\n }\n\n }", "public void updateAnalogWindowChilds() {\r\n\t\tif (this.analogTabItem != null && !this.analogTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.analogTabItem.updateChilds();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.analogTabItem.updateChilds();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void handleActionUpdateDriverWidget() {\n\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager\n .getAppWidgetIds(new ComponentName(this, WidgetProvider_Driver.class));\n\n //Trigger data update to handle the ListView widgets and force a data refresh\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.widget_list_view_orders);\n\n //Now update all widgets\n WidgetProvider_Driver.updateDriverWidgets(this, appWidgetManager, appWidgetIds);\n\n\n }", "private void updateButtons() {\n\t\t SwingUtilities.invokeLater(new Runnable() {\n\t\t public void run() { \n\t\t botones[rowId1][columnId1].toggleOnOff();\n\t\t\t botones[rowId1][columnId1].setEnabled(true);\n\t\t\t \n\t\t\t botones[rowId2][columnId2].toggleOnOff();\n\t\t\t botones[rowId2][columnId2].setEnabled(true);\n\t\t\t \n\t\t\t setEnabled(true);\n\t\t\t \n\t\t timerPush.stop();\n\t\t }\n\t\t });\n\t }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n views.setEmptyView(R.id.list , R.id.empty_view);\n\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n// Log.d(\"로그\", \"위젯 onUpdate\");\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void update() {\n if ((mLikesDialog != null) && (mLikesDialog.isVisible())) {\n return;\n }\n\n if ((mCommentariesDialog != null) && (mCommentariesDialog.isVisible())) {\n return;\n }\n\n if (!getUserVisibleHint()) {\n return;\n }\n\n updateUI();\n }", "private void refreshControls() {\n\t// Scrollbars are upside-down from real sliders.\n\tint scrollValue = caeliScroll.getMaximum() - caeliScroll.getValue();\n\tcaeliValueLabel.setText( \"\"+(scrollValue / 100.0 ) );\n\tparent.setCaeliDensity( scrollValue / 100.0 );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = planetScroll.getMaximum() - planetScroll.getValue();\n\tplanetValueLabel.setText( \"\"+scrollValue );\n\tparent.setPlanetCount( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = triSizeScroll.getMaximum() - triSizeScroll.getValue()\n\t + triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue();\n\t \n\ttriSizeValueLabel.setText( \"\"+(triSizeScroll.getMaximum() - triSizeScroll.getValue()) );\n\ttriFineSizeValueLabel.setText( \"\"+(triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue()) );\n\tparent.setDustTrianglesThreshold( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tint strnScrollValue = attStrengthScroll.getMaximum() - attStrengthScroll.getValue();\n\tint distScrollValue = attDistanceScroll.getMaximum() - attDistanceScroll.getValue();\n\n\tattStrnValueLabel.setText( \"\"+strnScrollValue );\n\tattDistValueLabel.setText( \"\"+distScrollValue );\n\n\tparent.setAttraction( distScrollValue, strnScrollValue );\n\n\n\t// Refresh iPad display values\n\tosc.send( new OscMessage( \"/faders\", new Object[] { sliderFloatValue( caeliScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( planetScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triFineSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attDistanceScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attStrengthScroll ) } ),\n\t new NetAddress( ipadAddress, OSC_PORT_SEND ) );\n }", "public void update(){\n label = tag.getSelectedItemPosition() == 0 ? \"all\" : mLabel[tag.getSelectedItemPosition()];\n Refresh();\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n // Construct the RemoteViews object\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.app_widget_top3);\n\n //klikken op widget titel TextView opent de app\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.titelTextView, pendingIntent);\n\n //update de UI\n String[] taaknamen = new TakenlijstDB(context).getWidgetTaken(3);\n views.setTextViewText(R.id.taak1TextView,\n taaknamen[0] == null ? \"\" : taaknamen[0]);\n views.setTextViewText(R.id.taak2TextView,\n taaknamen[1] == null ? \"\" : taaknamen[1]);\n views.setTextViewText(R.id.taak3TextView,\n taaknamen[2] == null ? \"\" : taaknamen[2]);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n Log.e(TAG, \"onUpdate action\");\n }", "private void updateWidgets(ShoppingList list) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,\n ShoppingListWidgetProvider.class));\n ShoppingListWidgetProvider.updateAppWidgets(this, appWidgetManager, list, appWidgetIds);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n IDList = appWidgetIds;\n for (int appWidgetId : appWidgetIds) {\n\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "public void updateView()\n {\n int selectionCount = selection.getElementSelectionCount();\n\n // If only one item selected, enable & update the\n // text boxes and pull downs with values.\n if (selectionCount == 1) {\n // preserve selected state if a whole text field is selected\n Text text = WindowUtil.getFocusedText();\n boolean restoreSel = false;\n if ((text != null) &&\n (text.getSelectionCount() == text.getCharCount()))\n {\n restoreSel = true;\n }\n\n // get the selected item\n Iterator<FrameElement> iter =\n selection.getSelectedElementsIterator();\n\n // For each selected object, which there is only one.\n FrameElement elt = iter.next();\n\n if (elt instanceof IWidget) {\n IWidget widget = (IWidget) elt;\n\n view.useParameters(FrameEditorView.USE_SINGLE_SELECT);\n view.updateWidgetProperties(widget);\n }\n else if (elt instanceof FrameElementGroup) {\n FrameElementGroup eltGroup = (FrameElementGroup) elt;\n\n view.useParameters(FrameEditorView.USE_GROUP_SELECT);\n view.updateEltGroupProperties(eltGroup);\n }\n\n // Restore the selection state\n if (restoreSel) {\n text.selectAll();\n }\n }\n else if (selectionCount > 1) {\n // TODO: on multi selection, some values are left enabled\n // We need to set these to something or disable them.\n view.useParameters(FrameEditorView.USE_MULTI_SELECT);\n }\n else {\n view.useParameters(FrameEditorView.USE_NONE);\n view.updateFrameProperties(frame, false);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n // There may be multiple widgets active, so update all of them\n // Play around with the passed parameters to see how it affects the widget\n Log.d(\"TEMPLETE_Widget\", \"Widget onUpdate Received\");\n update(context,isLightMode(context));\n }", "private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "private void handleActionUpdateBakingWidgets(){\n AppDatabase myDatabase = RecipeRoomSingleton.getInstance(this);\n //If it's empty, forget it.\n if(myDatabase.daoAccess().getAll().isEmpty())return;\n //Get the items\n ArrayList<Ingredient> ingredients = (myDatabase.daoAccess().getAll()).get(0).getIngredients();\n //Get the WidgetManager\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n //Get the widget IDs\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this, BakingWidget.class));\n //Notify the manager that the data has changed for the listview\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.appwidget_listview);\n\n //Update the appwidget\n BakingWidget.updateAppWidget(this, appWidgetIds, appWidgetManager, ingredients);\n }", "private void UpdateChecboxes()\r\n\t{\n\t\tfor (Iterator<CheckBox> iterator = this.CBlist.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\t// for the next CheckBox\r\n\t\t\tCheckBox currChBox = iterator.next();\r\n\t\t\t\r\n\t\t\t// if the matching tag is true - \r\n\t\t\tif (this.hmTags.get(currChBox.getText()) == true)\r\n\t\t\t{\r\n\t\t\t\t// Check it\r\n\t\t\t\tcurrChBox.setChecked(true);\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "private void updateSubModeSpinnerTexts() {\n\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n\n startServiceToDisplayList(appWidgetId, context);\n\n handleRemoteViewClick(context);\n\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n\n //setup the intent such that it calls the service to populate the widget views\n Intent intent = new Intent(context, BucketListWidgetService.class);\n\n //add the app widget ID to the intent extras.\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n\n //instantiate the RemoteViews object for the app widget layout\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.bucketlist_widget);\n //setup the adapter such that it populates the data\n rv.setRemoteAdapter(R.id.widget_listview, intent);\n //if there are no items in the bucket list, display this empty view\n rv.setEmptyView(R.id.widget_listview, R.id.empty_view);\n\n //setup onclick actions for the listview and empty view\n final Intent onClickIntent = new Intent(context, BucketListWidgetProvider.class);\n onClickIntent.setAction(BucketListWidgetProvider.CLICK_ACTION);\n onClickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n onClickIntent.setData(Uri.parse(onClickIntent.toUri(Intent.URI_INTENT_SCHEME)));\n final PendingIntent onClickPendingIntent = PendingIntent.getBroadcast(context, 0, onClickIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);\n rv.setOnClickPendingIntent(R.id.empty_view, onClickPendingIntent);\n rv.setPendingIntentTemplate(R.id.widget_listview, onClickPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, rv);\n }\n\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n PlaybackService.startServiceToUpdateWidgets(context);\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n Intent intent = new Intent(context, AppWidgetService.class);\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.app_widget);\n views.setTextViewText(R.id.appwidget_text, Util.getAppWidgetRecipeNamePreference(context));\n views.setEmptyView(R.id.appwidget_ingredient_list, R.id.empty_view);\n views.setRemoteAdapter(appWidgetId, R.id.appwidget_ingredient_list, intent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}", "private void updatePanels() // updatePanels method start\n\t{\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tlogOutput.setText(log.logReport());\n\t\tATBOutput.setText(log.adjustedTrialBalance());\n\t\tISOutput.setText(log.incomeStatement());\n\t\tRESOutput.setText(log.retainedEarningsStatement());\n\t\tBSOutput.setText(log.balanceSheet());\n\t}", "public void updateWidgetFor(String name) {\n }", "private void onUpdate(Context context) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance\n (context);\n\n // Uses getClass().getName() rather than MyWidget.class.getName() for\n // portability into any App Widget Provider Class\n ComponentName thisAppWidgetComponentName =\n new ComponentName(context.getPackageName(), getClass().getName()\n );\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(thisAppWidgetComponentName);\n onUpdate(context, appWidgetManager, appWidgetIds);\n }", "@Override\n\tpublic void onUpdate(Context ctxt, AppWidgetManager appWidgetManager,\n\t\t\tint[] appWidgetIds) {\n\t\t Log.w(LOG_TAG, \"onUpdate method called\");\n\t\t/* // Get all ids\n\t\t ComponentName thisWidget = new ComponentName(context,\n\t\t TaskWidget.class);\n\t\t int[] allWidgetIds = appWidgetManager.getAppWidgetIds(thisWidget);\n\n\t\t // Build the intent to call the service\n\t\t Intent intent = new Intent(context.getApplicationContext(),\n\t\t UpdateWidgetService.class);\n\t\t intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, allWidgetIds);\n\n\t\t // Update the widgets via the service\n\t\t context.startService(intent);*/\n for (int i=0; i<appWidgetIds.length; i++) {\n Intent svcIntent=new Intent(ctxt, WidgetService.class);\n\n svcIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]);\n svcIntent.setData(Uri.parse(svcIntent.toUri(Intent.URI_INTENT_SCHEME)));\n\n RemoteViews widget=new RemoteViews(ctxt.getPackageName(),\n R.layout.main);\n\n widget.setRemoteAdapter(appWidgetIds[i], R.id.widgetLV,\n svcIntent);\n\n Intent clickIntent=new Intent(ctxt, EditActivity.class);\n PendingIntent clickPI=PendingIntent\n .getActivity(ctxt, 0,\n clickIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n// widget.setPendingIntentTemplate(R.id.widgetLV, clickPI);\n widget.setOnClickPendingIntent(R.id.button, clickPI);\n appWidgetManager.updateAppWidget(appWidgetIds[i], widget);\n }\n\t}", "public void update(){\n\t\tthis.setVisible(true);\n\t}", "public void updateWindowsForAnimator() {\n forAllWindows(this.mUpdateWindowsForAnimator, true);\n }", "@Override\r\n\tpublic void update() {\r\n\t\t// get the first element and set the values according to its\r\n\t\t// information\r\n\t\tIqmDataBox iqmDataBox = (IqmDataBox) this.workPackage.getSources().get(0);\r\n\t\tPlanarImage pi = iqmDataBox.getImage();\r\n\r\n\t\tjFormattedTextFieldOldWidth.setValue(pi.getWidth());\r\n\t\tjFormattedTextFieldOldHeight.setValue(pi.getHeight());\r\n\r\n\t\tint left = ((Number) jSpinnerLeft.getValue()).intValue();\r\n\t\tint right = ((Number) jSpinnerRight.getValue()).intValue();\r\n\t\tint top = ((Number) jSpinnerTop.getValue()).intValue();\r\n\t\tint bottom = ((Number) jSpinnerBottom.getValue()).intValue();\r\n\r\n\t\t// Set image dependent initial values;\r\n\t\tjSpinnerNewWidth.removeChangeListener(this);\r\n\t\tjSpinnerNewWidth.setValue(pi.getWidth() + left + right);\r\n\t\tjSpinnerNewWidth.addChangeListener(this);\r\n\t\tjSpinnerNewHeight.removeChangeListener(this);\r\n\t\tjSpinnerNewHeight.setValue(pi.getHeight() + top + bottom);\r\n\t\tjSpinnerNewHeight.addChangeListener(this);\r\n\t\t\r\n\t\tif (buttConst.isSelected()){\r\n\t\t\ttbConst.setTitleColor(Color.BLACK);\r\n\t\t\tjLabelConst.setEnabled(true);\r\n\t\t\tjSpinnerConst.setEnabled(true);\r\n\t\t} else {\r\n\t\t\ttbConst.setTitleColor(Color.GRAY);\r\n\t\t\tjLabelConst.setEnabled(false);\r\n\t\t\tjSpinnerConst.setEnabled(false);\r\n\t\t}\r\n\t\tthis.repaint(); //because of tb TitledBorder cahnge of color\r\n\t\t\r\n\r\n\t\tthis.updateParameterBlock();\r\n\t\tthis.setParameterValuesToGUI();\r\n\t}", "public void update() {\n\tfireContentsChanged(this, 0, getSize());\n }", "@Override\r\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\r\n for (int i=0; i<N; i++) {\r\n updateAppWidget(context, appWidgetManager, appWidgetIds[i]);\r\n /*\r\n * Press the widget, send an broadcast to the broadcast receiver;\r\n * call onReceive() of the receiver.\r\n */\r\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.rotation_switcher);// get RemoteViews from xml file.\r\n Intent intent = new Intent(context, AutoSwitcherBroadcastReceiver.class); // MyReceiver.class is the receiver.\r\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context,0,intent,0);\r\n views.setOnClickPendingIntent(R.id.myImageView, pendingIntent); // similar to setOnClickListener()\r\n appWidgetManager.updateAppWidget(appWidgetIds, views);\r\n }\r\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n mContext = context;\n for (int appWidgetId : appWidgetIds) {\n\n\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.my_stocks);\n Intent widgetIntent = new Intent(context, MyStocksActivity.class);\n PendingIntent pi = PendingIntent.getActivity(context, 0, widgetIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setPendingIntentTemplate(R.id.listView, pi);\n\n\n Intent i = new Intent(context, WidgetService.class);\n i.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n i.setData(Uri.parse(i.toUri(Intent.URI_INTENT_SCHEME)));\n views.setRemoteAdapter(R.id.listView, i);\n\n\n views.setEmptyView(R.id.listView, R.id.emptyList);\n\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }", "public void updateUi() {\n\t\t// // update the car color to reflect premium status or lack thereof\n\t\t// ((ImageView)findViewById(R.id.free_or_premium)).setImageResource(mIsPremium\n\t\t// ? R.drawable.premium : R.drawable.free);\n\t\t//\n\t\t// // \"Upgrade\" button is only visible if the user is not premium\n\t\t// findViewById(R.id.upgrade_button).setVisibility(mIsPremium ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // \"Get infinite gas\" button is only visible if the user is not\n\t\t// subscribed yet\n\t\t// findViewById(R.id.infinite_gas_button).setVisibility(mSubscribedToInfiniteGas\n\t\t// ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // update gas gauge to reflect tank status\n\t\t// if (mSubscribedToInfiniteGas) {\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(R.drawable.gas_inf);\n\t\t// }\n\t\t// else {\n\t\t// int index = mTank >= TANK_RES_IDS.length ? TANK_RES_IDS.length - 1 :\n\t\t// mTank;\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(TANK_RES_IDS[index]);\n\t\t// }\n\t}", "@Override\n public void update() {\n this.blnDoUpdate.set(true);\n }", "private void refresh(int width, int height) {\n Integer numUnexposed = mainField.numUnexposed();\n nonminesLabel.setText(numUnexposed.toString());\n Integer numMarked = mainField.numMarked();\n if (numMarked < 0) {\n cellsUnmarked.setText(\"Too Many Marked!\");\n }\n else {\n cellsUnmarked.setText(numMarked.toString());\n }\n // iterate through all the buttons and update the text if it's an exposed cell\n for (int i = 0;i < width;i++) {\n for (int j = 0;j < height;j++) {\n int cellState = mainField.getCellState(i,j);\n if (cellState == mainField.EXPOSED) {\n Integer numValue = mainField.getValue(i,j);\n if (numValue == -1) {\n btArray[i][j].setText(\"B\");\n btArray[i][j].setStyle(\"-fx-background-color: #FF0000;\");\n }\n else if (numValue == 0) {\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n else {\n btArray[i][j].setText(numValue.toString());\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n }\n }\n }\n }", "protected void notifyDirty() {\n Event evt = new Event();\n evt.item = this;\n evt.widget = this;\n SelectionEvent event = new SelectionEvent(evt);\n for (SelectionListener listener : dirtyListener) {\n listener.widgetSelected(event);\n }\n }", "@Override\n\tpublic void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n\t\tfor (int appWidgetId : appWidgetIds) {\n\t\t\tupdateAppWidget(context, appWidgetManager, appWidgetId);\n\t\t}\n\t\tsuper.onUpdate(context, appWidgetManager, appWidgetIds);\n\t}", "public void updateAnalogWindow() {\r\n\t\tif (this.analogTabItem != null && !this.analogTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.analogTabItem.update(true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.analogTabItem.update(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void updateUI() {\n updateTrackDetails();\n //Disable Prev or Next or both button based on the current Index and number of tracks available\n if (mPlayingIndex == 0) {\n mPlayPrevBtn.setClickable(false);\n }\n if (mPlayingIndex == mTracks.size() - 1) {\n mPlayNextBtn.setClickable(false);\n }\n if (mPlayingIndex > 0 && mPlayingIndex < mTracks.size() - 1) {\n mPlayNextBtn.setClickable(true);\n mPlayPrevBtn.setClickable(true);\n }\n }", "private void updateControls() {\n updateBadge();\n etExtUsrId.setEnabled(isPushRegistrationAvailable() && !isUserPersonalizedWithExternalUserId());\n btnPersonalize.setEnabled(!isUserPersonalizedWithExternalUserId());\n btnDepersonalize.setEnabled(isUserPersonalizedWithExternalUserId());\n btnToInbox.setEnabled(isUserPersonalizedWithExternalUserId());\n }", "public void update(){\r\n\t\tupdateTurnLabel();\r\n\t\tupdateCanvas();\r\n\t}", "@Override\r\n\tpublic void updateUpdateableElements(double deltaTime) {\n\t\tfor (int i = 0; i < buttons.length; i++) {\r\n\t\t\tbuttons[i].updateUpdateableElements(deltaTime);\r\n\t\t}\r\n\t\t\r\n\t\t// Update screen\r\n\t\tfor (int i = 0; i < screens.length; i++) {\r\n\t\t\tscreens[i].updateUpdateableElements(deltaTime);\r\n\t\t}\r\n\t\t\r\n\t}", "public void refreshPanelComponents() {\r\n }", "public void update() {\r\n\r\n // update attributes\r\n finishIcon.setColored(isDirty());\r\n cancelIcon.setColored(isDirty());\r\n finishButton.repaint();\r\n cancelButton.repaint();\r\n\r\n }", "private void updateUI() {\n mLatestFeedsAdapter.notifyDataSetChanged();\n }", "public void update()\n\t{\n\t\tJPanel panel = getPanel();\n\n\t\tif (panel instanceof StylePanel)\n\t\t\t((StylePanel) panel).updatePanel();\n\t}", "public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n // Create an Intent to refresh\n Intent refreshIntent = new Intent(context, WidgetProvider.class);\n refreshIntent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);\n refreshIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[]{appWidgetId});\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, refreshIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Get the layout for the App Widget\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);\n views.setOnClickPendingIntent(R.id.rootView, pendingIntent);\n\n randomNumber = (int) (Math.random() * 100);\n Intent serviceIntent = new Intent(context, WidgetRemoteViewsService.class);\n serviceIntent.setData(Uri.fromParts(\"content\", String.valueOf(appWidgetId + randomNumber), null));\n views.setRemoteAdapter(R.id.listView, serviceIntent);\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }", "private void updateButtons() {\n\t\tif(buttonCount>1){\n\t\t\tremoveTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\tremoveTableButton.setEnabled(false);\n\t\t}\n\t\tif(buttonCount<tablesX.length){\n\t\t\taddTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\taddTableButton.setEnabled(false);\n\t\t}\n\t}", "private void updateGUI() {\n\t\tsfrDlg.readSFRTableFromCPU();\n\t\tsourceCodeDlg.updateRowSelection(cpu.PC);\n\t\tsourceCodeDlg.getCyclesLabel().setText(\"Cycles count : \" + cpu.getCyclesCount());\n\t\tdataMemDlg.fillDataMemory();\n\t\t//ioPortsDlg.fillIOPorts();\t\t\n\t\tIterator iter = seg7DlgList.iterator();\n\t\twhile(iter.hasNext())\n\t\t\t((GUI_7SegDisplay)iter.next()).drawSeg();\n\t}", "@Override\r\n\tpublic void drawUpdateableElements(Graphics g, ImageObserver observer) {\n\t\tfor (int i = 0; i < buttons.length; i++) {\r\n\t\t\tbuttons[i].drawUpdateableElements(g, observer);\r\n\t\t}\r\n\t\t\r\n\t\t// draw selected screen updateable\r\n\t\tthis.screens[this.selectedIndex].drawUpdateableElements(g, observer);\r\n\t}", "private void updateDialog() {\n for (int i = 0; i < NUMBER_OF_CARD_BACKGROUNDS; i++) {\n linearLayoutsBackgrounds[i].setBackgroundResource(i == selectedBackground ? R.drawable.settings_highlight : typedValue.resourceId);\n }\n\n for (int i = 0; i < NUMBER_OF_CARD_BACKGROUNDS; i++) {\n imageViews[i].setImageBitmap(bitmaps.getCardBack(i, selectedBackgroundColor));\n }\n\n for (int i = 0; i < 4; i++) {\n linearLayoutsColors[i].setBackgroundResource(i == selectedBackgroundColor ? R.drawable.settings_highlight : typedValue.resourceId);\n }\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n Recipe recipe = RecipeAppWidgetConfigure.loadRecipe(context, appWidgetId);\n if (recipe != null) {\n updateAppWidget(context, appWidgetManager, recipe, appWidgetId);\n }\n }\n }", "public void updateDisplay()\r\n {\r\n boardpanel.removeAll();\r\n for(int i = 0; i < 3; i++)\r\n {\r\n for(int j = 0; j < 3; j++)\r\n {\r\n if(buttons[i][j].getText().charAt(0) == ' ') {\r\n buttons[i][j].setEnabled(true);\r\n }\r\n else\r\n {\r\n buttons[i][j].setEnabled(false);\r\n }\r\n boardpanel.add(buttons[i][j]);\r\n }\r\n }\r\n }", "private void notifyWidget() {\n if (getActivity() != null) {\n ComponentName widget = new ComponentName(getActivity().getApplication(),\n RecipeWidgetProvider.class);\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());\n int[] ids = appWidgetManager.getAppWidgetIds(widget);\n appWidgetManager.notifyAppWidgetViewDataChanged(ids, R.id.widget_list);\n RecipeWidgetProvider widgetProvider = new RecipeWidgetProvider();\n widgetProvider.updateWidget(getActivity().getApplication(), ids);\n }\n }", "private void updateAll() {\n updateAction();\n updateQueryViews();\n }", "private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n btnBTScan.setText(R.string.btn_bt_devices_scan_text);\n tglBTToggle.setChecked(btAdapter.isEnabled());\n\n // remove all found (if any) devices when BT is disabled\n if (!btAdapter.isEnabled())\n lvAdapter.clear();\n\n if (lvAdapter.getCount() > 0)\n tvHeader.setText(R.string.tv_bt_devices_header_text_devices_found);\n else\n tvHeader.setText(R.string.tv_bt_devices_header_text_no_devices);\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - finish\");\n }", "@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n Intent buttonIntent = new Intent(context, PassiveJammerService.class);\n buttonIntent.setAction(ACTION_WIDGET_PASSIVE);\n PendingIntent pendingButtonIntent = PendingIntent.getService(context, 0, buttonIntent, 0);\n\n // wrap the whole widget layout in a view to capture button and text touch\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.passive_control_widget);\n views.setOnClickPendingIntent(R.id.passive_control_button, pendingButtonIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n //TODO check and start the Passive service to account for Android 11\n // can't create widget on screen if service already running...\n Log.d(\"PS_WIDGET\", \"press the button and update!\");\n\n /*\n Intent mainIntent = new Intent(context, MainActivity.class);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(mainIntent);\n */\n\n\n ActivityManager manager = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE);\n assert manager != null;\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (PassiveJammerService.class.getName().equals(service.service.getClassName())) {\n Toast.makeText(context, \"service already running\", Toast.LENGTH_SHORT).show();\n Log.d(\"PS_WIDGET\", \"service running\");\n }\n else {\n // Sam4 said service NOT started when it was, still worked though\n Toast.makeText(context, \"service NOT started\", Toast.LENGTH_SHORT).show();\n Log.d(\"PS_WIDGET\", \"service NOT running\");\n }\n }\n }\n }", "private void updatePanel() {\n\t\tProbeUtilities.updateModelProbePanel();\n\t}", "private void updateUI() {\n Bite bite = BiteLab.get(getActivity()).getBite(mBiteId);\n\n mPlacementTextView.setText(bite.getPlacement());\n\n Calendar c = bite.getCalendar();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH)+1;\n int day = c.get(Calendar.DAY_OF_MONTH);\n mDateTextView.setText(getString(R.string.show_date, day, month, year));\n\n mDaysSinceBiteTextView.setText(getString(R.string.days_since_bite\n , bite.getDaysSinceBite()));\n\n mStageTextView.setText(getString(R.string.show_stage, bite.getStage()));\n }", "public void updateDigitalWindowChilds() {\r\n\t\tif (this.digitalTabItem != null && !this.digitalTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.digitalTabItem.updateChilds();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.digitalTabItem.updateChilds();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.76561457", "0.7298138", "0.7140186", "0.71352535", "0.67506766", "0.6716224", "0.66729766", "0.65437967", "0.6530934", "0.65150374", "0.65097463", "0.6495792", "0.648777", "0.6483269", "0.6458042", "0.6447979", "0.6447979", "0.6447979", "0.6443288", "0.64250934", "0.6410868", "0.6406302", "0.6387792", "0.63804966", "0.6376122", "0.635045", "0.63410676", "0.63313794", "0.6325474", "0.631866", "0.6313181", "0.62926215", "0.6286651", "0.6274762", "0.62545764", "0.62545764", "0.62545764", "0.62545764", "0.62545764", "0.62545764", "0.62545764", "0.62545764", "0.6251965", "0.62394565", "0.62298566", "0.6226495", "0.6224488", "0.6224488", "0.6222542", "0.62183094", "0.6206254", "0.62052345", "0.6199861", "0.6196555", "0.6194621", "0.61809546", "0.6170463", "0.61568546", "0.6148791", "0.61380744", "0.6113184", "0.6107088", "0.6105878", "0.6103863", "0.6088337", "0.60759497", "0.6075395", "0.6066497", "0.6062901", "0.6061681", "0.6052908", "0.6046819", "0.6045781", "0.6040337", "0.6035654", "0.60229784", "0.6018667", "0.600483", "0.60035104", "0.59898967", "0.59832287", "0.59687746", "0.59671986", "0.5966608", "0.5958609", "0.5953635", "0.59471154", "0.5938072", "0.59377015", "0.59311485", "0.58985955", "0.5895729", "0.5893121", "0.5892958", "0.58922815", "0.5879287", "0.58781326", "0.5861431", "0.58519113", "0.58515835", "0.5846957" ]
0.0
-1
Enter relevant functionality for when the first widget is created
@Override public void onEnabled(Context context) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onEnabled(Context context) {\n // Enter relevant functionality for when the first widget is created\n }", "public abstract Widget onInitialize();", "public abstract void initUiAndListener();", "private void initUI() {\n }", "private void initUI() {\n tvQuote = (TextView) findViewById(R.id.tvQuote);\n tvBeginButton = (TextView) findViewById(R.id.tvBeginButton);\n\n tvBeginButton.setOnClickListener(this);\n\n loadBackground();\n }", "@Override\n protected void windowInit ()\n {\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "private void dynInit()\r\n\t{\t\t\r\n\t\t//\tInfo\r\n\t\tstatusBar.setStatusLine(Msg.getMsg(Env.getCtx(), \"InOutGenerateSel\"));//@@\r\n\t\tstatusBar.setStatusDB(\" \");\r\n\t\t//\tTabbed Pane Listener\r\n\t\ttabbedPane.addChangeListener(this);\r\n\t}", "private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }", "private void setUpWidgets(){\n\n }", "public void init()\n {\n buildUI(getContentPane());\n }", "@Override\n\tprotected void initAddButton() {\n addBtn = addButton(\"newBtn\", TwlLocalisationKeys.ADD_BEAT_TYPE_TOOLTIP, new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tnew AddEditBeatTypePanel(true, null, BeatTypesList.this).run(); // adding\n\t\t\t\t}\n\t }); \t\t\n\t}", "private void initiateInternal() {\n\n //define adaptation listener\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(ComponentEvent e) {\n adapt(e);\n }\n });\n\n //solve problem with unloading of internal components\n setExtendedState(ICONIFIED | MAXIMIZED_BOTH);\n //the set visible must be the last thing called \n pack();\n setExtendedState(MAXIMIZED_BOTH);\n setVisible(true);\n }", "@Override\n public void Create() {\n\n initView();\n }", "public void onStart() {\r\n\t\tthis.setVisible(true);\r\n\t}", "private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}", "protected void onPostInitUI() {\n if (hasPositiveButton()) {\n getPositiveButton().addClickHandler(new ClickHandler() {\n\n @Override\n public void onClick(ClickEvent event) {\n onPositiveButtonClicked();\n }\n });\n }\n if (hasNegativeButton()) {\n getNegativeButton().addClickHandler(new ClickHandler() {\n\n @Override\n public void onClick(ClickEvent event) {\n onNegativeButtonClicked();\n }\n });\n }\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "private GUIReminder() {\n\n initComponents();\n initOthers();\n\n }", "@Override\n\t\tpublic void postInit(){\n\t\tsuper.postInit();\n\t\tthis.buttonList.add(this.readDescription = new GuiButton(6, this.width - 110, 2, 100, 20, \"World Description\"));\n\t\tthis.readDescription.enabled = false;\n\t}", "private void init() {\n initView();\n setListener();\n }", "protected void initUI() {\n\r\n\t\t((Button) findViewById(R.id.project_site_start_wifiscan_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_calculate_ap_positions_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_add_known_ap)).setOnClickListener(this);\r\n\r\n\t\t((Button) findViewById(R.id.project_site_step_detect)).setOnClickListener(this);\r\n\t\t\r\n\t\t((ToggleButton) findViewById(R.id.project_site_toggle_autorotate)).setOnClickListener(this);\r\n\r\n\t\tmultiTouchView = ((MultiTouchView) findViewById(R.id.project_site_resultview));\r\n\t\tmultiTouchView.setRearrangable(false);\r\n\r\n\t\tmultiTouchView.addDrawable(map);\r\n\r\n\t\tif (site.getTitle().equals(ProjectSite.UNTITLED)) {\r\n\t\t\tshowDialog(DIALOG_TITLE);\r\n\t\t} else {\r\n\t\t\tif (freshSite) {\r\n\t\t\t\t// start configuration dialog\r\n\t\t\t\tshowDialog(DIALOG_FRESH_SITE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void init() {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n layout = inflater.inflate(R.layout.approvalaction_popup, null);\n showButton();\n bindButtonClick();\n }", "private void initGui() {\n initSeekBar();\n initDateFormatSpinner();\n GuiHelper.defineButtonOnClickListener(view, R.id.settings_buttonSave, this);\n\n }", "@Override\n\tpublic void initUi() {\n\t\tlayoutShowContact = currentView.findViewById(R.id.contact_layout_show);\n\t\tlayoutShowContact.setOnClickListener(clickListener);\n\t\tsetTitle(R.string.contact);\n\t}", "private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }", "protected void init() {\r\n\t\tsetBackground(Color.black);\r\n\t\tsetForeground(Color.white);\r\n\t\taddMouseListener(this);\r\n\t\taddMouseMotionListener(this);\r\n\t\tcreateSelection();\r\n\t\tsel.addListener(this);\r\n\t\tcreateSection();\r\n\t\tsection.addListener(this);\r\n\t\tsetOpaque(true);\r\n\t\tremoveAll();\r\n\t}", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }", "@Override\n public void initGUI() {\n\n }", "private void initial() {\n\t\tsetTitleTxt(getString(R.string.choose_game));\n\t\tLinearLayout contentView = (LinearLayout) findViewById(R.id.contentView);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\tview = View.inflate(this, R.layout.user_choose_game, null);\n\t\tcontentView.addView(view, params);\n\t\tgameGrid = (GridView) view.findViewById(R.id.game_list);\n\t\tgameContent = (LinearLayout) view.findViewById(R.id.game_list_info);\n\t\tview.setVisibility(View.GONE);\n\t}", "protected void initControl() {\n\t\t\r\n\t}", "void initUI();", "public void onModuleLoad() { \n\t\tsingleton = this;\n\t\t\n\t\tdockPanel.setWidth(\"100%\");\n\t\tdockPanel.setSpacing(8);\n\t\t\n\t\tmenuBar.setVisible(false);\n\t\tmenuBar.setStyleName(\"menu\");\n\t\t\n\t\tflowPanel.setWidth(\"100%\");\n\t\tflowPanel.add(menuBar);\n\t\t\n\t\tstatusBar.setVisible(false);\n\t\tstatusBar.setStyleName(\"status\");\n\t\t\n\t\tflowPanel.add(statusBar);\n\t\t\n\t\tdockPanel.add(flowPanel,DockPanel.NORTH);\n\t\t\n\t\tloginPanel.setVisible(false);\n\t\tdockPanel.add(loginPanel,DockPanel.WEST);\n\t\t\n\t\tpublisherListPanel.setVisible(false);\n\t\tpublisherListPanel.setWidth(\"100%\");\n\t\tdockPanel.add(publisherListPanel,DockPanel.CENTER);\n\t\t\n\t\tRootPanel.get(\"publisher\").add(dockPanel);\n\t}", "@FXML\r\n private void initialize() {\r\n addButton.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n handleOk();\r\n }\r\n });\r\n\r\n cancelButton.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent event) {\r\n handleCancel();\r\n }\r\n });\r\n }", "private void initUI() {\n // deal with toolbar\n setSupportActionBar(activityToolbar);\n if(getSupportActionBar() != null) {\n getSupportActionBar().setTitle(\"\");\n } else {\n Timber.w(\"Action bar is null? Strange behavior might occur\");\n }\n\n // deal with nav drawer\n drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n drawerLayout.addDrawerListener(drawerListener);\n\n }", "public MainView() {\n initComponents();\n addWindowListener(new AreYouSure());\n }", "private void initComponent()\n {\n groupName = findViewById(R.id.groupName);\n groupId = findViewById(R.id.gId);\n groupAddress = findViewById(R.id.gAddress);\n groupDescription = findViewById(R.id.gDescription);\n bCreate = findViewById(R.id.bCreate);\n rPublic = findViewById(R.id.rSecret);\n fTime = findViewById(R.id.fTime);\n toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n calendar = Calendar.getInstance();\n progressBar = findViewById(R.id.progress);\n\n //set scrollview in description editText\n groupDescription.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n if(v.getId() == R.id.txtNotice){\n v.getParent().requestDisallowInterceptTouchEvent(true);\n switch (event.getAction() & MotionEvent.ACTION_MASK){\n case MotionEvent.ACTION_UP:\n v.getParent().requestDisallowInterceptTouchEvent(false);\n break;\n }\n }\n return false;\n }\n });\n\n\n sharedPreferenceData = new SharedPreferenceData(this);\n currentUserName = sharedPreferenceData.getCurrentUserName();\n someMethod = new NeedSomeMethod(this);\n internetIsOn = new CheckInternetIsOn(this);\n dialogClass = new AlertDialogClass(this);\n }", "private void viewInit() {\n }", "private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}", "@Override\n public void Create() {\n initView();\n initData();\n }", "@Override\n public void initView() {\n }", "private void initialize() {\r\n\r\n // add default buttons\r\n addButton(getToggleButton(),\"toggle\");\r\n addButton(getFinishButton(),\"finish\");\r\n addButton(getCancelButton(),\"cancel\");\r\n addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n String cmd = e.getActionCommand();\r\n if(\"toggle\".equalsIgnoreCase(cmd)) change();\r\n else if(\"finish\".equalsIgnoreCase(cmd)) finish();\r\n else if(\"cancel\".equalsIgnoreCase(cmd)) cancel();\r\n }\r\n\r\n });\r\n\r\n }", "private void afterInitComponents() {\n \t\t\n \t}", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "public FirstNewFrame() {\n\t\tjbInit();\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }", "public void installFirstDrawTrigger() {\n mFrameAdapter.getFrameContainer().getViewTreeObserver().addOnGlobalLayoutListener(\n mFirstDrawTrigger);\n }", "@Override\r\n protected void onFinishInflate() {\r\n initComponents();\r\n }", "public void onCreateClick(){\r\n\t\tmyView.advanceToCreate();\r\n\t}", "@Override\n\tprotected void initContentView() {\n\t\t\n\t}", "void init() {\n setVisible(true);\n\n }", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initUIandEvent()\n\t{\n\t\tnew Handler(Looper.getMainLooper()).postDelayed(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIntent i = new Intent(MainActivity.this, LiveRoomActivity.class);\n\t\t\t\t\ti.putExtra(ConstantApp.ACTION_KEY_CROLE, Constants.CLIENT_ROLE_AUDIENCE);\n\t\t\t\t\ti.putExtra(ConstantApp.ACTION_KEY_ROOM_NAME, \"channel_00_01\");\n\t\t\t\t\tstartActivity(i);\n\t\t\t\t\tMainActivity.this.finish();\n\t\t\t\t}\n\t\t}, 1000);\n\t\t//finish();\n\t}", "private static void initAndShowGUI() {\n }", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "@Override\r\n \tpublic void start(AcceptsOneWidget panel, EventBus eventBus) {\n \t\tpanel.setWidget(view);\t\t\r\n \t}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "protected void setupUI() {\n\n }", "@Override\r\n\tpublic void initEvent() {\n\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "private void initializeUI() {\n MedUtils.displayMedInfo(coverArt, playBinding.thumbIv, playBinding.titleTv,\n playBinding.subtitleTv, selectedMed);\n\n playBinding.playPauseBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n switch (MediaPlayerService.getState()) {\n case Constants.STATE_PLAY:\n mediaPlayerService.pauseAction();\n break;\n case Constants.STATE_PAUSE:\n mediaPlayerService.playAction();\n break;\n case Constants.STATE_NOT_INIT:\n startMediaPlayerService();\n break;\n }\n }\n });\n\n playBinding.stopBt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mediaPlayerService.stopAction();\n }\n });\n }", "private void initView() {\n\n }", "private void initDialog() {\n }", "private void inicialize() {\n\t\t\n\t\t/**\n\t\t * Labels e textField of the page:\n\t\t * Nome\n\t\t * Descrição\n\t\t */\n\n\t\tJLabel lblNome = new JLabel(\"Nome\");\n\t\tlblNome.setBounds(5, 48, 86, 28);\n\t\tlblNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblNome);\n\t\t\n\t\tJLabel lblDescricao = new JLabel(\"Descrição\");\n\t\tlblDescricao.setBounds(5, 117, 86, 51);\n\t\tlblDescricao.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblDescricao);\n\t\t\n\t\ttextFieldNome = new JTextField();\n\t\ttextFieldNome.setBounds(103, 45, 290, 35);\n\t\ttextFieldNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\ttextFieldNome.setColumns(10);\n\t\tcontentPanel.add(textFieldNome);\n\t\t\n\t\ttextFieldDescricao = new JTextArea();\n\t\ttextFieldDescricao.setBackground(Color.WHITE);\n\t\ttextFieldDescricao.setLineWrap(true);\n\t\ttextFieldDescricao.setBounds(101, 118, 290, 193);\n\t\ttextFieldDescricao.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\ttextFieldDescricao.setColumns(10);\n\t\tcontentPanel.add(textFieldDescricao);\n\n\t\t/**\n\t\t * Confirmation panel\n\t\t * Confirmation button\n\t\t * Cancellation button\n\t\t */\n\n\t\tpainelConfirmacaoSetup();\n\t}", "@Override\n public void setWidget(Object arg0)\n {\n \n }", "private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(this.extension.getMessages().getString(\"spiderajax.options.title\"));\n \t if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {\n \t \tthis.setSize(391, 320);\n \t }\n this.add(getPanelProxy(), getPanelProxy().getName()); \n \t}", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "@Override\n public void initView() {\n\n }", "private void initializeWidgets() {\n resultTextView = findViewById(R.id.resultTextView);\n\n goBackButton = findViewById(R.id.goBackButton);\n goBackButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n }", "@Override\r\n public void initControl() {\n \r\n }", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tdisplayEvent();\n\t}", "public void setup() {\n self.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n // make dialog background unselectable\n self.setCanceledOnTouchOutside(false);\n }", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tinitView();\n\t\tinitData();\n\t\tsetOnClick();\n\t\tdelete();\n\t}", "public void init() {\r\n this.getChildren().clear();\r\n \r\n setAlignment(Pos.TOP_CENTER);\r\n setVgap(10);\r\n setHgap(10);\r\n setPadding(new Insets(25, 25, 25, 25));\r\n \r\n descriptionField.setMaxWidth(250);\r\n \r\n add(titleLabel, 0, 0);\r\n add(titleField, 1, 0);\r\n \r\n add(descLabel, 0, 1);\r\n add(descriptionField, 1, 1);\r\n \r\n add(urlLabel, 0, 2);\r\n add(urlField, 1, 2);\r\n \r\n add(addLabel, 0, 3);\r\n add(addIntensityBox, 1, 3);\r\n \r\n add(moviesLabel, 0, 4);\r\n add(includesMoviesBox, 1, 4);\r\n \r\n add(showsLabel, 0, 5);\r\n add(includesShowsBox, 1, 5);\r\n \r\n add(loginLabel, 0, 6);\r\n add(requiresLoginBox, 1, 6);\r\n \r\n \r\n add(addMovieSiteButton, 1, 7);\r\n \r\n addMovieSiteButton.setOnAction(e -> {\r\n String name = titleField.getText();\r\n String desc = descriptionField.getText();\r\n String url = urlField.getText();\r\n \r\n String addText = addIntensityBox.getText();\r\n \r\n int addIntensity = Integer.parseInt(addText.isEmpty() ? \"0\" : addText );\r\n boolean movies = includesMoviesBox.isSelected();\r\n boolean shows = includesShowsBox.isSelected();\r\n boolean login = requiresLoginBox.isSelected();\r\n \r\n if (name.matches(\"(\\\\p{L}){4,}\") && url.matches(\"www\\\\.[a-z0-9A-Z]{2,}\\\\.[a-z]+\")) {\r\n new MovieSite(name, desc, url, addIntensity, movies, shows, login);\r\n \r\n controller.getMainAppView().onMovieSitesClick(new ActionEvent());\r\n } else {\r\n \r\n controller.alert(\"Chyba\", \"\", \"Vyplňte alespoň název (alespoň 4 znaky a bez mezer) a url stránky (ve tvaru www.[jméno].[doména]!\");\r\n }\r\n \r\n \r\n \r\n \r\n });\r\n }", "private void init()\n {\n btnUser.setOnAction(buttonHandler);\n btnHome.setOnAction(event -> changeScene(\"store/fxml/home/home.fxml\"));\n btnCategories.setOnAction(event -> changeScene(\"store/fxml/category/categories.fxml\"));\n btnTopApps.setOnAction(buttonHandler);\n btnPurchased.setOnAction(buttonHandler);\n btnMenu.setOnAction(buttonHandler);\n btnSearch.setOnAction(buttonHandler);\n btnFeatured.setOnAction(buttonHandler);\n\n itmLogout = new MenuItem(\"Logout\");\n itmAddApp = new MenuItem(\"Add app\");\n itmUsers = new MenuItem(\"Manage users\");\n itmCategories = new MenuItem(\"Manage categories\");\n\n itmAddApp.setOnAction(itemHandler);\n itmLogout.setOnAction(itemHandler);\n itmUsers.setOnAction(itemHandler);\n itmCategories.setOnAction(itemHandler);\n\n if (user.getId() != null)\n {\n btnMenu.setVisible(true);\n if (user.getAdmin())\n btnMenu.getItems().addAll(itmAddApp, itmCategories, itmUsers, itmLogout);\n else\n btnMenu.getItems().add(itmLogout);\n\n ImageView imageView = new ImageView(user.getPicture());\n imageView.setFitHeight(25);\n imageView.setFitWidth(25);\n\n btnUser.setText(user.getUsername());\n }\n else\n btnMenu.setVisible(false);\n }", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\r\n\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\r\n\t}", "@Override\n public void initGui()\n {\n super.initGui();\n }", "@Override\n public void onStart() {\n super.onStart();\n updateUI();\n }", "public startingMenu() {\r\n initComponents();\r\n }", "public abstract void onInit();", "@Override\n\tprotected void InitButtonListener() {\n\t\tLayoutTop.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickOption();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }", "public TodoGUI() {\r\n todoChooserGui();\r\n }", "public void initWidgets(){\n\n g = (Globals)getApplication();\n\n //Application\n context = this;\n res = context.getResources();\n\n //Objekt\n mannschaft = g.getMannschaft();\n statistik = new Statistik();\n statistikwerte = new Statistikwerte();\n isUpdate = getIntent().getExtras().getBoolean(\"Update\");\n\n //Input-Widgets\n heim = (RadioGroup) findViewById(R.id.radioHeimAuswärts);\n gegner = (EditText) findViewById(R.id.gegnerbezeichnung);\n spielerListView = new SwipeMenuEditDelete(this, mannschaft, (SwipeMenuListView)findViewById(R.id.spielerList), new Spieler(), R.layout.swipemenu_item, false, false, false, true);\n anlegen = (Button) findViewById(R.id.stati_Anlegen);\n\n //Variablen\n spieler = new ArrayList<Spieler>();\n kategorien = new ArrayList<Kategorie>();\n datum = new Date();\n\n }" ]
[ "0.715538", "0.7002158", "0.6855211", "0.66847444", "0.6628957", "0.6619105", "0.66157687", "0.6520471", "0.6480197", "0.6431846", "0.641436", "0.63807935", "0.63721234", "0.6347073", "0.63405263", "0.63396084", "0.6333276", "0.63222086", "0.63017315", "0.6289287", "0.62836015", "0.6283359", "0.62593704", "0.62120783", "0.6206465", "0.6203842", "0.6187872", "0.61733097", "0.6160458", "0.6155827", "0.6144275", "0.61442196", "0.61358833", "0.6135225", "0.6133366", "0.6133062", "0.6127421", "0.6126418", "0.61236787", "0.6116742", "0.61128294", "0.6110151", "0.60938793", "0.608378", "0.6077107", "0.60764706", "0.6075842", "0.6075371", "0.6075371", "0.60721546", "0.6069784", "0.6064686", "0.6062066", "0.6056229", "0.6054631", "0.6049548", "0.60493255", "0.6043036", "0.60396475", "0.60376173", "0.6028715", "0.60280144", "0.60280144", "0.60192245", "0.6014575", "0.6011432", "0.6011384", "0.6011384", "0.60079473", "0.60041994", "0.5997207", "0.59911823", "0.5986873", "0.5984791", "0.5982719", "0.59817773", "0.5980645", "0.5975888", "0.59741944", "0.59741944", "0.59741944", "0.59741944", "0.59741944", "0.59741944", "0.59685993", "0.59616184", "0.5961411", "0.59523654", "0.5946995", "0.59457797", "0.5945508", "0.5945508", "0.5943934", "0.5939491", "0.5933506", "0.5931528", "0.5929658", "0.5929432", "0.59248674", "0.59218025", "0.5919066" ]
0.0
-1
Enter relevant functionality for when the last widget is disabled
@Override public void onDisabled(Context context) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDisabled(Context context) {\n // Enter relevant functionality for when the last widget is disabled\n }", "@Override\n public void onEnabled(Context context) {\n // Enter relevant functionality for when the first widget is created\n }", "@Override\n public void onDisabled() {\n }", "private void disableButtons()\r\n {\r\n }", "void outOfTime() {\r\n\r\n disableOptionButtons();\r\n }", "protected void onDisabled() {\n // Do nothing.\n }", "public void onDisable() {\r\n }", "public void updateDisabledButtons() {\n\t\t//at least 3 credits should be there for perform add max action\n\t\tif (obj.getCredit() < 3)\n\t\t\taddMax.setEnabled(false);\n\t\t//at least a credit should be there for perform add max action\n\t\tif (obj.getCredit() == 0)\n\t\t\taddOne.setEnabled(false);\n\t\tif (obj.getCredit() >= 3)\n\t\t\taddMax.setEnabled(true);\n\t\tif (obj.getCredit() > 0)\n\t\t\taddOne.setEnabled(true);\n\t}", "public void onDisable() {\n }", "public void onDisable() {\n }", "public void onDisable()\n {\n }", "public void onDisable() {\n }", "@Override\n public void onDisable() {\n }", "public abstract void onDisable();", "default void onDisable() {}", "@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }", "@Override\n\tpublic void onDisable() {\n\t\t\n\t}", "@Override\n\tpublic void onDisable() {\n\n\t}", "public void disableEndOfProductionButton(){\n this.endOfproductionButton.setEnabled(false);\n }", "@Override\r\n\tpublic void onDisable() {\n\t}", "public abstract void wgb_onDisable();", "@Override\n public void onDisabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }", "protected void updateEnabled() {\n\t\tFieldGroup control = getUIControl();\n\t\tif (control != null) {\n\t\t\tCollection<? extends IRidget> ridgets = getRidgets();\n\t\t\tfor (IRidget ridget : ridgets) {\n\t\t\t\tridget.setEnabled(isEnabled());\n\t\t\t}\n\t\t\tcontrol.setEnabled(isEnabled());\n\t\t}\n\t}", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "private void disableComponents() {\r\n maintainSponsorHierarchyBaseWindow.btnChangeGroupName.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnCreateNewGroup.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnDelete.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnMoveDown.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnMoveUp.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnSave.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmChangeGroupName.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmCreateNewGroup.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmDelete.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveDown.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveUp.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmSave.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setEnabled(false);\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n }", "@Override\n public void onEnabled(Context context) {\n Log.d(\"PS_WIDGET\", \"onEnabled reached\");\n }", "@Override\n\tpublic void onDisabled(Context context) \n\t{\n\t\tPackageManager pm = context.getPackageManager();\n\t\tpm.setComponentEnabledSetting(\n\t\t\t\tnew ComponentName(\"de.fhe\", \"MyAppWidgetProvider\"),\n\t\t\t\tPackageManager.COMPONENT_ENABLED_STATE_DISABLED, \n\t\t\t\tPackageManager.DONT_KILL_APP );\n\t}", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "@Override\n public void disableEndTurnButton() {\n gameboardPanel.disableEndTurnButton();\n }", "@Override\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t\t\t\tList<Pair<Text, Button>> texts = inputFields.get(fp);\n \t\t\t\ttexts.remove(pair);\n \t\t\t\tupdateState();\n \t\t\t\tremoveButton.dispose();\n \t\t\t\ttext.dispose();\n\t\t\t\taddButtons.get(fp).setEnabled(true);\n \t\t\t\tif (texts.size() == fp.getMinOccurrence())\n \t\t\t\t\tfor (Pair<Text, Button> otherPair : texts)\n \t\t\t\t\t\totherPair.getSecond().setEnabled(false);\n \n \t\t\t\t// do layout\n \t\t\t\t((Composite) getControl()).layout();\n \t\t\t\t// pack to make wizard smaller if possible\n \t\t\t\tgetWizard().getShell().pack();\n \t\t\t}", "public abstract void Disabled();", "private void setButtonDisabled() {\n final boolean areProjects = mainController.selectedOrganisationProperty().getValue().getProjects().size() > 0;\n final boolean areTeams = mainController.selectedOrganisationProperty().getValue().getTeams().size() > 0;\n //allocateTeamButton.setDisable(!(areProjects && areTeams));\n }", "public void handleApiDisabled() {\r\n\t\thandler.post(new Runnable(){\r\n\t\t\tpublic void run(){\r\n\t\t \tUtils.showMessageAndExit(SessionsList.this, getString(R.string.label_api_disabled));\r\n\t\t\t}\r\n\t\t});\t\t\t\t\r\n }", "String disabledButton();", "public void disablePanelInput() {\n\t\tif (!clickThem) {\r\n\t\t\ttxt_mssv.setText(\"\");\r\n\t\t\ttxt_mssv.setEnabled(false);\r\n\t\t\ttxt_hoten.setEnabled(false);\r\n\t\t\ttxt_hoten.setText(\"\");\r\n\t\t\tcomboSex.setEnabled(false);\r\n\t\t\ttxt_ntns.setText(\"\");\r\n\t\t\ttxt_ntns.setEnabled(false);\r\n\t\t\tbtn_nhap.setEnabled(false);\r\n\t\t} else {\r\n\t\t\ttxt_mssv.setEnabled(true);\r\n\t\t\ttxt_hoten.setEnabled(true);\r\n\t\t\tcomboSex.setEnabled(true);\r\n\t\t\ttxt_ntns.setEnabled(true);\r\n\t\t\tbtn_nhap.setEnabled(true);\r\n\t\t}\r\n\t}", "public void disableProductionButtons(){\n for(int i = 0; i < 3; i++){\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new ActivateProductionListener(gui,productionButtons[i],i));\n productionButtons[i].setEnabled(false);\n }\n\n baseProductionPanel.disableButton();\n }", "@Override\n\tpublic void onDisable() {\n\t\tgetLogger().info(\"SimplyWrapper successfully disabled !\");\n\t}", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "private void disableButtons() {\n for (DeployCommand cmd : DeployCommand.values()){\n setButtonEnabled(cmd, false);\n }\n butDone.setEnabled(false);\n setLoadEnabled(false);\n setUnloadEnabled(false);\n setAssaultDropEnabled(false);\n }", "public void disableEndTurnButton(){\n\n this.endTurnButton.setEnabled(false);\n }", "public void onEnabled() {\r\n }", "public void onNotEnabled() {\n Timber.d(\"onNotEnabled\");\n // keep the callback in case they turn it on manually\n setTorPref(Status.DISABLED);\n createClearnetClient();\n status = Status.NOT_ENABLED;\n if (onStatusChangedListener != null) {\n new Thread(() -> onStatusChangedListener.notEnabled()).start();\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent e) {\n if (!strategyList.isSelectionEmpty())\n playButton.setEnabled(true);\n }", "public void inhabilitaPanel() {\n\n\t\t//comboNombreCarta.setEnabled(false);\n\t\tjScrollPane1.setEnabled(false);\n\t\tjScrollPane1.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(false);\n\t\tjScrollPane2.setEnabled(false);\n\t\tjScrollPane2.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(false);\n\t\tlistaSeleccionadas.setEnabled(false);\n\t\tlistaDisponibles.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\ttextoNumeroCartas.setEnabled(false);\n\t\ttextoRaza.setEnabled(false);\n\t\tbotCargar.setEnabled(false);\n\t\tbotGuardar.setEnabled(false);\n\t\tbotGuardarComo.setEnabled(false);\n\t\tbotSalir.setEnabled(false);\n\t\tbotAyuda.setEnabled(false);\n\t\tbotNuevaBaraja.setEnabled(false);\n\t\ttextoBarajaCargada.setEnabled(false);\n\t\tthis.panelFondo.setEnabled(false);\n\t\tlabelImagen.setEnabled(false);\n this.NumeroPuntos.setEnabled(false);\n\n\t}", "public boolean isEnabled () {\r\n\tcheckWidget();\r\n\treturn getEnabled () && parent.isEnabled ();\r\n}", "private void updateEnabledState() {\n updateEnabledState(spinner, spinner.isEnabled()); }", "private void checkEnableDisable() {\n\t\tif (_trainingSet.getCount() > 0) {\n\t\t\t_saveSetMenuItem.setEnabled(true);\n\t\t\t_saveSetAsMenuItem.setEnabled(true);\n\t\t\t_trainMenuItem.setEnabled(true);\n\t\t} else {\n\t\t\t_saveSetMenuItem.setEnabled(false);\n\t\t\t_saveSetAsMenuItem.setEnabled(false);\n\t\t\t_trainMenuItem.setEnabled(false);\n\t\t}\n\n\t\tif (_currentTrainGrid == null) {\n\t\t\t_deleteGridMenuItem.setEnabled(true);\n\t\t} else {\n\t\t\t_deleteGridMenuItem.setEnabled(true);\n\t\t}\n\n\t\tif (_index > 0) {\n\t\t\t_leftGridMenuItem.setEnabled(true);\n\t\t\t_leftBtn.setEnabled(true);\n\t\t\t_firstGridMenuItem.setEnabled(true);\n\t\t\t_firstBtn.setEnabled(true);\n\t\t} else {\n\t\t\t_leftGridMenuItem.setEnabled(false);\n\t\t\t_leftBtn.setEnabled(false);\n\t\t\t_firstGridMenuItem.setEnabled(false);\n\t\t\t_firstBtn.setEnabled(false);\n\t\t}\n\n\t\tif (_index < _trainingSet.getCount() - 1) {\n\t\t\t_rightGridMenuItem.setEnabled(true);\n\t\t\t_rightBtn.setEnabled(true);\n\t\t\t_lastGridMenuItem.setEnabled(true);\n\t\t\t_lastBtn.setEnabled(true);\n\t\t} else {\n\t\t\t_rightGridMenuItem.setEnabled(false);\n\t\t\t_rightBtn.setEnabled(false);\n\t\t\t_lastGridMenuItem.setEnabled(false);\n\t\t\t_lastBtn.setEnabled(false);\n\t\t}\n\n\t\tif (_index >= _trainingSet.getCount()) {\n\t\t\t_indexLabel.setText(String.format(NEW_INDEX_LABEL, _trainingSet.getCount()));\n\t\t} else {\n\t\t\t_indexLabel.setText(String.format(INDEX_LABEL, _index + 1, _trainingSet.getCount()));\n\t\t}\n\n\t\t_resultLabel.setText(EMPTY_RESULT_LABEL);\n\t}", "private void disableInputs() {\n bulbPressTime.setEnabled(false);\n intervalTime.setEnabled(false);\n numTicks.setEnabled(false);\n startBtn.setEnabled(false);\n connStatus.setText(getString(R.string.StatusRunning));\n connStatus.setTextColor(getColor(R.color.green));\n }", "@Override\n public void disableEndOfProductionButton() {\n gameboardPanel.disableEndOfProductionButton();\n }", "protected void disableButtons() {\n if (mFalseButton.isPressed() || mTrueButton.isPressed())\n mFalseButton.setEnabled(false);\n mTrueButton.setEnabled(false);\n }", "public void inhabilitaPanel() {\n\t\t// contentPane.setEnabled(false);\n\t\tpanelPrincipal.setEnabled(false);\n\t\tpanelBotones.setEnabled(false);\n\t\tboton1Jugador.setEnabled(false);\n\t\tbotonJuegoRed.setEnabled(false);\n\t\tbotonEditar.setEnabled(false);\n\t\tbotonDemo.setEnabled(false);\n\t\tbotonReglas.setEnabled(false);\n\t\tbotonAyuda.setEnabled(false);\n\t\tbotonRecibir.setEnabled(false);\n\t\tbotonEnviar.setEnabled(false);\n\t\tbotonDescargaSobre.setEnabled(false);\n\t\tbotonSalir.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\tlabelDibujo.setEnabled(false);\n\n\t}", "@Override\n public void enableEndTurnButton() {\n gameboardPanel.enableEndTurnButton();\n }", "protected abstract void disable();", "private void deActivateButtons(){\n limiteBoton.setEnabled(false);\n derivadaBoton.setEnabled(false);\n integralBoton.setEnabled(false);\n}", "protected void whileDisable()\n\t{\n\n\t}", "public void enableEndOfProductionButton(){\n this.endOfproductionButton.setEnabled(true);\n }", "@FXML\n void disableHourly() {\n annualAddText.setDisable(false);\n managerRadio.setDisable(false);\n dHeadRadio.setDisable(false);\n directorRadio.setDisable(false);\n hourlyAddText.setDisable(true);\n }", "public void setDisabled() {\n\t\tdisabled = true;\n\t}", "public void disableButtons() {\n\t\t\r\n\t\tcapture.setEnabled(false);\r\n\t\tstop.setEnabled(false);\r\n\t\tfilter.setEnabled(false);\r\n\t\tsave.setEnabled(false);\r\n\t\t//load.setEnabled(false);\r\n\t}", "public void dama_DamaCloseButtonListener() {\n this.buttonDisabled = false;\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tebar.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tesend.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(false);\n\t\t\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}", "public Widget() {\n\t\tenabled = true;\n\t}" ]
[ "0.8324667", "0.66936314", "0.6632969", "0.6590516", "0.65348405", "0.6503779", "0.6500005", "0.6481272", "0.64199775", "0.64199775", "0.63905513", "0.63777363", "0.6373405", "0.6338429", "0.630844", "0.62827057", "0.62471", "0.62242955", "0.62146366", "0.62080747", "0.6201108", "0.61709094", "0.6104599", "0.6058021", "0.60551906", "0.6045964", "0.6041686", "0.6030131", "0.60231024", "0.60197717", "0.60184926", "0.6015299", "0.5999035", "0.5998961", "0.5990952", "0.59826654", "0.597735", "0.5977323", "0.5955284", "0.59354264", "0.5910098", "0.5909336", "0.59004164", "0.58990175", "0.5883039", "0.58812", "0.5877268", "0.5871307", "0.5848898", "0.5848581", "0.5841035", "0.5836575", "0.58363795", "0.5834862", "0.58303124", "0.58262", "0.5803186", "0.5788713", "0.57822496", "0.5775713", "0.5774406", "0.57701635" ]
0.57928157
93
TODO Autogenerated method stub
@Override public void GetOut() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void OkHereIsMoney(double amount) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Initialize the form. Call this after ID has been set on the form, so that form fields can use the ID as their prefix.
public void initialize() { cpuThreads = new BooleanLabel(constants.yes(), constants.no()); memoryOverCommit = new PercentLabel<Integer>(); resiliencePolicy = new ResiliencePolicyLabel(); clusterType = new ClusterTypeLabel(); driver.initialize(this); DefaultValueCondition virtServiceNotSupported = new DefaultValueCondition() { @Override public boolean showDefaultValue() { boolean supportsVirtService = getModel().getEntity() != null && getModel().getEntity().supportsVirtService(); return !supportsVirtService; } }; DefaultValueCondition glusterServiceNotSupported = new DefaultValueCondition() { @Override public boolean showDefaultValue() { boolean supportsGlusterService = getModel().getEntity() != null && getModel().getEntity().supportsGlusterService(); return !supportsGlusterService; } }; boolean virtSupported = ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly); boolean glusterSupported = ApplicationModeHelper.isModeSupported(ApplicationMode.GlusterOnly); formBuilder.addFormItem(new FormItem(constants.nameCluster(), name, 0, 0)); formBuilder.addFormItem(new FormItem(constants.descriptionCluster(), description, 1, 0)); formBuilder.addFormItem(new FormItem(constants.dcCluster(), dataCenterName, 2, 0, virtSupported)); formBuilder.addFormItem(new FormItem(constants.compatibilityVersionCluster(), compatibilityVersion, 3, 0)); // Show the cluster type only if the application is running in both the modes formBuilder.addFormItem(new FormItem(constants.clusterType(), clusterType, 4, 0, virtSupported && glusterSupported)); // properties for virt support formBuilder.addFormItem(new FormItem(constants.cpuTypeCluster(), cpuType, 0, 1, virtSupported) .withDefaultValue(constants.notAvailableLabel(), virtServiceNotSupported)); formBuilder.addFormItem(new FormItem(constants.cpuThreadsCluster(), cpuThreads, 1, 1, virtSupported) .withDefaultValue(constants.notAvailableLabel(), virtServiceNotSupported)); formBuilder.addFormItem(new FormItem(constants.memoryOptimizationCluster(), memoryOverCommit, 2, 1, virtSupported) .withDefaultValue(constants.notAvailableLabel(), virtServiceNotSupported)); formBuilder.addFormItem(new FormItem(constants.resiliencePolicyCluster(), resiliencePolicy, 3, 1, virtSupported) .withDefaultValue(constants.notAvailableLabel(), virtServiceNotSupported)); formBuilder.addFormItem(new FormItem(constants.emulatedMachine(), emulatedMachine, 4, 1, virtSupported) .withDefaultValue(constants.notAvailableLabel(), virtServiceNotSupported)); formBuilder.addFormItem(new FormItem(constants.numberOfVmsCluster(), numberOfVms, 5, 1, virtSupported) .withDefaultValue(constants.notAvailableLabel(), virtServiceNotSupported)); // properties for gluster support formBuilder.addFormItem(new FormItem(constants.clusterVolumesTotalLabel(), noOfVolumesTotal, 0, 2, glusterSupported) .withDefaultValue(constants.notAvailableLabel(), glusterServiceNotSupported)); formBuilder.addFormItem(new FormItem(constants.clusterVolumesUpLabel(), noOfVolumesUp, 1, 2, glusterSupported) .withDefaultValue(constants.notAvailableLabel(), glusterServiceNotSupported)); formBuilder.addFormItem(new FormItem(constants.clusterVolumesDownLabel(), noOfVolumesDown, 2, 2, glusterSupported) .withDefaultValue(constants.notAvailableLabel(), glusterServiceNotSupported)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public quanlixe_form() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "public form_for_bd() {\n initComponents();\n }", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "public Form() {\n initComponents();\n }", "public FormPemilihan() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }", "public formPrincipal() {\n initComponents();\n }", "private void initFields(){\n labels.put(\"patientID\", new JLabel(\"Patient ID:\"));\n labels.put(\"newOwed\", new JLabel(\"New Owed:\"));\n \n fields.put(\"patientID\", new JTextField());\n fields.put(\"newOwed\", new JTextField());\n }", "private void init()\n {\n \t// Make page stateless.\n setStatelessHint(true);\n\n // Add registration form.\n RegistrationForm registrationForm = new RegistrationForm(REGISTRATION_FORM);\n add(registrationForm);\n // AjaxFormValidatingBehavior.addToAllFormComponents(registrationForm, \"onblur\");\n }", "public FrmKashidashi() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "private void initFormulario() {\n btnCadastro = findViewById(R.id.btnCadastro);\n editNome = findViewById(R.id.editNome);\n editEmail = findViewById(R.id.editEmail);\n editSenhaA = findViewById(R.id.editSenha);\n editSenhaB = findViewById(R.id.editSenhaB);\n chTermo = findViewById(R.id.chTermos);\n isFormOk = false;\n }", "public FormCompra() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public FormListRemarking() {\n initComponents();\n }", "@Override\r\n\tpublic int getFormId()\r\n\t{\r\n\t\treturn 0;\r\n\t}", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public ValidFrequencyForm() {\r\n initComponents();\r\n }", "public EditProductForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n Utility.centerScreen(this);\n myself = this;\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public JfrmPrincipal() {\n initComponents();\n }", "public rentForm() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public Formulario() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public C_AdminForm() {\n initComponents();\n }", "public password_akses_admin_form() {\n initComponents();\n }", "public FormCadastroAutomovel() {\n initComponents();\n }", "public AuditFunctionForm() {\n initComponents();\n init();\n }", "public TaskDetailUpdateForm() {\n initComponents();\n }", "public SpeciesForm() {\n initComponents();\n setTitle(Application.TITLE_APP + \" Species\");\n processor = new SpeciesProcessor();\n loadData(); \n \n \n }", "public LOGINFORMF() {\n initComponents();\n }", "public JFrmPagoCuotaAnulacion() {\n setTitle(\"JFrmPagoCuotaAnulacion\");\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Frm_AddJob() {\n initComponents();\n ClearEdit();\n }", "private void initComponents() {\n\n\t\tsetName(\"Form\"); // NOI18N\n\t\tsetLayout(new java.awt.BorderLayout());\n\t}", "private void init() {\r\n\t\tthis.setBackground(Color.decode(\"#c5dfed\"));\r\n\r\n\t\tthis.initPanelButtons();\r\n\r\n\t\tUtilityClass.addBorder(this, 20, 20, 20, 20);\r\n\t\t\r\n\t\tthis.title.setFont(ConstantView.FONT_TITLE_CRUD);\r\n\t\tthis.title.setHorizontalAlignment(JLabel.CENTER);\r\n\t\tthis.add(title, BorderLayout.NORTH);\r\n\t\t\r\n\t\tthis.add(panelButtons, BorderLayout.SOUTH);\r\n\t\tthis.jPanelFormClient.setOpaque(false);\r\n\t\tthis.add(jPanelFormClient, BorderLayout.CENTER);\r\n\t}", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public StoreManagementForm_forTests() {\n initComponents();\n updateStoresTable();\n\n }", "public FrmInicioSesion() {\n initComponents();\n\n }", "@Override\r\n public void initializeComponents() {\r\n nameTf = new ITextField(\"name\");\r\n nameTf.addEditedListener(this, \"name\");\r\n\r\n separatorTf = new ITextField(\"Separator\");\r\n separatorTf.addEditedListener(this, \"separator\");\r\n }", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "public frmAddIncidencias() {\n initComponents();\n }", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "public UploadForm() {\n initComponents();\n }", "private void init(){\n this.firstNameTF.setText(user.getFirstName());\n this.nameTF.setText(user.getName());\n this.phoneTF.setText(user.getPhone());\n\n this.mailLabel.setText(user.getMail());\n this.roleLabel.setText(user.getFirstName());\n }", "public RegisterForm() {\n initComponents();\n }", "public RegisterForm() {\n initComponents();\n }", "public RegisterForm() {\n initComponents();\n }", "public PatientRegForm() {\n initComponents();\n }", "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }", "public ManageStudentForm() {\n initComponents();\n \n initTable();\n \n fillTable();\n \n initMajor();\n setLocationRelativeTo(null);\n \n \n }", "public frmModelMainForm() {\n initComponents();\n }", "public JMCF() {\n initComponents();\n }", "public loginForm() {\n initComponents();\n \n }", "public IssueBookForm() {\n initComponents();\n }", "public AttributeForm() \n {\n initComponents();\n mJerseyNumberUpDown.setModel(new SpinnerNumberModel(0,0,99,1));\n \n m_Parser = new InputParser();\n m_Attributes = new JComboBox[8];\n m_Attributes[0] = m_RSBox;\n m_Attributes[1] = m_RPBox;\n m_Attributes[2] = m_MSBox;\n m_Attributes[3] = m_HPBox;\n m_Attributes[4] = m_PS_BC_PI_KABox;\n m_Attributes[5] = m_PC_REC_QU_KABox;\n m_Attributes[6] = m_ACCBox;\n m_Attributes[7] = m_APBBox;\n\n m_SimAttrs = new JSpinner[4];\n m_SimAttrs[0] = m_Sim1UpDown;\n m_SimAttrs[1] = m_Sim2UpDown;\n m_SimAttrs[2] = m_Sim3UpDown;\n m_SimAttrs[3] = m_Sim4UpDown;\n \n m_DoneInit = true;\n setCurrentState(StateEnum.QB);\n \n }", "private void initForm() {\n\t\tfor (int i = 0; i < userRoles.size(); i++) {\n\t\t\tlb.addItem(userRoles.get(i).value);\n\t\t}\n\t}", "public void setFormId(String formId) {\r\n this.formId = formId;\r\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public void queryInit(SecurityUserBaseinfoForm form, String id,SessionForm sessionForm) {\n\t\tthis.setLocation(form, sessionForm);\r\n\t\tthis.init(form, id);\r\n\t}", "public frmPrincipal() {\n initComponents();\n }", "public FormInserir() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public ScheduleForm() {\n initComponents();\n }", "public TableForm() {\n initComponents();\n \n setMyTable();\n }", "public FormProduct() {\n initComponents();\n getData();\n }", "public void setFormId(Integer formId) {\n this.formId = formId;\n }", "public S2SSubmissionDetailForm() {\r\n initComponents();\r\n }", "protected void initialize()\n {\n // Initialize document\n\n Document document = createDefaultModel();\n\n field.setDocument(document);\n document.addDocumentListener(this);\n\n // Layout panel\n\n setLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\n flagLabel = new JLabel(GUI.getMandatoryIcon());\n\n flagLabel.addFocusListener(this);\n\n if (getTextField() != null)\n {\n getTextField().addFocusListener(this);\n }\n\n add(flagLabel);\n add(Box.createHorizontalStrut(3));\n add(field);\n\n if (field.getColumns() > 0)\n {\n setMaximumSize(new Dimension(getPreferredSize().width, field.getPreferredSize().height));\n setMinimumSize(new Dimension(getMinimumSize().width, field.getPreferredSize().height));\n }\n else\n {\n setMaximumSize(new Dimension(Integer.MAX_VALUE, getPreferredSize().height));\n setPreferredSize(new Dimension(Integer.MAX_VALUE, getPreferredSize().height));\n setMinimumSize(new Dimension(getMinimumSize().width, getPreferredSize().height));\n }\n\n performFlags();\n field.setCursor(GUI.ENTRY_CURSOR);\n }", "public FormularioP() {\n initComponents();\n }", "private void initialize() {\r\n\t\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setBounds(0, 0, 300, 100);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\ttxtQas = new JTextField();\r\n\t\ttxtQas.setToolTipText(\"\");\r\n\t\ttxtQas.setBounds(124, 11, 166, 20);\r\n\t\tpanel.add(txtQas);\r\n\t\ttxtQas.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblId = new JLabel(\"ID: \");\r\n\t\tlblId.setBounds(10, 14, 46, 14);\r\n\t\tpanel.add(lblId);\r\n\t\t\r\n\t\tbtnExcluirItem = new JButton(\"Excluir Item\");\r\n\t\tbtnExcluirItem.setBounds(10, 70, 99, 23);\r\n\t\tpanel.add(btnExcluirItem);\r\n\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n lblLoggedIn.setText(LoginController.employeeName + \" \" + LoginController.employeeSurname + \" ID: \" + LoginController.employeeID + \"\");\n try {\n requisitionForm = FXMLLoader.load(getClass().getResource(\"MaterialRequisition.fxml\"));\n requisitionForm2 = FXMLLoader.load(getClass().getResource(\"MaterialRequisition2.fxml\"));\n cartForm = FXMLLoader.load(getClass().getResource(\"Cart.fxml\"));\n equipmentForm = FXMLLoader.load(getClass().getResource(\"PPE.fxml\"));\n mainForm = FXMLLoader.load(getClass().getResource(\"Widgets.fxml\"));\n employeeForm = FXMLLoader.load(getClass().getResource(\"Employee.fxml\"));\n requisitionEquipment = FXMLLoader.load(getClass().getResource(\"Requisition.fxml\"));\n setNode(mainForm);\n } catch (IOException ex) {\n Logger.getLogger(MainFormController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public LoginForm() {\n initComponents();\n }", "public AddExpensesForm() {\n initComponents();\n }", "public Recruit() {\n initComponents();\n cemid.setText(currentEmployee.getId());\n }", "public FrmCadastro() {\n initComponents();\n\n }", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public FrameForm() {\n initComponents();\n }", "public frmAdminAccount() {\n initComponents();\n }", "public ProcedureFormPanel() {\n initComponents();\n }", "public FormPrincipal() {\n initComponents();\n setLocationRelativeTo( null );\n \n }", "public FormEditUser() {\n initComponents();\n id.setEnabled(false);\n }", "public PatientUI() {\n initComponents();\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //init form input\r\n initFormDataReservationType();\r\n //refresh data form input\r\n setSelectedDataToInputForm();\r\n }", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\tif (this.materielModel.getId() != -1) {\n\t\t\ttextFieldId.setText(String.valueOf(this.materielModel.getId()));\n\t\t\ttextFieldName.setText(this.materielModel.getName());\n\t\t\ttextFieldBon.setText(String.valueOf(this.materielModel.getNbBon()));\n\t\t\ttextFieldMoyen.setText(String.valueOf(this.materielModel.getNbMoyen()));\n\t\t\ttextFieldMauvais.setText(String.valueOf(this.materielModel.getNbMauvais()));\n\t\t\ttextFieldMaterielImgPath.setText(this.materielModel.getImagePath());\n\t\t}\n\n\t}", "public Form_soal() {\n initComponents();\n tampil_soal();\n }", "public FormularioCliente() {\n initComponents();\n }", "public passwordForm() {\n initComponents();\n }", "public frmAfiliado() {\n initComponents();\n \n }", "public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }", "public FrmInCadLocal() {\n initComponents();\n }" ]
[ "0.67254084", "0.658459", "0.63679385", "0.6323403", "0.6303437", "0.627651", "0.62553096", "0.62042826", "0.61479163", "0.61355996", "0.6135523", "0.6134997", "0.61005944", "0.6100425", "0.60890126", "0.6084649", "0.60742503", "0.6064015", "0.6061019", "0.60608906", "0.60307825", "0.5964248", "0.5964248", "0.5964248", "0.5959712", "0.5950142", "0.593823", "0.593727", "0.59201694", "0.59111315", "0.5904254", "0.58943826", "0.58823925", "0.5842889", "0.5839416", "0.58380413", "0.5831209", "0.58285236", "0.58197457", "0.58195597", "0.5808435", "0.5797168", "0.57946455", "0.57942677", "0.57767713", "0.57761675", "0.57678515", "0.5767369", "0.576599", "0.5761234", "0.57578504", "0.5744729", "0.5742369", "0.57315755", "0.57280797", "0.5727676", "0.5727676", "0.5727676", "0.5725313", "0.57248163", "0.5723084", "0.5721123", "0.571644", "0.5713955", "0.57135415", "0.57127076", "0.5712671", "0.5710252", "0.57035005", "0.56986517", "0.5690668", "0.5687146", "0.5661225", "0.563914", "0.56360376", "0.5632583", "0.5618982", "0.5618654", "0.56158674", "0.56070477", "0.5601096", "0.559954", "0.5598664", "0.5598518", "0.55909437", "0.5585691", "0.5580335", "0.5578793", "0.5569371", "0.5563092", "0.55569285", "0.5552771", "0.55506194", "0.5541781", "0.55402154", "0.5536431", "0.55337405", "0.55298287", "0.552804", "0.55279434", "0.5527158" ]
0.0
-1
get children nodes name
public static List<String> getChildrenParentMayNotExist(ZkClient zkClient, String path) { try { return zkClient.getChildren(path); } catch (ZkNoNodeException e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getNameChildren(int childPosition)\n {\n ExpandableListItems_Child tempChild = children.get(childPosition);\n return(tempChild.getName());\n }", "public String[] listChildren()\n/* */ {\n/* 519 */ int childCount = getChildCount();\n/* 520 */ String[] outgoing = new String[childCount];\n/* 521 */ for (int i = 0; i < childCount; i++) {\n/* 522 */ outgoing[i] = getChild(i).getName();\n/* */ }\n/* 524 */ return outgoing;\n/* */ }", "public List<String> getChildNames() {\n\t\treturn _childNames;\n\t}", "public static String childrenNames(Element element){\n String concl = \"\";\n for (Element child : element.children()){\n concl += child.tagName();\n if (!child.className().equals(\"\")) concl += \":\" + child.className();\n concl += \" \";\n }\n return concl;\n }", "public final String name() {\n return node.getNodeName();\n }", "public String getChildren() {\n return children;\n }", "public String getChildren() {\n\t\treturn children;\n\t}", "String getNodeName();", "Node[] getChildren(Node node);", "public abstract List<Node> getChildNodes();", "public Set<?> getChildrenNames(Fqn fqn) throws Exception\n {\n\n return (Set<?>) invokeWithRetries(GET_CHILDREN_METHOD, fqn);\n }", "public Node[] getChildren(){return children;}", "List<Node<T>> children();", "public abstract String toName(Object inNode);", "private String[][] childrenNames(LinkedList<QuadTree> Linked) {\n LinkedList<Double> latName = new LinkedList<>();\n Map<Double, LinkedList<String>> res = new HashMap<>();\n for (QuadTree q : Linked) {\n if (!res.containsKey(q.ullat)) {\n res.put(q.ullat, new LinkedList<>());\n latName.addLast(q.ullat);\n }\n res.get(q.ullat).addLast(q.name);\n }\n\n String[][] emptyTree = twoDArray(Linked);\n for (int row = 0; row < emptyTree.length; row++) {\n for (int col = 0; col < emptyTree[0].length; col++) {\n emptyTree[row][col] = \"img/\" + res.get(latName.get(row)).get(col) + \".png\";\n }\n }\n return emptyTree;\n }", "@Override\n public int getChildrenCount(String name)\n {\n return children.getSubNodes(name).size();\n }", "public String getChildTagName() {\n return (String)attributes.get(\"childTagName\");\n }", "public abstract String getChildTitle();", "String getNameElement();", "public String getNodeName (CyNode node) {\n return nodeHandler.getNodeName(node);\n }", "public Node [] getNodesByName(Node parent, String nodeName) throws Exception;", "public String[] getTreeNames();", "public Iterator<String> listChildren(T node){\n\t\tT target = node;\n\t\tSet<Edge<T,E>> alledges = this.graph.getEdges(target);\n\t\tList<String> children = new ArrayList<String>();\n\t\tfor(Edge<T, E> e : alledges) {\n\t\t\tchildren.add(e.getChild()+\"(\"+e.getName()+\")\");\n\t\t}\n\t\tCollections.sort(children);\n\t\tIterator<String> itr = children.iterator();\n\t\treturn itr;\n\t}", "@Override\n public String toString(){\n return \"the node has: \" + children.size()\n + \" the counter is \" + counter; \n }", "public List<String> getChildren() {\n\t\treturn null;\n\t}", "public List<String> children() {\n return this.children;\n }", "public String getName()\n {\n \tif (_nodeVRL==null)\n \t\treturn null;\n \t\n return _nodeVRL.getBasename(); // default= last part of path\n }", "protected Set<?> _getChildrenNames(Fqn fqn) throws Exception\n {\n Set cn;\n synchronized (this)\n {\n out.reset();\n out.writeByte(TcpCacheOperations.GET_CHILDREN_NAMES);\n out.writeObject(fqn);\n out.flush();\n Object retval = in.readObject();\n if (retval instanceof Exception)\n {\n throw (Exception) retval;\n }\n cn = (Set) retval;\n }\n\n // the cache loader contract is a bit different from the cache when it comes to dealing with childrenNames\n if (cn.isEmpty()) return null;\n return cn;\n }", "public Enumeration<Node> children() { return null; }", "@Override\n\tpublic List<Node> chilren() {\n\t\treturn children;\n\t}", "public static final String getSubordinateNodeName (Xid xid)\n\t{\n\t return XATxConverter.getSubordinateNodeName(getXIDfromXid(xid));\n\t}", "public String getNodeName()\n {\n return Constants.ELEMNAME_NUMBER_STRING;\n }", "public List<TreeNode> getChildrenNodes();", "@Override\n public List<ConfigurationNode> getChildren(String name)\n {\n return children.getSubNodes(name);\n }", "public String getName() {\n return element.getNodeName();\n }", "public ResultMap<BaseNode> listChildren();", "public List<SaveGameNode> getAllChilden(String name) {\r\n List<SaveGameNode> list = new ArrayList();\r\n list.addAll(this.children.stream().filter(child -> child.equals(name)).collect(Collectors.toList()));\r\n return list;\r\n }", "@DISPID(4)\n\t// = 0x4. The runtime will prefer the VTID if present\n\t@VTID(10)\n\tcom.gc.IList children();", "List<String> getNodeNames()\n {\n return allNodes.values().stream().map(CommunicationLink::getName).collect(Collectors.toList());\n }", "String getNodeName() {\n return this.nodeName;\n }", "public JodeList children(String nodeName) {\n return this.children().filter(nodeName);\n }", "String getNodeName() {\n return nodeName;\n }", "public String getName () { return n.getName(); }", "public XMLElement[] getChildren()\n/* */ {\n/* 532 */ int childCount = getChildCount();\n/* 533 */ XMLElement[] kids = new XMLElement[childCount];\n/* 534 */ this.children.copyInto(kids);\n/* 535 */ return kids;\n/* */ }", "public String getNameIdNode() {\r\n String nameIdNode = null;\r\n nameIdNode = this.getParam(ESCOConstantes.NAMEID_NODE);\r\n // Add the root element if not present\r\n if (null != nameIdNode && !nameIdNode.startsWith(ESCOConstantes.STEM_NAME_SEPARATOR)) {\r\n nameIdNode = ESCOConstantes.STEM_NAME_SEPARATOR + nameIdNode;\r\n }\r\n\r\n return nameIdNode;\r\n }", "public String getUnusedChildren();", "Collection<DendrogramNode<T>> getChildren();", "public java.lang.String getSubElementName(int index) { throw new RuntimeException(\"Stub!\"); }", "public String\n getNodeName() \n {\n return pNodeName;\n }", "String generatNodeName(JCRNodeWrapper parent, String nodeType);", "public String getTagName() \n {\n return _node == null ? null : _node.getName().getLocalPart();\n }", "@Override\n\tpublic String toString() {\n\t\treturn level+\":\"+title + \":\"+refId+\"::\"+childElems;\n\t}", "public String getNodeName()\n {\n return displayNode.toString();\n }", "public List<AST> getChildNodes ();", "public Node[] getChildren(){\n return children.values().toArray(new Node[0]);\n }", "public final String getTagName() {\n return getNodeName();\n }", "public String getNodeName() {\n final String ret;\n\n if (this.eName == null) {\n if (this.getNode() == null) {\n ret = null;\n } else {\n ret = this.getNode().getNodeName();\n }\n } else {\n ret = this.eName;\n }\n\n return ret;\n }", "@Override\n\tpublic TreeNode[] getChildren() {\n\t\treturn this.children ;\n\t}", "protected String[] doListChildren()\n {\n return (String[])m_children.toArray( new String[ m_children.size() ] );\n }", "public ArrayList<Node> getChildren() { return this.children; }", "public abstract String getXMLName();", "public Node getChild();", "public static ArrayList<Node> getChildrenByTagName(Node node, String name) {\r\n ArrayList<Node> list = new ArrayList<Node>();\r\n if (node == null)\r\n return list;\r\n\r\n for (Node child = node.getFirstChild(); child != null; child = child\r\n .getNextSibling()) {\r\n if (child.getNodeName().equals(name))\r\n list.add(child);\r\n }\r\n\r\n return list;\r\n }", "public String getXMLBaseNodeName();", "public void setChildren(String children) {\n this.children = children;\n }", "public String getTitle(XsdNode node) {\n\t\tString out = \"\";\n\n\t\t/** TODO: new */\n\t\tgetMaxCount(node);\n\n\t\tif (!node.isUsed) {\n\t\t\treturn out;\n\t\t}\n\n\t\tif (selections.contains(node)) {\n\t\t\tif (firstElement)\n\t\t\t\tfirstElement = false;\n\t\t\telse\n\t\t\t\tout += separator;\n\t\t\tout += node.getName() + nextNumber(node);\n\t\t}\n\n\t\tEnumeration children = node.children();\n\t\twhile (children.hasMoreElements()) {\n\t\t\tXsdNode child = (XsdNode) children.nextElement();\n\n\t\t\tif (child.isUsed) {\n\t\t\t\tswitch (((Annotated) child.getUserObject()).getStructureType()) {\n\t\t\t\tcase Structure.ELEMENT:\n\t\t\t\t\tint cpt = 0;\n\t\t\t\t\t/* create a NodeList with all childs with tagname */\n\t\t\t\t\tint maxCount = getMaxCount(child);\n\t\t\t\t\twhile (cpt < maxCount) {\n\t\t\t\t\t\tout += getTitle(child);\n\t\t\t\t\t\tcpt++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Structure.ATTRIBUTE:\n\t\t\t\t\tif (firstElement)\n\t\t\t\t\t\tfirstElement = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tout += separator;\n\t\t\t\t\tout += child.getName() + nextNumber(child);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"[PSI makers: flattener] ERROR: the node is neither an attribute nor an element\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}", "@Override\n public int getChildrenCount()\n {\n return children.getSubNodes().size();\n }", "String generatNodeName(JCRNodeWrapper parent, String defaultLanguage, ExtendedNodeType nodeType, String targetName);", "public int getChildCount() {return children.size();}", "public String name() {\n return BPMNode.getId();\n }", "public String getNodeName(String propertyName);", "static String getName(Node node) {\n Attr attribute = (Attr) node.getAttributes().getNamedItemNS(null, ATTR_NAME);\n\n if (attribute != null) {\n return attribute.getValue();\n }\n\n return null;\n }", "private String getName(Name node) {\n\t\tif (node.isQualifiedName()) {\n\t\t\tQualifiedName name = (QualifiedName) node;\n\t\t\treturn getName(name.getQualifier());\n\t\t}\n\t\t//if it's a simple name\n\t\telse if (node.isSimpleName()) {\n\t\t\treturn node.toString();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "protected abstract String getEventChildXML();", "public ArrayList<LexiNode> getChilds(){\n\t\treturn childs;\n\t}", "public String getTreeName() {\n return treeName;\n }", "public JodeList children() {\n return new JodeList(node.getChildNodes());\n }", "private String getLabelNodeAvl(){\n return concatLabel(this.root);\n }", "public String getNodeName() {\n return nodeName;\n }", "public List getChildren(String name) {\n List elements = new ArrayList();\n NodeList nodes = element.getChildNodes();\n\n for (int i = 0; i < nodes.getLength(); i++) {\n Node node = nodes.item(i);\n\n if ((node.getNodeType() == Node.ELEMENT_NODE) && node.getNodeName().equals(name)) {\n elements.add(new Element((org.w3c.dom.Element)node));\n }\n }\n\n return elements;\n }", "@Override\n\tpublic Set<HtmlTag> getChildren()\n\t{\n\t\tImmutableSet.Builder<HtmlTag> childrenBuilder = ImmutableSet.builder();\n\t\tfor(TreeNode<? extends HtmlTag> child : node.getChildren())\n\t\t{\n\t\t\tchildrenBuilder.add(child.getValue());\n\t\t}\n\t\treturn childrenBuilder.build();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public Vector getChildren()\r\n\t{\r\n\t\treturn m_children;\r\n\t}", "private String getName(Node node) {\n\t\tif (node.hasAttributes() == false) \n\t\t\treturn null;\n\t\t\n\t\tfor (int i = 0; i<node.getAttributes().getLength(); i++) {\n\t\t\tif (node.getAttributes().item(i).getNodeName().equals(\"name\")) \n\t\t\t\treturn node.getAttributes().item(i).getNodeValue();\n\t\t}\n\t\treturn null;\n\t}", "public void setChildren(String children) {\n\t\tthis.children = children;\n\t}", "public Vector<GraphicalLatticeElement> getChildren() {\n\t\tVector<GraphicalLatticeElement> children = new Vector<GraphicalLatticeElement>();\n\t\tif (childrenEdges != null)\n\t\t\tfor (int i = 0; i < childrenEdges.size(); i++) {\n\t\t\t\tEdge edge = childrenEdges.elementAt(i);\n\t\t\t\tchildren.add(edge);\n\t\t\t\tchildren.add(edge.getDestination());\n\t\t\t}\n\t\t\n\t\treturn children;\n\t}", "public Vector<Node> getChildren(){\n\t\t Vector<Node> children = new Vector<>(0);\n\t\t Iterator<Link> l= myLinks.iterator();\n\t\t\twhile(l.hasNext()){\n\t\t\t\tLink temp=l.next();\n\t\t\t\tif(temp.getM().equals(currNode))\n\t\t\t\t children.add(temp.getN());\n\t\t\t\tif(temp.getN().equals(currNode))\n\t\t\t\t children.add(temp.getM());\n\t\t\t}\n\t\treturn children;\n\t}", "public abstract int getNumChildren();", "@Override\r\n\t\tpublic String getNodeName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\r\n\tpublic List<Node> getChildren() {\r\n\t\treturn null;\r\n\t}", "public String getChild() {\n return child;\n }", "public int getNodeLabel ();", "public List<NamespaceNode> getChildNodes() {\n return childNodes;\n }", "public ArrayList<Node> getChildren(){\n return children;\n }", "@Override\n\tpublic int getChildrenNum() {\n\t\treturn children.size();\n\t}", "public Vector getChildren() {\n return this.children;\n }", "public StringWithCustomFacts getNumChildren() {\n return numChildren;\n }", "@JsProperty\n NodeList getChildNodes();", "public Node[] getChildren() {\n\t\treturn children.toArray(new Node[0]);\n\t}" ]
[ "0.714907", "0.68655723", "0.6724992", "0.66480994", "0.6644625", "0.66159606", "0.6536474", "0.65157557", "0.6500838", "0.6408129", "0.64077014", "0.6347601", "0.63435376", "0.6286529", "0.6257157", "0.621242", "0.6206955", "0.62064856", "0.61994964", "0.618373", "0.61834246", "0.61708343", "0.6157045", "0.61380994", "0.6137725", "0.6126011", "0.610382", "0.6092735", "0.6088779", "0.6083029", "0.6070435", "0.60687274", "0.6048996", "0.60440034", "0.6033949", "0.6030889", "0.6008826", "0.5984112", "0.5982103", "0.5974823", "0.59683156", "0.59508634", "0.5944918", "0.5933265", "0.58996713", "0.58882505", "0.58882004", "0.58631974", "0.5861259", "0.58517724", "0.58342284", "0.58144146", "0.5810491", "0.5806533", "0.58000284", "0.5791221", "0.57900536", "0.57888716", "0.57798094", "0.57780993", "0.5772391", "0.57715464", "0.5766622", "0.5752021", "0.57504326", "0.5727541", "0.57251346", "0.57200503", "0.5710311", "0.5697829", "0.56963384", "0.5695706", "0.56956416", "0.56955266", "0.5691198", "0.5687713", "0.56854755", "0.5671154", "0.56548035", "0.56489724", "0.56485534", "0.5646362", "0.5646362", "0.5646362", "0.56456447", "0.56449", "0.56341136", "0.5632322", "0.5629736", "0.5622494", "0.561814", "0.56179684", "0.5614276", "0.5607394", "0.56068623", "0.5598395", "0.55979836", "0.5593222", "0.55929494", "0.5591671", "0.55910903" ]
0.0
-1
read all broker group in the zookeeper
public static void getCustomerCluster(ZkClient zkClient, String[] queueNames) { if(queueNames != null && queueNames.length > 0){ getCluster(zkClient); try { for(String queue : queueNames){ if(StringUtils.isNotBlank(queue)){ List<String> childrens = zkClient.getChildren(ZkTopicQueueReadIndex.ZK_INDEX + "/" + queue); if(childrens != null){ List<String> sortChildrens = new ArrayList<String>(); Set<String> remove = new HashSet<String>(); for(String ip:Cluster.getMasterIps()){ for(String sip:childrens){ if(sip.startsWith(Group.QUEUE_INDEX_PREFIX)){ sip = sip.replace(Group.QUEUE_INDEX_PREFIX, ""); String[] ips = sip.split(":"); if(ip.equals(ips[0])){ sortChildrens.add(sip); remove.add(sip); } } } } for(String yip:childrens){ if(yip.startsWith(Group.QUEUE_INDEX_PREFIX)){ yip = yip.replace(Group.QUEUE_INDEX_PREFIX, ""); if(!remove.contains(yip)){ sortChildrens.add(yip); } } } for(String child:sortChildrens){ String[] ips = child.split(":"); if(ips != null){ if(ips.length == 1){ Cluster.putSlave(queue, ips[0], null); }else{ Cluster.putSlave(queue, ips[0], ips[1]); } } } } } } ConcurrentHashMap<String, List<Group>> maps = Cluster.getQueueGroups(); if(maps != null && maps.size() > 0){ LOGGER.debug("Customer load success, list:"); for(Entry<String, List<Group>> entry:maps.entrySet()){ LOGGER.debug(entry.getKey()+"=>"+entry.getValue().toString()); } } } catch (Exception e) { LOGGER.error("get customer cluster error", e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void getCluster(ZkClient zkClient) {\n \ttry {\n \t\tif(zkClient.getZooKeeper().getState().isAlive()){\n \t\t\tList<String> allGroupNames = ZkUtils.getChildrenParentMayNotExist(zkClient, ServerRegister.ZK_BROKER_GROUP);\n \tCollections.sort(allGroupNames);\n if (allGroupNames != null) {\n \t//LOGGER.debug(\"read all broker group count: \" + allGroupNames.size());\n \tList<Group> allGroup = new ArrayList<Group>();\n \tMap<String, String> slaveIp = new HashMap<>();\n for (String group : allGroupNames) {\n String jsonGroup = ZkUtils.readData(zkClient, ServerRegister.ZK_BROKER_GROUP + \"/\" + group);\n if(StringUtils.isNotBlank(jsonGroup)){\n \tGroup groupObj = DataUtils.json2BrokerGroup(jsonGroup);\n \tallGroup.add(groupObj);\n \tif(groupObj.getSlaveOf() != null){\n \t\tslaveIp.put(groupObj.getSlaveOf().getHost(), groupObj.getMaster().getHost());\n \t}\n \t//LOGGER.debug(\"Loading Broker Group \" + groupObj.toString());\n }\n }\n Cluster.clear();\n List<Group> noSlave = new ArrayList<Group>();\n for(Group group:allGroup){\n \tif(slaveIp.containsKey(group.getMaster().getHost())){\n \t\tgroup.getMaster().setShost(slaveIp.get(group.getMaster().getHost()));\n \t\tCluster.addGroup(group);\n \t}else{\n \t\tnoSlave.add(group);\n \t}\n }\n if(noSlave.size() > 0){\n \tCluster.addGroups(noSlave);\n \t//LOGGER.info(\"Master load success, list:\"+Cluster.getMasters().toString());\n }\n }\n \t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"get cluster error\", e);\n\t\t}\n }", "public String[] getTopics() {\n\n try {\n ZooKeeper zk = new ZooKeeper(\"localhost:2181\", 10000, null);\n List<String> topics = zk.getChildren(\"/brokers/topics\", false);\n// for (String topic : topics) {\n// System.out.println(topic);\n// }\n return topics.toArray(new String[0]);\n\n } catch (InterruptedException | KeeperException | IOException e) {\n e.printStackTrace();\n }\n return null;\n\n // Prints the topics to stdout\n // Iterator it = topics.entrySet().iterator();\n // System.out.println(\"Available topics:\");\n // while (it.hasNext()) {\n // Map.Entry entry = (Map.Entry)it.next();\n // System.out.println(\"> \" + entry.getKey());\n // }\n }", "ConsumerGroups consumerGroups();", "List<GroupUser> getConnectedClients();", "void getGroupsAsync(IAsyncCallback<Set<Object>> callback);", "public ChannelGroup getConnections();", "public List<VideoFile> loadChannelNames(int broker){\n //open connection\n Socket connection = null;\n try {\n connection = new Socket(IP, broker);\n\n //request brokers list\n ObjectOutputStream out = new ObjectOutputStream(connection.getOutputStream());\n out.writeObject(\"INIT\");\n out.flush();\n\n //get answer from broker\n ObjectInputStream in = new ObjectInputStream(connection.getInputStream());\n String message = (String) in.readObject();\n //broker will send\n if(message.equals(\"FAILURE\")){\n Extras.printError(\"CONSUMER: tried to Init without publishers\");\n }else if(message.equals(\"ACCEPT\")){\n ArrayList< String> list = (ArrayList<String>) in.readObject();\n for( String s : list){\n publisherToBrokers.put(s,broker);\n }\n getBrokers(in);\n }\n } catch(IOException e){\n Extras.printError(\"CONSUMER: LOAD: ERROR: Could not get streams\");\n } catch (ClassNotFoundException e){\n Extras.printError(\"CONSUMER: LOAD: ERROR: Could not cast Object to String\");\n }\n\n disconnect(connection);\n return null;\n }", "void retrieveBrokerList() {\n java.util.logging.Logger.getLogger(TAG).log(Level.INFO, \"Start: retrieveBrokerList()\");\n // request the list to the cloud\n // parse the response and add brokers to \"brokers\"\n NetworkThread thread = new NetworkThread();\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n java.util.logging.Logger.getLogger(TAG).log(Level.INFO, \"Finish: retrieveBrokerList()\");\n }", "ZigBeeGroup getGroup(int groupId);", "@GetMapping(\"/all\")\n public BasePageResponse getAllGroup() throws NodeMgrException {\n BasePageResponse pageResponse = new BasePageResponse(ConstantCode.SUCCESS);\n Instant startTime = Instant.now();\n log.info(\"start getAllGroup startTime:{}\", startTime.toEpochMilli());\n\n // get group list\n int count = groupService.countOfGroup(null, GroupStatus.NORMAL.getValue());\n if (count > 0) {\n List<TbGroup> groupList = groupService.getGroupList(GroupStatus.NORMAL.getValue());\n pageResponse.setTotalCount(count);\n pageResponse.setData(groupList);\n }\n\n // reset group\n resetGroupListTask.asyncResetGroupList();\n\n log.info(\"end getAllGroup useTime:{} result:{}\",\n Duration.between(startTime, Instant.now()).toMillis(),\n JsonTools.toJSONString(pageResponse));\n return pageResponse;\n }", "List<storage_server_connections> getAllForVolumeGroup(String group);", "public void sync() throws KeeperException, InterruptedException {\n members = zk.getChildren(thisPrefix, groupWatcher, null); // also reset the watcher\n }", "String zookeeperQuorum();", "@Test\n public void testZookeeperCacheLoader() throws InterruptedException, KeeperException, Exception {\n\n DiscoveryZooKeeperClientFactoryImpl.zk = mockZookKeeper;\n\n @SuppressWarnings(\"resource\")\n ZookeeperCacheLoader zkLoader = new ZookeeperCacheLoader(new DiscoveryZooKeeperClientFactoryImpl(), \"\", 30_000);\n\n List<String> brokers = Lists.newArrayList(\"broker-1:15000\", \"broker-2:15000\", \"broker-3:15000\");\n for (int i = 0; i < brokers.size(); i++) {\n try {\n LoadManagerReport report = i % 2 == 0 ? getSimpleLoadManagerLoadReport(brokers.get(i))\n : getModularLoadManagerLoadReport(brokers.get(i));\n zkLoader.getLocalZkCache().getZooKeeper().create(LOADBALANCE_BROKERS_ROOT + \"/\" + brokers.get(i),\n ObjectMapperFactory.getThreadLocal().writeValueAsBytes(report), ZooDefs.Ids.OPEN_ACL_UNSAFE,\n CreateMode.PERSISTENT);\n } catch (Exception e) {\n fail(\"failed while creating broker znodes\");\n }\n }\n\n // strategically wait for cache to get sync\n for (int i = 0; i < 5; i++) {\n if (zkLoader.getAvailableBrokers().size() == 3 || i == 4) {\n break;\n }\n Thread.sleep(1000);\n }\n\n // 2. get available brokers from ZookeeperCacheLoader\n List<LoadManagerReport> list = zkLoader.getAvailableBrokers();\n\n // 3. verify retrieved broker list\n Set<String> cachedBrokers = list.stream().map(loadReport -> loadReport.getWebServiceUrl())\n .collect(Collectors.toSet());\n Assert.assertEquals(list.size(), brokers.size());\n Assert.assertTrue(brokers.containsAll(cachedBrokers));\n\n // 4.a add new broker\n final String newBroker = \"broker-4:15000\";\n LoadManagerReport report = getSimpleLoadManagerLoadReport(newBroker);\n zkLoader.getLocalZkCache().getZooKeeper().create(LOADBALANCE_BROKERS_ROOT + \"/\" + newBroker,\n ObjectMapperFactory.getThreadLocal().writeValueAsBytes(report), ZooDefs.Ids.OPEN_ACL_UNSAFE,\n CreateMode.PERSISTENT);\n brokers.add(newBroker);\n\n Thread.sleep(100); // wait for 100 msec: to get cache updated\n\n // 4.b. get available brokers from ZookeeperCacheLoader\n list = zkLoader.getAvailableBrokers();\n\n // 4.c. verify retrieved broker list\n cachedBrokers = list.stream().map(loadReport -> loadReport.getWebServiceUrl()).collect(Collectors.toSet());\n Assert.assertEquals(list.size(), brokers.size());\n Assert.assertTrue(brokers.containsAll(cachedBrokers));\n\n }", "public java.util.Iterator engineListRootGroups() {\n ConfigurationHandler handler = factory.getConfigurationHandler();\n Configuration configuration = null;\n try {\n configuration = factory.getConfiguration(GROUPS_CONFIG_PATH, false, handler);\n return treeManager.listRoots(configuration);\n } catch (Exception e) {\n throw new BaseSecurityException(BaseSecurityException.CANNOT_LIST_ROOT_GROUPS, e);\n } finally {\n factory.close(configuration, handler);\n }\n }", "@Override\n\tpublic GroupSet getAllGroups() throws DataBackendException\n {\n GroupSet groupSet = new GroupSet();\n Connection con = null;\n\n try\n {\n \n con = Transaction.begin();\n\n List<Group> groups = doSelectAllGroups(con);\n\n for (Group group : groups)\n {\n // Add dependent objects if they exist\n ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con, getLazyLoading());\n\n groupSet.add(group);\n }\n\n Transaction.commit(con);\n con = null;\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Error retrieving group information\", e);\n }\n finally\n {\n if (con != null)\n {\n Transaction.safeRollback(con);\n }\n }\n\n return groupSet;\n }", "public void listGroup() {\r\n List<Group> groupList = groups;\r\n EventMessage evm = new EventMessage(\r\n EventMessage.EventAction.FIND_MULTIPLE,\r\n EventMessage.EventType.OK,\r\n EventMessage.EventTarget.GROUP,\r\n groupList);\r\n notifyObservers(evm);\r\n }", "public List<String> getAll() throws KeeperException, InterruptedException {\n List<String> copy = new ArrayList<>();\n copy.addAll(members);\n return copy;\n }", "ConsumerGroup getConsumerGroup(String name) throws RegistrationException;", "@Override\n protected Object doInBackground(Object... arg0) {\n\n try {\n //Parameter receiving example\n for(int i = 0 ; i < arg0.length ; i++)\n System.out.println((String)arg0[i]);\n\n //ClientCall example\n System.out.println(\"Call read group now!\");\n Group g = new Group();\n g.setViewerId(67);\n groupList = GroupClient.readGroups(g);\n System.out.println(\"Group Number:\"+groupList);\n\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return groupList;\n }", "public List<BrokerStatus> getBrokers()\r\n {\r\n return Collections.unmodifiableList(brokers);\r\n }", "public void getGroups() {\n String listOfCode = prefs.getString(\"listOfCode\");\n if (!listOfCode.isEmpty()) {\n for (String groupPair : listOfCode.split(\",\"))\n if (!groupPair.isEmpty()) {\n final String nickname = groupPair.substring(0, groupPair.indexOf('|'));\n String code = groupPair.substring(groupPair.indexOf('|') + 1);\n ServerAPI.groupInformation(code, new RequestHandler<Group>() {\n @Override\n public void callback(Group result) {\n if (result == null) {\n return;\n }\n savedGroups.add(new Pair<String, Group>(nickname, result));\n populateListView();\n }\n });\n }\n }\n }", "public List<Clients> getallClients();", "@RequiresBluetoothConnectPermission\n @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)\n public List<DeviceGroup> getDiscoveredGroups(boolean mPublicAddr) {\n if (DBG) log(\"getDiscoveredGroups()\");\n\n if (!mAppRegistered) {\n Log.e(TAG, \"App not registered for Group operations.\" +\n \" Register App using registerGroupClientApp\");\n return null;\n }\n\n final IBluetoothDeviceGroup service = getService();\n if (service == null) {\n Log.e(TAG, \"Proxy is not attached to Profile Service. Can't fetch Groups.\");\n return null;\n }\n\n try {\n List<DeviceGroup> groups = service.getDiscoveredGroups(mPublicAddr, mAttributionSource);\n return groups;\n } catch (RemoteException e) {\n Log.e(TAG, \"Stack:\" + Log.getStackTraceString(new Throwable()));\n }\n\n return null;\n }", "public ByteBufferMessageSet fetchMessages(PartitionMetadata partitionMetadata, String topic, long startOffset) {\n SimpleConsumer consumer = consumerMap.get(partitionMetadata.leader().id());\n ByteBufferMessageSet messageSet = fetchMessages(consumer, topic, partitionMetadata.partitionId(), startOffset);\n// simpleConsumer.close();\n return messageSet;\n }", "@GET\n @Path(\"/seeAllGroups/{userName}\")\n public String seeAllGroups(@PathParam(\"userName\") String userName) {\n try {\n User user = userService.getUserByUsername(userName);\n List<GroupMessage> groups = accountService.seeAllGroups(user);\n StringBuilder sb = new StringBuilder(\"[\");\n for (GroupMessage group : groups) {\n sb.append(getGroupByName(group.getName())).append(\",\");\n }\n sb.append(\"]\");\n return sb.toString();\n } catch (Exception e) {\n return \"err\";\n }\n }", "public String[] getLookupGroups() throws RemoteException {\n\t\treturn disco.getGroups();\n\t}", "public static Iterator getKeys(String group) {\n\t\tConfigManager cg = getConfigManager(group);\n\t\tIterator returnValue = null;\n\t\tif (cg != null) {\n\t\t\treturnValue = cg.getConfig().getKeys();\n\t\t}\n\t\treturn returnValue;\n\t}", "private Vector getGroupItems() {\n return protocol.getGroupItems();\n }", "List<String> getGroups(String usid);", "@Override\n public List<String> getGroups(String user) throws IOException {\n // parent get unix groups\n List<String> groups = new LinkedList<String>(super.getGroups(user));\n NetgroupCache.getNetgroups(user, groups);\n return groups;\n }", "public abstract Collection getGroups();", "@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}", "private static List<Group> getCollectionFromResultSet(ResultSet resultset) throws SQLException {\r\n\t\t\r\n\t\tList<Group> collection = new LinkedList<Group>();\r\n\t\t\r\n\t\twhile (resultset.next()) { \r\n\t\t\t// Appending all the objects to the collection.\r\n\t\t\tGroup group = getObjectFromCursor(resultset);\r\n\t\t\tcollection.add(group);\r\n\t\t\tlog.trace(\"Loaded client group: \" + group.toString());\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn Collections.unmodifiableList(collection);\r\n\r\n\t}", "public List<ConsumerRecord<byte[], byte[]>> consumeAllRecordsFromTopic(final String topic) {\n // Connect to broker to determine what partitions are available.\n KafkaConsumer<byte[], byte[]> kafkaConsumer = kafkaTestServer.getKafkaConsumer(\n ByteArrayDeserializer.class,\n ByteArrayDeserializer.class\n );\n\n final List<Integer> partitionIds = new ArrayList<>();\n for (PartitionInfo partitionInfo: kafkaConsumer.partitionsFor(topic)) {\n partitionIds.add(partitionInfo.partition());\n }\n kafkaConsumer.close();\n\n return consumeAllRecordsFromTopic(topic, partitionIds);\n }", "@GET\n @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Path(\"/{id}\")\n @CheckPermission(roles = { Role.SYSTEM_MONITOR, Role.TENANT_ADMIN }, acls = { ACL.ANY })\n public BlockConsistencyGroupRestRep getConsistencyGroup(@PathParam(\"id\") final URI id) {\n ArgValidator.checkFieldUriType(id, BlockConsistencyGroup.class, \"id\");\n\n // Query for the consistency group\n final BlockConsistencyGroup consistencyGroup = (BlockConsistencyGroup) queryResource(id);\n\n // Get the implementation for the CG.\n BlockServiceApi blockServiceApiImpl = getBlockServiceImpl(consistencyGroup);\n\n // Get the CG volumes\n List<Volume> volumes = BlockConsistencyGroupUtils.getActiveVolumesInCG(consistencyGroup,\n _dbClient, null);\n\n // If no volumes, just return the consistency group\n if (volumes.isEmpty()) {\n return map(consistencyGroup, null, _dbClient);\n }\n\n Set<URI> volumeURIs = new HashSet<URI>();\n for (Volume volume : volumes) {\n volumeURIs.add(volume.getId());\n }\n return map(consistencyGroup, volumeURIs, _dbClient);\n }", "public Object[] getGroupList() {\n return grouptabs.keySet().toArray();\n }", "public static ArrayList<MqttClient> getAllClients() {\n return clients;\n }", "public List<SecGroup> getAllGroups();", "protected abstract <T extends Group> List<T> doSelectAllGroups(Connection con)\n throws TorqueException;", "Group[] getParents() throws AccessManagementException;", "@Override\n public List<KeepercontainerTbl> doQuery() throws DalException {\n List<KeepercontainerTbl> allDcKeeperContainers = dao.findActiveByDcName(dcName, KeepercontainerTblEntity.READSET_FULL);\n List<KeepercontainerTbl> allDcOrgKeeperContainers = allDcKeeperContainers.stream().filter(keepercontainer -> keepercontainer.getKeepercontainerOrgId() == clusterOrgId).collect(Collectors.toList());\n\n List<KeepercontainerTbl> dcOrgKeeperContainersInUsed;\n if (allDcOrgKeeperContainers.isEmpty() && clusterOrgId != XPipeConsoleConstant.DEFAULT_ORG_ID) {\n logger.info(\"cluster {} with org id {} is going to find keepercontainers in normal pool\",\n clusterName, clusterOrgId);\n allDcOrgKeeperContainers = allDcKeeperContainers.stream().filter(keepercontainer -> keepercontainer.getKeepercontainerOrgId() == XPipeConsoleConstant.DEFAULT_ORG_ID).collect(Collectors.toList());\n\n // find keepers in used in normal org\n dcOrgKeeperContainersInUsed = dao.findKeeperContainerByCluster(dcName, XPipeConsoleConstant.DEFAULT_ORG_ID,\n KeepercontainerTblEntity.READSET_KEEPER_COUNT_BY_CLUSTER);\n } else {\n // find keepers in used in cluster org\n dcOrgKeeperContainersInUsed = dao.findKeeperContainerByCluster(dcName, clusterOrgId,\n KeepercontainerTblEntity.READSET_KEEPER_COUNT_BY_CLUSTER);\n }\n\n setCountAndSortForAllKeeperContainers(allDcOrgKeeperContainers, dcOrgKeeperContainersInUsed);\n allDcOrgKeeperContainers = filterKeeperFromSameAvailableZone(allDcOrgKeeperContainers, dcName);\n logger.info(\"find keeper containers: {}\", allDcOrgKeeperContainers);\n return allDcOrgKeeperContainers;\n }", "public Collection getGroups() throws Exception\r\n {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }", "private List<String> getChildren(String path, boolean watch)\n throws KeeperException, InterruptedException {\n return zk.getChildren(path, watch);\n }", "@Override\n public List<ConsumerMember> listClients() {\n return this.soapClient.listClients(this.getTargetUrl());\n }", "List<ClientTopicCouple> listAllSubscriptions();", "private void loadAllGroups() {\n ParseUser user = ParseUser.getCurrentUser();\n List<Group> groups = user.getList(\"groups\");\n groupList.clear();\n if (groups != null) {\n for (int i = 0; i < groups.size(); i++) {\n try {\n Group group = groups.get(i).fetchIfNeeded();\n groupList.add(group);\n groupAdapter.notifyItemInserted(groupList.size() - 1);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n }\n }", "ReadResponseMessage fetchAllMessages();", "Collection getForeignKeysInGroup(Object groupID) throws Exception;", "public List<Client> findAll() throws DataAccessLayerException {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.READ));\n return super.findAll(Client.class);\n } catch (AccessControlException e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public void getClients(AsyncCallback<List<Client>> cb);", "com.google.protobuf.ByteString getGroupBytes();", "@RequiresBluetoothConnectPermission\n @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)\n public List<DeviceGroup> getDiscoveredGroups() {\n return getDiscoveredGroups(false);\n }", "Set<Client> getAllClients();", "public Collection<String> getGroups() {\r\n \t\tCollection<String> serverGroups = this.groupList.getGroups();\r\n \r\n \t\treturn serverGroups;\r\n \t}", "public List<VPlexConsistencyGroupInfo> getConsistencyGroups()\n throws VPlexApiException {\n s_logger.info(\"Request to get all consistency groups on VPlex at {}\", _baseURI);\n\n return _discoveryMgr.getConsistencyGroups();\n }", "private void closeBrokers() {\n memberBroker.close();\naccountBroker.close();\n }", "private List[] query() {\n\t\tList[] result = new ArrayList[topics.length];\n\t\tint i = 0;\n\t\tfor(String topic:topics) {\n\t\t\tList<byte[]> bocache = fcache.getList(topic);\n\t\t\tif(bocache == null || bocache.isEmpty()) {\n\t\t\t\tlog.info(\"topic {} has no message in cache\",topic);\n\t\t\t}else {\n\t\t\t\tresult[i++] = bocache;\n\t\t\t}\t\t\n\t\t}\n\t\treturn result;\n\t}", "Collection getUniqueKeysInGroup(Object groupID) throws Exception;", "public ArrayList<Broker> getBrokerLog()\r\n {\r\n \r\n return brokerLog;\r\n }", "public CachetComponentGroupList getComponentGroups() {\n throw new RuntimeException(\"Method not implemented.\");\n }", "public List<Client> getAllClient();", "public static List<String> getConnectionNames(AsyncHttpClient httpClient, String rabbitAdminPort) throws Exception {\n final Response response = httpClient\n .prepareGet(\"http://localhost:\" + rabbitAdminPort + \"/api/connections\")\n .setRealm(realm)\n .execute().get();\n ObjectMapper mapper = new ObjectMapper();\n List<String> connections = new ArrayList<>();\n final List<Map<String,Object>> list = mapper.readValue(response.getResponseBody(), List.class);\n for(Map<String,Object> entry : list){\n connections.add(\"[ name=\"+entry.get(\"name\")+\", channels=\"+entry.get(\"channels\")+\", connected_at=\"+new DateTime(entry.get(\"connected_at\"))+\"]\");\n }\n return connections;\n }", "public List<Object> invokeMapReduce(Invoker invoker) {\n List<Pair<Pair<Short, Integer>, String>> list = clientConnections.getMapClientFromAll();\n List<KeyCluster> keyClusterList = new ArrayList<KeyCluster>(list.size());\n for ( Pair<Pair<Short, Integer>, String> each : list) {\n //key is represented by node 1 separate by , total nodes example 1,3\n //will passed by key to store proc to determine the how partition data node\n KeyCluster keyCluster = new KeyCluster(each.getFirst().getFirst(), Key.createKey(each.getSecond()),\n each.getFirst().getSecond() );\n keyClusterList.add( keyCluster);\n }\n //add Key must be true, key carry information about how to split cluster\n return executeStoreProc(invoker, keyClusterList, true);\n }", "public static void createEveryone(OpBroker broker) {\n OpQuery query = broker.newQuery(OpGroup.EVERYONE_ID_QUERY);\r\n Iterator result = broker.iterate(query);\r\n if (!result.hasNext()) {\r\n OpTransaction t = broker.newTransaction();\r\n OpGroup everyone = new OpGroup();\r\n everyone.setName(OpGroup.EVERYONE_NAME);\r\n everyone.setDisplayName(OpGroup.EVERYONE_DISPLAY_NAME);\r\n everyone.setDescription(OpGroup.EVERYONE_DESCRIPTION);\r\n broker.makePersistent(everyone);\r\n t.commit();\r\n }\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.getAllGroupListInfo();\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tList<Group> groupList = (List<Group>) result.data;\n\t\t\t\tString str_groupname = groupname.getText().toString();\n\t\t\t\tfor (int i = 0; i < groupList.size(); i++) {\n\t\t\t\t\tLog.e(TAG,groupList.get(i).getName()+\"\");\n\t\t\t\t\t\tLog.e(TAG,groupList.get(i).getId()+\"\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public com.hps.july.persistence.Group getGroups() throws Exception {\n\tGroupAccessBean bean = constructGroups();\n\tif (bean != null)\n\t return (Group)bean.getEJBRef();\n\telse\n\t return null;\n\n}", "public void getAllGroups() { \t\n \tCursor groupsCursor = groupDbHelper.getAllGroupEntries();\n \tList<String> groupNames = new ArrayList<String>();\n \tgroupNames.add(\"Create a Group\");\n \t\n \t// If query returns group, display them in Groups Tab\n \t// Might want to add ordering query so that most recent\n \t// spots display first...\n \tif (groupsCursor.getCount() > 0) {\n \t\tgroupsCursor.moveToFirst();\n \t\twhile (!groupsCursor.isAfterLast()) {\n \t\t\tgroupNames.add(groupsCursor.getString(1));\n \t\t\tgroupsCursor.moveToLast();\n \t\t}\n \t\t\n \t}\n \t\n \t// Close cursor\n \tgroupsCursor.close();\n \t\n \t// Temporary - Ad`d Sample Groups to List\n \t//for (String groupname : groupSamples) {\n \t\t//groupNames.add(groupname);\n \t//}\n \t\n \tgroupsview.setAdapter(new ArrayAdapter<String>(this, \n \t\t\t\tandroid.R.layout.simple_list_item_1, groupNames));\n }", "public ArrayList<String> getChildrenNodes(MasterMgrClient mclient, String start)\n\tthrows PipelineException\n\t{\n\t\tArrayList<String> toReturn = new ArrayList<String>();\n\t\tTreeMap<String, Boolean> comps = new TreeMap<String, Boolean>();\n\t\tcomps.put(start, false);\n\t\tNodeTreeComp treeComps = mclient.updatePaths(pUser, pView, comps);\n\t\tPath p = new Path(start);\n\t\tArrayList<String> parts = p.getComponents();\n\t\tfor (String comp : parts)\n\t\t{\n\t\t\tif(treeComps!=null)\n\t\t\t\ttreeComps = treeComps.get(comp);\n\t\t}\n\t\tfor (String s : treeComps.keySet())\n\t\t{\n\t\t\ttoReturn.add(s);\n\t\t}\n\t\treturn toReturn;\n\t}", "Observable<FailoverGroup> getAsync(String resourceGroupName, String serverName, String failoverGroupName);", "private void groupQuery() {\n ParseQuery<ParseObject> query = ParseQuery.getQuery(ParseConstants.CLASS_GROUPS);\n query.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject group, ParseException e) {\n setProgressBarIndeterminateVisibility(false);\n if(e == null) {\n mGroup = group;\n mMemberRelation = mGroup.getRelation(ParseConstants.KEY_MEMBER_RELATION);\n mMemberOfGroupRelation = mCurrentUser.getRelation(ParseConstants.KEY_MEMBER_OF_GROUP_RELATION);\n\n //only the admin can delete the group\n mGroupAdmin = mGroup.get(ParseConstants.KEY_GROUP_ADMIN).toString();\n mGroupAdmin = Utilities.removeCharacters(mGroupAdmin);\n if ((mCurrentUser.getUsername()).equals(mGroupAdmin)) {\n mDeleteMenuItem.setVisible(true);\n }\n\n mGroupName = group.get(ParseConstants.KEY_GROUP_NAME).toString();\n mGroupName = Utilities.removeCharacters(mGroupName);\n setTitle(mGroupName);\n\n mCurrentDrinker = mGroup.get(ParseConstants.KEY_CURRENT_DRINKER).toString();\n mCurrentDrinker = Utilities.removeCharacters(mCurrentDrinker);\n mCurrentDrinkerView.setText(mCurrentDrinker);\n\n mPreviousDrinker = mGroup.get(ParseConstants.KEY_PREVIOUS_DRINKER).toString();\n mPreviousDrinker = Utilities.removeCharacters(mPreviousDrinker);\n mPreviousDrinkerView.setText(mPreviousDrinker);\n\n listViewQuery(mMemberRelation);\n }\n else {\n Utilities.getNoGroupAlertDialog(null);\n }\n }\n });\n }", "private static void showGroups(Service service) {\r\n\t\tList<Group> groupList = service.getGroupList();\r\n\t\tfor(int index=0;index<groupList.size();index++) {\r\n\t\t\tSystem.out.println(groupList.get(index));\r\n\t\t}\r\n\t}", "@GetMapping(\"/group\")\n\tResponseEntity<String> getAllGroup() {\n\t\tArrayList<Group> groupList = new ArrayList<Group>();\n\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tConnection conn = DriverManager.getConnection(connectionString());\n\n\t\t\tString storedProc = \"select * from get_all_group()\";\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(storedProc);\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tlong groupId = rs.getLong(\"id\");\n\t\t\t\tString groupName = rs.getString(\"name\");\n\t\t\t\tint subscriberCount = rs.getInt(\"subscriber_count\");\n\t\t\t\tString groupDesc = rs.getString(\"descr\");\n\t\t\t\tDate createdDate = rs.getDate(\"created_date\");\n\t\t\t\tDate updatedDate = rs.getDate(\"updated_date\");\n\t\t\t\tint categoryId = rs.getInt(\"category_id\");\n\n\t\t\t\tGroup group = new Group(groupId, groupName, subscriberCount, groupDesc, createdDate, updatedDate,\n\t\t\t\t\t\tcategoryId);\n\t\t\t\tgroupList.add(group);\n\t\t\t}\n\t\t} catch (SQLException err) {\n\t\t\tSystem.out.println(err.getMessage());\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(err.getMessage());\n\t\t} catch (ClassNotFoundException err) {\n\t\t\tSystem.out.println(err.getMessage());\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(err.getMessage());\n\t\t}\n\n\t\t// Convert group list to json\n\t\tString json = \"\";\n\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tjson = mapper.writeValueAsString(groupList);\n\t\t} catch (Exception err) {\n\t\t\tSystem.out.println();\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(err.getMessage());\n\t\t}\n\n\t\treturn ResponseEntity.ok(json);\n\t}", "private String getZkServers(ServletContext context){\n Configuration config = new Configuration();\n config.addResource(\"pxf-site.xml\");\n String zk_hosts = config.get(\"zookeeper\");\n if(LOG.isDebugEnabled())\n LOG.debug(\"zookeeper server is :\" + zk_hosts);\n\n return zk_hosts;\n }", "void getOWLOntologyIDsAsync(Set<Object> groups,\n\t\t\tIAsyncCallback<String> callback);", "private void refreshList() {\n\t\t\t\tlist.clear();\n\t\t\t\tGetChildrenBuilder childrenBuilder = client.getChildren();\n\t\t\t\ttry {\n\t\t\t\t\tList<String> listdir = childrenBuilder.forPath(servicezoopath);\n\t\t\t\t\tfor (String string : listdir) {\n\t\t\t\t\t\tbyte[] data = client.getData().forPath(servicezoopath + \"/\" + string);\n\t\t\t\t\t\tlist.add(new String(data));\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@SuppressWarnings(\"serial\")\n\tpublic ArrayList<String> getGroups() throws Exception{\n\t\treturn new ArrayList<String>(){{\n\t\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\t\tGroups groups = Groups.findOrCreate(ur);\n\t\t\tfor(Group g:Group.list(groups))\n\t\t\t\tadd(g.getAttribute(\"name\"));\n\t\t}};\n\t}", "public void listThreadGroups() {\n\t\tthis.toSlave.println(MasterProcessInterface.LIST_THREAD_GROUPS_COMMAND);\n\t}", "Collection getIndexesInGroup(Object groupID) throws Exception;", "@Transactional(readOnly = true)\n public List<MsgReceiverGroup> findAll() {\n log.debug(\"Request to get all MsgReceiverGroups\");\n return msgReceiverGroupRepository.findAllWithEagerRelationships();\n }", "List<MusclegroupCategory> getAllMusclegroup() throws PersistenceException;", "@Override\n public List<BrokerMessageListener> findAll() throws SystemException {\n return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n }", "@Override\n public List checkGroup(List groupChannels) throws DefaultException {\n List existsList = new ArrayList();\n List notExists = new ArrayList();\n if (ListUtils.listIsExists(groupChannels)) {\n\n for (int i = 0; i < groupChannels.size(); i++) {\n String groupChannel = (String) groupChannels.get(i);\n if (!redisMsgService.hasKey(groupChannel + Constant.CHANNEL_REDIS)) {\n //throw new DefaultException(groupChannel + \"频道不存在\");\n notExists.add(groupChannel);\n } else {\n existsList.add(groupChannel);\n }\n\n }\n if (ListUtils.listIsExists(notExists)) {\n if (notExists.size() == groupChannels.size()) {\n String notExistsStr = \"\";\n for (int i = 0; i < notExists.size(); i++) {\n String groupChannel = (String) notExists.get(i);\n notExistsStr += groupChannel + \",\";\n\n }\n throw new DefaultException(notExistsStr + \"频道不存在\");\n }\n\n }\n\n }\n return existsList;\n //return notExistsGroups;\n\n /*groupChannels.stream().forEach((Object p) ->{\n if (!redisMsgService.hasKey(p+Constant.CHANNEL_REDIS)) {\n try {\n throw new DefaultException(p+\"频道不存在\");\n } catch (DefaultException e) {\n throw new DefaultException(p+\"频道不存在\");\n }\n }});*/\n\n }", "public interface MRConnectionManagerContainer {\n\n\n String MR_GROUP_PATH = \"/zk/mr/\";\n\n void start() throws Exception;\n\n void start(Map<String, MRMessageListener> messageListenerMap) throws Exception;\n\n void register();\n\n void add(Map.Entry<String, String> entry) throws Exception;\n\n void update(Map.Entry<String, String> entry);\n\n void addListener(String topic, MRMessageListener mrMessageListener);\n\n void remove(Map.Entry<String, String> entry);\n\n void refresh();\n\n void shutdown();\n\n void shutdownAndWait() throws InterruptedException;\n\n Map<String, MRConnectionManager> getMrConnectionManagerCache();\n\n static String groupPath(String group) {\n return String.format(\"%s%s\", MR_GROUP_PATH, group);\n }\n\n void setPerfetchSize(int perfetchSize);\n\n\n}", "private void printAllClients() {\n Set<Client> clients = ctrl.getAllClients();\n clients.stream().forEach(System.out::println);\n }", "List<Group> getGroups();", "public static void main(String[] args) {\n Properties configs = new Properties();\r\n //commit\r\n // 환경 변수 설정\r\n configs.put(\"bootstrap.servers\", \"localhost:9092\");\t\t// kafka server host 및 port\r\n configs.put(\"session.timeout.ms\", \"10000\");\t\t\t\t// session 설정\r\n configs.put(\"group.id\", \"test191031\");\t\t\t\t\t// topic 설정\r\n configs.put(\"key.deserializer\", \"org.apache.kafka.common.serialization.StringDeserializer\");\t// key deserializer\r\n configs.put(\"value.deserializer\", \"org.apache.kafka.common.serialization.StringDeserializer\"); // value deserializer\r\n \r\n @SuppressWarnings(\"resource\")\r\n\t\tKafkaConsumer<String, String> consumer = new KafkaConsumer<>(configs);\t// consumer 생성\r\n consumer.subscribe(Arrays.asList(\"test191031\"));\t\t// topic 설정\r\n \r\n SimpleDateFormat format1 = new SimpleDateFormat ( \"yyyy-MM-dd HH:mm:ss\");\r\n\r\n while (true) {\t// 계속 loop를 돌면서 producer의 message를 띄운다.\r\n ConsumerRecords<String, String> records = consumer.poll(500);\r\n for (ConsumerRecord<String, String> record : records) {\r\n \t\r\n \tDate time = new Date();\r\n \tString time1 = format1.format(time);\r\n \t\r\n String s = record.topic();\r\n if (\"test191031\".equals(s)) {\r\n System.out.println(time1 + \" | \" + record.value());\r\n } else {\r\n throw new IllegalStateException(\"get message on topic \" + record.topic());\r\n\r\n }\r\n }\r\n }\r\n \r\n\t}", "public StringBuilder adminDeleteConsumerGroupInfo(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n try {\n WebParameterUtils.reqAuthorizeCheck(master, brokerConfManager,\n req.getParameter(\"confModAuthToken\"));\n Set<String> batchOpTopicNames =\n WebParameterUtils.getBatchTopicNames(req.getParameter(\"topicName\"),\n true, false, null, sBuilder);\n Set<String> batchOpGroupNames =\n WebParameterUtils.getBatchGroupNames(req.getParameter(\"groupName\"),\n false, false, null, sBuilder);\n if (batchOpGroupNames.isEmpty()) {\n for (String tmpTopicName : batchOpTopicNames) {\n BdbGroupFilterCondEntity webFilterCondEntity =\n new BdbGroupFilterCondEntity();\n webFilterCondEntity.setTopicName(tmpTopicName);\n List<BdbGroupFilterCondEntity> webFilterCondEntities =\n brokerConfManager.confGetBdbAllowedGroupFilterCondSet(webFilterCondEntity);\n if (!webFilterCondEntities.isEmpty()) {\n webFilterCondEntity.setCreateUser(\"System\");\n brokerConfManager.confDelBdbAllowedGroupFilterCondSet(webFilterCondEntity);\n }\n BdbConsumerGroupEntity webConsumerGroupEntity =\n new BdbConsumerGroupEntity();\n webConsumerGroupEntity.setGroupTopicName(tmpTopicName);\n brokerConfManager.confDelBdbAllowedConsumerGroupSet(webConsumerGroupEntity);\n }\n } else {\n for (String tmpTopicName : batchOpTopicNames) {\n for (String tmpGroupName : batchOpGroupNames) {\n BdbGroupFilterCondEntity webFilterCondEntity =\n new BdbGroupFilterCondEntity();\n webFilterCondEntity.setTopicName(tmpTopicName);\n webFilterCondEntity.setConsumerGroupName(tmpGroupName);\n List<BdbGroupFilterCondEntity> webFilterCondEntities =\n brokerConfManager.confGetBdbAllowedGroupFilterCondSet(webFilterCondEntity);\n if (!webFilterCondEntities.isEmpty()) {\n webFilterCondEntity.setCreateUser(\"System\");\n brokerConfManager.confDelBdbAllowedGroupFilterCondSet(webFilterCondEntity);\n }\n BdbConsumerGroupEntity webConsumerGroupEntity =\n new BdbConsumerGroupEntity();\n webConsumerGroupEntity.setGroupTopicName(tmpTopicName);\n webConsumerGroupEntity.setConsumerGroupName(tmpGroupName);\n brokerConfManager.confDelBdbAllowedConsumerGroupSet(webConsumerGroupEntity);\n }\n }\n }\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\"}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\"}\");\n }\n return sBuilder;\n }", "@ApiOperation(value = \"获取常用联系人分组列表\")\n @GetMapping(value = \"/ifclist\")\n @ResponseBody\n public ReqResult getChatGroupList() throws Exception {\n String userId = SecurityFacade.getCurUserId();\n List<InfoFrequentConnect> ifcList = ifcService.getListByUser(userId);\n if (ifcList != null) {\n return ReqResult.success(ifcList);\n }\n return ReqResult.failed();\n }", "public StringBuilder adminQueryConsumerGroupInfo(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n BdbConsumerGroupEntity webConsumerGroupEntity =\n new BdbConsumerGroupEntity();\n try {\n webConsumerGroupEntity\n .setGroupTopicName(WebParameterUtils.validStringParameter(\"topicName\",\n req.getParameter(\"topicName\"),\n TBaseConstants.META_MAX_TOPICNAME_LENGTH,\n false, null));\n webConsumerGroupEntity\n .setConsumerGroupName(WebParameterUtils.validGroupParameter(\n \"groupName\",\n req.getParameter(\"groupName\"),\n TBaseConstants.META_MAX_GROUPNAME_LENGTH,\n false, null));\n webConsumerGroupEntity\n .setRecordCreateUser(WebParameterUtils.validStringParameter(\"createUser\",\n req.getParameter(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n false, null));\n List<BdbConsumerGroupEntity> webConsumerGroupEntities =\n brokerConfManager.confGetBdbAllowedConsumerGroupSet(webConsumerGroupEntity);\n SimpleDateFormat formatter =\n new SimpleDateFormat(TBaseConstants.META_TMP_DATE_VALUE);\n int j = 0;\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\",\\\"count\\\":\")\n .append(webConsumerGroupEntities.size()).append(\",\\\"data\\\":[\");\n for (BdbConsumerGroupEntity entity : webConsumerGroupEntities) {\n if (j++ > 0) {\n sBuilder.append(\",\");\n }\n sBuilder.append(\"{\\\"topicName\\\":\\\"\").append(entity.getGroupTopicName())\n .append(\"\\\",\\\"groupName\\\":\\\"\").append(entity.getConsumerGroupName())\n .append(\"\\\",\\\"createUser\\\":\\\"\").append(entity.getRecordCreateUser())\n .append(\"\\\",\\\"createDate\\\":\\\"\").append(formatter.format(entity.getRecordCreateDate()))\n .append(\"\\\"}\");\n }\n sBuilder.append(\"]}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\",\\\"count\\\":0,\\\"data\\\":[]}\");\n }\n return sBuilder;\n }", "public static List<KirolakObject> listByGroup(Group group)\n\t{\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tList<KirolakObject> items = session.createQuery(\"from Round r where r.compositeId.group = :group\").setParameter(\"group\", group).list();\n\t\tIterator<KirolakObject> iterator = items.iterator();\n\t\twhile(iterator.hasNext())\n\t\t{\n\t\t\tRound round = (Round)iterator.next();\t\t\t\t\n\t\t\tround.setMatches(MatchDAO.listByRound(round));\n\t\t}\n\t\treturn items;\n\t}", "public List<Object> retrieveIncrementalGroups() {\n List<Object> result = new ArrayList<Object>();\n for (ProvisioningGroupWrapper provisioningGroupWrapper : this.provisioningGroupWrappers) {\n \n if (provisioningGroupWrapper.getGrouperTargetGroup() != null) {\n result.add(provisioningGroupWrapper.getGrouperTargetGroup());\n } else if (provisioningGroupWrapper.getGrouperProvisioningGroup() != null) {\n result.add(provisioningGroupWrapper.getGrouperProvisioningGroup());\n } else if (provisioningGroupWrapper.getGcGrouperSyncGroup() != null) {\n result.add(provisioningGroupWrapper.getGcGrouperSyncGroup());\n } else if (provisioningGroupWrapper.getProvisioningStateGroup() != null) {\n result.add(provisioningGroupWrapper.getProvisioningStateGroup());\n }\n }\n return result;\n }", "@Override\r\n\tpublic List<String> getGroup(String service) {\n\t\tList<String> results = new ArrayList<String>();\r\n\t\tString rest = null;\r\n\t\tfor(String s : prefixes)\r\n\t\t\tif(service.startsWith(s))\r\n\t\t\t\trest = service.substring(s.length());\r\n\t\tif(rest == null)\r\n\t\t\treturn null;\r\n\t\tfor(String s : prefixes)\r\n\t\t\tresults.add(s + rest);\r\n\t\treturn results;\r\n\t\t\t\r\n\t}", "private void checkAllarmOnDatabase(Session session) {\n\t\tsynchronized (clients) {\n\t\t\tfor (Session sess : clients) {\n\t\t\t\t/**\n\t\t\t\t * check the mapping\n\t\t\t\t */\n\t\t\t\tString userid = (String) this.endpointConfig.getUserProperties()\n\t\t\t\t\t\t.get(sess.getId());\n\t\t\t\tif (sess.isOpen()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString message = \"\";\n\t\t\t\t\t\tif (StringUtils.isNotEmpty(userid)) {\n\t\t\t\t\t\t\tmessage = codaEveService\n\t\t\t\t\t\t\t\t\t.jsonQueueGetAllarms(userid);\n\t\t\t\t\t\t\tsess.getBasicRemote().sendText(message);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\tlogger.error(ex.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public List<String> getAllGroups() throws IOException {\n String httpResponse = httpGet(baseUrl.resolve(\"/automation/v2/groups\"));\n return mapper.readValue(httpResponse, new TypeReference<List<String>>() {\n });\n }", "@Test\n public void getPartitionIds() {\n final EventHubConsumerAsyncClient consumer = toClose(createBuilder()\n .consumerGroup(DEFAULT_CONSUMER_GROUP_NAME)\n .buildAsyncConsumerClient());\n\n // Act & Assert\n StepVerifier.create(consumer.getPartitionIds())\n .expectNextCount(NUMBER_OF_PARTITIONS)\n .verifyComplete();\n }", "Collection<Service> getAllSubscribeService();", "public Map<String, PartitionGroupConfig<?>> getPartitionGroups() {\n return partitionGroups;\n }", "List<String> getAllJobGroupNames() throws GWTJahiaServiceException;", "public List<Group> getMyGroups() {\n String path = template.urlFor( UrlTemplate.GROUPS_PATH ).build();\n try {\n String stringResponse = client.get( path );\n Result<com.silanis.esl.api.model.Group> apiResponse = JacksonUtil.deserialize( stringResponse, new TypeReference<Result<com.silanis.esl.api.model.Group>>() {\n } );\n List<Group> result = new ArrayList<Group>();\n for ( com.silanis.esl.api.model.Group apiGroup : apiResponse.getResults() ) {\n result.add( new GroupConverter(apiGroup).toSDKGroup());\n }\n return result;\n } catch ( RequestException e ) {\n throw new EslServerException( \"Failed to retrieve Groups list.\", e );\n } catch ( Exception e ) {\n throw new EslException( \"Failed to retrieve Groups list.\", e );\n }\n }" ]
[ "0.6502632", "0.6022897", "0.5945016", "0.57550585", "0.5734807", "0.5723996", "0.5661321", "0.5605246", "0.55802095", "0.5560359", "0.5526674", "0.5476857", "0.5473109", "0.5325891", "0.5324717", "0.52769065", "0.5272635", "0.5245936", "0.5187478", "0.51852405", "0.5136443", "0.5125345", "0.51155686", "0.51057535", "0.50972515", "0.50899994", "0.50643325", "0.50604576", "0.5058449", "0.5056591", "0.50558966", "0.50391644", "0.5029572", "0.502246", "0.4996289", "0.499236", "0.4988542", "0.4983693", "0.4976281", "0.4965654", "0.49650806", "0.495849", "0.49551764", "0.4940784", "0.49403712", "0.491044", "0.4909778", "0.49047622", "0.49012062", "0.48975214", "0.4893414", "0.48931557", "0.48930517", "0.48927054", "0.48911178", "0.48898175", "0.4888793", "0.48845297", "0.48736182", "0.48724487", "0.48655668", "0.48626462", "0.4858969", "0.48581305", "0.48274827", "0.4805229", "0.48016727", "0.4791951", "0.47906217", "0.47856674", "0.47853667", "0.47826388", "0.4782445", "0.47808868", "0.47796333", "0.47720435", "0.47648805", "0.47637296", "0.47601557", "0.47540432", "0.47433558", "0.47426534", "0.47410417", "0.47390848", "0.47382534", "0.47293875", "0.47280505", "0.4725469", "0.4722448", "0.47224134", "0.47219318", "0.4719795", "0.47156936", "0.47146344", "0.47106448", "0.47023562", "0.46900627", "0.4681449", "0.46788308", "0.46730742" ]
0.57908
3
read all broker group in the zookeeper
public static void getCluster(ZkClient zkClient) { try { if(zkClient.getZooKeeper().getState().isAlive()){ List<String> allGroupNames = ZkUtils.getChildrenParentMayNotExist(zkClient, ServerRegister.ZK_BROKER_GROUP); Collections.sort(allGroupNames); if (allGroupNames != null) { //LOGGER.debug("read all broker group count: " + allGroupNames.size()); List<Group> allGroup = new ArrayList<Group>(); Map<String, String> slaveIp = new HashMap<>(); for (String group : allGroupNames) { String jsonGroup = ZkUtils.readData(zkClient, ServerRegister.ZK_BROKER_GROUP + "/" + group); if(StringUtils.isNotBlank(jsonGroup)){ Group groupObj = DataUtils.json2BrokerGroup(jsonGroup); allGroup.add(groupObj); if(groupObj.getSlaveOf() != null){ slaveIp.put(groupObj.getSlaveOf().getHost(), groupObj.getMaster().getHost()); } //LOGGER.debug("Loading Broker Group " + groupObj.toString()); } } Cluster.clear(); List<Group> noSlave = new ArrayList<Group>(); for(Group group:allGroup){ if(slaveIp.containsKey(group.getMaster().getHost())){ group.getMaster().setShost(slaveIp.get(group.getMaster().getHost())); Cluster.addGroup(group); }else{ noSlave.add(group); } } if(noSlave.size() > 0){ Cluster.addGroups(noSlave); //LOGGER.info("Master load success, list:"+Cluster.getMasters().toString()); } } } } catch (Exception e) { LOGGER.error("get cluster error", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getTopics() {\n\n try {\n ZooKeeper zk = new ZooKeeper(\"localhost:2181\", 10000, null);\n List<String> topics = zk.getChildren(\"/brokers/topics\", false);\n// for (String topic : topics) {\n// System.out.println(topic);\n// }\n return topics.toArray(new String[0]);\n\n } catch (InterruptedException | KeeperException | IOException e) {\n e.printStackTrace();\n }\n return null;\n\n // Prints the topics to stdout\n // Iterator it = topics.entrySet().iterator();\n // System.out.println(\"Available topics:\");\n // while (it.hasNext()) {\n // Map.Entry entry = (Map.Entry)it.next();\n // System.out.println(\"> \" + entry.getKey());\n // }\n }", "ConsumerGroups consumerGroups();", "public static void getCustomerCluster(ZkClient zkClient, String[] queueNames) {\n \tif(queueNames != null && queueNames.length > 0){\n \t\tgetCluster(zkClient);\n \t\ttry {\n \t\t\tfor(String queue : queueNames){\n \t\t\tif(StringUtils.isNotBlank(queue)){\n \t\t\t\tList<String> childrens = zkClient.getChildren(ZkTopicQueueReadIndex.ZK_INDEX + \"/\" + queue);\n \t\t\t\tif(childrens != null){\n \t\t\t\t\tList<String> sortChildrens = new ArrayList<String>();\n \t\t\t\t\tSet<String> remove = new HashSet<String>();\n \t\t\t\t\tfor(String ip:Cluster.getMasterIps()){\n \t\t\t\t\t\tfor(String sip:childrens){\n \t\t\t\t\t\t\tif(sip.startsWith(Group.QUEUE_INDEX_PREFIX)){\n \t\t\t\t\t\t\t\tsip = sip.replace(Group.QUEUE_INDEX_PREFIX, \"\");\n \t\t\t\t\t\t\t\tString[] ips = sip.split(\":\");\n \t\t\t\t\t\t\tif(ip.equals(ips[0])){\n \t\t\t\t\t\t\t\tsortChildrens.add(sip);\n \t\t\t\t\t\t\t\tremove.add(sip);\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor(String yip:childrens){\n \t\t\t\t\t\tif(yip.startsWith(Group.QUEUE_INDEX_PREFIX)){\n \t\t\t\t\t\t\tyip = yip.replace(Group.QUEUE_INDEX_PREFIX, \"\");\n \t\t\t\t\t\t\tif(!remove.contains(yip)){\n \t\t\t\t\t\t\tsortChildrens.add(yip);\n \t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor(String child:sortChildrens){\n \t\t\t\t\tString[] ips = child.split(\":\");\n \t\t\t\t\tif(ips != null){\n \t\t\t\t\t\tif(ips.length == 1){\n \t\t\t\t\t\t\tCluster.putSlave(queue, ips[0], null);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\tCluster.putSlave(queue, ips[0], ips[1]);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tConcurrentHashMap<String, List<Group>> maps = Cluster.getQueueGroups();\n \t\tif(maps != null && maps.size() > 0){\n \t\t\tLOGGER.debug(\"Customer load success, list:\");\n \t\tfor(Entry<String, List<Group>> entry:maps.entrySet()){\n \t\t\tLOGGER.debug(entry.getKey()+\"=>\"+entry.getValue().toString());\n \t\t}\n \t\t}\n \t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOGGER.error(\"get customer cluster error\", e);\n\t\t\t}\n \t}\n }", "List<GroupUser> getConnectedClients();", "void getGroupsAsync(IAsyncCallback<Set<Object>> callback);", "public ChannelGroup getConnections();", "public List<VideoFile> loadChannelNames(int broker){\n //open connection\n Socket connection = null;\n try {\n connection = new Socket(IP, broker);\n\n //request brokers list\n ObjectOutputStream out = new ObjectOutputStream(connection.getOutputStream());\n out.writeObject(\"INIT\");\n out.flush();\n\n //get answer from broker\n ObjectInputStream in = new ObjectInputStream(connection.getInputStream());\n String message = (String) in.readObject();\n //broker will send\n if(message.equals(\"FAILURE\")){\n Extras.printError(\"CONSUMER: tried to Init without publishers\");\n }else if(message.equals(\"ACCEPT\")){\n ArrayList< String> list = (ArrayList<String>) in.readObject();\n for( String s : list){\n publisherToBrokers.put(s,broker);\n }\n getBrokers(in);\n }\n } catch(IOException e){\n Extras.printError(\"CONSUMER: LOAD: ERROR: Could not get streams\");\n } catch (ClassNotFoundException e){\n Extras.printError(\"CONSUMER: LOAD: ERROR: Could not cast Object to String\");\n }\n\n disconnect(connection);\n return null;\n }", "void retrieveBrokerList() {\n java.util.logging.Logger.getLogger(TAG).log(Level.INFO, \"Start: retrieveBrokerList()\");\n // request the list to the cloud\n // parse the response and add brokers to \"brokers\"\n NetworkThread thread = new NetworkThread();\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n java.util.logging.Logger.getLogger(TAG).log(Level.INFO, \"Finish: retrieveBrokerList()\");\n }", "ZigBeeGroup getGroup(int groupId);", "@GetMapping(\"/all\")\n public BasePageResponse getAllGroup() throws NodeMgrException {\n BasePageResponse pageResponse = new BasePageResponse(ConstantCode.SUCCESS);\n Instant startTime = Instant.now();\n log.info(\"start getAllGroup startTime:{}\", startTime.toEpochMilli());\n\n // get group list\n int count = groupService.countOfGroup(null, GroupStatus.NORMAL.getValue());\n if (count > 0) {\n List<TbGroup> groupList = groupService.getGroupList(GroupStatus.NORMAL.getValue());\n pageResponse.setTotalCount(count);\n pageResponse.setData(groupList);\n }\n\n // reset group\n resetGroupListTask.asyncResetGroupList();\n\n log.info(\"end getAllGroup useTime:{} result:{}\",\n Duration.between(startTime, Instant.now()).toMillis(),\n JsonTools.toJSONString(pageResponse));\n return pageResponse;\n }", "List<storage_server_connections> getAllForVolumeGroup(String group);", "public void sync() throws KeeperException, InterruptedException {\n members = zk.getChildren(thisPrefix, groupWatcher, null); // also reset the watcher\n }", "String zookeeperQuorum();", "@Test\n public void testZookeeperCacheLoader() throws InterruptedException, KeeperException, Exception {\n\n DiscoveryZooKeeperClientFactoryImpl.zk = mockZookKeeper;\n\n @SuppressWarnings(\"resource\")\n ZookeeperCacheLoader zkLoader = new ZookeeperCacheLoader(new DiscoveryZooKeeperClientFactoryImpl(), \"\", 30_000);\n\n List<String> brokers = Lists.newArrayList(\"broker-1:15000\", \"broker-2:15000\", \"broker-3:15000\");\n for (int i = 0; i < brokers.size(); i++) {\n try {\n LoadManagerReport report = i % 2 == 0 ? getSimpleLoadManagerLoadReport(brokers.get(i))\n : getModularLoadManagerLoadReport(brokers.get(i));\n zkLoader.getLocalZkCache().getZooKeeper().create(LOADBALANCE_BROKERS_ROOT + \"/\" + brokers.get(i),\n ObjectMapperFactory.getThreadLocal().writeValueAsBytes(report), ZooDefs.Ids.OPEN_ACL_UNSAFE,\n CreateMode.PERSISTENT);\n } catch (Exception e) {\n fail(\"failed while creating broker znodes\");\n }\n }\n\n // strategically wait for cache to get sync\n for (int i = 0; i < 5; i++) {\n if (zkLoader.getAvailableBrokers().size() == 3 || i == 4) {\n break;\n }\n Thread.sleep(1000);\n }\n\n // 2. get available brokers from ZookeeperCacheLoader\n List<LoadManagerReport> list = zkLoader.getAvailableBrokers();\n\n // 3. verify retrieved broker list\n Set<String> cachedBrokers = list.stream().map(loadReport -> loadReport.getWebServiceUrl())\n .collect(Collectors.toSet());\n Assert.assertEquals(list.size(), brokers.size());\n Assert.assertTrue(brokers.containsAll(cachedBrokers));\n\n // 4.a add new broker\n final String newBroker = \"broker-4:15000\";\n LoadManagerReport report = getSimpleLoadManagerLoadReport(newBroker);\n zkLoader.getLocalZkCache().getZooKeeper().create(LOADBALANCE_BROKERS_ROOT + \"/\" + newBroker,\n ObjectMapperFactory.getThreadLocal().writeValueAsBytes(report), ZooDefs.Ids.OPEN_ACL_UNSAFE,\n CreateMode.PERSISTENT);\n brokers.add(newBroker);\n\n Thread.sleep(100); // wait for 100 msec: to get cache updated\n\n // 4.b. get available brokers from ZookeeperCacheLoader\n list = zkLoader.getAvailableBrokers();\n\n // 4.c. verify retrieved broker list\n cachedBrokers = list.stream().map(loadReport -> loadReport.getWebServiceUrl()).collect(Collectors.toSet());\n Assert.assertEquals(list.size(), brokers.size());\n Assert.assertTrue(brokers.containsAll(cachedBrokers));\n\n }", "public java.util.Iterator engineListRootGroups() {\n ConfigurationHandler handler = factory.getConfigurationHandler();\n Configuration configuration = null;\n try {\n configuration = factory.getConfiguration(GROUPS_CONFIG_PATH, false, handler);\n return treeManager.listRoots(configuration);\n } catch (Exception e) {\n throw new BaseSecurityException(BaseSecurityException.CANNOT_LIST_ROOT_GROUPS, e);\n } finally {\n factory.close(configuration, handler);\n }\n }", "@Override\n\tpublic GroupSet getAllGroups() throws DataBackendException\n {\n GroupSet groupSet = new GroupSet();\n Connection con = null;\n\n try\n {\n \n con = Transaction.begin();\n\n List<Group> groups = doSelectAllGroups(con);\n\n for (Group group : groups)\n {\n // Add dependent objects if they exist\n ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con, getLazyLoading());\n\n groupSet.add(group);\n }\n\n Transaction.commit(con);\n con = null;\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Error retrieving group information\", e);\n }\n finally\n {\n if (con != null)\n {\n Transaction.safeRollback(con);\n }\n }\n\n return groupSet;\n }", "public void listGroup() {\r\n List<Group> groupList = groups;\r\n EventMessage evm = new EventMessage(\r\n EventMessage.EventAction.FIND_MULTIPLE,\r\n EventMessage.EventType.OK,\r\n EventMessage.EventTarget.GROUP,\r\n groupList);\r\n notifyObservers(evm);\r\n }", "public List<String> getAll() throws KeeperException, InterruptedException {\n List<String> copy = new ArrayList<>();\n copy.addAll(members);\n return copy;\n }", "ConsumerGroup getConsumerGroup(String name) throws RegistrationException;", "@Override\n protected Object doInBackground(Object... arg0) {\n\n try {\n //Parameter receiving example\n for(int i = 0 ; i < arg0.length ; i++)\n System.out.println((String)arg0[i]);\n\n //ClientCall example\n System.out.println(\"Call read group now!\");\n Group g = new Group();\n g.setViewerId(67);\n groupList = GroupClient.readGroups(g);\n System.out.println(\"Group Number:\"+groupList);\n\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return groupList;\n }", "public List<BrokerStatus> getBrokers()\r\n {\r\n return Collections.unmodifiableList(brokers);\r\n }", "public void getGroups() {\n String listOfCode = prefs.getString(\"listOfCode\");\n if (!listOfCode.isEmpty()) {\n for (String groupPair : listOfCode.split(\",\"))\n if (!groupPair.isEmpty()) {\n final String nickname = groupPair.substring(0, groupPair.indexOf('|'));\n String code = groupPair.substring(groupPair.indexOf('|') + 1);\n ServerAPI.groupInformation(code, new RequestHandler<Group>() {\n @Override\n public void callback(Group result) {\n if (result == null) {\n return;\n }\n savedGroups.add(new Pair<String, Group>(nickname, result));\n populateListView();\n }\n });\n }\n }\n }", "public List<Clients> getallClients();", "@RequiresBluetoothConnectPermission\n @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)\n public List<DeviceGroup> getDiscoveredGroups(boolean mPublicAddr) {\n if (DBG) log(\"getDiscoveredGroups()\");\n\n if (!mAppRegistered) {\n Log.e(TAG, \"App not registered for Group operations.\" +\n \" Register App using registerGroupClientApp\");\n return null;\n }\n\n final IBluetoothDeviceGroup service = getService();\n if (service == null) {\n Log.e(TAG, \"Proxy is not attached to Profile Service. Can't fetch Groups.\");\n return null;\n }\n\n try {\n List<DeviceGroup> groups = service.getDiscoveredGroups(mPublicAddr, mAttributionSource);\n return groups;\n } catch (RemoteException e) {\n Log.e(TAG, \"Stack:\" + Log.getStackTraceString(new Throwable()));\n }\n\n return null;\n }", "public ByteBufferMessageSet fetchMessages(PartitionMetadata partitionMetadata, String topic, long startOffset) {\n SimpleConsumer consumer = consumerMap.get(partitionMetadata.leader().id());\n ByteBufferMessageSet messageSet = fetchMessages(consumer, topic, partitionMetadata.partitionId(), startOffset);\n// simpleConsumer.close();\n return messageSet;\n }", "@GET\n @Path(\"/seeAllGroups/{userName}\")\n public String seeAllGroups(@PathParam(\"userName\") String userName) {\n try {\n User user = userService.getUserByUsername(userName);\n List<GroupMessage> groups = accountService.seeAllGroups(user);\n StringBuilder sb = new StringBuilder(\"[\");\n for (GroupMessage group : groups) {\n sb.append(getGroupByName(group.getName())).append(\",\");\n }\n sb.append(\"]\");\n return sb.toString();\n } catch (Exception e) {\n return \"err\";\n }\n }", "public String[] getLookupGroups() throws RemoteException {\n\t\treturn disco.getGroups();\n\t}", "public static Iterator getKeys(String group) {\n\t\tConfigManager cg = getConfigManager(group);\n\t\tIterator returnValue = null;\n\t\tif (cg != null) {\n\t\t\treturnValue = cg.getConfig().getKeys();\n\t\t}\n\t\treturn returnValue;\n\t}", "private Vector getGroupItems() {\n return protocol.getGroupItems();\n }", "List<String> getGroups(String usid);", "@Override\n public List<String> getGroups(String user) throws IOException {\n // parent get unix groups\n List<String> groups = new LinkedList<String>(super.getGroups(user));\n NetgroupCache.getNetgroups(user, groups);\n return groups;\n }", "public abstract Collection getGroups();", "@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}", "private static List<Group> getCollectionFromResultSet(ResultSet resultset) throws SQLException {\r\n\t\t\r\n\t\tList<Group> collection = new LinkedList<Group>();\r\n\t\t\r\n\t\twhile (resultset.next()) { \r\n\t\t\t// Appending all the objects to the collection.\r\n\t\t\tGroup group = getObjectFromCursor(resultset);\r\n\t\t\tcollection.add(group);\r\n\t\t\tlog.trace(\"Loaded client group: \" + group.toString());\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn Collections.unmodifiableList(collection);\r\n\r\n\t}", "public List<ConsumerRecord<byte[], byte[]>> consumeAllRecordsFromTopic(final String topic) {\n // Connect to broker to determine what partitions are available.\n KafkaConsumer<byte[], byte[]> kafkaConsumer = kafkaTestServer.getKafkaConsumer(\n ByteArrayDeserializer.class,\n ByteArrayDeserializer.class\n );\n\n final List<Integer> partitionIds = new ArrayList<>();\n for (PartitionInfo partitionInfo: kafkaConsumer.partitionsFor(topic)) {\n partitionIds.add(partitionInfo.partition());\n }\n kafkaConsumer.close();\n\n return consumeAllRecordsFromTopic(topic, partitionIds);\n }", "@GET\n @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Path(\"/{id}\")\n @CheckPermission(roles = { Role.SYSTEM_MONITOR, Role.TENANT_ADMIN }, acls = { ACL.ANY })\n public BlockConsistencyGroupRestRep getConsistencyGroup(@PathParam(\"id\") final URI id) {\n ArgValidator.checkFieldUriType(id, BlockConsistencyGroup.class, \"id\");\n\n // Query for the consistency group\n final BlockConsistencyGroup consistencyGroup = (BlockConsistencyGroup) queryResource(id);\n\n // Get the implementation for the CG.\n BlockServiceApi blockServiceApiImpl = getBlockServiceImpl(consistencyGroup);\n\n // Get the CG volumes\n List<Volume> volumes = BlockConsistencyGroupUtils.getActiveVolumesInCG(consistencyGroup,\n _dbClient, null);\n\n // If no volumes, just return the consistency group\n if (volumes.isEmpty()) {\n return map(consistencyGroup, null, _dbClient);\n }\n\n Set<URI> volumeURIs = new HashSet<URI>();\n for (Volume volume : volumes) {\n volumeURIs.add(volume.getId());\n }\n return map(consistencyGroup, volumeURIs, _dbClient);\n }", "public Object[] getGroupList() {\n return grouptabs.keySet().toArray();\n }", "public static ArrayList<MqttClient> getAllClients() {\n return clients;\n }", "public List<SecGroup> getAllGroups();", "protected abstract <T extends Group> List<T> doSelectAllGroups(Connection con)\n throws TorqueException;", "Group[] getParents() throws AccessManagementException;", "@Override\n public List<KeepercontainerTbl> doQuery() throws DalException {\n List<KeepercontainerTbl> allDcKeeperContainers = dao.findActiveByDcName(dcName, KeepercontainerTblEntity.READSET_FULL);\n List<KeepercontainerTbl> allDcOrgKeeperContainers = allDcKeeperContainers.stream().filter(keepercontainer -> keepercontainer.getKeepercontainerOrgId() == clusterOrgId).collect(Collectors.toList());\n\n List<KeepercontainerTbl> dcOrgKeeperContainersInUsed;\n if (allDcOrgKeeperContainers.isEmpty() && clusterOrgId != XPipeConsoleConstant.DEFAULT_ORG_ID) {\n logger.info(\"cluster {} with org id {} is going to find keepercontainers in normal pool\",\n clusterName, clusterOrgId);\n allDcOrgKeeperContainers = allDcKeeperContainers.stream().filter(keepercontainer -> keepercontainer.getKeepercontainerOrgId() == XPipeConsoleConstant.DEFAULT_ORG_ID).collect(Collectors.toList());\n\n // find keepers in used in normal org\n dcOrgKeeperContainersInUsed = dao.findKeeperContainerByCluster(dcName, XPipeConsoleConstant.DEFAULT_ORG_ID,\n KeepercontainerTblEntity.READSET_KEEPER_COUNT_BY_CLUSTER);\n } else {\n // find keepers in used in cluster org\n dcOrgKeeperContainersInUsed = dao.findKeeperContainerByCluster(dcName, clusterOrgId,\n KeepercontainerTblEntity.READSET_KEEPER_COUNT_BY_CLUSTER);\n }\n\n setCountAndSortForAllKeeperContainers(allDcOrgKeeperContainers, dcOrgKeeperContainersInUsed);\n allDcOrgKeeperContainers = filterKeeperFromSameAvailableZone(allDcOrgKeeperContainers, dcName);\n logger.info(\"find keeper containers: {}\", allDcOrgKeeperContainers);\n return allDcOrgKeeperContainers;\n }", "public Collection getGroups() throws Exception\r\n {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }", "private List<String> getChildren(String path, boolean watch)\n throws KeeperException, InterruptedException {\n return zk.getChildren(path, watch);\n }", "@Override\n public List<ConsumerMember> listClients() {\n return this.soapClient.listClients(this.getTargetUrl());\n }", "List<ClientTopicCouple> listAllSubscriptions();", "private void loadAllGroups() {\n ParseUser user = ParseUser.getCurrentUser();\n List<Group> groups = user.getList(\"groups\");\n groupList.clear();\n if (groups != null) {\n for (int i = 0; i < groups.size(); i++) {\n try {\n Group group = groups.get(i).fetchIfNeeded();\n groupList.add(group);\n groupAdapter.notifyItemInserted(groupList.size() - 1);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }\n }\n }", "ReadResponseMessage fetchAllMessages();", "Collection getForeignKeysInGroup(Object groupID) throws Exception;", "public List<Client> findAll() throws DataAccessLayerException {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.READ));\n return super.findAll(Client.class);\n } catch (AccessControlException e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public void getClients(AsyncCallback<List<Client>> cb);", "com.google.protobuf.ByteString getGroupBytes();", "@RequiresBluetoothConnectPermission\n @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)\n public List<DeviceGroup> getDiscoveredGroups() {\n return getDiscoveredGroups(false);\n }", "Set<Client> getAllClients();", "public Collection<String> getGroups() {\r\n \t\tCollection<String> serverGroups = this.groupList.getGroups();\r\n \r\n \t\treturn serverGroups;\r\n \t}", "public List<VPlexConsistencyGroupInfo> getConsistencyGroups()\n throws VPlexApiException {\n s_logger.info(\"Request to get all consistency groups on VPlex at {}\", _baseURI);\n\n return _discoveryMgr.getConsistencyGroups();\n }", "private void closeBrokers() {\n memberBroker.close();\naccountBroker.close();\n }", "private List[] query() {\n\t\tList[] result = new ArrayList[topics.length];\n\t\tint i = 0;\n\t\tfor(String topic:topics) {\n\t\t\tList<byte[]> bocache = fcache.getList(topic);\n\t\t\tif(bocache == null || bocache.isEmpty()) {\n\t\t\t\tlog.info(\"topic {} has no message in cache\",topic);\n\t\t\t}else {\n\t\t\t\tresult[i++] = bocache;\n\t\t\t}\t\t\n\t\t}\n\t\treturn result;\n\t}", "Collection getUniqueKeysInGroup(Object groupID) throws Exception;", "public ArrayList<Broker> getBrokerLog()\r\n {\r\n \r\n return brokerLog;\r\n }", "public CachetComponentGroupList getComponentGroups() {\n throw new RuntimeException(\"Method not implemented.\");\n }", "public List<Client> getAllClient();", "public static List<String> getConnectionNames(AsyncHttpClient httpClient, String rabbitAdminPort) throws Exception {\n final Response response = httpClient\n .prepareGet(\"http://localhost:\" + rabbitAdminPort + \"/api/connections\")\n .setRealm(realm)\n .execute().get();\n ObjectMapper mapper = new ObjectMapper();\n List<String> connections = new ArrayList<>();\n final List<Map<String,Object>> list = mapper.readValue(response.getResponseBody(), List.class);\n for(Map<String,Object> entry : list){\n connections.add(\"[ name=\"+entry.get(\"name\")+\", channels=\"+entry.get(\"channels\")+\", connected_at=\"+new DateTime(entry.get(\"connected_at\"))+\"]\");\n }\n return connections;\n }", "public List<Object> invokeMapReduce(Invoker invoker) {\n List<Pair<Pair<Short, Integer>, String>> list = clientConnections.getMapClientFromAll();\n List<KeyCluster> keyClusterList = new ArrayList<KeyCluster>(list.size());\n for ( Pair<Pair<Short, Integer>, String> each : list) {\n //key is represented by node 1 separate by , total nodes example 1,3\n //will passed by key to store proc to determine the how partition data node\n KeyCluster keyCluster = new KeyCluster(each.getFirst().getFirst(), Key.createKey(each.getSecond()),\n each.getFirst().getSecond() );\n keyClusterList.add( keyCluster);\n }\n //add Key must be true, key carry information about how to split cluster\n return executeStoreProc(invoker, keyClusterList, true);\n }", "public static void createEveryone(OpBroker broker) {\n OpQuery query = broker.newQuery(OpGroup.EVERYONE_ID_QUERY);\r\n Iterator result = broker.iterate(query);\r\n if (!result.hasNext()) {\r\n OpTransaction t = broker.newTransaction();\r\n OpGroup everyone = new OpGroup();\r\n everyone.setName(OpGroup.EVERYONE_NAME);\r\n everyone.setDisplayName(OpGroup.EVERYONE_DISPLAY_NAME);\r\n everyone.setDescription(OpGroup.EVERYONE_DESCRIPTION);\r\n broker.makePersistent(everyone);\r\n t.commit();\r\n }\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult result = mFacePlus.getAllGroupListInfo();\n\t\t\t\tif(result.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + result.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tList<Group> groupList = (List<Group>) result.data;\n\t\t\t\tString str_groupname = groupname.getText().toString();\n\t\t\t\tfor (int i = 0; i < groupList.size(); i++) {\n\t\t\t\t\tLog.e(TAG,groupList.get(i).getName()+\"\");\n\t\t\t\t\t\tLog.e(TAG,groupList.get(i).getId()+\"\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "public com.hps.july.persistence.Group getGroups() throws Exception {\n\tGroupAccessBean bean = constructGroups();\n\tif (bean != null)\n\t return (Group)bean.getEJBRef();\n\telse\n\t return null;\n\n}", "public void getAllGroups() { \t\n \tCursor groupsCursor = groupDbHelper.getAllGroupEntries();\n \tList<String> groupNames = new ArrayList<String>();\n \tgroupNames.add(\"Create a Group\");\n \t\n \t// If query returns group, display them in Groups Tab\n \t// Might want to add ordering query so that most recent\n \t// spots display first...\n \tif (groupsCursor.getCount() > 0) {\n \t\tgroupsCursor.moveToFirst();\n \t\twhile (!groupsCursor.isAfterLast()) {\n \t\t\tgroupNames.add(groupsCursor.getString(1));\n \t\t\tgroupsCursor.moveToLast();\n \t\t}\n \t\t\n \t}\n \t\n \t// Close cursor\n \tgroupsCursor.close();\n \t\n \t// Temporary - Ad`d Sample Groups to List\n \t//for (String groupname : groupSamples) {\n \t\t//groupNames.add(groupname);\n \t//}\n \t\n \tgroupsview.setAdapter(new ArrayAdapter<String>(this, \n \t\t\t\tandroid.R.layout.simple_list_item_1, groupNames));\n }", "public ArrayList<String> getChildrenNodes(MasterMgrClient mclient, String start)\n\tthrows PipelineException\n\t{\n\t\tArrayList<String> toReturn = new ArrayList<String>();\n\t\tTreeMap<String, Boolean> comps = new TreeMap<String, Boolean>();\n\t\tcomps.put(start, false);\n\t\tNodeTreeComp treeComps = mclient.updatePaths(pUser, pView, comps);\n\t\tPath p = new Path(start);\n\t\tArrayList<String> parts = p.getComponents();\n\t\tfor (String comp : parts)\n\t\t{\n\t\t\tif(treeComps!=null)\n\t\t\t\ttreeComps = treeComps.get(comp);\n\t\t}\n\t\tfor (String s : treeComps.keySet())\n\t\t{\n\t\t\ttoReturn.add(s);\n\t\t}\n\t\treturn toReturn;\n\t}", "Observable<FailoverGroup> getAsync(String resourceGroupName, String serverName, String failoverGroupName);", "private void groupQuery() {\n ParseQuery<ParseObject> query = ParseQuery.getQuery(ParseConstants.CLASS_GROUPS);\n query.getInBackground(mGroupId, new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject group, ParseException e) {\n setProgressBarIndeterminateVisibility(false);\n if(e == null) {\n mGroup = group;\n mMemberRelation = mGroup.getRelation(ParseConstants.KEY_MEMBER_RELATION);\n mMemberOfGroupRelation = mCurrentUser.getRelation(ParseConstants.KEY_MEMBER_OF_GROUP_RELATION);\n\n //only the admin can delete the group\n mGroupAdmin = mGroup.get(ParseConstants.KEY_GROUP_ADMIN).toString();\n mGroupAdmin = Utilities.removeCharacters(mGroupAdmin);\n if ((mCurrentUser.getUsername()).equals(mGroupAdmin)) {\n mDeleteMenuItem.setVisible(true);\n }\n\n mGroupName = group.get(ParseConstants.KEY_GROUP_NAME).toString();\n mGroupName = Utilities.removeCharacters(mGroupName);\n setTitle(mGroupName);\n\n mCurrentDrinker = mGroup.get(ParseConstants.KEY_CURRENT_DRINKER).toString();\n mCurrentDrinker = Utilities.removeCharacters(mCurrentDrinker);\n mCurrentDrinkerView.setText(mCurrentDrinker);\n\n mPreviousDrinker = mGroup.get(ParseConstants.KEY_PREVIOUS_DRINKER).toString();\n mPreviousDrinker = Utilities.removeCharacters(mPreviousDrinker);\n mPreviousDrinkerView.setText(mPreviousDrinker);\n\n listViewQuery(mMemberRelation);\n }\n else {\n Utilities.getNoGroupAlertDialog(null);\n }\n }\n });\n }", "private static void showGroups(Service service) {\r\n\t\tList<Group> groupList = service.getGroupList();\r\n\t\tfor(int index=0;index<groupList.size();index++) {\r\n\t\t\tSystem.out.println(groupList.get(index));\r\n\t\t}\r\n\t}", "@GetMapping(\"/group\")\n\tResponseEntity<String> getAllGroup() {\n\t\tArrayList<Group> groupList = new ArrayList<Group>();\n\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tConnection conn = DriverManager.getConnection(connectionString());\n\n\t\t\tString storedProc = \"select * from get_all_group()\";\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(storedProc);\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tlong groupId = rs.getLong(\"id\");\n\t\t\t\tString groupName = rs.getString(\"name\");\n\t\t\t\tint subscriberCount = rs.getInt(\"subscriber_count\");\n\t\t\t\tString groupDesc = rs.getString(\"descr\");\n\t\t\t\tDate createdDate = rs.getDate(\"created_date\");\n\t\t\t\tDate updatedDate = rs.getDate(\"updated_date\");\n\t\t\t\tint categoryId = rs.getInt(\"category_id\");\n\n\t\t\t\tGroup group = new Group(groupId, groupName, subscriberCount, groupDesc, createdDate, updatedDate,\n\t\t\t\t\t\tcategoryId);\n\t\t\t\tgroupList.add(group);\n\t\t\t}\n\t\t} catch (SQLException err) {\n\t\t\tSystem.out.println(err.getMessage());\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(err.getMessage());\n\t\t} catch (ClassNotFoundException err) {\n\t\t\tSystem.out.println(err.getMessage());\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(err.getMessage());\n\t\t}\n\n\t\t// Convert group list to json\n\t\tString json = \"\";\n\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tjson = mapper.writeValueAsString(groupList);\n\t\t} catch (Exception err) {\n\t\t\tSystem.out.println();\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(err.getMessage());\n\t\t}\n\n\t\treturn ResponseEntity.ok(json);\n\t}", "private String getZkServers(ServletContext context){\n Configuration config = new Configuration();\n config.addResource(\"pxf-site.xml\");\n String zk_hosts = config.get(\"zookeeper\");\n if(LOG.isDebugEnabled())\n LOG.debug(\"zookeeper server is :\" + zk_hosts);\n\n return zk_hosts;\n }", "void getOWLOntologyIDsAsync(Set<Object> groups,\n\t\t\tIAsyncCallback<String> callback);", "private void refreshList() {\n\t\t\t\tlist.clear();\n\t\t\t\tGetChildrenBuilder childrenBuilder = client.getChildren();\n\t\t\t\ttry {\n\t\t\t\t\tList<String> listdir = childrenBuilder.forPath(servicezoopath);\n\t\t\t\t\tfor (String string : listdir) {\n\t\t\t\t\t\tbyte[] data = client.getData().forPath(servicezoopath + \"/\" + string);\n\t\t\t\t\t\tlist.add(new String(data));\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@SuppressWarnings(\"serial\")\n\tpublic ArrayList<String> getGroups() throws Exception{\n\t\treturn new ArrayList<String>(){{\n\t\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\t\tGroups groups = Groups.findOrCreate(ur);\n\t\t\tfor(Group g:Group.list(groups))\n\t\t\t\tadd(g.getAttribute(\"name\"));\n\t\t}};\n\t}", "public void listThreadGroups() {\n\t\tthis.toSlave.println(MasterProcessInterface.LIST_THREAD_GROUPS_COMMAND);\n\t}", "Collection getIndexesInGroup(Object groupID) throws Exception;", "@Transactional(readOnly = true)\n public List<MsgReceiverGroup> findAll() {\n log.debug(\"Request to get all MsgReceiverGroups\");\n return msgReceiverGroupRepository.findAllWithEagerRelationships();\n }", "List<MusclegroupCategory> getAllMusclegroup() throws PersistenceException;", "@Override\n public List<BrokerMessageListener> findAll() throws SystemException {\n return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n }", "@Override\n public List checkGroup(List groupChannels) throws DefaultException {\n List existsList = new ArrayList();\n List notExists = new ArrayList();\n if (ListUtils.listIsExists(groupChannels)) {\n\n for (int i = 0; i < groupChannels.size(); i++) {\n String groupChannel = (String) groupChannels.get(i);\n if (!redisMsgService.hasKey(groupChannel + Constant.CHANNEL_REDIS)) {\n //throw new DefaultException(groupChannel + \"频道不存在\");\n notExists.add(groupChannel);\n } else {\n existsList.add(groupChannel);\n }\n\n }\n if (ListUtils.listIsExists(notExists)) {\n if (notExists.size() == groupChannels.size()) {\n String notExistsStr = \"\";\n for (int i = 0; i < notExists.size(); i++) {\n String groupChannel = (String) notExists.get(i);\n notExistsStr += groupChannel + \",\";\n\n }\n throw new DefaultException(notExistsStr + \"频道不存在\");\n }\n\n }\n\n }\n return existsList;\n //return notExistsGroups;\n\n /*groupChannels.stream().forEach((Object p) ->{\n if (!redisMsgService.hasKey(p+Constant.CHANNEL_REDIS)) {\n try {\n throw new DefaultException(p+\"频道不存在\");\n } catch (DefaultException e) {\n throw new DefaultException(p+\"频道不存在\");\n }\n }});*/\n\n }", "public interface MRConnectionManagerContainer {\n\n\n String MR_GROUP_PATH = \"/zk/mr/\";\n\n void start() throws Exception;\n\n void start(Map<String, MRMessageListener> messageListenerMap) throws Exception;\n\n void register();\n\n void add(Map.Entry<String, String> entry) throws Exception;\n\n void update(Map.Entry<String, String> entry);\n\n void addListener(String topic, MRMessageListener mrMessageListener);\n\n void remove(Map.Entry<String, String> entry);\n\n void refresh();\n\n void shutdown();\n\n void shutdownAndWait() throws InterruptedException;\n\n Map<String, MRConnectionManager> getMrConnectionManagerCache();\n\n static String groupPath(String group) {\n return String.format(\"%s%s\", MR_GROUP_PATH, group);\n }\n\n void setPerfetchSize(int perfetchSize);\n\n\n}", "private void printAllClients() {\n Set<Client> clients = ctrl.getAllClients();\n clients.stream().forEach(System.out::println);\n }", "List<Group> getGroups();", "public static void main(String[] args) {\n Properties configs = new Properties();\r\n //commit\r\n // 환경 변수 설정\r\n configs.put(\"bootstrap.servers\", \"localhost:9092\");\t\t// kafka server host 및 port\r\n configs.put(\"session.timeout.ms\", \"10000\");\t\t\t\t// session 설정\r\n configs.put(\"group.id\", \"test191031\");\t\t\t\t\t// topic 설정\r\n configs.put(\"key.deserializer\", \"org.apache.kafka.common.serialization.StringDeserializer\");\t// key deserializer\r\n configs.put(\"value.deserializer\", \"org.apache.kafka.common.serialization.StringDeserializer\"); // value deserializer\r\n \r\n @SuppressWarnings(\"resource\")\r\n\t\tKafkaConsumer<String, String> consumer = new KafkaConsumer<>(configs);\t// consumer 생성\r\n consumer.subscribe(Arrays.asList(\"test191031\"));\t\t// topic 설정\r\n \r\n SimpleDateFormat format1 = new SimpleDateFormat ( \"yyyy-MM-dd HH:mm:ss\");\r\n\r\n while (true) {\t// 계속 loop를 돌면서 producer의 message를 띄운다.\r\n ConsumerRecords<String, String> records = consumer.poll(500);\r\n for (ConsumerRecord<String, String> record : records) {\r\n \t\r\n \tDate time = new Date();\r\n \tString time1 = format1.format(time);\r\n \t\r\n String s = record.topic();\r\n if (\"test191031\".equals(s)) {\r\n System.out.println(time1 + \" | \" + record.value());\r\n } else {\r\n throw new IllegalStateException(\"get message on topic \" + record.topic());\r\n\r\n }\r\n }\r\n }\r\n \r\n\t}", "public StringBuilder adminDeleteConsumerGroupInfo(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n try {\n WebParameterUtils.reqAuthorizeCheck(master, brokerConfManager,\n req.getParameter(\"confModAuthToken\"));\n Set<String> batchOpTopicNames =\n WebParameterUtils.getBatchTopicNames(req.getParameter(\"topicName\"),\n true, false, null, sBuilder);\n Set<String> batchOpGroupNames =\n WebParameterUtils.getBatchGroupNames(req.getParameter(\"groupName\"),\n false, false, null, sBuilder);\n if (batchOpGroupNames.isEmpty()) {\n for (String tmpTopicName : batchOpTopicNames) {\n BdbGroupFilterCondEntity webFilterCondEntity =\n new BdbGroupFilterCondEntity();\n webFilterCondEntity.setTopicName(tmpTopicName);\n List<BdbGroupFilterCondEntity> webFilterCondEntities =\n brokerConfManager.confGetBdbAllowedGroupFilterCondSet(webFilterCondEntity);\n if (!webFilterCondEntities.isEmpty()) {\n webFilterCondEntity.setCreateUser(\"System\");\n brokerConfManager.confDelBdbAllowedGroupFilterCondSet(webFilterCondEntity);\n }\n BdbConsumerGroupEntity webConsumerGroupEntity =\n new BdbConsumerGroupEntity();\n webConsumerGroupEntity.setGroupTopicName(tmpTopicName);\n brokerConfManager.confDelBdbAllowedConsumerGroupSet(webConsumerGroupEntity);\n }\n } else {\n for (String tmpTopicName : batchOpTopicNames) {\n for (String tmpGroupName : batchOpGroupNames) {\n BdbGroupFilterCondEntity webFilterCondEntity =\n new BdbGroupFilterCondEntity();\n webFilterCondEntity.setTopicName(tmpTopicName);\n webFilterCondEntity.setConsumerGroupName(tmpGroupName);\n List<BdbGroupFilterCondEntity> webFilterCondEntities =\n brokerConfManager.confGetBdbAllowedGroupFilterCondSet(webFilterCondEntity);\n if (!webFilterCondEntities.isEmpty()) {\n webFilterCondEntity.setCreateUser(\"System\");\n brokerConfManager.confDelBdbAllowedGroupFilterCondSet(webFilterCondEntity);\n }\n BdbConsumerGroupEntity webConsumerGroupEntity =\n new BdbConsumerGroupEntity();\n webConsumerGroupEntity.setGroupTopicName(tmpTopicName);\n webConsumerGroupEntity.setConsumerGroupName(tmpGroupName);\n brokerConfManager.confDelBdbAllowedConsumerGroupSet(webConsumerGroupEntity);\n }\n }\n }\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\"}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\"}\");\n }\n return sBuilder;\n }", "@ApiOperation(value = \"获取常用联系人分组列表\")\n @GetMapping(value = \"/ifclist\")\n @ResponseBody\n public ReqResult getChatGroupList() throws Exception {\n String userId = SecurityFacade.getCurUserId();\n List<InfoFrequentConnect> ifcList = ifcService.getListByUser(userId);\n if (ifcList != null) {\n return ReqResult.success(ifcList);\n }\n return ReqResult.failed();\n }", "public StringBuilder adminQueryConsumerGroupInfo(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n BdbConsumerGroupEntity webConsumerGroupEntity =\n new BdbConsumerGroupEntity();\n try {\n webConsumerGroupEntity\n .setGroupTopicName(WebParameterUtils.validStringParameter(\"topicName\",\n req.getParameter(\"topicName\"),\n TBaseConstants.META_MAX_TOPICNAME_LENGTH,\n false, null));\n webConsumerGroupEntity\n .setConsumerGroupName(WebParameterUtils.validGroupParameter(\n \"groupName\",\n req.getParameter(\"groupName\"),\n TBaseConstants.META_MAX_GROUPNAME_LENGTH,\n false, null));\n webConsumerGroupEntity\n .setRecordCreateUser(WebParameterUtils.validStringParameter(\"createUser\",\n req.getParameter(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n false, null));\n List<BdbConsumerGroupEntity> webConsumerGroupEntities =\n brokerConfManager.confGetBdbAllowedConsumerGroupSet(webConsumerGroupEntity);\n SimpleDateFormat formatter =\n new SimpleDateFormat(TBaseConstants.META_TMP_DATE_VALUE);\n int j = 0;\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\",\\\"count\\\":\")\n .append(webConsumerGroupEntities.size()).append(\",\\\"data\\\":[\");\n for (BdbConsumerGroupEntity entity : webConsumerGroupEntities) {\n if (j++ > 0) {\n sBuilder.append(\",\");\n }\n sBuilder.append(\"{\\\"topicName\\\":\\\"\").append(entity.getGroupTopicName())\n .append(\"\\\",\\\"groupName\\\":\\\"\").append(entity.getConsumerGroupName())\n .append(\"\\\",\\\"createUser\\\":\\\"\").append(entity.getRecordCreateUser())\n .append(\"\\\",\\\"createDate\\\":\\\"\").append(formatter.format(entity.getRecordCreateDate()))\n .append(\"\\\"}\");\n }\n sBuilder.append(\"]}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\",\\\"count\\\":0,\\\"data\\\":[]}\");\n }\n return sBuilder;\n }", "public static List<KirolakObject> listByGroup(Group group)\n\t{\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tList<KirolakObject> items = session.createQuery(\"from Round r where r.compositeId.group = :group\").setParameter(\"group\", group).list();\n\t\tIterator<KirolakObject> iterator = items.iterator();\n\t\twhile(iterator.hasNext())\n\t\t{\n\t\t\tRound round = (Round)iterator.next();\t\t\t\t\n\t\t\tround.setMatches(MatchDAO.listByRound(round));\n\t\t}\n\t\treturn items;\n\t}", "public List<Object> retrieveIncrementalGroups() {\n List<Object> result = new ArrayList<Object>();\n for (ProvisioningGroupWrapper provisioningGroupWrapper : this.provisioningGroupWrappers) {\n \n if (provisioningGroupWrapper.getGrouperTargetGroup() != null) {\n result.add(provisioningGroupWrapper.getGrouperTargetGroup());\n } else if (provisioningGroupWrapper.getGrouperProvisioningGroup() != null) {\n result.add(provisioningGroupWrapper.getGrouperProvisioningGroup());\n } else if (provisioningGroupWrapper.getGcGrouperSyncGroup() != null) {\n result.add(provisioningGroupWrapper.getGcGrouperSyncGroup());\n } else if (provisioningGroupWrapper.getProvisioningStateGroup() != null) {\n result.add(provisioningGroupWrapper.getProvisioningStateGroup());\n }\n }\n return result;\n }", "@Override\r\n\tpublic List<String> getGroup(String service) {\n\t\tList<String> results = new ArrayList<String>();\r\n\t\tString rest = null;\r\n\t\tfor(String s : prefixes)\r\n\t\t\tif(service.startsWith(s))\r\n\t\t\t\trest = service.substring(s.length());\r\n\t\tif(rest == null)\r\n\t\t\treturn null;\r\n\t\tfor(String s : prefixes)\r\n\t\t\tresults.add(s + rest);\r\n\t\treturn results;\r\n\t\t\t\r\n\t}", "private void checkAllarmOnDatabase(Session session) {\n\t\tsynchronized (clients) {\n\t\t\tfor (Session sess : clients) {\n\t\t\t\t/**\n\t\t\t\t * check the mapping\n\t\t\t\t */\n\t\t\t\tString userid = (String) this.endpointConfig.getUserProperties()\n\t\t\t\t\t\t.get(sess.getId());\n\t\t\t\tif (sess.isOpen()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString message = \"\";\n\t\t\t\t\t\tif (StringUtils.isNotEmpty(userid)) {\n\t\t\t\t\t\t\tmessage = codaEveService\n\t\t\t\t\t\t\t\t\t.jsonQueueGetAllarms(userid);\n\t\t\t\t\t\t\tsess.getBasicRemote().sendText(message);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\tlogger.error(ex.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public List<String> getAllGroups() throws IOException {\n String httpResponse = httpGet(baseUrl.resolve(\"/automation/v2/groups\"));\n return mapper.readValue(httpResponse, new TypeReference<List<String>>() {\n });\n }", "@Test\n public void getPartitionIds() {\n final EventHubConsumerAsyncClient consumer = toClose(createBuilder()\n .consumerGroup(DEFAULT_CONSUMER_GROUP_NAME)\n .buildAsyncConsumerClient());\n\n // Act & Assert\n StepVerifier.create(consumer.getPartitionIds())\n .expectNextCount(NUMBER_OF_PARTITIONS)\n .verifyComplete();\n }", "Collection<Service> getAllSubscribeService();", "public Map<String, PartitionGroupConfig<?>> getPartitionGroups() {\n return partitionGroups;\n }", "List<String> getAllJobGroupNames() throws GWTJahiaServiceException;", "public List<Group> getMyGroups() {\n String path = template.urlFor( UrlTemplate.GROUPS_PATH ).build();\n try {\n String stringResponse = client.get( path );\n Result<com.silanis.esl.api.model.Group> apiResponse = JacksonUtil.deserialize( stringResponse, new TypeReference<Result<com.silanis.esl.api.model.Group>>() {\n } );\n List<Group> result = new ArrayList<Group>();\n for ( com.silanis.esl.api.model.Group apiGroup : apiResponse.getResults() ) {\n result.add( new GroupConverter(apiGroup).toSDKGroup());\n }\n return result;\n } catch ( RequestException e ) {\n throw new EslServerException( \"Failed to retrieve Groups list.\", e );\n } catch ( Exception e ) {\n throw new EslException( \"Failed to retrieve Groups list.\", e );\n }\n }" ]
[ "0.6022897", "0.5945016", "0.57908", "0.57550585", "0.5734807", "0.5723996", "0.5661321", "0.5605246", "0.55802095", "0.5560359", "0.5526674", "0.5476857", "0.5473109", "0.5325891", "0.5324717", "0.52769065", "0.5272635", "0.5245936", "0.5187478", "0.51852405", "0.5136443", "0.5125345", "0.51155686", "0.51057535", "0.50972515", "0.50899994", "0.50643325", "0.50604576", "0.5058449", "0.5056591", "0.50558966", "0.50391644", "0.5029572", "0.502246", "0.4996289", "0.499236", "0.4988542", "0.4983693", "0.4976281", "0.4965654", "0.49650806", "0.495849", "0.49551764", "0.4940784", "0.49403712", "0.491044", "0.4909778", "0.49047622", "0.49012062", "0.48975214", "0.4893414", "0.48931557", "0.48930517", "0.48927054", "0.48911178", "0.48898175", "0.4888793", "0.48845297", "0.48736182", "0.48724487", "0.48655668", "0.48626462", "0.4858969", "0.48581305", "0.48274827", "0.4805229", "0.48016727", "0.4791951", "0.47906217", "0.47856674", "0.47853667", "0.47826388", "0.4782445", "0.47808868", "0.47796333", "0.47720435", "0.47648805", "0.47637296", "0.47601557", "0.47540432", "0.47433558", "0.47426534", "0.47410417", "0.47390848", "0.47382534", "0.47293875", "0.47280505", "0.4725469", "0.4722448", "0.47224134", "0.47219318", "0.4719795", "0.47156936", "0.47146344", "0.47106448", "0.47023562", "0.46900627", "0.4681449", "0.46788308", "0.46730742" ]
0.6502632
0
gets list of instructions from the chosen source
public ArrayList getListOfInstructions(String[] args) { ArrayList instructions = new ArrayList(); SourceChooser sourceChooser = new SourceChooser(); String source = sourceChooser.chooseSource(args); if(source.equals("command line")) { FromCommandLine fromCommandLine = new FromCommandLine(); instructions = fromCommandLine.reader(args); } if(source.equals("json")) { } if(source.equals("txt")) { FromTxtFile fromTxtFile = new FromTxtFile(); instructions = fromTxtFile.reader(); } if(source.equals("xml")) { } return instructions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getInstructions();", "String getSource();", "public List<String> sourceString() {\n // Processing is done here\n return Arrays.asList(\"tomato\", \"carrot\", \"cabbage\");\n }", "private List<Action> createInstructions(String line) {\n\t\tLOGGER.info(\"Reads instruction as '{}'\", line);\n\t\tMatcher m = INSTRUCTION_LINE_PATTERN.matcher(line);\n\t\tif (!m.matches()) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\tString.format(\"The line '%s' does not define a correct sequence of mower instructions!\", line));\n\t\t}\n\t\treturn line.chars()\n\t\t\t.mapToObj(c -> Action.valueOf((char)c))\n\t\t\t.collect(Collectors.toList());\n\t}", "String getInstruction();", "java.lang.String getSource();", "java.lang.String getSource();", "public abstract List<Instruction> getPossibleActions();", "TraceInstructionsView instructions();", "public String getSource();", "public String getSource ();", "java.util.List<java.lang.String>\n getSourcepathList();", "public abstract String getSource();", "java.util.List<java.lang.String>\n getSourceFileList();", "private List<String> applySSA() {\n\t\t//String content = Utility.getStringFromFile(filePath);\n\t\tList<String> ssa = new ArrayList<String>();\n\t\tInputStream stream = new ByteArrayInputStream(source.getBytes());\n\t\ttry {\n\t\t\tANTLRInputStream input = new ANTLRInputStream(stream);\n\t\t\tEntryLexer lexer = new EntryLexer(input);\n\t\t\tCommonTokenStream tokens = new CommonTokenStream(lexer);\n\t\t\tEntryParser parser = new EntryParser(tokens);\n\t\t\tProgContext prog = parser.prog();\n\t\t\tconvertToSSAString(prog, ssa);\n\t\t\treturn ssa;\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "java.util.List<java.lang.String>\n getSourcepathList();", "public String toString() {\n String allSources = \"\";\n for (String source : sourceList) {\n allSources += \"\\n\" + source;\n Log.d(\"wattdroid\", \"returning source...\" + source);\n }\n return allSources;\n }", "String getSourceExpression();", "<T> List<String> generateFindAllScript(GremlinSource<T> source);", "static String methodCode(Source code, Set<String> relevant){\n final UnitLocation located = locateUnit(code, relevant);\n final SourceSelection selection = new SourceSelection(ImmutableList.of(located));\n return selection.toCode();\n }", "public List<String> getSource() {\n return this.source;\n }", "String getSourceString();", "public String getInstructions() {\n return instructions;\n }", "java.lang.String getSourceFile(int index);", "private static String[] collectInput() {\n\t\tString command = sc.next();\n\t\tString i = sc.next();\n\t\tString destination = sc.next();\n\t\treturn new String[] { command, destination };\n\t\t\n\t}", "DelegateCaseExecution getSourceExecution();", "public List<DexlibAbstractInstruction> instructionsBefore(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction \" + instruction + \" not part of this body.\");\n }\n\n List<DexlibAbstractInstruction> l = new ArrayList<DexlibAbstractInstruction>();\n l.addAll(instructions.subList(0, i));\n Collections.reverse(l);\n return l;\n }", "State getSource();", "public org.LexGrid.commonTypes.Source[] getSource() {\n return source;\n }", "public ArrayList<String> start(String source, String target);", "public String parseSrc() throws Exception{\n\t\tr = new FileReader(userArg); \r\n\t\tst = new StreamTokenizer(r);\r\n\t\t st.eolIsSignificant(true);\r\n\t\t st.commentChar(46);\r\n\t\t st.whitespaceChars(9, 9);\r\n\t\t st.whitespaceChars(32, 32);\r\n\t\t st.wordChars(39, 39);\r\n\t\t st.wordChars(44, 44);\r\n\t\t \r\n\t\t //first we check for a specified start address\r\n\t\t while (InstructionsRead < 2) {\r\n\t\t \tif (st.sval != null) {\r\n\t\t \t\tInstructionsRead++;\r\n\t\t \t\tif (st.sval.equals(\"START\")) {\r\n\t\t \t\twhile(st.ttype != StreamTokenizer.TT_NUMBER) {\r\n\t\t \t\t\tst.nextToken();\r\n\t\t \t\t}\r\n\t\t \t\tDDnval = st.nval;\r\n\t\t \t\tstartAddress = Integer.parseInt(\"\" + DDnval.intValue(), 16);\r\n\t\t \t\tlocctr = startAddress;\r\n\t\t \t\tsLocctr = Integer.toHexString(locctr.intValue());\r\n\t\t \t\tif (sLocctr.length() == 1) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 000\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse if (sLocctr.length() == 2) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 00\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse if (sLocctr.length() == 3 ) {\r\n\t\t \t\t\tSystem.out.println(\"locctr: 0\" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\telse {\r\n\t\t \t\t\tSystem.out.println(\"locctr: \" + Integer.toHexString(locctr.intValue()));\r\n\t\t \t\t}\r\n\t\t \t\t//writer.write(\"\" + locctr); //should write to IF, not working yet 2/15/2011\r\n\t\t \t\tstartSpecified = true;\r\n\t\t \t\t}\r\n\t\t \t\telse if (!st.sval.equals(\"START\") && InstructionsRead < 2) { //this should be the program name, also could allow for label here potentially...\r\n\t\t \t\t\t//this is the name of the program\r\n\t\t \t\t\t//search SYMTAB for label etc. \r\n\t\t \t\t\tname = st.sval;\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t st.nextToken();\r\n\t\t }\r\n\t\t if (!startSpecified) {\r\n\t\t \tstartAddress = 0;\r\n\t\t \tlocctr = startAddress;\r\n\t\t }\r\n\t\t startAddress2 = startAddress;\r\n\t\t /*\r\n\t\t ATW = Integer.toHexString(startAddress2.intValue());\r\n\t\t \r\n\t\t for (int i = 0; i<(6-ATW.length()); i++){\r\n\t\t \tmyWriter.write(\"0\");\r\n\t\t }\r\n\t\t myWriter.write(ATW);\r\n\t\t myWriter.newLine();//end of line for now; in ReadIF when this line is read and translated to object code, the program length will be tacked on the end\r\n\t\t */\r\n\t\t \r\n\t\t //Now that startAddress has been established, we move on to the main parsing loop\r\n\t\t while (st.ttype != StreamTokenizer.TT_EOF) { //starts parsing to end of file\r\n\t\t \t//System.out.println(\"Stuck in eof\");\r\n\t\t \t//iLocctr = locctr.intValue();\r\n\t\t \tinstFound = false;\r\n\t\t \topcodeDone = false;\r\n\t\t \tlabelDone = false;\r\n\t\t \tmoveOn = true;\r\n\t\t \t//constantCaseW = false;\r\n\t\t \tconstantCaseB = false;\r\n\t\t \txfound = false;\r\n\t\t \tcfound = false;\r\n\t\t \t\r\n\t\t \tInstructionsRead = 0; //init InsRead to 0 at the start of each line\r\n\t\t \tSystem.out.println(\"new line\");\r\n\t\t \tSystem.out.println(\"Ins read: \" + InstructionsRead);\r\n\t\t \tsLocctr = Integer.toHexString(locctr.intValue());\r\n\t \t\tif (sLocctr.length() == 1) {\r\n\t \t\t\tSystem.out.println(\"locctr: 000\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse if (sLocctr.length() == 2) {\r\n\t \t\t\tSystem.out.println(\"locctr: 00\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse if (sLocctr.length() == 3 ) {\r\n\t \t\t\tSystem.out.println(\"locctr: 0\" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\tSystem.out.println(\"locctr: \" + Integer.toHexString(locctr.intValue()));\r\n\t \t\t}\r\n\t\t \tif (foundEnd()) {\r\n\t\t \t\tbreak;\r\n\t\t \t}\r\n\t\t \twhile (st.ttype != StreamTokenizer.TT_EOL) {//breaks up parsing by lines so that InstructionsRead will be a useful count\r\n\t\t \t\t\r\n\t\t \t\tmoveOn = true;\r\n\t\t \t\tif (st.ttype == StreamTokenizer.TT_WORD) { \r\n\t\t \t\t\tInstructionsRead++;\r\n\t\t \t\t\tSystem.out.println(st.sval);\r\n\t\t \t\t\tSystem.out.println(\"Instructions Read: \" + InstructionsRead);\r\n\t\t \t\t\tif (foundEnd()) {\r\n\t\t \t\t\t\tbreak;\r\n\t\t \t\t\t}\r\n\t\t \t\t\t/*\r\n\t\t \t\t\t * The whole instructinsread control architecture doesn't quite work, because\r\n\t\t \t\t\t * the ST doesn't count the whitespace it reads in. This is by design because\r\n\t\t \t\t\t * the prof specified that whitespace is non-regulated and thus we cannot\r\n\t\t \t\t\t * predict exactly how many instances of char dec value 32 (space) will appear\r\n\t\t \t\t\t * before and/or between the label/instruction/operand 'fields'. \r\n\t\t \t\t\t * \r\n\t\t \t\t\t * What we could try alternatively is to structure the control around'\r\n\t\t \t\t\t * the optab, since it it static and populated pre-runtime. The schema might\r\n\t\t \t\t\t * go something like this: first convert whatever the sval or nval is to string.\r\n\t\t \t\t\t * Then call the optab.searchOpcode method with the resultant string as the input\r\n\t\t \t\t\t * parameter. If the string is in optab then it is an instruction and the ST is in the\r\n\t\t \t\t\t * instruction 'field' and boolean foundInst is set to true. If it is not in optab AND a boolean variable foundInst which resets to\r\n\t\t \t\t\t * false at the beginning of each new line is still false, then it is a label being declared in the label 'field'\r\n\t\t \t\t\t * If it is not in the optab AND foundInst is true, then the ST is at the operand 'field'.\r\n\t\t \t\t\t * This should work even if the prof has a crappy line with just a label declaration and no instruction or operand, because there\r\n\t\t \t\t\t * definitely cannot be an operand without an instruction...\r\n\t\t \t\t\t */\r\n\t\t \t\t\tif (instFound){\r\n\t\t \t\t\t\tprocessOperand(st);\r\n\t\t \t\t\t}\r\n\t\t \t\t\tif (!instFound) {//this is either label or instruction field\r\n\t\t \t\t\t\t//before anything, search optab to see if this might be the opcode\r\n\t\t \t\t\t\t//if it is an opcode, send it to the opcode processing function\r\n\t\t \t\t\t\tif (st.sval.equals(\"WORD\") || st.sval.equals(\"BYTE\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (st.sval.equals(\"WORD\")){\r\n\t\t \t\t\t\t\t\tif (hexDigitCount >= 55){\r\n\t\t \t\t\t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tif (st.sval.equals(\"BYTE\")){\r\n\t\t \t\t\t\t\t\tconstantCaseB = true;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (st.sval.equals(\"RESW\") || st.sval.equals(\"RESB\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount++;\r\n\t\t \t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (optab.searchOpcode(st.sval)) {//if true this is the instruction\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (hexDigitCount >= 55){\r\n\t \t\t\t\t\t\t\tnewTHandle();\r\n\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcode(st);\r\n\t\t \t\t\t\t\t//InstructionsRead++;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse {//otherwise this is the label\r\n\t\t \t\t\t\t\tprocessLabel(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t \t\t\t//else{ //if instFound is true, this must be the operand field\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\t//processOperand(st);\r\n\t\t \t\t\t//}\r\n\t\t \t\t\t//if (InstructionsRead == 3) {//this is the operand field\r\n\t\t \t\t\t\t//processOperand();\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t//}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\tif (st.ttype == StreamTokenizer.TT_NUMBER) {\r\n\t\t \t\t\tInstructionsRead++;\r\n\t\t \t\t\tif (!instFound) {//this is either label or instruction field\r\n\t\t \t\t\t\t//before anything, search optab to see if this might be the opcode\r\n\t\t \t\t\t\t//if it is an opcode, send it to the opcode processing function\r\n\t\t \t\t\t\tif (NtoString(st.nval).equals(\"WORD\") || NtoString(st.nval).equals(\"BYTE\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (NtoString(st.nval).equals(\"WORD\")){\r\n\t\t \t\t\t\t\t\tif (hexDigitCount >= 55){\r\n\t\t \t\t\t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tif (NtoString(st.nval).equals(\"BYTE\")){\r\n\t\t \t\t\t\t\t\tconstantCaseB = true;\r\n\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\tif (NtoString(st.nval).equals(\"RESW\") || NtoString(st.nval).equals(\"RESB\")){//these are the directives... not technically instructions, but they go in the instruction field\r\n\t\t \t\t\t\t\tresCount++;\r\n\t\t \t\t\t\t\tnewTHandle();\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse if (optab.searchOpcode(\"\" + st.nval)) {\r\n\t\t \t\t\t\t\tresCount = 0;\r\n\t\t \t\t\t\t\tif (hexDigitCount >= 55){\r\n\t \t\t\t\t\t\t\tnewTHandle();\r\n\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\thexDigitCount += 6;\r\n\t\t \t\t\t\t\tinstFound = true;\r\n\t\t \t\t\t\t\tprocessOpcodeN(st);\r\n\t\t \t\t\t\t\t//InstructionsRead++;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\telse {\r\n\t\t \t\t\t\t\tprocessLabelN(st);\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t}\r\n\t\t \t\t\telse{ //this is the operand field\r\n\t\t \t\t\t\tprocessOperandN(st);\r\n\t\t \t\t\t}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \tif (moveOn){\r\n\t\t \tst.nextToken(); //read next token in current line\r\n\t\t \t}\r\n\t\t \t}\r\n\t\t \t////write line just finished to IF eventually\r\n\t\t if (moveOn){\r\n\t\t st.nextToken(); //read first token of next line\t\r\n\t\t }\r\n\t\t }\r\n\t\t programLength = (locctr - startAddress); \r\n\t\t programLength2 = programLength;\r\n\t\t System.out.println(\" !!prgmlngth2:\" + Integer.toHexString(programLength2.intValue()));\r\n\t\t /*\r\n\t\t sProgramLength = Integer.toHexString(programLength2.intValue());\r\n\t\t for (int i = 0; i<(6-sProgramLength.length()); i++){\r\n\t\t \tmyWriter.write(\"0\");\r\n\t\t }\r\n\t\t myWriter.write(sProgramLength);\r\n\t\t myWriter.close();\r\n\t\t ////myWriter.close();\r\n\t\t \r\n\t\t */\r\n\t\t r.close();\r\n\t\t System.out.println(\"?????!?!?!?!?ALPHA?!?!?!?!?!??!?!?!\");\r\n\t\t if (hexDigitCount/2 < 16){\r\n\t\t \tlineLength.add(\"0\" + Integer.toHexString(hexDigitCount/2));\r\n\t\t }\r\n\t\t else{\r\n\t\t lineLength.add(Integer.toHexString(hexDigitCount/2));\r\n\t\t }\r\n\t\t for (int i = 0; i<lineLength.size(); i++){\r\n\t\t System.out.println(lineLength.get(i));\r\n\t\t }\r\n\t\t // System.out.println(hexDigitCount);\r\n\t\t ReadIF pass2 = new ReadIF(this.optab,this.symtab,this.startAddress2,this.programLength2,this.name,this.lineLength,this.userArg);\r\n\t\t return st.sval;\r\n\t\t \r\n\t\t\r\n\r\n\t}", "@Override\n\tpublic String getSource() {\n\t\treturn source;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<NavigationInstruction> getInstructions(){\n\t\treturn (List<NavigationInstruction>) getObject(NavigationInstruction.class,KEY_INSTRUCTIONS);\n\t}", "public String[] getAllSources() {\n return this.sourceList.toArray(new String[0]);\n }", "private static String getContent() throws IOException\n\t{\n\t\tString instr = \"\";\n\t\ttry\n\t\t{\n\t\t\tStream<String> lines = Files.lines(Paths.get(\"input.txt\"));\n\t\t\tinstr = lines.skip(currentFilePointer).findFirst().get();\n\t\t\tinstr = instr.replaceAll(\"#\", \"\");\n\t\t\tinstr = instr.replaceAll(\",\", \"\");\n\t\t\tcurrentFilePointer++;\n\t\t\tcurrentPC = currentPC + 4;\n\t\t\tSystem.out.println(\"-------------------------Instruction Address : \" + currentPC + \"------------------------\");\n\n\t\t} catch (Exception ex)\n\t\t{\n//\t\t\t ex.printStackTrace();\n\t\t}\n\t\treturn instr;\n\t}", "public String getSource() {\n/* 312 */ return getValue(\"source\");\n/* */ }", "public void parseListSources(String source) {\r\n\t\t// Gets a scanner from the source\r\n\t\tInputStream in = new ByteArrayInputStream(source.getBytes());\r\n\t\t_assertedFacs = new HashSet<String>();\r\n\t\tScanner scan = new Scanner(in);\r\n\t\tString file = null;\r\n\t\tString line = null;\r\n\t\tboolean isFile = false;\r\n\t\tboolean isAsserted = false;\r\n\t\tint initLine = -1;\r\n\t\tint endLine = -1;\r\n\t\t\r\n\t\t// Puts the wait cursor\r\n\t\tAcideDataViewReplaceWindow.getInstance().setCursor(\r\n\t\t\t\tCursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t\t\t\t\t\r\n\t\t// reads the line and chechks that is not a end nor an error\r\n\t\twhile (scan.hasNextLine()\r\n\t\t\t\t&& !(line = scan.nextLine()).replaceAll(\" \", \"\").equals(\r\n\t\t\t\t\t\t\"$error\") && !line.replaceAll(\" \", \"\").equals(\"$eot\")) {\r\n\t\t\t// checks if the next lines corresponds to a file\r\n\t\t\tif (line.replaceAll(\" \", \"\").equals(\"$file\")) {\r\n\t\t\t\tisAsserted = false;\r\n\t\t\t\tisFile = true;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t// checks if the next lines corresponds to an asserted predicate\r\n\t\t\tif (line.replaceAll(\" \", \"\").equals(\"$asserted\")) {\r\n\t\t\t\tisAsserted = true;\r\n\t\t\t\tisFile = false;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (isAsserted) {\r\n\t\t\t\t_assertedFacs.add(this._query);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (isFile) {\r\n\t\t\t\t// checks if the line is a number of line or the file path\r\n\t\t\t\tif (line.replaceAll(\" \", \"\").matches(\"(\\\\d)+\")) {\r\n\t\t\t\t\t// gets the initial and the end line and adds the lines to\r\n\t\t\t\t\t// the highlight\r\n\t\t\t\t\tif (initLine == -1)\r\n\t\t\t\t\t\tinitLine = Integer.parseInt(line.replaceAll(\" \", \"\"));\r\n\t\t\t\t\telse if (endLine == -1) {\r\n\t\t\t\t\t\tendLine = Integer.parseInt(line.replaceAll(\" \", \"\"));\r\n\t\t\t\t\t\tfor (int i = initLine - 1; i < endLine; i++)\r\n\t\t\t\t\t\t\taddLine(file, i);\r\n\t\t\t\t\t\tinitLine = -1;\r\n\t\t\t\t\t\tendLine = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfile = line.substring(line.indexOf(\"'\") + 1,\r\n\t\t\t\t\t\t\tline.lastIndexOf(\"'\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Puts the default cursor\r\n\t\tAcideDataViewReplaceWindow.getInstance().setCursor(\r\n\t\t\tCursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\t\t\t\t\r\n\t\tscan.close();\r\n\t}", "java.lang.String getSourceFile();", "Source getSrc();", "public List<String> getSourceList() {\n return this.sourceList; \n }", "private static List<String> getJavasSourceCodeFiels(Map<String,Object> map){\r\n \t\t\r\n \t\t\r\n \t\tSystem.out.println(\"............\");\r\n \t\tLinkedList<String> list = new LinkedList<String>();\r\n \t\tfor(String key : map.keySet()){\r\n \t\t\tObject o = map.get(key);\r\n \r\n \t\t\t//package...\r\n \t\t\tif(o instanceof IPackageFragment){\r\n \t\t\t\t//System.out.println(\"Package --> \" + key);\r\n \t\t\t\tkey = key.substring(0,key.indexOf('[')).trim();\r\n \t\t\t\tkey = PACKAGE + \"(\" + key + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t\t//class...\r\n \t\t\tif(o instanceof ICompilationUnit){\r\n \t\t\t\t//System.out.println(\"Class --> \" + key);\r\n \t\t\t\tString classname = key.substring(0,key.indexOf('[')).trim();\r\n \t\t\t\tString packagename = key.substring(key.indexOf(PACKAGE),key.indexOf('\\n',key.indexOf(PACKAGE)));\r\n \t\t\t\tkey = CLASS_WITH_MEMBERS + \"(\" + packagename + \",\" + classname + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}//method\r\n \t\t\tif(o instanceof IMethod){\r\n \t\t\t\tSystem.out.println(\"Methode --> \" + key);\r\n \t\t\t\tkey = METHOD + \"(\" + getQueryFromMethod((IMethod)o) + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(o instanceof IField){\r\n \t\t\t\tSystem.out.println(\"Attribut --> \" + key);\r\n \t\t\t\tkey = FIELD + \"(\" + getQueryFromField((IField)o) + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn list;\r\n \t\t\r\n \t\t\r\n \t\t/*\r\n \t\tfor(String key : map.keySet()){\r\n \t\t\tObject o = map.get(key);\r\n \t\t\t//if(o instanceof ISourceAttribute)\r\n \t\t\t\t//System.out.println(\"attribute\");\r\n \t\t\t//if(o instanceof ISourceMethod)\r\n \t\t\t\t//System.out.println(\"methode\");\r\n \t\t\tif(o instanceof IPackageFragment) \r\n \t\t\t\tSystem.out.println(\"Package\");\r\n \t\t\tif(o instanceof ICompilationUnit)\r\n \t\t\t\tSystem.out.println(\"sour code file\");\r\n \t\t\t\t\r\n \t\t\t//\"oldquery or class('voller packagename', klassenname)\"\r\n \t\t\t\t\r\n \t\t\t\t\r\n \t\t\tif(o instanceof IField)\r\n \t\t\t\tSystem.out.println(\"Attribut\");\r\n \t\t\tif(o instanceof IType)\r\n \t\t\t\tSystem.out.println(\"classe also class ... in einem file\");\r\n \t\t\tif(o instanceof IMethod)\r\n \t\t\t\tSystem.out.println(\"Methode\");\r\n \t\t\tif(o instanceof IPackageFragmentRoot) \r\n \t\t\t\tSystem.out.println(\"jar package / src Ordner\");\r\n \t\t\tif(o instanceof IProject)\r\n \t\t\t\tSystem.out.println(\"Projekt Ordner\");\r\n \t\t\tif(o instanceof IClassFile)\r\n \t\t\t\tSystem.out.println(\"ClassFile\");\r\n \t\t\tif(o instanceof IAdaptable) //trieft auch auf viele ander sachen zu\r\n \t\t\t\tSystem.out.println(\"Libaraycontainer\");\r\n \t\t\tif(o instanceof IFile)\r\n \t\t\t\tSystem.out.println(\"file\"); //je nach ausgewlter ansicht knnen file auch *.java datein sein\r\n \t\t\tif(o instanceof IFolder)\r\n \t\t\t\tSystem.out.println(\"folder\");\r\n \t\t\tSystem.out.println(o.getClass());\r\n \t\t\t\r\n \t\r\n \t\t}\r\n \t\treturn null;\r\n \t\t*/\r\n \t}", "public static List<Pair<String, SourceBuilder>> getSourceBuilders() {\n List<Pair<String, SourceBuilder>> builders =\n new ArrayList<Pair<String, SourceBuilder>>();\n builders.add(new Pair<String, SourceBuilder>(\"helloWorldSource\", builder()));\n return builders;\n }", "public char[] getSource() {\n\t\treturn source;\n\t}", "public String getSource() {\r\n return source;\r\n }", "@Override\n public List<Machine.Instruction> emit() {\n ArrayList<Machine.Instruction> data = new ArrayList<>();\n data.add(new Machine.Load(name));\n return data;\n }", "public String getSource(String cat);", "public String getInstructions(WebSession s)\n {\n String instructions = \"\";\n\n if (!getLessonTracker(s).getCompleted())\n {\n String stage = getStage(s);\n if (STAGE1.equals(stage))\n {\n instructions = \"Stage 1: Execute a Stored Cross Site Scripting (XSS) attack.<br><br>\"\n + \"<b><font color=blue> THIS LESSON ONLY WORKS WITH THE DEVELOPER VERSION OF WEBGOAT</font></b><br/><br/>\"\n + \"As 'Tom', execute a Stored XSS attack against the Street field on the Edit Profile page. \"\n + \"Verify that 'Jerry' is affected by the attack. \"\n + \"A sample JavaScript snippet you can use is: &lt;SCRIPT&gt;alert('bang!');&lt;/SCRIPT&gt;.\";\n }\n else if (STAGE2.equals(stage))\n {\n instructions = \"Stage 2: Block Stored XSS using Input Validation.<br>\"\n + \"Implement a fix in the stored procedure to prevent the stored XSS from being written to the database. \";\n if (getWebgoatContext().getDatabaseDriver().contains(\"jtds\"))\n instructions += \"Use the provided user-defined function RegexMatch to test the data against a pattern. \";\n instructions += \"A sample regular expression pattern: ^[a-zA-Z0-9,\\\\. ]{0,80}$ \"\n + \"Repeat stage 1 as 'Eric' with 'David' as the manager. Verify that 'David' is not affected by the attack.\";\n }\n }\n\n return instructions;\n\n }", "public IAstRlsSourceFile[] getRlsSourceFiles();", "ElementCircuit getSource();", "public String toString() {\n return getClass().getName() + \"[source=\" + source + \"]\";\n }", "public String getSource() {\n return source;\n }", "private void loadInstructions(byte... codes) {\r\n\t\tint instructionLocation = instructionBase;\r\n\t\tfor (int i = -128; i < 128; i++) {\r\n\t\t\tfor (byte code : codes) {\r\n\t\t\t\tcpuBuss.write(instructionLocation++, code);\r\n\t\t\t} // for codes\r\n\t\t\tcpuBuss.write(instructionLocation++, (byte) i);\r\n\t\t} // for\r\n\t\twrs.setProgramCounter(instructionBase);\r\n\t}", "public String getSource() {\n return source;\n }", "public String getSource() {\n return source;\n }", "public String getSource() {\n return source;\n }", "public abstract Source getSource();", "@Override\n public String[] getInstructions() {\n return null;\n }", "@Override\n public void getMosSource(String testTest, ArrayList<String> source) {\n\n }", "public List<Symbol> sourceOutputLayout(int sourceIndex)\n {\n return getOutputSymbols().stream()\n .map(symbol -> outputToInputs.get(symbol).get(sourceIndex))\n .collect(toImmutableList());\n }", "public ArrayList<DrawableVector> getInstructions(){\n return instructions;\n }", "public String toString()\n\t{return getClass().getName()+\"[source=\"+source+\",id=\"+id+']';}", "ISourceMethod[] getMethods();", "@Nullable\n static ListenableFuture<List<TargetInfo>> getTargetsBuildingSource(LocationContext context) {\n if (!SourceToTargetProvider.hasProvider()) {\n return null;\n }\n // early-out if source is trivially covered by project targets (e.g. because there's a wildcard\n // target pattern for the parent package)\n if (context.getImportRoots().packageInProjectTargets(context.blazePackage)) {\n return null;\n }\n // Finally, query the exact targets building this source file.\n // This is required to handle project targets which failed to build\n return Futures.transform(\n SourceToTargetHelper.findTargetsBuildingSourceFile(\n context.project, context.workspacePath.relativePath()),\n (Function<List<TargetInfo>, List<TargetInfo>>)\n (List<TargetInfo> result) ->\n result == null || sourceInProjectTargets(context, fromTargetInfo(result))\n ? ImmutableList.of()\n : result,\n MoreExecutors.directExecutor());\n }", "public static interface ISourceFunctions extends IDynamicResourceExtension {\r\n\r\n @IDynamicResourceExtension.MethodId(\"4b8d7404-c58d-11e5-aeea-1db9268c0ee9\")\r\n public java.lang.String GetId();\r\n\r\n @IDynamicResourceExtension.MethodId(\"43b904fe-c97a-11e5-a64e-a5d84d8f1b45\")\r\n public List<cleon.architecturemethods.eamod.metamodel.spec.chrv.sources.javamodel.ISource> GetAllSources();\r\n\r\n @IDynamicResourceExtension.MethodId(\"88b17f27-c992-11e5-b35b-8fb753dd0798\")\r\n public java.lang.String GetTypeName();\r\n\r\n @IDynamicResourceExtension.MethodId(\"b217619b-7c0b-11e6-a6f8-61123cfa9fd9\")\r\n public java.lang.String GetName();\r\n\r\n @IDynamicResourceExtension.MethodId(\"769bc163-38e7-11e8-8c35-85f8e4a22f42\")\r\n public List<cleon.architecturemethods.eamod.metamodel.spec.chrv.sources.javamodel.ISourceAware> GetAllUsedSourceAware();\r\n\r\n @IDynamicResourceExtension.MethodId(\"0e17d013-ea68-11e8-8092-1f65b9544bbd\")\r\n public java.lang.String GetCascadingName();\r\n\r\n }", "private void addInstructions() {\n for (InstructionWrapper instructionWrapper : this.instructions) {\n if (!(instructionWrapper.instruction instanceof LabelInstruction)) {\n this.code.addInstruction(instructionWrapper.instruction);\n }\n }\n }", "public InstructionIterator getInstructions(boolean forward);", "public List<DexlibAbstractInstruction> instructionsAfter(DexlibAbstractInstruction instruction) {\n int i = instructions.indexOf(instruction);\n if (i == -1) {\n throw new IllegalArgumentException(\"Instruction\" + instruction + \"not part of this body.\");\n }\n\n return instructions.subList(i + 1, instructions.size());\n }", "public LSPSource[] getSources () {\r\n return sources;\r\n }", "java.lang.String getSourcepath(int index);", "java.lang.String getSourcepath(int index);", "public String getSource(int i)\r\n { return this.history.get(i).source;\r\n }", "public String getSource(){\n\t\treturn source.getEvaluatedValue();\n\t}", "java.lang.String getSrc();", "private List<String> readSrc(){\n //daclarations\n InputStream stream;\n List<String> lines;\n String input;\n BufferedReader reader;\n StringBuilder buf;\n\n //Inlezen van bestand\n stream = this.getClass().getResourceAsStream(RESOURCE);\n lines = new LinkedList<>();\n\n // laad de tekst in \n reader = new BufferedReader(new InputStreamReader(stream));\n buf = new StringBuilder();\n\n if(stream != null){\n try{\n while((input = reader.readLine()) != null){\n buf.append(input);\n System.out.println(input);\n lines.add(input);\n }\n } catch(IOException ex){\n System.out.println(ex);// anders schreeuwt hij in mijn gezicht:\n }\n }\n return lines;\n }", "public String get_source() {\n\t\treturn source;\n\t}", "static void main(String[] args) {\n int[] instructions = {0x0000,0x01FF,0xF025,0xFFFF};\n for (int i:instructions) {\n //holds the instruction\n int instr;\n //holds the first three bits after the opcode\n int f3Bits;\n //holsd the second three bits after the opcode\n int s3Bits;\n \n // String to hold the code disassembled into a string\n String instruction=\"\";\n\n //makes the instruction only the last 16 bits instead of int natural 32\n i = i&0x0000FFFF; \n\n //separates just the Opcode\n instr = 0xf000 &i;\n \n //Test for each instruction and adds the Call of that instruction to the\n //string\n if(i==0x0000){\n \tinstruction = \"NOP\";\n }\n else if(instr ==0x1000){\n instruction = \"ADD \";\n }\n else if(instr==0x5000){\n \tinstruction = \"AND \";\n }\n else if(instr==0x0000){\n \tinstruction = \"BR \";\n \t//Test for each part of the NZP\n int n = i & 0x0800;\n \tint z = i & 0x0400;\n \tint p = i & 0x0200;\n if(n == 0x0800)\n \tinstruction += \"n\";\n if(z == 0x0400)\n \tinstruction += \"z\";\n if(p == 0x0200)\n \tinstruction += \"p\";\n //Adds the offset to the string\n int offset9 = i & 0x01FF;\n instruction += \" \" + offset9;\n }\n else if(instr==0xC000){\n \tinstruction = \"JMP \";\n \tinstruction += \"R\"+(i&0x01C0);\n }\n else if(instr==0x4000){\n \tinstruction += \"JSR\";\n \tif((i&0x0800) == 0x0800) {\n \t\tinstruction += \" \"+(i&0x07FF);\n \t}\n \telse {\n \t\tinstruction += \"R R\"+(i&0x01C0);\n \t}\n }\n else if(instr==0x2000){\n \tinstruction = \"LD \";\n }\n else if(instr==0xA000){\n instruction = \"LDI \";\n }\n else if(instr==0x6000){\n \tinstruction = \"LDR \";\n }\n else if(instr==0xE000){\n \tinstruction = \"LEA \";\n }\n else if(instr==0x9000){\n \tinstruction = \"NOT \";\n }\n else if(instr==0x3000){\n \tinstruction =\"ST \";\n }\n else if(instr==0xB000){\n \tinstruction = \"STI \";\n }\n else if(instr==0x7000){\n \tinstruction = \"STR \";\n }\n else if(i==0xF025){\n \tinstruction = \"HALT\";\n }\n else {\n \tinstruction = \"ERROR\";\n }\n\n //Grabs the first Register either SR or DR if it is not \n // NOP RET JSR JSRR\n if(instr !=0x0000 || instr != 0xC000 || instr != 0x4000) {\n f3Bits = i & 0x0E00;\n f3Bits= f3Bits >> 9;\n\n // Does the first two Registers for ADD AND LDR STR and NOT\n if(instr==0x1000 || instr==0x5000 || instr==0x6000 || instr==0x9000 || instr==0x7000){\n instruction = instruction + \"R\"+f3Bits+\" \";\n s3Bits = i & 0x01C0;\n s3Bits = s3Bits >> 6;\n instruction = instruction + \"R\"+s3Bits+\" \";\n }\n // Does teh First register and the Offset for LD, LDI, RET, ST, STI\n else if(instr==0x2000 || instr==0xA000 || instr==0xC000 || instr==0x3000 || instr=0xB000){\n instruction = instruction +\"R\"+f3Bits+\" \";\n System.out.printf(\"%x\",i);\n int offset9 = i & 0x01FF;\n instruction = instruction + offset9;\n }\n // DOes the logic for IMM5 or the 3rd REG for ADD and AND\n if(instr==0x1000 || instr==0x5000) {\n int bit4 = i & 0x0020;\n if(bit4 == 0x0020){\n int imm5 = i & 0x001F;\n instruction = instruction + imm5;\n }\n else {\n \t instr = i &0x0007;\n \t instruction = instruction + \"R\" + instr;\n }\n }\n //Computes the Offset for LDR and STR\n else if(instr==0x6000 || instr == 0x7000) {\n int offset6 = i & 0x003F;\n instruction = instruction + offset6;\n }\n }\n System.out.println(instruction);\n }\n }", "public String getSource() {\r\n return Source;\r\n }", "java.lang.String getSourceContext();", "@Override\n public java.util.List<Path> getSourcePathList() {\n return sourcePath_;\n }", "@RequestMapping(value = \"/txsource\", method = RequestMethod.GET)\n public\n @ResponseBody\n Collection<Description> getTxSourceList(Locale locale) {\n return Collections2.transform(\n translationSourceService.getTranslationSourceList(),\n Description.fromDescriptible(strings, locale)\n );\n }", "public String source(String src)\n\t{\n\t\tint i;\n\t\tString [] toks = src.split(\"\\\\s+\");\n\t\tString ret = toks[sourceStart];\n\t\tfor (i = sourceStart + 1; i < sourceEnd; i++) {\n\t\t\tret += \" \" + toks[i];\n\t\t}\n\t\treturn ret;\n\t}", "public void readInstruction() {\n\t\ttry {\n\t\t\tScanner scan = new Scanner(instructionFile);\n\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\tString instruction = scan.nextLine();\n\t\t\t\tScanner sc = new Scanner(instruction);\n\t\t\t\tString keyword, param;\n\t\t\t\tif(sc.hasNext()) {\n\t\t\t\t\tkeyword = sc.next();\n\t\t\t\t\tif(sc.hasNextLine()) {\n\t\t\t\t\t\tparam = sc.nextLine();\n\t\t\t\t\t\tif(keyword.equalsIgnoreCase(\"update\")) {\n\t\t\t\t\t\t\trecord.updateDonator(param);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keyword.equalsIgnoreCase(\"delete\")) {\n\t\t\t\t\t\t\trecord.deleteDonator(param);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keyword.equalsIgnoreCase(\"donate\")) {\n\t\t\t\t\t\t\trecord.donateDonator(param);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (keyword.equalsIgnoreCase(\"query\")) {\n\t\t\t\t\t\t\trecord.queryDonator(param);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsc.close();\n\t\t\t}\n\t\t\tscan.close();\n\t\t} catch(FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract Object getSource();", "public String getSource() {\n\n return source;\n }", "<T> List<String> generateFindByIdScript(GremlinSource<T> source);", "public static final String[] getSourceTypeList() {\n final SourceType[] types = SourceType.values();\n final String[] displayStrings = new String[types.length];\n for(int i = 0; i < types.length; i++) {\n displayStrings[i] = JMeterUtils.getResString(types[i].propertyName);\n }\n return displayStrings;\n }", "public interface SourceAble {\n public void method1();\n\n public void method2();\n}", "private String findSource(Request request) {\n String current = \"class\";\n String source = current;\n // check the java execution params for dev or prod values\n RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();\n List<String> arguments = runtimeMxBean.getInputArguments();\n // it will be run only for the first request\n if (startParameterSource == null) {\n // this condition will met only once per lifecycle\n startParameterSource = \"\";\n for (String arg : arguments) {\n if (arg != null && arg.startsWith(\"-Dtarget.source=\")) {\n startParameterSource = arg.substring(\"-Dtarget.source=\".length());\n break;\n }\n }\n }\n // first level is jvm parameter\n if (startParameterSource != null) {\n current = startParameterSource;\n }\n\n // second is the session\n if (request.getSession().containsKey(\"Dtarget.source\") && request.getSession().get(\"Dtarget.source\") != null) {\n current = String.valueOf(request.getSession().get(\"Dtarget.source\"));\n }\n\n // third is the header\n if (request.getHeader(\"Dtarget.source\") != null) {\n current = request.getHeader(\"Dtarget.source\");\n }\n\n // last is the request\n if (request.get(\"Dtarget.source\") != null) {\n current = request.get(\"Dtarget.source\");\n }\n\n if (\"db\".equalsIgnoreCase(current)) {\n source = \"db\";\n } else if (\"db-update-from-file\".equalsIgnoreCase(current)) {\n source = \"db-update-from-file\";\n } else if (\"file\".equalsIgnoreCase(current)) {\n source = \"file\";\n } else if (\"class\".equalsIgnoreCase(current)) {\n source = \"class\";\n }\n\n // return current execution source\n return source;\n }", "@Override\n\tpublic EList<SourceRef> getSource() {\n\t\treturn adaptee.getSource();\n\t}", "public InstructionIterator getInstructions(Address addr, boolean forward);", "List<String> getCommands();", "@Override\n public String getSource() {\n return this.src;\n }", "@RequestMapping(value = \"/txfilesource\", method = RequestMethod.GET)\n public\n @ResponseBody\n Collection<Description> getTxFileSourceList(Locale locale) {\n return Collections2.transform(\n translationSourceService.getTxFileSourceList(),\n Description.fromDescriptible(strings, locale)\n );\n }", "private List<ImageInfo> scanForImageInfo(CharSequence source) {\n return null; \n }", "public InstructionIterator getInstructions(AddressSetView addrSet, boolean forward);", "public PyList getTargets() {\n\t\treturn (PyList) shadowstr_gettargets();\n\t}", "public String readAllLines() {\n String ans = \"\";\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"./assets/Instruction.txt\"));\n String str;\n while ((str = br.readLine()) != null) {\n ans += (str + \"\\n\");\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n assert ans != null;\n return ans;\n }", "public static List<ApexPath> getPaths(GraphTraversalSource g, String sourceCode) {\n return getPaths(g, new String[] {sourceCode});\n }", "public java.lang.String getSource() {\r\n return localSource;\r\n }", "@Override\n public Text getUsage(CommandSource source) {\n return usage;\n }" ]
[ "0.68656516", "0.6207989", "0.6162893", "0.6131527", "0.60356647", "0.59497887", "0.59497887", "0.5921183", "0.5883258", "0.5861697", "0.57813853", "0.5773221", "0.5772372", "0.57347363", "0.573137", "0.5730371", "0.5709793", "0.56923544", "0.5682837", "0.5674651", "0.5657034", "0.56356746", "0.5582761", "0.55821615", "0.55724955", "0.55567795", "0.5552758", "0.5533039", "0.5530886", "0.55126905", "0.54598516", "0.5422869", "0.54166025", "0.5398171", "0.53979605", "0.53907007", "0.53886217", "0.53885835", "0.5369755", "0.5353809", "0.53446007", "0.5341572", "0.53373474", "0.532694", "0.5312781", "0.53042156", "0.52957875", "0.52830726", "0.52808267", "0.5279564", "0.5265906", "0.52420014", "0.52312994", "0.52312994", "0.52312994", "0.5225258", "0.52169937", "0.5212261", "0.5204716", "0.5197919", "0.519545", "0.51872855", "0.51847565", "0.5179231", "0.5178876", "0.51754266", "0.51659864", "0.51622427", "0.51600045", "0.51600045", "0.51582646", "0.5128595", "0.5113414", "0.511068", "0.511043", "0.5107379", "0.5096758", "0.5088921", "0.5084165", "0.50765216", "0.5073535", "0.5070426", "0.50660765", "0.5060422", "0.50602704", "0.5057183", "0.50531834", "0.50531596", "0.50531256", "0.5043967", "0.5040682", "0.5037684", "0.5035121", "0.5025281", "0.5007572", "0.4999102", "0.4990417", "0.4990279", "0.49897206", "0.4982644" ]
0.69984907
0
we need to load saved data immediately apon entry to the application
@Override public void initialize(URL url, ResourceBundle rb) { deSerialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void loadData()\n {\n }", "private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}", "private void loadPersistedData() {\n IntegerRange storedAutoStartOnDisconnectDelayRange =\n AUTOSTART_ON_DISCONNECT_DELAY_RANGE_SETTING.load(mDeviceDict);\n if (storedAutoStartOnDisconnectDelayRange != null) {\n mPilotingItf.getAutoStartOnDisconnectDelay().updateBounds(storedAutoStartOnDisconnectDelayRange);\n }\n\n DoubleRange endingHoveringAltitudeRange = ENDING_HOVERING_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (endingHoveringAltitudeRange != null) {\n mPilotingItf.getEndingHoveringAltitude().updateBounds(endingHoveringAltitudeRange);\n }\n\n DoubleRange minAltitudeRange = MIN_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (minAltitudeRange != null) {\n mPilotingItf.getMinAltitude().updateBounds(minAltitudeRange);\n }\n\n applyPresets();\n }", "public void load() {\n handleLoad(false, false);\n }", "protected abstract void loadData();", "public void loadFromLocalStorage() {\n\t\t\n\t}", "public void loadPersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tif (file.length() == 0) { // no persistent data to use\n\t\t\treturn;\n\t\t}\n\t\tdeserializeFile(file);\n\t\tloadPersistentSettings();\n\t}", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "public void load() {\n\t}", "private void loadData() {\n reminderData.loadDataFromSharedPreferences();\n reminderText.setText(reminderData.getNotificationText());\n timePicker.setMinute(reminderData.getMinutes());\n timePicker.setHour(reminderData.getHours());\n }", "void loadData();", "void loadData();", "private void swapAndLoadData() {\n\n \tLog.d(Constants.TAG, \"EntryListActivity: swapAndLoadData: update last loaded data date\");\n \tSharedPreferences settings = getSharedPreferences(Preferences.PREFS_NAME, 0);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t editor.putLong(Preferences.PREF_KEY_LAST_LOADED_DATA_DATE, this.lastRefreshSuccessDate);\n\t editor.commit();\n\n\t\tLog.d(Constants.TAG, \"EntryListActivity: swapAndLoadData: swap data\");\n\t\t// TODO JGU #1: swap in background or UI thread\n\t\tLoadNewDataTask loadNewDataTask = new LoadNewDataTask(this);\n\t\tloadNewDataTask.execute();\n//\t\texecuteSwapping();\n\t\t///JGU #1\n\t}", "public void load() {\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "public abstract void loadData();", "public abstract void loadData();", "private synchronized void initializeData() {\n\n System.out.println(\"En inicializar datos\");\n // Only perform initialization once per app lifetime. If initialization has already been\n // performed, we have nothing to do in this method.\n if (mInitialized) return;\n mInitialized = true;\n\n mExecutors.diskIO().execute(() -> {\n if (isFetchNeeded()) {\n System.out.println(\"Se necesita actualizar, fetch is needed\");\n startFetchPublicacionService();\n }\n });\n }", "@Override\n protected void onResume() {\n super.onResume();\n loadData();\n }", "@Override\n protected void onResume() {\n super.onResume();\n loadData();\n }", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "public void loadAllUserData(){\n\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "private void loadDataOnFirst(){\n updateDateTimeText();\n\n mPbLoading.setVisibility(View.VISIBLE);\n mCalendarListView.setVisibility(View.GONE);\n\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "private void saveData() {\n }", "private void loadUserData() {\n\t\tuserData = new UserData();\n }", "private void initialData() {\n\n }", "public void load() ;", "private void loadData(){\n Dh.refresh();\n }", "private void loadData() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n String fromSymbols = sharedPreferences.getString(getString(R.string.cryto_key), getString(R.string.cryto_value));\n String toSymbols = sharedPreferences.getString(getString(R.string.currencies_key), getString(R.string.currencies_value));\n new FetchUrlTask().execute(fromSymbols, toSymbols);\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "public void load() {\n updater.load(-1); // -1 because Guest ID doesn't matter.\n }", "private void loadData() {\n //load general data\n Settings.loadSettings();\n\n this.spCrawlTimeout.setValue(Settings.CRAWL_TIMEOUT / 1000);\n this.spRetryPolicy.setValue(Settings.RETRY_POLICY);\n this.spRecrawlInterval.setValue(Settings.RECRAWL_TIME / 3600000);\n this.spRecrawlCheckTime.setValue(Settings.RECRAWL_CHECK_TIME / 60000);\n }", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "private static void load(){\n }", "@Override\n public void load() {\n }", "@EventListener(ApplicationReadyEvent.class)\n\tpublic void loadData() {\n\t\tList<AppUser> allUsers = appUserRepository.findAll();\n\t\tList<Customer> allCustomers = customerRepository.findAll();\n\t\tList<Part> allPArts = partRepository.findAll();\n\n\t\tif (allUsers.size() == 0 && allCustomers.size() == 0 && allPArts.size() == 0) {\n\t\t\tSystem.out.println(\"Pre-populating the database with test data\");\n\n\t\t\tResourceDatabasePopulator resourceDatabasePopulator = new ResourceDatabasePopulator(\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\t\"UTF-8\",\n\t\t\t\tnew ClassPathResource(\"data.sql\"));\n\t\t\tresourceDatabasePopulator.execute(dataSource);\n\t\t}\n\t\tSystem.out.println(\"Application successfully started!\");\n\t}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void loadData() {\n this.financeDataList = new ArrayList<>();\n }", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "@Override\r\n\tpublic void load() {\n\r\n\t}", "@Override\r\n\tpublic void load() {\n\t}", "public void getData() {\n\t\tfileIO.importRewards();\n\t\tfileIO.getPrefs();\n\t}", "private void InitData() {\n\t}", "private void loadUser() {\n File dataFile = new File(getFilesDir().getPath() + \"/\" + DATA_FILE);\n\n if(dataFile.exists()) {\n loadData();\n } else { // First time CigCount is launched\n user = new User();\n }\n }", "public void updatePersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tserializeToFile(file);\n\t\tupdatePersistentSettings();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\texecutor.execute(new Task(ReadingDataModel.Event.INIT_LOAD));\n\t\tinitBookNote();\n\t}", "private void persistData() {\n mSharedPref.storeLastScreen(SCREEN_NAME);\n }", "private void loadData() {\n Log.d(LOG_TAG, \"loadData()\");\n /* If the device does not have an internet connection, then... */\n if (!NetworkUtils.hasInternetConnection(this)){\n showErrorMessage(true);\n return;\n }\n /* Make the View for the data visible and hide the error message */\n showDataView();\n\n /* Fetch the data from the web asynchronous using Retrofit */\n TMDBApi the_movie_database_api = new TMDBApi(new FetchDataTaskCompleteListener());\n /* Start the network transactions */\n the_movie_database_api.start(sortOrderCurrent);\n\n /* Display the loading indicator */\n displayLoadingIndicator(true);\n }", "@Override\n public void load() {\n }", "private void initDataLoader() {\n\t}", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "protected boolean initLocalData() {\n return true;\n }", "private void loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}", "@Override\n public void run() {\n ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());\n OrderReasons.loadData(getApplicationContext());\n }", "public void initAfterUnpersistence() {\n //From a legacy bundle\n if (sources == null) {\n sources = Misc.newList(getName());\n }\n super.initAfterUnpersistence();\n openData();\n }", "public static void load() {\n }", "private void loadData(){\n updateDateTimeText();\n\n mLoadingDialog = DialogUtil.createLoadingDialog(getActivity(), getString(R.string.loading_dialog_in_progress));\n mLoadingDialog.show();\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }", "private void reloadData() {\n if (DataFile == null)\n DataFile = new File(dataFolder, DATAFILENAME);\n Data = YamlConfiguration.loadConfiguration(DataFile);\n }", "@Override\n\tpublic void loadData(Bundle bundle) {\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "public void load()\n\t{\n\t\tfor(String s : playerData.getConfig().getKeys(false))\n\t\t{\n\t\t\tPlayerData pd = new PlayerData(playerData, s);\n\t\t\tpd.load();\n\t\t\tdataMap.put(s, pd);\n\t\t}\n\t}", "private void initData() {\n requestServerToGetInformation();\n }", "protected void onStartLoading() { forceLoad();}", "public void loadFirstData() throws Exception {\n\t}", "public void loadData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n Gson gson = new Gson();\n String jsonItem = sharedPreferences.getString(REMINDER_ITEM, null);\n\n Type typeItem = new TypeToken<ArrayList<ReminderItem>>() {}.getType();\n\n reminderItems = gson.fromJson(jsonItem, typeItem);\n\n // In case reminderItems is null, reassign it.\n if (reminderItems == null) {\n reminderItems = new ArrayList<>();\n }\n }", "public void saveData() {\n\t\t//place to save notes e.g to file\n\t}", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "public void load();", "public void load();", "private void loadRecords() {\r\n\t\tpanContent.updateContent();\r\n\t}", "private void onDataLoaded() {\n if (userLoc.getLoadingState() != LoadingState.DATA\n || randomNumberLoc1.getLoadingState() != LoadingState.DATA\n || randomNumberLoc2.getLoadingState() != LoadingState.DATA) {\n return;\n }\n\n // Let's pretend that adapting is expensive and takes a while\n try {\n Thread.sleep(ADAPT_DELAY_MS);\n } catch (InterruptedException e) {\n // can't catch a break!\n }\n\n UserService.User user = userLoc.getUser();\n assert user != null; // based on LoadingState check\n DateFormat dateTimeInstance =\n SimpleDateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);\n\n loadingState = LoadingState.DATA;\n text1 = user.getId() + \": \" + user.getName() + \" (\" + randomNumberLoc1.getRandomNumber() + \")\";\n text2 = dateTimeInstance.format(user.getLastUpdate()) + \" (\" + randomNumberLoc2.getRandomNumber() + \")\";\n notifyPropertyChanged(BR.loadingState);\n notifyPropertyChanged(BR.text1);\n notifyPropertyChanged(BR.text2);\n }", "private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }", "private void loadData() {\r\n titleField.setText(existingAppointment.getTitle());\r\n descriptionField.setText(existingAppointment.getDescription());\r\n contactField.setText(existingAppointment.getContact());\r\n customerComboBox.setValue(customerList.stream()\r\n .filter(x -> x.getCustomerId() == existingAppointment.getCustomerId())\r\n .findFirst().get());\r\n typeComboBox.setValue(existingAppointment.getType());\r\n locationComboBox.setValue(existingAppointment.getLocation());\r\n startTimeComboBox.setValue(existingAppointment.getStart().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n endTimeComboBox.setValue(existingAppointment.getEnd().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n startDatePicker.setValue(existingAppointment.getStart().toLocalDate());\r\n endDatePicker.setValue(existingAppointment.getEnd().toLocalDate());\r\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "public static void load() {\n load(false);\n }", "private void loadState() {\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n this._tally = prefs.getInt(\"count\", 0);\n }", "private void loadSavedSchedules() {\n scheduleList = new ScheduleList(new ArrayList<>());\n try {\n scheduleList = reader.readSchedules();\n } catch (IOException e) {\n System.err.println(\"Schedule File Missing\");\n } catch (JSONException je) {\n System.err.println(\"Empty File - Schedule\");\n System.out.println(je);\n }\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif(Vars.onAdd){\n\t\t\t//createJsonRefresh(shared.getSharedValue(\"mLASTTIMESTAMP\").toString());\n\t\t\tif(shared.getSharedValue(\"mLASTTIMESTAMP\").toString().equalsIgnoreCase(\"N/A\")){\n\t\t\t\tif (comman.isNetworkAvailable(context)) {\n\t\t\t\t\tcreateJsonRefresh(timeStamp);\n\n\t\t\t\t}else{\n\t\t\t\t\tonLoad();\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\tif (comman.isNetworkAvailable(context)) {\n\t\t\t\t\tcreateJsonRefresh(shared.getSharedValue(\"mLASTTIMESTAMP\").toString());\n\t\t\t\t}else{\n\t\t\t\t\tonLoad();\n\t\t\t\t}\n\t\t\t}\n\t\t\tVars.onAdd= false;\n\t\t}\n\t}", "public void loaded(){\n\t\tloaded=true;\n\t}", "public void load() {\n Boolean value = permanentStore.getBoolean(key);\n if (value != null) {\n set(value.booleanValue());\n log.info(\"Property \" + key + \" has the non-default value \" + value.booleanValue());\n } else {\n set(defaultValue);\n }\n }", "private void initData() {\n\n }", "void massiveModeLoading( File dataPath );", "public void postOpenInit() {\n logger = Logger.getLogger(Dataset.class);\n clear();\n for (DataPoint point : persistentData) {\n addPoint(point);\n }\n }", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "private void initData() {\n\t}", "public void loadData(){\n SharedPreferences sharedPreferences=getSharedPreferences(\"logDetails\",Context.MODE_PRIVATE);\n nameText=sharedPreferences.getString(\"name\",\"na\");\n regText=sharedPreferences.getString(\"regnum\",\"na\");\n count=sharedPreferences.getInt(\"count\",1);\n\n\n }", "@Override\n\tprotected void onResume() {\n\t\t_id=getIntent().getLongExtra(Globle._ID,0);\n\t\tSystem.out.println(\"\"+_id);\n\t\tloadData(_id);\n\t\tsuper.onResume();\n\t}", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "private void loadSettings() {\n//\t\tSharedPreferences prefs = this.getSharedPreferences(Defs.PREFS_NAME, 0);\n//\t\t\n//\t\tString fileData = prefs.getString(Defs.PREFS_KEY_PREV_RATES_FILE, \"\");\n//\t\tLog.d(TAG, \"Loaded last \" + fileData);\n//\t\tif ( fileData.length() > 0 ) {\n//\t\t\tByteArrayInputStream bias = new ByteArrayInputStream(fileData.getBytes());\n//\t\t\t_oldRates = new ExchangeRate();\n//\t\t\tparseRates(bias, _oldRates);\n//\t\t}\n\t}", "private void saveData() {\n\t\tdataSaver.save(data);\n\t}", "public void preSaveInit() {\n persistentData.clear();\n for (int i = 0; i < getNumPoints(); i++) {\n persistentData.add(getPoint(i));\n }\n }" ]
[ "0.7255672", "0.720644", "0.7064631", "0.69240874", "0.68705755", "0.67410755", "0.6677238", "0.6676019", "0.6651046", "0.6636196", "0.6632901", "0.66265595", "0.6613963", "0.6613963", "0.65831745", "0.65504086", "0.6540643", "0.65177196", "0.65177196", "0.6516144", "0.6505028", "0.6505028", "0.6504047", "0.6479278", "0.64506406", "0.64470685", "0.6435334", "0.6432553", "0.6430194", "0.64215416", "0.64162886", "0.64142764", "0.6407193", "0.6405126", "0.640091", "0.63976145", "0.63815576", "0.6359153", "0.6352895", "0.6345595", "0.63439155", "0.6343133", "0.63398683", "0.63367736", "0.63212955", "0.6320343", "0.63037115", "0.62960714", "0.6291211", "0.62910587", "0.62907344", "0.62884045", "0.6281781", "0.6257823", "0.62511533", "0.6234874", "0.6228962", "0.62214744", "0.62206346", "0.6215501", "0.62154454", "0.6214013", "0.621221", "0.61973643", "0.61973643", "0.61973643", "0.6175309", "0.6175309", "0.6169271", "0.61681163", "0.6164853", "0.6164625", "0.61578816", "0.6153229", "0.6143756", "0.61302954", "0.6127667", "0.61154765", "0.61154765", "0.610221", "0.60782236", "0.6076381", "0.6068545", "0.60668", "0.60652286", "0.6058762", "0.60360706", "0.6035606", "0.6033779", "0.60308284", "0.6020301", "0.6018618", "0.601735", "0.60139865", "0.6011971", "0.60090774", "0.60082424", "0.60070944", "0.6005052", "0.60038495", "0.60037893" ]
0.0
-1
this method will transport to new set window
@FXML private void handleNewSetButton(ActionEvent event) { Switchable.switchTo("NewSetView"); NewSetViewController controller = (NewSetViewController)getControllerByName("NewSetView"); if (controller != null) { controller.allNoteCardSets = allNoteCardSets; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void newWindow(ReFrame newFrame);", "public void setWindow(GWindow w) {\r\n window = w;\r\n }", "public void openWindow()\r\n {\r\n myWindow = new TraderWindow(this);\r\n while(!mailbox.isEmpty())\r\n {\r\n myWindow.showMessage( mailbox.remove() );\r\n }\r\n }", "@Override\n public void windowOpened(WindowEvent we) {\n }", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "private void setupSettingWindow()\n {\n setGUI.setWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent we) {\n }\n\n @Override\n public void windowClosing(WindowEvent we) {\n }\n\n @Override\n public void windowClosed(WindowEvent we) {\n player1Color = setGUI.getPlayer1Color();\n player2Color = setGUI.getPlayer2Color();\n }\n\n @Override\n public void windowIconified(WindowEvent we) {\n }\n\n @Override\n public void windowDeiconified(WindowEvent we) {\n }\n\n @Override\n public void windowActivated(WindowEvent we) {\n }\n\n @Override\n public void windowDeactivated(WindowEvent we) {\n }\n });\n }", "public static void goToEditSongWindow()\n {\n EditSongWindow editSongWindow = new EditSongWindow();\n editSongWindow.setVisible(true);\n editSongWindow.setFatherWindow(actualWindow, false);\n }", "public void createPopupWindow() {\r\n \t//\r\n }", "@Override\n public void windowOpened(WindowEvent e)\n {\n\n }", "public void setResultsWindow(JFrame rsw) {\r\n \t\tthis.resultsWindow = rsw;\r\n \t\tif (rsw instanceof ResultsWindow) {\r\n \t\t\t// Sets action for toolbar buttons\r\n \t\t\t((ResultsWindow) rsw).addButtonActions(simulate, pauseSimulation, stopSimulation);\r\n \t\t} else {\r\n \t\t\tshowResults.setEnabled(true);\r\n \t\t}\r\n \t\t// Adds a listener that will unselect Show results button upon results\r\n \t\t// window closing\r\n \t\trsw.addWindowListener(new WindowAdapter() {\r\n \t\t\tpublic void windowClosing(WindowEvent e) {\r\n \t\t\t\tshowResults.setSelected(false);\r\n \t\t\t}\r\n \t\t});\r\n \t}", "public boolean setWindow(int i,window newc) {\n return windows.setObject(i, newc);\n }", "public void listAction() {\n TextWin newWindow = new TextWin(getSelectedCell());\n WindowUtils.avoidParent(newWindow, parentFrame);\n watchers.add(newWindow);\n }", "public void SwitchToWindow(String handle)\n\t{\n\t}", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void windowOpened(WindowEvent e) {\n \n }", "public void switchToDefaultWindow() {\n\n\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void windowInit ()\n {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "@Override\n public void windowOpened(WindowEvent e) {\n }", "private void openHistoryManagementWindow() {\r\n\t\tnew JFrameHistory(this.jFrameMainWindow.getUser());\r\n\t}", "@Override\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\n\t\t}", "public void refreshWindowsMenu() {\r\n Window.removeAll();\r\n for(JInternalFrame cf: circuitwindows){\r\n final JInternalFrame cf2 = cf;\r\n javax.swing.JMenuItem windowItem = new javax.swing.JMenuItem();\r\n windowItem.setText(cf.getTitle()); \r\n windowItem.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n try { cf2.setSelected(true);\r\n } catch (PropertyVetoException ex) {\r\n ErrorHandler.newError(\"Editor Error\",\"Cannot select circuit \" + cf2.getTitle() + \".\", ex);\r\n }\r\n }\r\n });\r\n Window.add(windowItem); \r\n }\r\n if(circuitwindows.size()==0){\r\n Window.setEnabled(false);\r\n } else {\r\n Window.setEnabled(true);\r\n }\r\n }", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "public void newWindow() {\n\t\tJMenuTest frame1 = new JMenuTest();\n\t\tframe1.setBounds(100, 100, 400, 400);\n\t\tframe1.setVisible(true);\n\t}", "public void switchToWindow(int index) {\n\t\ttry {\r\n\t\t\tSet<String> allWindows = getter().getWindowHandles();\r\n\t\t\tList<String> allhandles = new ArrayList<String>(allWindows);\r\n\t\t\tString windowIndex = allhandles.get(index);\r\n\t\t\tgetter().switchTo().window(windowIndex);\r\n\t\t\tSystem.out.println(\"The Window With index: \"+index+\r\n\t\t\t\t\t\" switched successfully\");\r\n\t\t} catch (NoSuchWindowException e) {\r\n\t\t\tSystem.err.println(\"The Window With index: \"+index+ \" not found\");\t\r\n\t\t}\t\r\n\t}", "@Override\r\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\r\n\t\t}", "public static void goToPlaylistChooserWindow()\n {\n PlaylistChooser playlistChooser = new PlaylistChooser();\n playlistChooser.setVisible(true);\n playlistChooser.setFatherWindow(actualWindow, false);\n }", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\r\n\t}", "@Override public void windowOpened(WindowEvent evt) { }", "@Override public void windowOpened(WindowEvent evt) { }", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t\t}", "public void setWindow(Window window) {\n this.window = window;\n window.setInput(input);\n }", "public void updateDetailWindow();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontrolleur.executeFirstWindow();\n\t\t\t\tdispose();\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\n\t\t\t}", "public void switchToLastWindow() {\n\t\tSet<String> windowHandles = getDriver().getWindowHandles();\n\t\tfor (String str : windowHandles) {\n\t\t\tgetDriver().switchTo().window(str);\n\t\t}\n\t}", "public void switchToNewlyOpenedWindow(){\n\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t\tdriver.getWindowHandles();\n\t\t\tfor(String handle : driver.getWindowHandles())\n\t\t\t{\n\t\t\t\tdriver.switchTo().window(handle);\n\t\t\t}\n\t\t\tLOGGER.info(\"Step : Switching to New Window : Pass\");\n\t\t} catch (InterruptedException e) {\n\t\t\tLOGGER.error(\"Step : Switching to New Window : Fail\");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while switching to newly opened window\");\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "public SetInfoWindow() {\n super(BasicWindow.curWindow,\"Stage Info\", true);\n //setTitle(\"Inventory Manager\");\n proj_class=(project)project.oClass;\n \n addComponents();\n populateComponents();\n setBounds(10,50, iScreenHeight,iScreenWidth);\n //setSize(500,500);\n setResizable(true);\n setVisible(true);\n }", "void createWindow();", "@Override\n\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void setWindow(BasePanel windowName) {\n\t\tjavaScriptWindow = (JavaScriptWindow) windowName;\r\n\t\tsetJavaScript(javaScriptWindow.getJavaScript());\r\n\r\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e)\n\t{\n\n\t}", "public void setWindow(WindowClient window){\n\n this.window = window;\n this.setFavorTokens(window.getFTokens());\n\n }", "@Override\r\n public void windowOpened(WindowEvent e) {\n }", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\n\t}", "public void setWindow(final Window window) {\r\n this.window = window;\r\n }", "public void open() {\n\t\tthis.createContents();\n\n\t\tWindowBuilder delegate = this.getDelegate();\n\t\tdelegate.setTitle(this.title);\n\t\tdelegate.setContents(this);\n\t\tdelegate.setIcon(this.iconImage);\n\t\tdelegate.setMinHeight(this.minHeight);\n\t\tdelegate.setMinWidth(this.minWidth);\n\t\tdelegate.open();\n\t}", "public void switchLastWindow() {\n\n Set<String> allwindow = driver.getWindowHandles();\n\n for (String next : allwindow) {\n driver.switchTo().window(next);\n\n }\n }", "public void setupWindowButtons(){\n focusPropertyButton(btnExitProgramPlannerPlanPane);\n focusPropertyButton(btnExitProgramPlannerShoppingListPane);\n focusPropertyButton(btnExitProgramPlannerCupboardPane);\n focusPropertyButton(btnMinimiseProgramPlannerPlanPlane);\n focusPropertyButton(btnMinimiseProgramPlannerShoppingListPane);\n focusPropertyButton(btnMinimiseProgramPlannerCupboardPane);\n focusPropertyButton(btnExitProgramMealsBrowsePane);\n focusPropertyButton(btnMinimiseProgramMealsBrowsePane);\n focusPropertyButton(btnExitProgramMealsAddPane);\n focusPropertyButton(btnMinimiseProgramMealsAddPane);\n focusPropertyButton(btnExitProgramIngredBrowse);\n focusPropertyButton(btnMinimiseProgramIngredBrowse);\n focusPropertyButton(btnExitProgramIngredAdd);\n focusPropertyButton(btnMinimiseProgramIngredAdd);\n\n }", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t}", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) \r\n\t\t\t{\n\t\t\t\tif(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cibernauta\"))\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_cibernauta(canalL.getValue()));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Vista_Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_vista_usuario(canalL.getValue(), contratacion, idModalidad));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contratacion || idModalidad.isEmpty())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\t\tsubWindow.setContent(new Contratar_cliente(canalL.getValue()));\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t}else\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdoNavigate(Crear_incidencia.VIEW_NAME + \"/\" + \"contratacion\" +\";\" +canalL.getValue());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void windowOpened(WindowEvent e) {\n\t\t\n\t}", "public void selectWindow(int index) {\n\t\tList<String> listOfWindows = new ArrayList<>(SharedSD.getDriver().getWindowHandles());\n\t\tSharedSD.getDriver().switchTo().window(listOfWindows.get(index));\n\t}", "@Override\n\tpublic void windowOpened( WindowEvent e ) {\n\t\t\n\t}", "@FXML\n private void openForwardWindow() {\n try {\n ComposeEmailWindow cew = new ComposeEmailWindow(\"FWD: \", \"\",\n this.subjectContent.getText(), this.msgContent.getText());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public NewJFrame1(NewJFrame n) {\n main = n;\n initComponents();\n winOpen();\n setLocationFrame();\n this.setVisible(true);\n }", "@Override\n\t\t\tpublic void windowActivated(WindowEvent e) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.67828196", "0.66521275", "0.65689003", "0.64764214", "0.6457996", "0.6457996", "0.6457996", "0.6457996", "0.6440214", "0.64288634", "0.6415592", "0.64128536", "0.63886285", "0.6360465", "0.63538903", "0.635198", "0.63391286", "0.63391286", "0.63273734", "0.63215", "0.631154", "0.63032347", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62882435", "0.62875795", "0.6261962", "0.62559384", "0.6232024", "0.62304145", "0.6224176", "0.62195766", "0.6218976", "0.62103206", "0.62103206", "0.62103206", "0.62103206", "0.62103206", "0.6206825", "0.6206825", "0.6195123", "0.6195123", "0.6195123", "0.6195123", "0.61909324", "0.61908215", "0.6184177", "0.618002", "0.618002", "0.61780494", "0.6170018", "0.6158481", "0.6157373", "0.6145545", "0.6139273", "0.61288404", "0.61084783", "0.61052006", "0.60995156", "0.60935545", "0.60916585", "0.60916585", "0.60916585", "0.60916585", "0.60916585", "0.60810167", "0.6080183", "0.60746425", "0.6074382", "0.6070604", "0.60628575", "0.6061794", "0.6061794", "0.6061794", "0.6061794", "0.6061794", "0.6061794", "0.6061794", "0.6041991", "0.6041797", "0.6033611", "0.60323", "0.60264313" ]
0.0
-1
this method will transport to the load set window
@FXML private void handleLoadSetButton(ActionEvent event) { Switchable.switchTo("LoadSetView"); LoadSetViewController controller = (LoadSetViewController)getControllerByName("LoadSetView"); if (controller != null) { controller.allNoteCardSets = allNoteCardSets; controller.realInit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUploading()\n {\n jPanel4.setVisible(false);\n th.start();\n }", "public void openLoadSelection() {\n\t\ttry {\n\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/LoadSelectionView.fxml\"));\n\t\t\tfxmlLoader.setResources(bundle);\n\t\t\tParent root1 = (Parent) fxmlLoader.load();\n\t\t\tStage stage = new Stage();\n\t\t\tLoadSelectionController lsc = fxmlLoader.getController();\n\t\t\tlsc.setMainController(this);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\t\t// stage.initStyle(StageStyle.UNDECORATED);\n\t\t\tstage.setTitle(bundle.getString(\"lSTitle\"));\n\t\t\tstage.setScene(new Scene(root1));\n\t\t\tstage.show();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void showLoadProcessPage() {\r\n\t\tmainFrame.setTitle(null);\r\n\t\tmainFrame.showPage(loadProcessPage.getClass().getCanonicalName());\r\n\t}", "public void clickonFullyAutomaticFrontLoad() {\n\t\t\n\t}", "@Override\n protected void windowInit ()\n {\n }", "private void load() { \n\t\tmannschaft_name.setText(helper.getTeamName(mannschaftId));\n\t\tmannschaft_kuerzel.setText(helper.getTeamKuerzel(mannschaftId));\t\t \n\t}", "@Override\r\n\tpublic void windowstartUpData() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "private void loadScreen() {\r\n\t\ttry {\r\n\t\t\t// Filtros\r\n\t\t\tcmbDataSource = new LTComboBoxField(rsBundle.getString(\"data_source\"), true, true);\r\n\t\t\tcmbDataSource.addValues(rsBundle.getString(\"screen_audio_comparison_filters_database\"), rsBundle.getString(\"screen_audio_comparison_filters_database\"));\r\n\t\t\tcmbDataSource.addValues(rsBundle.getString(\"screen_audio_comparison_filters_library\"), rsBundle.getString(\"screen_audio_comparison_filters_library\"));\r\n\t\t\tcmbDataSource.addValues(rsBundle.getString(\"screen_audio_comparison_filters_audio_file\"), rsBundle.getString(\"screen_audio_comparison_filters_audio_file\"));\r\n\t\t\tcmbDataSource.setValue(rsBundle.getString(\"screen_audio_comparison_filters_database\"));\r\n\t\t\t\r\n\t\t\tcmbFeature = new LTComboBoxField(rsBundle.getString(\"feature\"), true, true);\r\n\t\t\tcmbFeature.addValues(\"Power Spectrum\", rsBundle.getString(\"feature_power_spectrum\"));\r\n\t\t\tcmbFeature.addValues(\"MFCC\", rsBundle.getString(\"feature_mfcc\"));\r\n\t\t\tcmbFeature.addValues(\"LPC\", rsBundle.getString(\"feature_lpc\"));\r\n\t\t\tcmbFeature.addValues(\"LPCC\", rsBundle.getString(\"feature_lpcc\"));\r\n\t\t\tcmbFeature.addValues(\"PLP\", rsBundle.getString(\"feature_plp\"));\r\n\t\t\tcmbFeature.addValues(\"MFCC_LPC\", \"MFCC + LPC\");\r\n\t\t\tcmbFeature.addValues(\"MFCC_LPCC\", \"MFCC + LPCC\");\r\n\t\t\tcmbFeature.addValues(\"MFCC_PLP\", \"MFCC + PLP\");\r\n\t\t\tcmbFeature.addValues(\"MFCC_LPC_LPCC_PLP\", \"MFCC + LPC + LPCC + PLP\");\r\n\t\t\tcmbFeature.setValue(\"Power Spectrum\");\r\n\t\t\t\r\n\t\t\tcmbClassifier = new LTComboBoxField(rsBundle.getString(\"classifier\"), true, true);\r\n\t\t\tcmbClassifier.addValues(\"Pearson Correlation\", rsBundle.getString(\"classifier_pearson_correlation\"));\r\n\t\t\tcmbClassifier.setValue(\"Pearson Correlation\");\r\n\r\n\t\t\t// Botão Filtro\r\n\t\t\tbtnFilters = new JButton();\r\n\t\t\tbtnFilters.setMinimumSize(new Dimension(40, 40));\r\n\t\t\tbtnFilters.setMaximumSize(new Dimension(40, 40));\r\n\t\t\tbtnFilters.setIcon(new ImageIcon(\"res/images/filter.png\"));\r\n\t\t\tbtnFilters.setToolTipText(\"Filtros\");\r\n\t\t\tbtnFilters.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent event) {\r\n\t\t\t\t\tScreenAudioComparisonFilters objAudioComparisonFilters = new ScreenAudioComparisonFilters();\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalPhylum(lstAnimalPhylum);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalClass(lstAnimalClass);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalOrder(lstAnimalOrder);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalFamily(lstAnimalFamily);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalGenus(lstAnimalGenus);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalSpecies(lstAnimalSpecies);\r\n\t\t\t\t\tobjAudioComparisonFilters.setRecordist(lstRecordist);\r\n\t\t\t\t\tobjAudioComparisonFilters.setLocationCountry(lstLocationCountry);\r\n\t\t\t\t\tobjAudioComparisonFilters.setLocationState(lstLocationState);\r\n\t\t\t\t\tobjAudioComparisonFilters.setLocationCity(lstLocationCity);\r\n\t\t\t\t\tobjAudioComparisonFilters.setDateInitial(txtDateInitial.getValue());\r\n\t\t\t\t\tobjAudioComparisonFilters.setDateFinal(txtDateFinal.getValue());\r\n\t\t\t\t\t\r\n\t\t\t\t\tobjAudioComparisonFilters.showScreen();\r\n\t\t\t\t\t\r\n\t\t\t\t\tlstAnimalPhylum = objAudioComparisonFilters.getAnimalPhylum();\r\n\t\t\t\t\tlstAnimalClass = objAudioComparisonFilters.getAnimalClass();\r\n\t\t\t\t\tlstAnimalOrder = objAudioComparisonFilters.getAnimalOrder();\r\n\t\t\t\t\tlstAnimalFamily = objAudioComparisonFilters.getAnimalFamily();\r\n\t\t\t\t\tlstAnimalGenus = objAudioComparisonFilters.getAnimalGenus();\r\n\t\t\t\t\tlstAnimalSpecies = objAudioComparisonFilters.getAnimalSpecies();\r\n\t\t\t\t\tlstRecordist = objAudioComparisonFilters.getRecordist();\r\n\t\t\t\t\tlstLocationCountry = objAudioComparisonFilters.getLocationCountry();\r\n\t\t\t\t\tlstLocationState = objAudioComparisonFilters.getLocationState();\r\n\t\t\t\t\tlstLocationCity = objAudioComparisonFilters.getLocationCity();\r\n\t\t\t\t\ttxtDateInitial = objAudioComparisonFilters.getDateInitialField();\r\n\t\t\t\t\ttxtDateFinal = objAudioComparisonFilters.getDateFinalField();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// *********************************************************************************************\r\n\t\t\t// Segmentos do Áudio (ROIs)\r\n\t\t\tpanelSegments = new WasisPanel(rsBundle.getString(\"screen_audio_comparison_selections\"));\r\n\t\t\tpanelSegments.setLayout(new MigLayout(\"insets 0\", \"[grow]\", \"[grow]\"));\r\n\t\t\t\r\n\t\t\t// Seleções realizadas pelo usuário\r\n\t\t\tobjTableSegments = new LTTable(true);\r\n\t\t\tobjTableSegments.addColumn(\"sound_unit\", rsBundle.getString(\"audio_file_selection_sound_unit\"), LTDataTypes.STRING, 140, false);\r\n\t\t\tobjTableSegments.addColumn(\"time_initial\", rsBundle.getString(\"audio_file_selection_time_initial\"), LTDataTypes.INTEGER, 0, false);\r\n\t\t\tobjTableSegments.addColumn(\"time_final\", rsBundle.getString(\"audio_file_selection_time_final\"), LTDataTypes.INTEGER, 0, false);\r\n\t\t\tobjTableSegments.addColumn(\"frequency_initial\", rsBundle.getString(\"audio_file_selection_frequency_minimum\"), LTDataTypes.INTEGER, 0, false);\r\n\t\t\tobjTableSegments.addColumn(\"frequency_final\", rsBundle.getString(\"audio_file_selection_frequency_maximum\"), LTDataTypes.INTEGER, 0, false);\r\n\t\t\tobjTableSegments.addColumn(\"time_initial_show\", rsBundle.getString(\"audio_file_selection_time_initial\"), LTDataTypes.STRING, 145, false);\r\n\t\t\tobjTableSegments.addColumn(\"time_final_show\", rsBundle.getString(\"audio_file_selection_time_final\"), LTDataTypes.STRING, 145, false);\r\n\t\t\tobjTableSegments.addColumn(\"frequency_initial_show\", rsBundle.getString(\"audio_file_selection_frequency_minimum\"), LTDataTypes.STRING, 145, false);\r\n\t\t\tobjTableSegments.addColumn(\"frequency_final_show\", rsBundle.getString(\"audio_file_selection_frequency_maximum\"), LTDataTypes.STRING, 145, false);\r\n\t\t\tobjTableSegments.addMouseListener(new SegmentMouseAdapter());\r\n\t\t\tobjTableSegments.showTable();\r\n\r\n\t\t\tloadAudioSegments();\r\n\t\t\t\r\n\t\t\t// Botão Comparar Áudio\r\n\t\t\tbtnRunComparison = new JButton(rsBundle.getString(\"screen_audio_comparison_run_comparison\"));\r\n\t\t\tbtnRunComparison.setMinimumSize(new Dimension(100, 30));\r\n\t\t\tbtnRunComparison.setMaximumSize(new Dimension(300, 30));\r\n\t\t\tbtnRunComparison.setIconTextGap(15);\r\n\t\t\tbtnRunComparison.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\t\tbtnRunComparison.setIcon(new ImageIcon(\"res/images/compare_sounds.png\"));\r\n\t\t\tbtnRunComparison.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent event) {\r\n\t\t\t\t\tcompareAudios();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// *********************************************************************************************\r\n\t\t\t// Resultados da comparação\r\n\t\t\tpanelResults = new WasisPanel(rsBundle.getString(\"screen_audio_comparison_results\"));\r\n\t\t\tpanelResults.setLayout(new MigLayout(\"insets 0\", \"[grow]\", \"[grow]\"));\r\n\t\t\t\r\n\t\t\tobjTableResults = new LTTable(true);\r\n\t\t\tobjTableResults.addColumn(\"fk_audio_file_segment\", rsBundle.getString(\"audio_file_selection_id_selection\"), LTDataTypes.LONG, 0, false);\r\n\t\t\tobjTableResults.addColumn(\"correlation_result\", rsBundle.getString(\"screen_audio_comparison_results_correlation\"), LTDataTypes.DOUBLE, 120, false);\r\n\t\t\tobjTableResults.addColumn(\"animal_name_english\", rsBundle.getString(\"animal_name_english\"), LTDataTypes.STRING, 230, false);\r\n\t\t\tobjTableResults.addColumn(\"animal_genus\", rsBundle.getString(\"animal_genus\"), LTDataTypes.STRING, 185, false);\r\n\t\t\tobjTableResults.addColumn(\"animal_species\", rsBundle.getString(\"animal_species\"), LTDataTypes.STRING, 185, false);\r\n\t\t\tobjTableResults.addColumn(\"audio_file_path\", rsBundle.getString(\"audio_file_path\"), LTDataTypes.STRING, 0, false);\r\n\t\t\tobjTableResults.addColumn(\"sound_unit\", rsBundle.getString(\"audio_file_selection_sound_unit\"), LTDataTypes.STRING, 0, false);\r\n\t\t\tobjTableResults.addMouseListener(new ResultMouseAdapter());\r\n\t\t\tobjTableResults.showTable();\r\n\t\t\t\r\n\t\t\tobjTableResults.setColumnDoubleFractionDigits(\"correlation_result\", 4);\r\n\t\t\t\r\n\t\t\t// Botão Mostrar Resultados\r\n\t\t\tbtnShowResults = new JButton(rsBundle.getString(\"screen_audio_comparison_show_results\"));\r\n\t\t\tbtnShowResults.setMinimumSize(new Dimension(100, 30));\r\n\t\t\tbtnShowResults.setMaximumSize(new Dimension(300, 30));\r\n\t\t\tbtnShowResults.setIconTextGap(15);\r\n\t\t\tbtnShowResults.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\t\tbtnShowResults.setIcon(new ImageIcon(\"res/images/results.png\"));\r\n\t\t\tbtnShowResults.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent event) {\r\n\t\t\t\t\tshowDetailedResults();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// ***********************************************************************************************************************\r\n\t\t\t// Cria a tela\r\n\t\t\tobjWasisDialog = new WasisDialog(rsBundle.getString(\"screen_audio_comparison_screen_description\"), true);\r\n\t\t\tobjWasisDialog.setBounds(350, 350, 800, 500);\r\n\t\t\tobjWasisDialog.setMinimumSize(new Dimension(800, 500));\r\n\t\t\t\r\n\t\t\tobjWasisDialog.getContentPane().setLayout(new MigLayout(\"insets 5 5 5 5\", \"[grow]\", \"[60.00][400.00][][][]\"));\r\n\t\t\tobjWasisDialog.getContentPane().add(cmbDataSource, \"cell 0 0, grow, width 400\");\r\n\t\t\tobjWasisDialog.getContentPane().add(cmbFeature, \"cell 0 0, grow, width 500\");\r\n\t\t\tobjWasisDialog.getContentPane().add(cmbClassifier, \"cell 0 0, grow, width 500\");\r\n\t\t\tobjWasisDialog.getContentPane().add(btnFilters, \"cell 0 0, grow, gap 5 1 2 0\");\r\n\t\t\tobjWasisDialog.getContentPane().add(panelSegments, \"cell 0 1, grow\");\r\n\t\t\tobjWasisDialog.getContentPane().add(btnRunComparison, \"cell 0 2, grow\");\r\n\t\t\tobjWasisDialog.getContentPane().add(panelResults, \"cell 0 3, grow\");\r\n\t\t\t//objWasisDialog.getContentPane().add(btnShowResults, \"cell 0 4, grow\");\r\n\t\t\t\r\n\t\t\tpanelSegments.add(objTableSegments, \"cell 0 0, grow\");\r\n\t\t\t\r\n\t\t\tpanelResults.add(objTableResults, \"cell 0 0, grow\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void loadwindow(String loc, String title){\n\t \ttry{\n\t \t\tParent parent = FXMLLoader.load(getClass().getClassLoader().getResource(loc));\n\t \t\tStage stage = new Stage(StageStyle.DECORATED);\n\t \t\tstage.setTitle(title);\n\t \t\tstage.setScene(new Scene(parent));\n\t \t\tstage.show();\n\t \t\t \t}catch (IOException e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t \t\t \t\tLogger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, e);\n\t\t\t\t\t}\n\t }", "void loadSet() {\n int returnVal = fc.showOpenDialog(this);\n if (returnVal != JFileChooser.APPROVE_OPTION) {\n System.out.println(\"Open command cancelled by user.\");\n return;\n }\n file = fc.getSelectedFile();\n System.out.println(\"Opening: \" + file.getName());\n closeAllTabs();\n try {\n FileInputStream fis = new FileInputStream(file);\n ObjectInputStream ois = new ObjectInputStream(fis);\n //loopButton.setSelected( ois.readObject() ); \n ArrayList l = (ArrayList) ois.readObject();\n System.out.println(\"read \"+l.size()+\" thingies\");\n ois.close();\n for(int i=0; i<l.size(); i++) {\n HashMap m = (HashMap) l.get(i);\n openNewTab();\n getCurrentTab().paste(m);\n }\n } catch(Exception e) {\n System.out.println(\"Open error \"+e);\n }\n }", "public void onLoad() {\n\t}", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "private void loadDisplayScreen() {\r\n wells = xmlreader.getWells();\r\n \r\n for (int i = 0; i < wells.size(); i++) {\r\n opName.add(new Well(i, wells.get(i).getName()));\r\n \r\n }\r\n Iterator<Well> iterate = opName.iterator();\r\n \r\n while (iterate.hasNext()) {\r\n arrName.add(iterate.next().getName());\r\n }\r\n aModel = new DefaultComboBoxModel<>(arrName);\r\n wellCombo.setModel(aModel);\r\n\r\n }", "@Override\n\tprotected void load() {\n\t\tisPageLoaded = true;\n\t}", "public void setLoaded();", "public Composite loadComposite() {\n\t\ttry {\n\t\t\t{\n\t\t\t\tthis.setSize(974, 749);\n\t\t\t\tif (beanutil.isAdminHead()) {\n\n\t\t\t\t\t{\n\t\t\t\t\t\tlblBranch = new Label(this, SWT.NONE);\n\t\t\t\t\t\tlblBranch.setText(\"Select Branch \");\n\t\t\t\t\t\tlblBranch.setBounds(345, 114, 76, 18);\n\t\t\t\t\t}\n\t\t\t\t\t{\n\t\t\t\t\t\tcoBranch = new Combo(this, SWT.BORDER | SWT.READ_ONLY);\n\t\t\t\t\t\tcoBranch.setBounds(440, 112, 187, 21);\n\t\t\t\t\t\tpopulateBranches();\n\t\t\t\t\t\tcoBranch.addSelectionListener(new SetUpAction());\n\t\t\t\t\t}\n\n\t\t\t\t\tif (clientRights == RIGHTS_22 || clientRights == RIGHTS_25 || clientRights == RIGHTS_3) {\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttabReport = new TabFolder(this, SWT.NONE);\n\t\t\t\t\t\t\ttabReport.setBounds(50, 210, 915, 480);\n\t\t\t\t\t\t\ttabReport.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(BeanUtil.getDbName() == null || BeanUtil.getDbName().equals(\"\")){\n\t\t\t\t\t\t\t\ttiStationarySettings = new TabItem(tabReport,\n\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\ttiStationarySettings\n\t\t\t\t\t\t\t\t\t\t.setText(STATIONARY_SETTINGS_TAB);\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcanvas2 = new Canvas(tabReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\ttiStationarySettings.setControl(canvas2);\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel1 = new Label(canvas2, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel1.setText(\"Select\");\n\t\t\t\t\t\t\t\t\t\tlabel1.setBounds(30, 16, 75, 15);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcbSB = new Combo(canvas2, SWT.DROP_DOWN\n\t\t\t\t\t\t\t\t\t\t\t\t| SWT.READ_ONLY);\n\t\t\t\t\t\t\t\t\t\tcbSB.setBounds(110, 13, 150, 10);\n\n\t\t\t\t\t\t\t\t\t\tcbSB\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t\tpopulateSelectedBranches();\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tString value = cbSB.getItem(0);\n\t\t\t\t\t\t\t\t\t\t\tcbSB.setText(value);\n\t\t\t\t\t\t\t\t\t\t\tint index = value.indexOf(\" - \");\n\t\t\t\t\t\t\t\t\t\t\tString branchCode = value\n\t\t\t\t\t\t\t\t\t\t\t\t\t.substring(index + 3);\n\t\t\t\t\t\t\t\t\t\t\tStationsDTO rowDTO[] = null;\n\t\t\t\t\t\t\t\t\t\t\trowDTO = handler\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getStations(branchCode);\n\t\t\t\t\t\t\t\t\t\t\tif (rowDTO != null) {\n\t\t\t\t\t\t\t\t\t\t\t\tint rows = rowDTO.length;\n\t\t\t\t\t\t\t\t\t\t\t\tObject[] rowData = rowDTO;\n\t\t\t\t\t\t\t\t\t\t\t\tcreateTable(6, rows,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolumn_head, rowData);\n\t\t\t\t\t\t\t\t\t\t\t\tpopulateStationaryValues(branchCode);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t} catch (Exception exception) {\n\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnUpdate = new Button(canvas2,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.PUSH | SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tbtnUpdate.setText(\"Update\");\n\t\t\t\t\t\t\t\t\t\tbtnUpdate.setBounds(730, 427, 50, 25);\n\t\t\t\t\t\t\t\t\t\tbtnUpdate\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(BeanUtil.getDbName() == null || BeanUtil.getDbName().equals(\"\"))\n\t\t\t\t\t\t\t{tiAssignStationary = new TabItem(tabReport,\n\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\ttiAssignStationary.setText(ASSIGN_STATIONARY_TAB);\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcanvas3 = new Canvas(tabReport, SWT.NONE);\n\t\t\t\t\t\t\t\ttiAssignStationary.setControl(canvas3);\n\n\t\t\t\t\t\t\t\tcptTree1 = new TreeComposite(canvas3, SWT.NONE,\n\t\t\t\t\t\t\t\t\t\t300).loadComposite();\n\t\t\t\t\t\t\t\tcptTree1.setBounds(50, 50, 250, 350);\n\n\t\t\t\t\t\t\t\tbtnAssign = new Button(canvas3, SWT.PUSH);\n\t\t\t\t\t\t\t\tbtnAssign.setBounds(425, 198, 50, 25);\n\t\t\t\t\t\t\t\tbtnAssign.setText(\"Assign\");\n\t\t\t\t\t\t\t\tbtnAssign\n\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchkTopay = new Button(canvas3, SWT.CHECK\n\t\t\t\t\t\t\t\t\t\t\t| SWT.LEFT);\n\t\t\t\t\t\t\t\t\tchkTopay.setText(\"Topay\");\n\t\t\t\t\t\t\t\t\tchkTopay.setBounds(345, 158, 60, 27);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchkPaid = new Button(canvas3, SWT.CHECK\n\t\t\t\t\t\t\t\t\t\t\t| SWT.LEFT);\n\t\t\t\t\t\t\t\t\tchkPaid.setText(\"Paid\");\n\t\t\t\t\t\t\t\t\tchkPaid.setBounds(345, 182, 62, 33);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchkBilling = new Button(canvas3, SWT.CHECK\n\t\t\t\t\t\t\t\t\t\t\t| SWT.LEFT);\n\t\t\t\t\t\t\t\t\tchkBilling.setText(\"Billing\");\n\t\t\t\t\t\t\t\t\tchkBilling.setBounds(345, 210, 62, 30);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchkCR = new Button(canvas3, SWT.CHECK\n\t\t\t\t\t\t\t\t\t\t\t| SWT.LEFT);\n\t\t\t\t\t\t\t\t\tchkCR.setText(\"CR\");\n\t\t\t\t\t\t\t\t\tchkCR.setBounds(345, 236, 60, 33);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(BeanUtil.getDbName() == null || BeanUtil.getDbName().equals(\"\")){\n\t\t\t\t\t\t\t\ttiStationaryReport = new TabItem(tabReport,\n\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\ttiStationaryReport\n\t\t\t\t\t\t\t\t\t\t.setText(STATIONARY_REPORT_TAB);\n\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcanvas5 = new Canvas(tabReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\ttiStationaryReport.setControl(canvas5);\n\t\t\t\t\t\t\t\t\ttblStationaryReport = new Table(canvas5,\n\t\t\t\t\t\t\t\t\t\t\tSWT.MULTI | SWT.BORDER\n\t\t\t\t\t\t\t\t\t\t\t\t\t| SWT.FULL_SELECTION\n\t\t\t\t\t\t\t\t\t\t\t\t\t| SWT.CHECK);\n\t\t\t\t\t\t\t\t\ttblStationaryReport.setLinesVisible(true);\n\t\t\t\t\t\t\t\t\ttblStationaryReport.setHeaderVisible(true);\n\t\t\t\t\t\t\t\t\ttblStationaryReport.setBounds(100, 40, 500,\n\t\t\t\t\t\t\t\t\t\t\t380);\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnAll = new Button(canvas5, SWT.CHECK\n\t\t\t\t\t\t\t\t\t\t\t\t| SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tbtnAll.setText(\"Assign to all\");\n\t\t\t\t\t\t\t\t\t\tbtnAll.setBounds(516, 15, 83, 20);\n\t\t\t\t\t\t\t\t\t\tbtnAll\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnAssignStationary = new Button(\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas5, SWT.PUSH | SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tbtnAssignStationary.setText(\"Assign\");\n\t\t\t\t\t\t\t\t\t\tbtnAssignStationary.setBounds(516, 425,\n\t\t\t\t\t\t\t\t\t\t\t\t67, 26);\n\t\t\t\t\t\t\t\t\t\tbtnAssignStationary\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolSno = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblStationaryReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolSno.setText(\"S.No\");\n\t\t\t\t\t\t\t\t\t\tcolSno.setWidth(40);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolStation = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblStationaryReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolStation.setText(\"Station\");\n\t\t\t\t\t\t\t\t\t\tcolStation.setWidth(100);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolTopay = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblStationaryReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolTopay.setText(\"Topay\");\n\t\t\t\t\t\t\t\t\t\tcolTopay.setWidth(84);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolPaid = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblStationaryReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolPaid.setText(\"Paid\");\n\t\t\t\t\t\t\t\t\t\tcolPaid.setWidth(84);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolBilling = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblStationaryReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolBilling.setText(\"Billing\");\n\t\t\t\t\t\t\t\t\t\tcolBilling.setWidth(84);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolCR = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblStationaryReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolCR.setText(\"CR\");\n\t\t\t\t\t\t\t\t\t\tcolCR.setWidth(84);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttiLRTrack = new TabItem(tabReport, SWT.NONE);\n\t\t\t\t\t\t\t\ttiLRTrack.setText(\"LRTrackCount\");\n\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\tcanLRTrack = new Canvas(tabReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\ttiLRTrack.setControl(canLRTrack);\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblLrtrackDisplay = new Label(\n\t\t\t\t\t\t\t\t\t\t\t\tcanLRTrack, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblLrtrackDisplay\n\t\t\t\t\t\t\t\t\t\t\t\t.setText(\"No of LR Track\");\n\t\t\t\t\t\t\t\t\t\tlblLrtrackDisplay.setBounds(273, 133,\n\t\t\t\t\t\t\t\t\t\t\t\t72, 30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblLrTrackResult = new Label(\n\t\t\t\t\t\t\t\t\t\t\t\tcanLRTrack, SWT.BORDER);\n\t\t\t\t\t\t\t\t\t\tlblLrTrackResult.setBounds(357, 133,\n\t\t\t\t\t\t\t\t\t\t\t\t60, 25);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblLRTRackDate = new Label(canLRTrack,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblLRTRackDate.setText(\"From Date\");\n\t\t\t\t\t\t\t\t\t\tlblLRTRackDate.setBounds(221, 72, 52,\n\t\t\t\t\t\t\t\t\t\t\t\t30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttxtLRTRackDate = new Text(canLRTrack,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.BORDER);\n\t\t\t\t\t\t\t\t\t\ttxtLRTRackDate.setBounds(274, 72, 81,\n\t\t\t\t\t\t\t\t\t\t\t\t22);\n\t\t\t\t\t\t\t\t\t\ttxtLRTRackDate.setEditable(false);\n\t\t\t\t\t\t\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\t\"dd-MM-yyyy\");\n\t\t\t\t\t\t\t\t\t\tjava.util.Date currentDate = new java.util.Date();\n\t\t\t\t\t\t\t\t\t\tString date = dateFormat\n\t\t\t\t\t\t\t\t\t\t\t\t.format(currentDate);\n\n\t\t\t\t\t\t\t\t\t\tif (SERVER_DATE != null) {\n\t\t\t\t\t\t\t\t\t\t\ttxtLRTRackDate.setText(SERVER_DATE);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ttxtLRTRackDate.setText(date);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnLRTrack = new Button(canLRTrack,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.PUSH | SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tbtnLRTrack.setText(\"Go\");\n\t\t\t\t\t\t\t\t\t\tbtnLRTrack.setBounds(362, 71, 33, 30);\n\t\t\t\t\t\t\t\t\t\tbtnLRTrack\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblLRTrackToDate = new Label(\n\t\t\t\t\t\t\t\t\t\t\t\tcanLRTrack, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblLRTrackToDate.setText(\"To Date\");\n\t\t\t\t\t\t\t\t\t\tlblLRTrackToDate.setBounds(422, 73, 43,\n\t\t\t\t\t\t\t\t\t\t\t\t27);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttxtLRTrackToDate = new Text(canLRTrack,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.BORDER);\n\t\t\t\t\t\t\t\t\t\ttxtLRTrackToDate.setBounds(472, 74, 80,\n\t\t\t\t\t\t\t\t\t\t\t\t24);\n\t\t\t\t\t\t\t\t\t\ttxtLRTrackToDate.setEditable(false);\n\t\t\t\t\t\t\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\t\"dd-MM-yyyy\");\n\t\t\t\t\t\t\t\t\t\tjava.util.Date currentDate = new java.util.Date();\n\t\t\t\t\t\t\t\t\t\tString date = dateFormat\n\t\t\t\t\t\t\t\t\t\t\t\t.format(currentDate);\n\n\t\t\t\t\t\t\t\t\t\tif (SERVER_DATE != null) {\n\t\t\t\t\t\t\t\t\t\t\ttxtLRTrackToDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t.setText(SERVER_DATE);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ttxtLRTrackToDate.setText(date);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnLRTRackToDate = new Button(\n\t\t\t\t\t\t\t\t\t\t\t\tcanLRTrack, SWT.PUSH\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t| SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tbtnLRTRackToDate.setText(\"Go\");\n\t\t\t\t\t\t\t\t\t\tbtnLRTRackToDate.setBounds(564, 70, 33,\n\t\t\t\t\t\t\t\t\t\t\t\t30);\n\t\t\t\t\t\t\t\t\t\tbtnLRTRackToDate\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnLRTrackView = new Button(canLRTrack,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.PUSH | SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tbtnLRTrackView.setText(\"View\");\n\t\t\t\t\t\t\t\t\t\tbtnLRTrackView.setBounds(603, 70, 37,\n\t\t\t\t\t\t\t\t\t\t\t\t30);\n\t\t\t\t\t\t\t\t\t\tbtnLRTrackView\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tgpLrTrack = new Group(canLRTrack,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tGridLayout gpLrTrackLayout = new GridLayout();\n\t\t\t\t\t\t\t\t\t\tgpLrTrackLayout.makeColumnsEqualWidth = true;\n\t\t\t\t\t\t\t\t\t\tgpLrTrack.setLayout(gpLrTrackLayout);\n\t\t\t\t\t\t\t\t\t\tgpLrTrack.setText(\"Lr Track Details\");\n\t\t\t\t\t\t\t\t\t\tgpLrTrack.setBounds(195, 35, 478, 142);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\tif(BeanUtil.getDbName() == null || BeanUtil.getDbName().equals(\"\")){\n\t\t\t\t\t\t\t\ttiCFT = new TabItem(tabReport, SWT.NONE);\n\t\t\t\t\t\t\t\ttiCFT.setText(\"CFT\");\n\t\t\t\t\t\t\t\tcanCFT = new Canvas(tabReport, SWT.NONE);\n\t\t\t\t\t\t\t\ttiCFT.setControl(canCFT);\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlblCFTInch = new Label(canCFT, SWT.NONE);\n\t\t\t\t\t\t\t\t\tlblCFTInch.setText(\"Inch\");\n\t\t\t\t\t\t\t\t\tlblCFTInch.setBounds(285, 150, 39, 23);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlblCFTFt = new Label(canCFT, SWT.NONE);\n\t\t\t\t\t\t\t\t\tlblCFTFt.setText(\"Ft\");\n\t\t\t\t\t\t\t\t\tlblCFTFt.setBounds(285, 189, 39, 21);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlblCFTCm = new Label(canCFT, SWT.NONE);\n\t\t\t\t\t\t\t\t\tlblCFTCm.setText(\"Cm\");\n\t\t\t\t\t\t\t\t\tlblCFTCm.setBounds(285, 232, 39, 19);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttxtCFTInch = new Text(canCFT, SWT.BORDER);\n\t\t\t\t\t\t\t\t\ttxtCFTInch.setBounds(353, 145, 60, 24);\n\t\t\t\t\t\t\t\t\ttxtCFTInch\n\t\t\t\t\t\t\t\t\t\t\t.addVerifyListener(new FloatValidation());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttxtCFTFt = new Text(canCFT, SWT.BORDER);\n\t\t\t\t\t\t\t\t\ttxtCFTFt.setBounds(353, 185, 60, 24);\n\t\t\t\t\t\t\t\t\ttxtCFTFt\n\t\t\t\t\t\t\t\t\t\t\t.addVerifyListener(new FloatValidation());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttxtCm = new Text(canCFT, SWT.BORDER);\n\t\t\t\t\t\t\t\t\ttxtCm.setBounds(353, 226, 60, 24);\n\t\t\t\t\t\t\t\t\ttxtCm\n\t\t\t\t\t\t\t\t\t\t\t.addVerifyListener(new FloatValidation());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tbtnCFTSet = new Button(canCFT, SWT.PUSH\n\t\t\t\t\t\t\t\t\t\t\t| SWT.CENTER);\n\t\t\t\t\t\t\t\t\tbtnCFTSet.setText(\"Set\");\n\t\t\t\t\t\t\t\t\tbtnCFTSet.setBounds(369, 259, 45, 30);\n\t\t\t\t\t\t\t\t\tbtnCFTSet\n\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tgpCFTSet = new Group(canCFT, SWT.NONE);\n\t\t\t\t\t\t\t\t\tGridLayout gpCFTSetLayout = new GridLayout();\n\t\t\t\t\t\t\t\t\tgpCFTSetLayout.makeColumnsEqualWidth = true;\n\t\t\t\t\t\t\t\t\tgpCFTSet.setLayout(gpCFTSetLayout);\n\t\t\t\t\t\t\t\t\tgpCFTSet.setText(\"CFT Settings\");\n\t\t\t\t\t\t\t\t\tgpCFTSet.setBounds(253, 112, 234, 208);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*{\n\t\t\t\t\t\t\t\ttiContactReport = new TabItem(tabReport,\n\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\ttiContactReport.setText(CONTACT_REPORT_TAB);\n\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcanContact = new Canvas(tabReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\ttiContactReport.setControl(canContact);\n\t\t\t\t\t\t\t\t\ttblContactReport = new Table(canContact,\n\t\t\t\t\t\t\t\t\t\t\tSWT.MULTI | SWT.BORDER\n\t\t\t\t\t\t\t\t\t\t\t\t\t| SWT.FULL_SELECTION);\n\t\t\t\t\t\t\t\t\ttblContactReport.setLinesVisible(true);\n\t\t\t\t\t\t\t\t\ttblContactReport.setHeaderVisible(true);\n\t\t\t\t\t\t\t\t\ttblContactReport.setBounds(16, 119, 780,\n\t\t\t\t\t\t\t\t\t\t\t315);\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblContactBranch = new Label(\n\t\t\t\t\t\t\t\t\t\t\t\tcanContact, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblContactBranch\n\t\t\t\t\t\t\t\t\t\t\t\t.setText(\"Select Branch\");\n\t\t\t\t\t\t\t\t\t\tlblContactBranch.setBounds(12, 21, 67,\n\t\t\t\t\t\t\t\t\t\t\t\t20);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcbContactBranch = new Combo(canContact,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcbContactBranch.setBounds(85, 19, 95,\n\t\t\t\t\t\t\t\t\t\t\t\t21);\n\t\t\t\t\t\t\t\t\t\tcbContactBranch\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblDVSelectstation = new Label(\n\t\t\t\t\t\t\t\t\t\t\t\tcanContact, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblDVSelectstation\n\t\t\t\t\t\t\t\t\t\t\t\t.setText(\"Select Station\");\n\t\t\t\t\t\t\t\t\t\tlblDVSelectstation.setBounds(206, 19,\n\t\t\t\t\t\t\t\t\t\t\t\t78, 21);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcbDVSelectstation = new Combo(\n\t\t\t\t\t\t\t\t\t\t\t\tcanContact, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcbDVSelectstation.setBounds(291, 19,\n\t\t\t\t\t\t\t\t\t\t\t\t118, 21);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblDVLrType = new Label(canContact,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblDVLrType.setText(\"LrType\");\n\t\t\t\t\t\t\t\t\t\tlblDVLrType.setBounds(430, 19, 41, 21);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcbDVLrType = new Combo(canContact,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcbDVLrType.setBounds(477, 19, 103, 21);\n\t\t\t\t\t\t\t\t\t\tcbDVLrType.add(\"All\");\n\t\t\t\t\t\t\t\t\t\tcbDVLrType.add(\"Topay\");\n\t\t\t\t\t\t\t\t\t\tcbDVLrType.add(\"Paid\");\n\t\t\t\t\t\t\t\t\t\tcbDVLrType.add(\"Billing\");\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblDVDeliveryType = new Label(\n\t\t\t\t\t\t\t\t\t\t\t\tcanContact, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblDVDeliveryType.setText(\"Delivery\");\n\t\t\t\t\t\t\t\t\t\tlblDVDeliveryType.setBounds(599, 19,\n\t\t\t\t\t\t\t\t\t\t\t\t42, 21);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcbDVDeliveryType = new Combo(\n\t\t\t\t\t\t\t\t\t\t\t\tcanContact, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcbDVDeliveryType.setBounds(647, 18, 81,\n\t\t\t\t\t\t\t\t\t\t\t\t21);\n\t\t\t\t\t\t\t\t\t\tcbDVDeliveryType.add(\"All\");\n\t\t\t\t\t\t\t\t\t\tcbDVDeliveryType.add(\"Door\");\n\t\t\t\t\t\t\t\t\t\tcbDVDeliveryType.add(\"Office\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblDVInwardDays = new Label(canContact,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblDVInwardDays.setText(\"InwardDays\");\n\t\t\t\t\t\t\t\t\t\tlblDVInwardDays.setBounds(12, 77, 67,\n\t\t\t\t\t\t\t\t\t\t\t\t22);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttxtDVInwardDays = new Text(canContact,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.BORDER);\n\t\t\t\t\t\t\t\t\t\ttxtDVInwardDays.setBounds(85, 73, 75,\n\t\t\t\t\t\t\t\t\t\t\t\t22);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblDVAmount = new Label(canContact,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblDVAmount.setText(\"Amount\");\n\t\t\t\t\t\t\t\t\t\tlblDVAmount.setBounds(197, 75, 47, 22);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttxtDVAmount = new Text(canContact,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.BORDER);\n\t\t\t\t\t\t\t\t\t\ttxtDVAmount.setBounds(258, 75, 60, 22);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnDVSubmit = new Button(canContact,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.PUSH | SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tbtnDVSubmit.setText(\"View\");\n\t\t\t\t\t\t\t\t\t\tbtnDVSubmit.setBounds(344, 72, 60, 30);\n\t\t\t\t\t\t\t\t\t\tbtnDVSubmit\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactSno = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactSno.setText(\"S.No\");\n\t\t\t\t\t\t\t\t\t\tcolContactSno.setWidth(50);\n\t\t\t\t\t\t\t\t\t\tcolContactSno.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactLrno = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactLrno.setText(\"Lrno\");\n\t\t\t\t\t\t\t\t\t\tcolContactLrno.setWidth(100);\n\t\t\t\t\t\t\t\t\t\tcolContactLrno.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactLrdate = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactLrdate.setText(\"Lrdate\");\n\t\t\t\t\t\t\t\t\t\tcolContactLrdate.setWidth(84);\n\t\t\t\t\t\t\t\t\t\tcolContactLrdate.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactCnorName = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactCnorName.setText(\"Cnor Name\");\n\t\t\t\t\t\t\t\t\t\tcolContactCnorName.setWidth(84);\n\t\t\t\t\t\t\t\t\t\tcolContactCnorName.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactCneeName = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactCneeName.setText(\"Cnee Name\");\n\t\t\t\t\t\t\t\t\t\tcolContactCneeName.setWidth(84);\n\t\t\t\t\t\t\t\t\t\tcolContactCneeName.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactCneeAddress = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactCneeAddress\n\t\t\t\t\t\t\t\t\t\t\t\t.setText(\"CneeAddress\");\n\t\t\t\t\t\t\t\t\t\tcolContactCneeAddress.setWidth(84);\n\t\t\t\t\t\t\t\t\t\tcolContactCneeAddress.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactNoa = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactNoa.setText(\"Noa\");\n\t\t\t\t\t\t\t\t\t\tcolContactNoa.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactNoa.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactActWt = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactActWt.setText(\"ActWt\");\n\t\t\t\t\t\t\t\t\t\tcolContactActWt.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactActWt.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactArtID = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactArtID.setText(\"ArtID\");\n\t\t\t\t\t\t\t\t\t\tcolContactArtID.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactArtID.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactLrTotal = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactLrTotal.setText(\"LrTotal\");\n\t\t\t\t\t\t\t\t\t\tcolContactLrTotal.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactLrTotal.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactDDCrg = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactDDCrg.setText(\"DDCrg\");\n\t\t\t\t\t\t\t\t\t\tcolContactDDCrg.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactDDCrg.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactLrType = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactLrType.setText(\"LrType\");\n\t\t\t\t\t\t\t\t\t\tcolContactLrType.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactLrType.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactInwarddays = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactInwarddays\n\t\t\t\t\t\t\t\t\t\t\t\t.setText(\"InwarDays\");\n\t\t\t\t\t\t\t\t\t\tcolContactInwarddays.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactInwarddays.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactFrom = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactFrom.setText(\"From\");\n\t\t\t\t\t\t\t\t\t\tcolContactFrom.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactFrom.addListener(\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolContactTo = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblContactReport, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolContactTo.setText(\"To\");\n\t\t\t\t\t\t\t\t\t\tcolContactTo.setWidth(60);\n\t\t\t\t\t\t\t\t\t\tcolContactTo.addListener(SWT.Selection,\n\t\t\t\t\t\t\t\t\t\t\t\tnew sortListener());\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpopulateBranchForDV();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Daily Delivery status\n\n\t\t\t\t\t\t\t\ttiDailyDelvStatus = new TabItem(tabReport,\n\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\ttiDailyDelvStatus\n\t\t\t\t\t\t\t\t\t\t.setText(DAILY_DELIVERY_STATUS);\n\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcvsDailyDelvStatus = new Canvas(tabReport,\n\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\ttiDailyDelvStatus\n\t\t\t\t\t\t\t\t\t\t\t.setControl(cvsDailyDelvStatus);\n\t\t\t\t\t\t\t\t\ttblDailyDelvStatus = new Table(\n\t\t\t\t\t\t\t\t\t\t\tcvsDailyDelvStatus, SWT.MULTI\n\t\t\t\t\t\t\t\t\t\t\t\t\t| SWT.BORDER\n\t\t\t\t\t\t\t\t\t\t\t\t\t| SWT.FULL_SELECTION);\n\t\t\t\t\t\t\t\t\ttblDailyDelvStatus.setLinesVisible(true);\n\t\t\t\t\t\t\t\t\ttblDailyDelvStatus.setHeaderVisible(true);\n\t\t\t\t\t\t\t\t\ttblDailyDelvStatus.setBounds(13, 65, 884,\n\t\t\t\t\t\t\t\t\t\t\t374);\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblDDSBranch = new Label(\n\t\t\t\t\t\t\t\t\t\t\t\tcvsDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblDDSBranch.setText(\"Select Branch\");\n\t\t\t\t\t\t\t\t\t\tlblDDSBranch.setBounds(12, 16, 67, 20);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcbDDSBranch = new Combo(\n\t\t\t\t\t\t\t\t\t\t\t\tcvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.READ_ONLY);\n\t\t\t\t\t\t\t\t\t\tcbDDSBranch.setBounds(85, 14, 145, 21);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttxtDDSDate = new Text(\n\t\t\t\t\t\t\t\t\t\t\t\tcvsDailyDelvStatus, SWT.BORDER\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t| SWT.READ_ONLY);\n\t\t\t\t\t\t\t\t\t\ttxtDDSDate.setBounds(233, 13, 70, 22);\n\t\t\t\t\t\t\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\t\"dd-MM-yyyy\");\n\t\t\t\t\t\t\t\t\t\tCalendar c1 = Calendar.getInstance();\n\t\t\t\t\t\t\t\t\t\tc1.add(Calendar.DATE, -1);\n\t\t\t\t\t\t\t\t\t\ttxtDDSDate.setText(dateFormat.format(c1\n\t\t\t\t\t\t\t\t\t\t\t\t.getTime()));\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnDDSdt = new Button(\n\t\t\t\t\t\t\t\t\t\t\t\tcvsDailyDelvStatus, SWT.PUSH\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t| SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tbtnDDSdt\n\t\t\t\t\t\t\t\t\t\t\t\t.setImage(SWTResourceManager\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getImage(\"hm/akr/resources/Calendar.jpg\"));\n\t\t\t\t\t\t\t\t\t\tbtnDDSdt.setBounds(305, 12, 26, 23);\n\t\t\t\t\t\t\t\t\t\t// btnGo.setFont(BUTTON_FONT);\n\t\t\t\t\t\t\t\t\t\tbtnDDSdt\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void widgetSelected(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSelectionEvent e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tKalendarDialog cd = new KalendarDialog(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Shell());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tObject obj = cd.open();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (obj != null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString date = obj\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSimpleDateFormat parse = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"dd-MM-yyyy\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate curDate = parse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parse(SERVER_DATE);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate selectedDate = parse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parse(date);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (selectedDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.before(curDate)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttxtDDSDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setText(date);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplayError(\"Date should be less than current date\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttxtDDSDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (Exception exception) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texception\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbtnDDSgo = new Button(\n\t\t\t\t\t\t\t\t\t\t\t\tcvsDailyDelvStatus, SWT.None);\n\t\t\t\t\t\t\t\t\t\tbtnDDSgo.setBounds(334, 13, 36, 24);\n\t\t\t\t\t\t\t\t\t\tbtnDDSgo.setText(\"Go\");\n\t\t\t\t\t\t\t\t\t\tbtnDDSgo\n\t\t\t\t\t\t\t\t\t\t\t\t.addSelectionListener(new SetUpAction());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlblInward = new Label(\n\t\t\t\t\t\t\t\t\t\t\t\tcvsDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlblInward.setText(\"Inward\");\n\t\t\t\t\t\t\t\t\t\tlblInward.setBounds(96, 49, 57, 16);\n\t\t\t\t\t\t\t\t\t\tlblInward.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlblInward.setBackground(Display\n\t\t\t\t\t\t\t\t\t\t\t\t.getDefault().getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_GRAY));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel3 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel3.setText(\"Before 8:30\");\n\t\t\t\t\t\t\t\t\t\tlabel3.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel3.setBounds(197, 49, 57, 16);\n\t\t\t\t\t\t\t\t\t\tlabel3.setBackground(Display\n\t\t\t\t\t\t\t\t\t\t\t\t.getDefault().getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_GRAY));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel4 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel4.setText(\"8:30-9:30\");\n\t\t\t\t\t\t\t\t\t\tlabel4.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel4.setBounds(254, 49, 63, 16);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel5 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel5.setText(\"9:30-10:30\");\n\t\t\t\t\t\t\t\t\t\tlabel5.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel5.setBounds(315, 49, 58, 16);\n\t\t\t\t\t\t\t\t\t\tlabel5.setBackground(Display\n\t\t\t\t\t\t\t\t\t\t\t\t.getDefault().getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_GRAY));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel6 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel6.setText(\"10:30-11:30\");\n\t\t\t\t\t\t\t\t\t\tlabel6.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel6.setBounds(375, 49, 63, 16);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel7 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel7.setText(\"11:30-12:30\");\n\t\t\t\t\t\t\t\t\t\tlabel7.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel7.setBounds(439, 49, 63, 16);\n\t\t\t\t\t\t\t\t\t\tlabel7.setBackground(Display\n\t\t\t\t\t\t\t\t\t\t\t\t.getDefault().getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_GRAY));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel9 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel9.setText(\"12:30-13:30\");\n\t\t\t\t\t\t\t\t\t\tlabel9.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel9.setBounds(503, 49, 63, 16);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel8 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel8.setText(\"13:30-14:30\");\n\t\t\t\t\t\t\t\t\t\tlabel8.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel8.setBounds(567, 49, 63, 16);\n\t\t\t\t\t\t\t\t\t\tlabel8.setBackground(Display\n\t\t\t\t\t\t\t\t\t\t\t\t.getDefault().getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_GRAY));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel10 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel10.setText(\"14:30-15:30\");\n\t\t\t\t\t\t\t\t\t\tlabel10.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel10.setBounds(631, 49, 63, 16);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel11 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel11.setText(\"After 15:30\");\n\t\t\t\t\t\t\t\t\t\tlabel11.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel11.setBounds(696, 49, 58, 16);\n\t\t\t\t\t\t\t\t\t\tlabel11.setBackground(Display\n\t\t\t\t\t\t\t\t\t\t\t\t.getDefault().getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_GRAY));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel12 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel12.setText(\"Pending\");\n\t\t\t\t\t\t\t\t\t\tlabel12.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel12.setBounds(756, 49, 58, 16);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel13 = new Label(cvsDailyDelvStatus,\n\t\t\t\t\t\t\t\t\t\t\t\tSWT.NONE);\n\t\t\t\t\t\t\t\t\t\tlabel13.setText(\"Stock\");\n\t\t\t\t\t\t\t\t\t\tlabel13.setAlignment(SWT.CENTER);\n\t\t\t\t\t\t\t\t\t\tlabel13.setBounds(815, 49, 58, 16);\n\t\t\t\t\t\t\t\t\t\tlabel13.setBackground(Display\n\t\t\t\t\t\t\t\t\t\t\t\t.getDefault().getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_GRAY));\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\t * { colDDSSno = new TableColumn(\n\t\t\t\t\t\t\t\t\t * tblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t * colDDSSno.setText(\"S.No\");\n\t\t\t\t\t\t\t\t\t * colDDSSno.setWidth(50); }\n\t\t\t\t\t\t\t\t\t *\\/\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSBranch = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSBranch.setText(\"Branch Office\");\n\t\t\t\t\t\t\t\t\t\tcolDDSBranch.setWidth(80);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayOD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayOD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayOD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayDD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayDD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayDD.setWidth(30);\n\t\t\t\t\t\t\t\t\t\t// colDDSTodayDD.setImage(SWTResourceManager.getImage(\"hm/akr/resources/Calendar.jpg\"));\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayDD.setAlignment(SWT.LEFT);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayTotal = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayTotal.setText(\"Total\");\n\t\t\t\t\t\t\t\t\t\tcolDDSTodayTotal.setWidth(40);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS_before830_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS_before830_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS_before830_OD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS_before830_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS_before830_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS_before830_DD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS830_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS830_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS830_OD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS830_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS830_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS830_DD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS930_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS930_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS930_OD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS930_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS930_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS930_DD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1030_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1030_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1030_OD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1030_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1030_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1030_DD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1130_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1130_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1130_OD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1130_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1130_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1130_DD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1230_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1230_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1230_OD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1230_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1230_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1230_DD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1330_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1330_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1330_OD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1330_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1330_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1330_DD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1430_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1430_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1430_OD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDS1530_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDS1530_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDS1530_DD.setWidth(32);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSAfter1530_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSAfter1530_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDSAfter1530_OD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSAfter1530_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSAfter1530_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDSAfter1530_DD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSpending_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSpending_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDSpending_OD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSpending_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSpending_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDSpending_DD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSstock_OD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSstock_OD.setText(\"OD\");\n\t\t\t\t\t\t\t\t\t\tcolDDSstock_OD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolDDSstock_DD = new TableColumn(\n\t\t\t\t\t\t\t\t\t\t\t\ttblDailyDelvStatus, SWT.NONE);\n\t\t\t\t\t\t\t\t\t\tcolDDSstock_DD.setText(\"DD\");\n\t\t\t\t\t\t\t\t\t\tcolDDSstock_DD.setWidth(30);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpopulateBranchForDDS();\n\t\t\t\t\t\t\t}*/\n\n\t\t\t\t\t\t\ttabReport.setSelection(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tbeanutil = BeanUtil.getInstance();\n\n\t\t\t\t{\n\t\t\t\t\tlblStation = new Label(this, SWT.NONE);\n\t\t\t\t\tlblStation.setText(\"Select Station \");\n\t\t\t\t\tlblStation.setBounds(345, 166, 76, 18);\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\tcoStation = new Combo(this, SWT.BORDER | SWT.READ_ONLY);\n\t\t\t\t\tcoStation.setBounds(440, 163, 187, 21);\n\t\t\t\t\tpopulateDestStationCodes();\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\tbtnSetup = new Button(this, SWT.PUSH | SWT.CENTER);\n\t\t\t\t\tbtnSetup.setText(\"Set\");\n\t\t\t\t\tbtnSetup.setBounds(636, 163, 67, 23);\n\t\t\t\t\tbtnSetup.addSelectionListener(new SetUpAction());\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t\tgroup1 = new Group(this, SWT.NONE);\n\t\t\t\t\tGridLayout group1Layout = new GridLayout();\n\t\t\t\t\tgroup1Layout.makeColumnsEqualWidth = true;\n\t\t\t\t\tgroup1.setLayout(group1Layout);\n\t\t\t\t\tgroup1.setText(\"Change Station\");\n\t\t\t\t\tgroup1.setBounds(336, 95, 378, 106);\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn this;\n\n\t}", "public void loadInfo(){\n list=control.getPrgList();\n refreshpsTextField(list.size());\n populatepsListView();\n }", "private void resultsConfigButton(){\n if(!resultsOpened){\n resultsUI = new ResultsUI(this, false);\n resultsOpened = true;\n } \n }", "private void startLoad() {\n\t\tif (getIntent().getFlags()==8)\n\t\t{\n\t\t\ttitleTv.setText(R.string.WXYT);\n\t\tmWebView.loadUrl(UrlLib.CLI);\n\t\t}\n\t\telse if (getIntent().getFlags()==5)\n\t\t{\n\t\t\ttitleTv.setText(R.string.reservior); \n\t\t\tmWebView.loadUrl(UrlLib.CLI5);\t\n\t\t}\t\n\t\t\n\t\tmWebView.setWebViewClient(new WebViewClient() {\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * \n\t\t\t * @see\n\t\t\t * android.webkit.WebViewClient#shouldOverrideUrlLoading(android\n\t\t\t * .webkit.WebView, java.lang.String)\n\t\t\t */\n\n\t\t\t@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tview.loadUrl(url);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * \n\t\t\t * @see\n\t\t\t * android.webkit.WebViewClient#onPageFinished(android.webkit.WebView\n\t\t\t * , java.lang.String)\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onPageFinished(view, url);\n\t\t\t}\n\t\t});\n\n\t\tmWebView.setWebChromeClient(new WebChromeClient() {\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(WebView view, int newProgress) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onProgressChanged(view, newProgress);\n\t\t\t\tprogressBar.setProgress(newProgress);\n\t\t\t\tprogressBar.postInvalidate();\n\t\t\t\tif(newProgress==100)\n\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\n\t\t\t}\n\t\t});\n\n\t}", "public void load(iFunctionCallback cb) {\n this.callback = cb;\n Platform.getWindowViewer().spawn(this);\n }", "void handleLoadClicked(ActionEvent event);", "void btnLoadPlanning();", "public WebEditar() {\n initComponents();\n this.setLocationRelativeTo(null);\n cargarcomboboxMarcas();\n cargarcomboboxRubros();\n cargarcomboboxMedidas();\n leer_archivo();\n cargardata();\n }", "public void start() {\r\n\t\tif (FormsContext.isFormsServicesApp()) {\r\n\t\t\tinitialOpenLWWindows = new LWWindowOperator().getWindowTitles();\r\n\t\t} else {\r\n\r\n\t\t}\r\n\t}", "public void loadRoomViewerUI()\r\n\t{\r\n\t\t// start the loader thread so the graphics can be drawn as the loading takes place\r\n\t\tnew RoomViewerLoadingThread(roomViewerUI).start();\r\n\t}", "@FXML\n\t private void loadlistbook(ActionEvent event) {\n\t \tloadwindow(\"views/booklist.fxml\", \"View Book List\");\n\t }", "public void startLoading() {\r\n\t\tgetDisplay().setRowCount(0, true);\r\n\t\tlabel1.setHTML(\"\");\r\n\t\tlabel2.setHTML(\"\");\r\n\t}", "public void load() {\n handleLoad(false, false);\n }", "public void display() {\r\n try {\r\n if( mdiForm.getFrame(CoeusGuiConstants.SPONSORHIERARCHY_BASE_WINDOW) == null ){\r\n mdiForm.putFrame(CoeusGuiConstants.SPONSORHIERARCHY_BASE_WINDOW, maintainSponsorHierarchyBaseWindow);\r\n mdiForm.getDeskTopPane().add(maintainSponsorHierarchyBaseWindow);\r\n maintainSponsorHierarchyBaseWindow.setSelected(true);\r\n maintainSponsorHierarchyBaseWindow.setVisible(true);\r\n }\r\n }catch (java.beans.PropertyVetoException propertyVetoException) {\r\n propertyVetoException.printStackTrace();\r\n }\r\n }", "@Override protected void startup() {\n show(new MIDLetParamsView(this));\n }", "private void initiateInternal() {\n\n //define adaptation listener\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(ComponentEvent e) {\n adapt(e);\n }\n });\n\n //solve problem with unloading of internal components\n setExtendedState(ICONIFIED | MAXIMIZED_BOTH);\n //the set visible must be the last thing called \n pack();\n setExtendedState(MAXIMIZED_BOTH);\n setVisible(true);\n }", "private void LoadContent()\n {\n \n }", "public void loadPage() {\n\t\tLog.i(TAG, \"MyGardenListActivity::LoadPage ! Nothing to do anymore here :)\");\n\t}", "public void run() {\n\t\t\t\tVerticalPanel panelCompteRendu = new VerticalPanel();\r\n\t\t\t\thtmlCompteRendu = new HTML();\r\n\t\t\t\tpanelCompteRendu.add(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"compteRendu\").add(panelCompteRendu);\r\n\t\t\t\t\r\n\t\t\t\tVerticalPanel panelLegende = new VerticalPanel();\r\n\t\t\t\thtmlLegende = new HTML();\r\n\t\t\t\tpanelLegende.add(htmlLegende);\r\n\t\t\t\tRootPanel.get(\"legende\").add(htmlLegende);\r\n\t\t\t\t\r\n\t\t\t\t// temps d'intˇgration restant\r\n\t\t\t\tLabel tempsDIntegrationRestant = new Label();\r\n\t\t\t\tRootPanel.get(\"tempsDIntegrationRestant\").add(tempsDIntegrationRestant);\r\n\t\t\t\t\r\n\t\t\t\t// ajout de la carte\r\n\t\t\t\twMap = new MapFaWidget2(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"carte\").add(wMap);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// ajout du bouton reset\r\n\t\t\t\tButton boutonReset = new Button(\"Nettoyer la carte\");\r\n\t\t\t\tboutonReset.addClickHandler(actionBoutonReset());\r\n\t\t\t\tRootPanel.get(\"boutonReset\").add(boutonReset);\r\n\r\n\t\t\t\t// ajout du formulaire d'intˇgration\r\n\t\t\t\tnew FileUploadView(wMap,htmlLegende, htmlCompteRendu,tempsDIntegrationRestant);\r\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\n\t\t\t}", "public manageLecturersNewUI() {\n initComponents();\n loadLecturerData();\n loadSubjectsToComboBox();\n PanelMain.setBackground(Loading.getColorCode());\n PanelSub.setBackground(Loading.getColorCode());\n }", "public void Refresh_button() {\n\t\tthis.defaultSetup();\n\t}", "private void allDataLoaded() {\n mButtonHubId.setText(R.string.select_hub);\n }", "public void loadPage() { \n\t \n\t if((sPref.equals(ANY)) && (wifiConnected || mobileConnected)) {\n\t \tnew DownloadXmlTask().execute(URL);\n\t }\n\t else if ((sPref.equals(WIFI)) && (wifiConnected)) {\n\t new DownloadXmlTask().execute(URL);\n\t } else {\n\t // show error\n\t } \n\t }", "void setNilSearchWindowStart();", "private void initView() {\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerKapfenberg.refresh(true);\r\n\t\tviewerLeoben.refresh(true);\r\n\t\tviewerMariazell.refresh(true);\r\n\t\tviewerWien.refresh(true);\r\n\t}", "private void loadLists() {\n setUpFooter();\n if (numberOfLists > 0) {\n this.updateComponent(footer);\n for (Object l : agenda.getConnector().getItems(agenda.getUsername(), \"list\")) {\n Items list = (Items) l;\n comboBox.addItem(list.getName());\n JPanel panel = new JPanel();\n panel.setName(list.getName());\n setup.put(list.getName(), false);\n window.add(list.getName(), panel);\n currentList = list;\n }\n setUpHeader();\n for (Component c : window.getComponents()) {\n if (!setup.get(c.getName())){\n setUpList((JPanel) c);\n setup.replace(c.getName(),true);\n break;\n }\n }\n comboBox.setSelectedIndex(numberOfLists-1);\n } else{\n setUpHeader();\n }\n }", "@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\tLoadingFrame.show(Store.getStoreMainFrame());\r\n\t\t\tThread thread = new Thread(this, \"LoadModule\");\r\n\t\t\tthread.start();\r\n\t\t}", "@Override\n\tpublic void onLoad() {\n\t\t\n\t}", "private void invokeLoaded() \n{\n printDebug(\"calling loaded\");\n Object[] args = new Object[0];\n Object ret = this.getWindow().call(\"loaded\", args);\n}", "public void loadAndPopulateViewer(final iContainer fv) {\n final WindowViewer w = Platform.getWindowViewer();\n iFunctionCallback cb = new iFunctionCallback() {\n @Override\n public void finished(boolean canceled, Object returnValue) {\n w.hideWaitCursor();\n\n if (returnValue instanceof Exception) {\n Utils.handleError((Throwable) returnValue);\n } else {\n populateViewer(fv);\n }\n }\n };\n\n w.showWaitCursor();\n load(cb);\n }", "@Override\n public void setLoadOnStartup(int los) {\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n showPromotion();\n showCombo();\n showComboPart();\n \n }", "public void start(SplitPane splitpane, User user,String userJob) {\r\n\t\tthis.splitpane=splitpane;\r\n\t\tthis.user=user;\r\n\t\tthis.userrank=userJob;\r\n\t\tprimaryStage=LoginController.primaryStage;\r\n\t\ttry{\t\r\n\t\t\tloader = new FXMLLoader(getClass().getResource(\"/gui/MarketingManagerNewReports.fxml\"));\r\n\t\t\tlowerAnchorPane = loader.load();\r\n\t\t\tsplitpane.getItems().set(1, lowerAnchorPane);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t}\t\t\r\n}", "public void LoadContent(){\n }", "@Override\n public void actionPerformed(ActionEvent e){\n try{\n //Open a new window with the past game data\n new PastDataWindow();\n }catch(NullPointerException ex){\n JOptionPane.showMessageDialog(null, \"Error! No data loaded!\",\"Error!\",JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void windowOpened(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "void loadAll(int pageNum, LoadView mLoadView);", "@FXML\n public void dislay(ActionEvent event) throws IOException, SQLException{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"OrderPage.fxml\"));\n Parent root = loader.load();\n \n // pass information to orderPage scene\n OrderPageController controller = loader.getController();\n controller.initData(this.tableView.getSelectionModel().getSelectedItem());\n \n Scene scene = new Scene(root);\n Stage orderWindow = new Stage();\n orderWindow.setScene(scene);\n orderWindow.show();\n }", "public void startPage() {\n\t\tthis.dataComposer.startPage();\n\t}", "private void loadContent(ActionEvent event, String page) throws IOException {\n Parent ViewParent = FXMLLoader.load(getClass().getResource(page + \".fxml\"));\n Scene tableViewScene = new Scene(ViewParent);\n \n //This line gets the Stage information\n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow();\n \n window.setScene(tableViewScene);\n window.show();\n }", "public void start() {\n\t\t setVisible(true);\n\t}", "private void loadData(com.sun.star.awt.XWindow aWindow)\n throws com.sun.star.uno.Exception\n {\n // Determine the name of the window. This serves two purposes. First, if this\n // window is supported by this handler and second we use the name two locate\n // the corresponding data in the registry.\n String sWindowName = getWindowName(aWindow);\n if (sWindowName == null)\n throw new com.sun.star.lang.IllegalArgumentException(\n \"The window is not supported by this handler\", this, (short) -1);\n\n // To acces the separate controls of the window we need to obtain the\n // XControlContainer from window implementation\n XControlContainer xContainer = (XControlContainer) UnoRuntime.queryInterface(\n XControlContainer.class, aWindow);\n if (xContainer == null)\n throw new com.sun.star.uno.Exception(\n \"Could not get XControlContainer from window.\", this);\n\n // This is an implementation which will be used for several options pages\n // which all have the same controls. m_arStringControls is an array which\n // contains the names.\n for (int i = 0; i < ControlNames.length; i++)\n {\n // load the values from the registry\n // To access the registry we have previously created a service instance\n // of com.sun.star.configuration.ConfigurationUpdateAccess which supports\n // com.sun.star.container.XNameAccess. We obtain now the section\n // of the registry which is assigned to this options page.\n XPropertySet xLeaf = (XPropertySet) UnoRuntime.queryInterface(\n XPropertySet.class, this.accessLeaves.getByName(sWindowName));\n if (xLeaf == null)\n throw new com.sun.star.uno.Exception(\"XPropertySet not supported.\", this);\n\n // The properties in the registry have the same name as the respective\n // controls. We use the names now to obtain the property values.\n Object aValue = xLeaf.getPropertyValue(ControlNames[i]);\n\n // Now that we have the value we need to set it at the corresponding\n // control in the window. The XControlContainer, which we obtained earlier\n // is the means to get hold of all the controls.\n XControl xControl = xContainer.getControl(ControlNames[i]);\n\n // This generic handler and the corresponding registry schema support\n // up to five text controls. However, if a options page does not use all\n // five controls then we will not complain here.\n if (xControl == null)\n continue;\n\n // From the control we get the model, which in turn supports the\n // XPropertySet interface, which we finally use to set the data at the\n // control\n XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(\n XPropertySet.class, xControl.getModel());\n\n if (xProp == null)\n throw new com.sun.star.uno.Exception(\"Could not get XPropertySet from control.\", this);\n\n // Some default handlings: you can freely adapt the behaviour to your\n // needs, this is only an example.\n // For text controls we set the \"Text\" property.\n if(ControlNames[i].startsWith(\"txt\"))\n {\n xProp.setPropertyValue(\"Text\", aValue);\n }\n // The available properties for a checkbox are defined in file\n // offapi/com/sun/star/awt/UnoControlCheckBoxModel.idl\n else if(ControlNames[i].startsWith(\"chk\"))\n {\n xProp.setPropertyValue(\"State\", aValue);\n }\n // The available properties for a checkbox are defined in file\n // offapi/com/sun/star/awt/UnoControlListBoxModel.idl\n else if(ControlNames[i].startsWith(\"lst\"))\n {\n xProp.setPropertyValue(\"StringItemList\", aValue);\n \n aValue = xLeaf.getPropertyValue(ControlNames[i] + \"Selected\");\n xProp.setPropertyValue(\"SelectedItems\", aValue);\n }\n }\n }", "@Override\r\n\tpublic void windowOpened(WindowEvent arg0) {\n\t\tSystem.out.println(\"Window Opened.\");\r\n\t\tmodel.readObjects(\"Departments.dat\", model.getDepartments());\r\n\t\tmodel.readObjects(\"Lecturers.dat\", model.getLecturers());\r\n\t}", "private SettingsWindow() {\n loadData();\n createListeners();\n }", "@Override\r\n\tprotected void done() {\r\n\t\ttry {\r\n\t\t\tthis.get();\r\n\r\n\t\t\tRunnable run = new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tMainFrame mf = GUITools.getMainFrame();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// try to restore the window at the last location\r\n\t\t\t\t\t\tPropertyManager pm = PropertyManager.getManager(mf);\r\n\t\t\t\t\t\tProperties p = pm.read();\r\n\t\t\t\t\t\t// first run, write default values\r\n\t\t\t\t\t\tif (p.isEmpty()){\r\n\t\t\t\t\t\t\tDimension dimScreen = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\t\t\t\t\tint width = (int) dimScreen.getWidth() / 9 * 8;\r\n\t\t\t\t\t\t\tint height = (int) dimScreen.getHeight() / 9 * 8;\r\n\t\t\t\t\t\t\tmf.setLocation(width / 9 * 1 / 2, height / 9 * 1 / 3);\r\n\t\t\t\t\t\t\tmf.setPreferredSize(new Dimension(width, height));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tp.setProperty(\"loc_x\", String.valueOf(mf.getLocation().x));\r\n\t\t\t\t\t\t\tp.setProperty(\"loc_y\", String.valueOf(mf.getLocation().y));\r\n\t\t\t\t\t\t\tp.setProperty(\"width\", String.valueOf(width));\r\n\t\t\t\t\t\t\tp.setProperty(\"height\", String.valueOf(height));\r\n\t\t\t\t\t\t\tp.setProperty(\"extendedState\", String.valueOf(JFrame.MAXIMIZED_BOTH));\r\n\t\t\t\t\t\t\tpm.write();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmf.setVisible(true);\r\n\t\t\t\t\t\t// start like last time\r\n\t\t\t\t\t\tmf.setLocation(new Point(Integer.valueOf(p.getProperty(\"loc_x\")), Integer.valueOf(p.getProperty(\"loc_y\")))); \r\n\t\t\t\t\t\tmf.setSize(Integer.valueOf(p.getProperty(\"width\")), Integer.valueOf(p.getProperty(\"height\")));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (Integer.valueOf(p.getProperty(\"extendedState\")) != JFrame.MAXIMIZED_BOTH){\r\n\t\t\t\t\t\t\tmf.setExtendedState(JFrame.NORMAL);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t// finally display (from EDT)\r\n\t\t\tSwingUtilities.invokeLater(run);\r\n\r\n\t\t\tSystem.gc();\r\n\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e1);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e1, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch (ExecutionException e1) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e1);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e1, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "public void openSaveSelection() {\n\t\ttry {\n\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/SaveSelectionView.fxml\"));\n\t\t\tfxmlLoader.setResources(bundle);\n\t\t\tParent root1 = (Parent) fxmlLoader.load();\n\t\t\tStage stage = new Stage();\n\t\t\tSaveSelectionController ssc = fxmlLoader.getController();\n\t\t\tssc.setMainController(this);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\t\t// stage.initStyle(StageStyle.UNDECORATED);\n\t\t\tstage.setTitle(bundle.getString(\"sSHeaderLabel\"));\n\t\t\tstage.setScene(new Scene(root1));\n\t\t\tstage.show();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void windowOpened(WindowEvent e)\n {\n\n }", "private void load() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tloadPairs();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "public void showQuestsToPickScreen(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/QuestsToPickScreen.fxml\"));\n mainScreenController.getSecondaryScreen().getChildren().clear();\n mainScreenController.getSecondaryScreen().getChildren().add((AnchorPane) loader.load());\n \n QuestsToPickScreenController controller = loader.getController();\n controller.setGame(this);\n }catch(IOException e){\n }\n }", "private void affichagePeuDeQuestions() {\n\t\ttry {\n\t\t\tstage = (Stage)buttonRetour.getScene().getWindow();\n\t\t\tsetDynamicPane(FXMLLoader.load(getClass().getResource(\"FenetrePasAssezDeQuestions.fxml\")));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initMainComponentsLayout() {\r\n VerticalPanel selectDatasetLayout = new VerticalPanel();\r\n selectDatasetLayout.setWidth(\"300px\");\r\n selectDatasetLayout.setHeight(\"40px\");\r\n selectDatasetList = new ListBox();\r\n selectDatasetList.getElement().setAttribute(\"style\", \"border: 1px solid gray;height: 24px;font-weight: bold;width: 300px;border-radius: 5px;\");\r\n selectDatasetList.setWidth(\"300px\");\r\n selectDatasetList.addItem(\"Select Dataset\");\r\n selectDatasetLayout.add(selectDatasetList);\r\n selectDatasetList.setVisible(false);\r\n\r\n selectSubDatasetList = new ListBox();\r\n selectSubDatasetList.getElement().setAttribute(\"style\", \"border: 1px solid gray;height: 24px;font-weight: bold;width: 300px;border-radius: 5px;\");\r\n selectSubDatasetList.setWidth(\"300px\");\r\n selectSubDatasetList.addItem(\"Select Sub-Dataset\");\r\n selectSubDatasetList.setVisible(false);\r\n selectDatasetLayout.add(selectSubDatasetList);\r\n\r\n tempSelectDatasetList = new ListBox();\r\n tempSelectDatasetList.addItem(\"Select Dataset\");\r\n\r\n tempSelectDatasetList.setWidth(\"300px\");\r\n tempSelectDatasetList.setHeight(\"24px\");\r\n\r\n getDatasetsList(\"\");//get available dataset names\r\n RootPanel.get(\"dropdown_select\").add(selectDatasetLayout);\r\n selectDatasetList.addChangeHandler(this);\r\n selectSubDatasetList.addChangeHandler(this);\r\n\r\n tempSelectDatasetList.addChangeHandler(this);\r\n tempSelectDatasetList.addChangeHandler(this);\r\n Window.addResizeHandler(new ResizeHandler() {\r\n\r\n @Override\r\n public void onResize(ResizeEvent event) {\r\n if (masterWidth != Page.getScreenWidth() || masterHeight != Page.getScreenHeight()) {\r\n BooleanCallback ok = new BooleanCallback() {\r\n\r\n @Override\r\n public void execute(Boolean value) {\r\n if (value) {\r\n Window.Location.reload();\r\n }\r\n }\r\n };\r\n SC.confirm(\"You have changed the screen size the application need to reload the page press OK to proceed or close and back to the old screen\", ok);\r\n }\r\n }\r\n });\r\n\r\n initHomePage();\r\n welcomePage.setStyleName(\"welcomepagelayout\");\r\n RootPanel.get(\"welcomediva\").add(welcomePage);\r\n if (!oldIE) {\r\n initMiddleBodyLayout();\r\n }\r\n }", "public void LoadWin() throws IOException { \n\t\t\n\t\tFXMLLoader loader = new FXMLLoader();\n\t\tloader.setLocation(getClass().getClassLoader().getResource(\"application/view/Victory.fxml\"));\n\t\trootPane1 = loader.load();\n Scene scene = new Scene(rootPane1);// pane you are GOING TO show\n Stage window = stage;// pane you are ON\n window.setScene(scene);\n window.show();\n \n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}", "public void loadPanel () {\n System.out.println(\"warning: unimplemented loadPanel() in \" + this);\n }", "@Override\n protected void onLoad() {\n Element element = DOM.getElementById(BANDNAME_LISTBOX_ROW);\n element.setId(BANDNAME_LISTBOX_ROW + radioGroupId);\n\n this.pageLoaded = true;\n quicklookNone.setValue(true, true);\n buildBandNameListBox();\n }", "public void lendingPaneInit() {\n\t\tlendPane.getChildren().clear();\n\t\t\n Label lendPaneLabel = new Label(\"Lending\");\n lendPane.getChildren().add(lendPaneLabel);\n\t\t\n\t\tList<Tool> ownedTools = appUser.toolsICanLend();\n ArrayList<String> toolNames = new ArrayList<>();\n for (Tool tool: ownedTools) {\n \tif (tool.isLendable()) {\n \ttoolNames.add(tool.getToolID()+ \" : \"+tool.getToolName());\n \t}\n }\n \n HashMap<Integer, String> allUsers = conn.fetchAllUsers();\n \n ArrayList<String> usersNames = new ArrayList<>();\n for (Integer userID: allUsers.keySet()) {\n \tif(userID != appUser.getUserID()) {\n \tusersNames.add(userID+\" : \"+allUsers.get(userID));\n \t}\n }\n \n ComboBox<String> toolsDrop = new ComboBox<String>(FXCollections.observableArrayList(toolNames));\n ComboBox<String> usersDrop = new ComboBox<String>(FXCollections.observableArrayList(usersNames));\n\n Label toolReturnLabel = new Label(\"Return Date: \");\n DatePicker toolReturnDate = new DatePicker();\n\n HBox toolReturn = new HBox();\n toolReturn.getChildren().add(toolReturnLabel);\n toolReturn.getChildren().add(toolReturnDate);\n \n Button submitLendRequest = new Button();\n submitLendRequest.setText(\"Submit\");\n submitLendRequest.setOnAction(new EventHandler<ActionEvent>() {\n\n @Override\n public void handle(ActionEvent event) {\n \tString[] selectedTool = toolsDrop.getValue().split(\" \");\n \t\n \tTool toolToLend = appUser.getToolFromOwned(Integer.parseInt(selectedTool[0]));\n \t\n \tString[] selectedUser = usersDrop.getValue().split(\" \");\n \t\n \tUser userToLendTo = new User(Integer.parseInt(selectedUser[0]), conn);\n \t\n \tLocalDate returnDate = toolReturnDate.getValue();\n Date date = Date.valueOf(returnDate);\n \n \tappUser.lendTool(toolToLend, userToLendTo, date);\n \trefreshToolCollection(appUser.getToolCollection());\n \trefreshToolsOwned(appUser.getOwnedTools());\n \trefreshLogs(appUser.getLendingLogs(), conn.fetchAllUsers());\n \t\n \tlendingPaneInit();\n }\n });\n \n lendPane.getChildren().add(toolsDrop);\n lendPane.getChildren().add(usersDrop);\n lendPane.getChildren().add(toolReturn);\n lendPane.getChildren().add(submitLendRequest);\n\t}", "public void setUIsettingPane(PropertyFileWrapper pfw) {\n\n int col = 0, row = 0;\n\n GridPane uistatusgrid = new GridPane();\n uistatusgrid.setHgap(20);\n uistatusgrid.setVgap(5);\n uistatusgrid.setPadding(new Insets(20, 10, 10, 10));\n timeZone = new JFXTextField();\n timeZone.setPromptText(\"Enter the Time Zone\");\n if (!pfw.getTimeZone().isEmpty() || !pfw.getTimeZone().equals(\"\") || pfw.getTimeZone() != null) {\n timeZone.setText(pfw.getTimeZone());\n }\n\n timeFormat = new JFXTextField();\n timeFormat.setPromptText(\"Enter the time format\");\n if (!pfw.getTimeFormat().isEmpty() || !pfw.getTimeFormat().equals(\"\") || pfw.getTimeFormat() != null) {\n timeFormat.setText(pfw.getTimeFormat());\n }\n fetchTime = new JFXTextField();\n fetchTime.setPromptText(\"Enter Refresh Rate\");\n if (!pfw.getFetchTime().isEmpty() || !pfw.getFetchTime().equals(\"\") || pfw.getFetchTime() != null) {\n fetchTime.setText(pfw.getFetchTime());\n }\n statusPath = new JFXTextField();\n statusPath.setPromptText(\"Please select the Status folder\");\n statusPath.setDisable(true);\n if (!pfw.getStatusPath().isEmpty() || !pfw.getStatusPath().equals(\"\") || pfw.getStatusPath() != null) {\n statusPath.setText(pfw.getStatusPath());\n }\n statusFileLoad = new Button(\"Browse\");\n\n statusFileLoad.setOnAction((ActionEvent event) -> {\n\n try {\n\n Stage mainstage = (Stage) mainvbox.getScene().getWindow();\n File fileName = fileChooser.showOpenDialog(mainstage);\n\n if (fileName != null) {\n\n if (fileName.getAbsoluteFile().exists()) {\n statusPath.setText(fileName.getAbsolutePath());\n\n if (!statusPath.getText().isEmpty()) {\n schedularConf.setDisable(false);\n fileConf.setDisable(false);\n mailAlerts.setDisable(false);\n smtpConf.setDisable(false);\n ftptp.setDisable(false);\n try {\n statusProperties = new StatusProperties(statusPath.getText());\n setConnProperties(statusProperties.getConnFile());\n setSmtpProperties(statusProperties.getMailFile());\n\n } catch (IOException ex) {\n Logger.getLogger(ConfigFile.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n } else {\n throw new FileNotFoundException(fileName.getAbsolutePath() + \" does not exists.\");\n }\n }\n } catch (Exception ex) {\n\n ex.printStackTrace();\n new ExceptionUI(ex);\n }\n\n });\n\n if (statusPath.getText().isEmpty()) {\n schedularConf.setDisable(true);\n fileConf.setDisable(true);\n mailAlerts.setDisable(true);\n smtpConf.setDisable(true);\n ftptp.setDisable(true);\n } else {\n schedularConf.setDisable(false);\n fileConf.setDisable(false);\n mailAlerts.setDisable(false);\n smtpConf.setDisable(false);\n ftptp.setDisable(false);\n }\n\n uistatusgrid.add(new Label(\"Time Zone\"), col, row);\n uistatusgrid.add(timeZone, col + 1, row, 2, 1);\n uistatusgrid.add(new Label(\"Date & Time Format\"), col, ++row);\n uistatusgrid.add(timeFormat, col + 1, row, 2, 1);\n uistatusgrid.add(new Label(\"Refresh Rate\"), col, ++row);\n uistatusgrid.add(fetchTime, col + 1, row, 2, 1);\n uistatusgrid.add(new Label(\"Status File\"), col, ++row);\n uistatusgrid.add(statusPath, col + 1, row, 2, 1);\n uistatusgrid.add(statusFileLoad, col + 3, row, 3, 1);\n// uistatusgrid.add(validate, col + 1, ++row, 2, 1);\n uiStatus.setContent(uistatusgrid);\n }", "public void loadGameView() {\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Spiel Laden\");\n\t\t\tBorderPane root = new BorderPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/LoadGame.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tLoadGameViewController loadGameViewController = (LoadGameViewController) loader.getController();\n\t\t\tloadGameViewController.setOnitamaController(onitamaController);\n\t\t\tloadGameViewController.init();\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void showMainLoadingWheel();", "private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }", "@Override\r\n\tprotected void initPage() {\n\t\t\r\n\t\t\r\n\t\tJPanel paneLabel = new JPanel();\r\n\t\t//JPanel panelTabs = new JPanel();\r\n\t\t\r\n\t\t\r\n\t\t//pack.setVisible(false);\r\n\r\n\t\t//setlay out\r\n\t\t//panelTabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add label to label panel\r\n\t\tpaneLabel.add(new JLabel(\"Please select Objects To export\"));\r\n\t\t//tabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add tabs\r\n\t\ttabs.addTab(\"Packages\", null, pack, \"Packages\");\r\n\t\ttabs.addTab(\"Functions\", null, fun, \"Functions\");\r\n\t\ttabs.addTab(\"Procedures\", null, proc, \"Procedures\");\r\n\t\ttabs.addTab(\"Schemas\", null, sch, \"Schemas\");\r\n\t\t\r\n\t\t\r\n\t\ttabs.setTabPlacement(JTabbedPane.TOP);\r\n\t\t\r\n\t\t//add tabs to tabpanel panel\r\n\t\t//panelTabs.add(tabs);\r\n\t\t\r\n\t\t//add data tables to panels\r\n\t\tpackTbl = new JObjectTable(pack);\r\n\t\tfunTbl = new JObjectTable(fun);\r\n\t\tschTbl = new JObjectTable(sch);\r\n\t\tprocTbl = new JObjectTable(proc);\r\n\t\t\r\n\t\t//set layout\r\n\t\tsetLayout(new GridLayout(1,1));\r\n\t\t\r\n\t\t//add label & tabs to page panel\r\n\t\t//add(paneLabel, BorderLayout.NORTH);\r\n\t\t//add(panelTabs,BorderLayout.CENTER);\r\n\t\tadd(tabs);\r\n\t\t\r\n\t\t//init select all check boxes\r\n\t\tinitChecks();\r\n\t\t\r\n\t\t//add checks to panel\r\n\t\tpack.add(ckPack);\r\n\t\tfun.add(ckFun);\r\n\t\tsch.add(ckSchema);\r\n\t\tproc.add(ckProc);\r\n\t\t\r\n\t}", "public void routetopage() {\n this.setVisible(true);\n }", "public LOADIUNG() {\n initComponents();\n \n load();\n timer.start();\n HOME home = new HOME();\n \n \n }", "public void doLoadInThread() {\n selectFiles(fileChooser.getSelectedFiles(),\n fileChooser.getCurrentDirectory());\n }", "private void loadingAnalysis(DatasetInformation datasetInfos) {\r\n datasetInfo = datasetInfos;\r\n updateLeftPanel(datasetInfos);\r\n if (reload) {\r\n\r\n Selection s = Selection_Manager.getSelectedRows();\r\n Selection_Manager.setSelectedRows(s);\r\n return;\r\n }\r\n processProfilePlot();\r\n reload = true;\r\n\r\n if (!init) {\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n\r\n }", "private void settings() {\n\n\t\tthis.addWindowListener(controller);\n\t\tthis.setVisible(true);\n\t\tthis.setSize(1000, 660);\n\t\tthis.validate();\n\t\tthis.repaint();\n\n\t}", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }", "public void start()\n\t{\n\t\tview.showWindow();\n\t\taddListeners();\n\t}", "public History_GUI(){\n super();\n InitializeComponents();\n ConfigureWin();\n\n }", "public WindowLoader(Node window) {\n w = (Stage) window.getScene().getWindow();\n }", "@FXML\n private void callCourseSelectPage(ActionEvent e) {\n\n CourseSelectPage.selectForRecordMode= false;\n\n Pageloader loader = new Pageloader();\n Parent root = loader.getPage(\"GUIcourseSelectPage\");\n Stage stage = new Stage();\n stage.setTitle(\"Add record for student\");\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(new Scene(root));\n stage.showAndWait();\n }", "private void loadRecords() {\r\n\t\tpanContent.updateContent();\r\n\t}", "public void updateDetailWindow();", "@Override\n\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\n\t\t}", "private void loadItemList() {\n this.presenter.initialize();\n }", "public void lancementJeuClassique() {\n\t\ttry {\n\t\t\tstage = (Stage)buttonRetour.getScene().getWindow();\n\t\t\tsetDynamicPane(FXMLLoader.load(getClass().getResource(\"FenetreLancementJeu.fxml\")));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 950, 620);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLayeredPane layeredPane = new JLayeredPane();\n\t\tlayeredPane.setBounds(0, 0, 932, 533);\n\t\tframe.getContentPane().add(layeredPane);\n\t\t\n\t\tJLayeredPane layeredPane_1 = new JLayeredPane();\n\t\tlayeredPane_1.setBounds(0, 37, 933, 538);\n\t\tlayeredPane_1.setVisible(false);\n\t\tframe.getContentPane().add(layeredPane_1);\n\t\t\n\t\tJLayeredPane layeredPane_2 = new JLayeredPane();\n\t\tlayeredPane_2.setBounds(0, 37, 940, 538);\n\t\tlayeredPane_2.setVisible(false);\n\t\tframe.getContentPane().add(layeredPane_2);\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tfileChooser.setMultiSelectionEnabled(true);\n\t\t\n\t\tJLabel lblFileToBe = new JLabel(\"File to Upload\");\n\t\tlblFileToBe.setBounds(0, 167, 900, 230);\n\t\tlayeredPane.add(lblFileToBe);\n\t\tlblFileToBe.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblFileToBe.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tlblFileToBe.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnChooseFile = new JButton(\"Choose File\");\n\t\tbtnChooseFile.setBounds(367, 94, 440, 80);\n\t\tlayeredPane.add(btnChooseFile);\n\t\t\n\t\tJButton btnLoadEngine = new JButton(\"Load Engine\");\n\t\tbtnLoadEngine.setVisible(false);\n\t\tbtnLoadEngine.setBounds(370, 165, 117, 29);\n\t\tlayeredPane.add(btnLoadEngine);\n\t\tbtnLoadEngine.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\t\n\t\tlblLoading = new JLabel(\"Loading...\");\n\t\tlblLoading.setBounds(10, 122, 117, 21);\n\t\tlblLoading.setVisible(false);\n\t\tlayeredPane.add(lblLoading);\n\t\tlblLoading.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\n\t\tlblLoading.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\t\n\t\tbtnSearchForTerm = new JButton(\"Search For Term\");\n\t\tbtnSearchForTerm.setVisible(false);\n\t\tbtnSearchForTerm.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tbtnSearchForTerm.setBounds(172, 205, 515, 29);\n\t\tlayeredPane.add(btnSearchForTerm);\n\t\t\n\t\tJLabel lblEnterSearchTerm = new JLabel(\"Enter Search Term:\");\n\t\tlblEnterSearchTerm.setBounds(10, 120, 265, 85);\n\t\tlayeredPane_1.add(lblEnterSearchTerm);\n\t\tlblEnterSearchTerm.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblEnterSearchTerm.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tsearchTextField = new JTextField();\n\t\tsearchTextField.setBounds(320, 150, 200, 22);\n\t\tlayeredPane_1.add(searchTextField);\n\t\tsearchTextField.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tsearchTextField.setColumns(10);\n\t\t\n\t\t\n\t\tJButton btnSearch = new JButton(\"Search!\");\t\n\t\tbtnSearch.setBounds(550, 145, 80, 40);\n\t\tlayeredPane_1.add(btnSearch);\n\t\tbtnSearch.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\t\n\t\tbtnGoBackToSearch = new JButton(\"Go Back To Search\");\n\t\tbtnGoBackToSearch.setBounds(685, 0, 187, 22);\n\t\tlayeredPane_2.add(btnGoBackToSearch);\n\t\tbtnGoBackToSearch.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblSearchedTerm = new JLabel(\"Searched Term\");\n\t\tlblSearchedTerm.setBounds(58, 0, 680, 48);\n\t\tlayeredPane_2.add(lblSearchedTerm);\n\t\tlblSearchedTerm.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\t\n\t\tJLabel executionTimeLabel = new JLabel(\"Search Elapsed Time\");\n\t\texecutionTimeLabel.setBounds(58, 51, 200, 48);\n\t\tlayeredPane_2.add(executionTimeLabel);\n\t\texecutionTimeLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\t\n\t\t\n\t\tJLabel lblTermNotExist = new JLabel(\"Term Does Not Exist!\");\n\t\tlblTermNotExist.setVisible(false);\n\t\tlblTermNotExist.setBounds(320, 162, 342, 120);\n\t\tlayeredPane_2.add(lblTermNotExist);\n\t\tlblTermNotExist.setFont(new Font(\"Tahoma\", Font.BOLD, 22));\n\t\tlblTermNotExist.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\t\n\t\ttableSearch = new JTable();\n\t\ttableSearch.setBounds(200, 250, 600, 300);\n\t\ttableSearch.setRowHeight(20);\n\t\ttableSearch.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\t\n\t\tlayeredPane_2.add(tableSearch);\n\t\t\n\t\tbtnChooseFile.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint res = fileChooser.showSaveDialog(null);\n\t\t\t\tif (res == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\tString text = \"\";\n\t\t\t\t\tfiles = fileChooser.getSelectedFiles();\n\t\t\t\t\ttext = \"<html><div style='text-align: center;'>\";\n\t\t\t\t\tfor (int n = 0; n < files.length; n++)\n\t\t\t\t\t\ttext += files[n] + \"<br/>\";\n\t\t\t\t\ttext += \"</div></html>\";\n\t\t\t\t\t\n\t\t\t\t\tlblFileToBe.setText(text);\n\t\t\t\t\tbtnLoadEngine.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnLoadEngine.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlblFileToBe.setVisible(false);\n\t\t\t\tbtnChooseFile.setVisible(false);\n\t\t\t\tlblLoading.setVisible(true);\n\t\t\t\tbtnLoadEngine.setVisible(false);\n\t\t\t\t\n\t\t\t\tfor (File f: files) {\n\t\t\t\t\tString obj = HttpRequestMethod(\"POST\", \"https://storage.googleapis.com/upload/storage/v1/b/\" + bucketName + \"/o??uploadType=media&name=input/\" + f.getName(), \"application/octet-stream\", new FileEntity(f), accessToken);\n\t\t\t\t\tif(obj == null) {\n\t\t\t\t\t\tlblLoading.setText(\"Failed to upload files to bucket\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlblLoading.setText(\"<html>Files Uploaded to bucket.<br/>Now Populationg InvertedIndex.txt on Cluster</html>\");\n\t\t\t\tString jsonBody = \"{\\\"projectId\\\": \\\"\" + projectId + \"\\\",\" +\"\\\"job\\\": {\\\"placement\\\": {\\\"clusterName\\\": \\\"\" + clusterName + \"\\\"},\\\"hadoopJob\\\": {\\\"jarFileUris\\\": [\\\"gs://\" + bucketName +\"/JAR/InvertedIndex.jar\\\"],\\\"args\\\": [\\\"gs://\" + bucketName + \"/input\\\",\\\"gs://\" + bucketName + \"/IIOutput\\\"],\\\"mainClass\\\": \\\"InvertedIndex\\\"}}}\";\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject obj = new JSONObject(HttpRequestMethod(\"POST\", \"https://dataproc.googleapis.com/v1/projects/\" + projectId +\"/regions/\" + clusterRegion +\"/jobs:submit\" + \"?key=\" + apiKey, \"application/json\", new StringEntity(jsonBody), accessToken));\n\t\t\t\t\tjobId = obj.getJSONObject(\"reference\").getString(\"jobId\");\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tjava.util.Timer timer = new java.util.Timer();\n\t\t\t\tRecurrentTask task = new RecurrentTask(getThis(), \"InvertedIndex\");\n\t\t\t\ttimer.scheduleAtFixedRate(task, 0, 5000);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnSearch.addActionListener(new ActionListener() {\t\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSearch.setText(\"Searching...\");\n\t\t\t\t\n\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t \n\t\t\t\tString wordSearched = searchTextField.getText();\n\t\t\t\tList<String> docList = new ArrayList<String>(files.length);\n\t\t\t\tList<String> frequencyList = new ArrayList<String>(files.length);\n\t\t\t\t\n\t\t\t\tScanner scanner = new Scanner(InvertedIndexResult);\n\t\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\tString[] array = line.split(\"\\t\");\n\t\t\t\t\tif(wordSearched.equals(array[0])) {\n\t\t\t\t\t\tSystem.out.println(\"Found term\");\n\t\t\t\t\t\tfor(int n=0;n < files.length; n++) {\n\t\t\t\t\t\t\tif(!array[0].equals(wordSearched)) \n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocList.add(array[1]);\n\t\t\t\t\t\t\tfrequencyList.add(array[2]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!scanner.hasNextLine()) \n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tline = scanner.nextLine();\n\t\t\t\t\t\t\tarray = line.split(\"\\t\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tscanner.close();\n\t\t\t\tlong end = System.currentTimeMillis();\n\t\t\t\t\n\t\t\t\tlblSearchedTerm.setText(\"Searched Term: \" + wordSearched);\n\t\t\t\texecutionTimeLabel.setText(\"Search Elapsed Time: \" + Float.toString((end - start) / 1000F));\n\t\t\t\t\n\t\t\t\tif(docList.size() == 0) {\n\t\t\t\t\ttableSearch.setModel(new DefaultTableModel());\n\t\t\t\t\tlblTermNotExist.setVisible(true);\n\t\t\t\t}\n\t\t\t\telse {\t\t\t\t\t\t\n\t\t\t\t\tDefaultTableModel model = new DefaultTableModel();\n\t\t\t\t model.setColumnIdentifiers(new Object[] {\"Doc Name\", \"Frequency\"});\n\t\t\t\t model.addRow(new Object[] {\"Doc Name\", \"Frequency\"});\n\t\t\t\t for(int n=0;n<docList.size();n++) \n\t\t\t\t \tmodel.addRow(new Object[] {docList.get(n), frequencyList.get(n)});\n\t\t\t\t\ttableSearch.setModel(model);\n\t\t\t\t}\n\t\t\t\tlayeredPane_1.setVisible(false);\n\t\t\t\tlayeredPane_2.setVisible(true);\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnGoBackToSearch.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSearch.setText(\"Search!\");\n\t\t\t\tlblTermNotExist.setVisible(false);\n\t\t\t\tlayeredPane_2.setVisible(false);\n\t\t\t\tlayeredPane_1.setVisible(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnSearchForTerm.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlayeredPane.setVisible(false);\n\t\t\t\tlayeredPane_1.setVisible(true);\n\t\t\t}\n\t\t});\n\t}" ]
[ "0.66628784", "0.6604621", "0.6360442", "0.6293041", "0.61723393", "0.6148109", "0.61476403", "0.6109242", "0.6070346", "0.60500675", "0.60415953", "0.6025799", "0.601199", "0.5993242", "0.59911567", "0.59904605", "0.59313923", "0.59174025", "0.5896609", "0.5892062", "0.5877543", "0.5863937", "0.586157", "0.5860755", "0.58439654", "0.5836983", "0.5833244", "0.5827506", "0.5813209", "0.58128774", "0.5789553", "0.5781789", "0.5773903", "0.5768248", "0.5765059", "0.5765059", "0.5765059", "0.5765059", "0.5750583", "0.5739857", "0.5735961", "0.5717269", "0.57114714", "0.5703431", "0.5703191", "0.5696492", "0.5694032", "0.56912875", "0.5680859", "0.56808275", "0.567871", "0.5678592", "0.5678509", "0.56744325", "0.5666184", "0.5659383", "0.5659383", "0.56408876", "0.5633814", "0.56336385", "0.5632404", "0.56266415", "0.5625069", "0.56202215", "0.5619831", "0.5615555", "0.56138253", "0.56136864", "0.5613317", "0.56129444", "0.56121457", "0.5609264", "0.5603387", "0.5599864", "0.55964583", "0.55943745", "0.55935514", "0.55889255", "0.5585711", "0.55856293", "0.5580723", "0.5578778", "0.5574287", "0.5572212", "0.556564", "0.5564521", "0.5561384", "0.5560052", "0.5559057", "0.5557594", "0.5553311", "0.55518794", "0.5542449", "0.55418414", "0.5535265", "0.55346596", "0.55340147", "0.55336714", "0.5530242", "0.55289793" ]
0.6456541
2
this method will load saved data in the specified path, so long it exists
private void deSerialize() { try { String filename = "src/serialization/allSets.ser"; FileInputStream file = new FileInputStream(filename); ObjectInputStream in = new ObjectInputStream(file); allNoteCardSets = (AllNoteCardSets)in.readObject(); in.close(); file.close(); } catch(IOException | ClassNotFoundException ex) { } catch(Exception ex) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "void massiveModeLoading( File dataPath );", "public void loadPersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tif (file.length() == 0) { // no persistent data to use\n\t\t\treturn;\n\t\t}\n\t\tdeserializeFile(file);\n\t\tloadPersistentSettings();\n\t}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}", "void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void load() {\n }", "private void loadUser() {\n File dataFile = new File(getFilesDir().getPath() + \"/\" + DATA_FILE);\n\n if(dataFile.exists()) {\n loadData();\n } else { // First time CigCount is launched\n user = new User();\n }\n }", "public void load() ;", "public void loadSave(){\n if((new File(\"data.MBM\")).exists()){\n isNew = false;\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"data.MBM\"));\n String line = br.readLine();\n \n while (line != null) {\n \n if(line.contains(\"outDir\")){\n String[] result = line.split(\":\");\n outputDir = new File(result[1]);\n if(outputDir.exists() == false){\n isNew = true;\n }\n }\n else if(line.contains(\"MBMWORLD\")){\n String[] result = line.split(\":\");\n //1 = filename\n //2 = world name\n //3 = path\n //4 = date\n addWorld(new File(result[3]), result[2]);\n worlds.get(numWorlds()-1).setLastBackup(result[4]);\n }\n \n line = br.readLine();\n }\n \n br.close();\n \n } catch(IOException e){\n System.out.println(e);\n }\n }\n }", "public void load() {\n\t}", "public void loadSavedConfigsMap() {\n\t\tfinal File folder = new File(serializePath);\n\t\tlistFilesForFolder(folder);\n\t}", "protected abstract void loadData();", "protected void loadData()\n {\n }", "public static void load() {\n }", "public void load();", "public void load();", "public void setDataPath(String path){\n\t\t_dataPath = path;\n\t\ttry {\n\t\t\tFileInputStream file = new FileInputStream(path + \"properties.txt\");\n\t\t\tprops.load(file);\n\t\t\tfile.close();\n\t\t} catch (IOException exp) {\n\t\t\tDebug.getInstance().errorMessage(this.getClass(),\n\t\t\t\t\t\"No Property File found: \" + exp.getMessage());\n\t\t\t;\n\t\t}\n\t}", "void loadData();", "void loadData();", "void reloadFromDiskSafe();", "public void makeData() {\n\t\tFile file = null;\r\n try {\r\n if (!m.getDataFolder().exists()) { //Check if the directory of the plugin exists...\r\n \tm.getDataFolder().mkdirs(); //If not making one.\r\n }\r\n file = new File(m.getDataFolder(), \"data.yml\"); // Defining file to data.yml NOTE: This file has to be also in your Project, even if it's empty.\r\n if (!file.exists()) { //Check if it exists\r\n \tm.getLogger().info(\"data.yml not found, creating!\"); //Log that it is creating\r\n \tm.saveResource(\"data.yml\", true); //Saving the resource, This is all by Java done no Spigot noeeded. \r\n } else {\r\n \tm.getLogger().info(\"data.yml found, loading!\"); //If it is already there, load it.\r\n \t//TODO: Loading...\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();//If something returned a NPE or something it will print a stacktrace...\r\n }\r\n\t}", "private static void load(){\n }", "public abstract void loadData();", "public abstract void loadData();", "public void loadFromLocalStorage() {\n\t\t\n\t}", "public void load()\n\t{\n\t\tfor(String s : playerData.getConfig().getKeys(false))\n\t\t{\n\t\t\tPlayerData pd = new PlayerData(playerData, s);\n\t\t\tpd.load();\n\t\t\tdataMap.put(s, pd);\n\t\t}\n\t}", "void load();", "void load();", "private void getDataLists(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile file = new File(path);\n\t\t\tfile.createNewFile();\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\t\t\t\n\t\t\tString str = null;\n\t\t\twhile((str = fileReader.readLine()) != null)\n\t\t\t{\n\t\t\t\tthis.dataList.push(str);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed : data list read\");\n\t\t}\n\t}", "private void fileRead(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile file = new File(path);\n\t\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\t\t\n\t\t\t// data read\n\t\t\tthis.dataContent = new byte[(int)file.length()];\n\t\t\tint ret = fileStream.read(this.dataContent, 0, (int)file.length());\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File Not Found : \" + e.getMessage());\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed File Read : \" + e.getMessage());\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public abstract void load();", "public void load() {\n handleLoad(false, false);\n }", "private void reloadData() {\n if (DataFile == null)\n DataFile = new File(dataFolder, DATAFILENAME);\n Data = YamlConfiguration.loadConfiguration(DataFile);\n }", "public void load(String path) throws IOException, ClassNotFoundException {\n FileInputStream inputFile = new FileInputStream(path);\n ObjectInputStream objectInput = new ObjectInputStream(inputFile);\n\n map = (String[]) objectInput.readObject();\n\n objectInput.close();\n inputFile.close();\n }", "public FileStorage(File path) {\n dataFolder = path;\n }", "public DaoFileImpl(String path) {\r\n\t\tgson = new Gson();\r\n\t\tthis.path = path;\r\n\t\tthis.daoMap = new HashMap<>();\r\n\t\treadMapFromFile();\r\n\t}", "public static void load() {\n load(false);\n }", "public void load(String filePath){\r\n File loadFile = new File(filePath);\r\n if (!loadFile.exists()){\r\n System.out.println(\"I failed. There are no saved games.\");\r\n return;\r\n }\r\n FileInputStream fis = null;\r\n ObjectInputStream in = null;\r\n try {\r\n fis = new FileInputStream(filePath);\r\n in = new ObjectInputStream(fis);\r\n long versionUID = (long) in.readObject();\r\n if (versionUID != this.serialVersionUID) {\r\n throw new UnsupportedClassVersionError(\"Version mismatch for save game!\");\r\n }\r\n this.p = (Character) in.readObject();\r\n this.map = (SpecialRoom[][]) in.readObject();\r\n\r\n } catch (FileNotFoundException ex){\r\n System.out.println(\"The saved game was not found!\");\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n System.out.println(\"There was an error reading your save game :(\");\r\n ex.printStackTrace();\r\n System.out.println(\")\");\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(\"The version of the save game is not compatible with this game!\");\r\n ex.printStackTrace();\r\n } catch (UnsupportedClassVersionError ex) {\r\n System.out.println(ex.getMessage());\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n System.out.println(\"An unknown error occurred!\");\r\n }\r\n\r\n }", "public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "@Override\n void loadData() {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n // Attempt to read the config in the config file.\n langConfig = YamlConfiguration.loadConfiguration(langConfigFile);\n // If the config file is null (due to the config file being invalid or not there) create a new one.\n // If the file doesnt exist, populate it from the template.\n if (!langConfigFile.exists()) {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n langConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(plugin.getResource(\"messages.yml\")));\n saveData();\n }\n }", "private void loadFromSdCard() throws IOException {\n\t\tif (!Environment.getExternalStorageState().equals(\n\t\t\t\tEnvironment.MEDIA_MOUNTED)) {\n\t\t\tthrow new IOException(getResources().getString(\n\t\t\t\t\tR.string.error_noExternalStorage));\n\t\t}\n\n\t\tStringBuffer whiteBoardFilePath = new StringBuffer(\n\t\t\t\tWHITEBOARD_DATA_FOLDER_PATH);\n\t\twhiteBoardFilePath.append(whiteBoard.id).append(\".dat\");\n\n\t\ttry {\n\t\t\tmDataStore.deserializeDataStore(new FileInputStream(new File(\n\t\t\t\t\twhiteBoardFilePath.toString())));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not load save file\");\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"I/O error loading save file\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createOrReadCache() {\n\t\tList<String> cachedDirectoryPaths = new ArrayList<>();\n\t\tFile file = new File(LevelEditor.SAVED_PATH_DATA);\n\t\tif (!file.exists()) {\n\t\t\t// Set the default paths first\n\t\t\tFileControl.lastSavedDirectory = new File(LevelEditor.defaultPath);\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\n\t\t\tcachedDirectoryPaths.add(FileControl.lastSavedDirectory.getAbsolutePath());\n\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"rw\")) {\n\t\t\t\tthis.storeCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"r\")) {\n\t\t\t\tthis.fetchCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\n\t\t\tFileControl.lastSavedDirectory = new File(cachedDirectoryPaths.get(LevelEditor.FileControlIndex));\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\t\t}\n\t}", "public abstract void load() throws IOException;", "private void readSavedFile() {\n\n String[] files = new String[0];\n \n // On récupère la liste des fichiers\n File file = new File(folderName);\n\n // check if the specified pathname is directory first\n if(file.isDirectory()){\n //list all files on directory\n files = file.list();\n }\n\n if (files != null) {\n for(String currentFile : files) {\n Vehicule voiture;\n try {\n FileInputStream fileIn = new FileInputStream(folderName + \"/\" + currentFile);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n voiture = (Vehicule) in.readObject();\n addVoitureToList(voiture);\n in.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"#Erreur : Impossible de récupérer l'objet \" + currentFile);\n c.printStackTrace();\n return;\n }\n }\n }\n }", "public void loadCache() {\n if (!directory.exists()) {\n directory.mkdirs();\n }\n File[] files = this.directory.listFiles();\n if (files == null) {\n return;\n }\n for (File file : files) {\n if (file.getName().endsWith(\".json\")) {\n cache.put(file.getName().split(\".json\")[0], new JsonDocument(file));\n }\n }\n }", "private void loadSavedSchedules() {\n scheduleList = new ScheduleList(new ArrayList<>());\n try {\n scheduleList = reader.readSchedules();\n } catch (IOException e) {\n System.err.println(\"Schedule File Missing\");\n } catch (JSONException je) {\n System.err.println(\"Empty File - Schedule\");\n System.out.println(je);\n }\n }", "private void loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}", "File getLoadLocation();", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public DataSetLoader load (String path) {\n\t\tJSONParser parser = new JSONParser();\n\t\t\n\t\t// Obtain the name of the data set from the file name\n\t\tString name = FilenameUtils.removeExtension(new File(path).getName());\n\t\t\n\t\ttry {\n\t\t\t// Parse the JSON file into a JSON object\n\t\t\tthis.dataSet = new DataSet(name, (JSONArray) parser.parse(new FileReader(CURRENT_DIR + \"data_sets/\" + path)));\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tcatch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn this;\n\t}", "public Data(String path) throws IOException {\n this.path = Paths.get(\"src/main/data/duke.txt\").toAbsolutePath();\n if (Files.notExists(this.path)) {\n new File(String.valueOf(path)).createNewFile();\n }\n }", "private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }", "public StillModel loadModel(String filepath);", "private void loadData(List<String> pathList)\n {\n Log.e(TAG, \"loadData() called pathList=\" + pathList.toString());\n for (int i = 0; i < pathList.size(); i++)\n {\n String path = pathList.get(i);\n ArrayList<String> thisPathDataList = new ArrayList<String>();\n mDataMap.put(path, loadDataImp(path, thisPathDataList));\n }\n\n }", "void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "public void initDataSource(String path) throws IOException {\n File file = new File(path);\n if (!file.exists()) {\n Path dirPath = Paths.get(PATH);\n Files.createDirectories(dirPath);\n file.createNewFile();\n }\n }", "public void load() throws FileNotFoundException {\n loadConfig();\n initRepos();\n }", "public void load() {\r\n\t\t\r\n\t\t//-- Clean\r\n\t\tthis.repositories.clear();\r\n\t\t\r\n\t\tloadInternal();\r\n\t\tloadExternalRepositories();\r\n\t\t\r\n\t}", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "public boolean load() throws IOException {\n File db = new File(plugin.getDataFolder(), FILENAME);\n mdb = new YamlConfiguration();\n if(db.exists()) {\n try {\n mdb.load(db);\n } catch (Exception e) {\n mdb = null;\n e.printStackTrace();\n throw new IOException(\"Could not read Courier database!\");\n }\n return true;\n }\n return false;\n }", "public void load(Storable storable)/* throws LogFile.LockException */{\n if (dataFile != null) {\n // If the file has been set, synchronize on it.\n synchronized (dataFile) {\n storable.load(properties);\n }\n }\n else {\n storable.load(properties);\n }\n }", "public void loadClients(String path) throws StorageException {\r\n // Get the lines in the file\r\n String[] lines = readFile(path);\r\n // Parse and save clients to database\r\n parseClients(lines);\r\n }", "private void loadSavedCourses() {\n courseList = new CourseList(new ArrayList<>());\n try {\n courseList = reader.readCourseList();\n } catch (IOException ioe) {\n System.err.println(\"Course File Missing\");\n } catch (JSONException je) {\n System.err.println(\"Empty File - Course\");\n System.out.println(je);\n }\n }", "@Override\n void load(String data) {\n }", "private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public ConfigData loadConfigFile(String path) {\n ConfigData config = null;\n if (path != null) {\n try {\n String data = loadTextFile(path);\n config = Resources.loadJson(data, ConfigData.class);\n } catch (IOException e) {\n LoggerFactory.getLogger(Resources.class).error(\"Unable to load the config file at \"\n + path + \", creating a default config file.\", e);\n }\n // Create a new config file and save it if none exists.\n if (config == null) {\n config = new ConfigData();\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String outputData = gson.toJson(config, ConfigData.class);\n try {\n writeData(outputData, path);\n } catch (IOException ex) {\n throw new IOError(ex);\n }\n }\n } else {\n config = new ConfigData();\n }\n\n return config;\n }", "public abstract void loadKnowledge(String path) throws LoadKnowledgeException;", "public static BotData loadData()\n\t{\n\t\tBotData data = null;\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fis = new FileInputStream(SAVE_DATA_FILENAME);\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tObject obj = ois.readObject();\n\t\t\tString json = (String)obj;\n\t\t\tdata = new Gson().fromJson(json, BotData.class);\n\t\t\tois.close();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\t//error\n\t\t}\n\t\tif ( data == null )\n\t\t\tdata = new BotData();\n\t\treturn data;\n\t}", "void loadPath(String path) {\n clear();\n\n setVisible(false);\n \n File fpath = new File(path);\n if (fpath.exists()) {\n // salva o diretorio atual entre os diretorios recentes\n try {\n File recente_path = new File(\"resources/configs/path\");\n PrintStream out = new PrintStream(recente_path);\n out.println(path);\n out.close();\n } catch (Exception e) { System.err.println(\"Erro ao salvar path: \"+ e.getMessage()); }\n\n txtPath.setText(fpath.getAbsolutePath());\n\n // primeiro exibe os diretorios\n File aqui = new File(path);\n File[] arquivos = aqui.listFiles(new FileFilter() {\n\n public boolean accept(File pathname) {\n return pathname.isDirectory() && !pathname.isHidden();\n }\n });\n if (arquivos != null)\n for (int i = 0; i < arquivos.length; i++)\n addFile(arquivos[i]);\n\n // depois exibe os arquivos\n arquivos = aqui.listFiles(new FileFilter() {\n\n public boolean accept(File pathname) {\n return pathname.isFile() && !pathname.isHidden();\n }\n });\n if (arquivos != null)\n for (int i = 0; i < arquivos.length; i++)\n addFile(arquivos[i]);\n\n setVisible(true);\n }\n }", "public void loadData(){\n try {\n entities.clear();\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.parse(fileName);\n\n Node root = document.getDocumentElement();\n NodeList nodeList = root.getChildNodes();\n for (int i = 0; i < nodeList.getLength(); i++){\n Node node = nodeList.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE){\n Element element = (Element) node;\n Department department = createDepartmentFromElement(element);\n try{\n super.save(department);\n } catch (RepositoryException | ValidatorException e) {\n e.printStackTrace();\n }\n }\n }\n } catch (SAXException | ParserConfigurationException | IOException e) {\n e.printStackTrace();\n }\n }", "public static Resource loadFromFile() {\n File file = new File(saveFilePath);\n // create a new file if it doesn't exist\n if (!file.exists()) {\n // save an empty resource object\n Resource resource = new Resource();\n resource.saveToFile();\n }\n\n Resource resource = null;\n try {\n resource = (Resource) loadObjFromFile(saveFilePath);\n } catch (InvalidClassException e) {\n // if resource file is outdated or corrupted reset file\n resource = new Resource();\n resource.saveToFile();\n staticLog(\"resource file was corrupted, cleared with new one\");\n// e.printStackTrace();\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n resource.activeUsers = new HashMap<>();\n resource.activeProjects = new HashMap<>();\n return resource;\n }", "@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}", "private static String loadFile(String path){\n try {\n\n BufferedReader reader = new BufferedReader(new FileReader(path));\n StringBuilder sb = new StringBuilder();\n\n String line;\n while((line = reader.readLine()) != null){\n sb.append(line);\n sb.append('\\n');\n }\n\n reader.close();\n return sb.toString();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "public void loadQuickly(){\r\n System.out.println(\"I am going to try to load your games.\");\r\n String quickLoadPath = this.savePath + File.separator + \"QuickSave.ser\";\r\n this.load(quickLoadPath);\r\n }", "public void load() throws ClassNotFoundException, IOException;", "@Override\n\tpublic Path load(String keyName) {\n\t\treturn null;\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "@Override\n public void load() {\n }", "public void load(String path) {\n try {\n texId = new TextureId(path);\n BufferedImage image = ImageIO.read(new FileInputStream(\"resources\" + texId.getPath()));\n createImage(image);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "@Override\r\n\tpublic void load() {\n\t}", "private void loadDataFromFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // load data for new users after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // load data for existing users after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n FileReader fr = new FileReader(file);\n BufferedReader br = new BufferedReader(fr);\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n Object[] lines = br.lines().toArray();\n for (int i = 0; i < lines.length; i++) {\n String[] row = lines[i].toString().split(\"\\t\");\n model.addRow(row);\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void loadStaticEntity(String path) {\r\n assert (entityManager != null);\r\n \r\n try {\r\n Scanner sc = new Scanner(new File(path));\r\n while (sc.hasNext()) {\r\n int id = sc.nextInt();\r\n float x = sc.nextFloat();\r\n float y = sc.nextFloat();\r\n int kwidth = sc.nextInt();\r\n int kheight = sc.nextInt();\r\n entityManager.addEntity(new StaticEntity(handler, id, Tile.TILEWIDTH * x, \r\n Tile.TILEHEIGHT * y, Tile.TILEWIDTH * kwidth, Tile.TILEHEIGHT * kheight));\r\n }\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "private void replaceData(String folderName, ArrayList<String> loader1, ArrayList<String> loader2) throws IOException {\n LoadAndSave las =new LoadAndSave();\n las.load(folderName);\n las.loader1=loader1;\n las.loader2=loader2;\n las.save(folderName);\n \n }", "@Override\n\tpublic Object load(String path, Object defaultObject) throws Exception {\n\t\tfinal Object[] object = new Object[1];\n\t\t\n\t\t// Stream\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(path);\n\t\t\tfinal ObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\t// Load an object\n\t\t\tobject[0] = ois.readObject();\n\n\t\t\t// Close stream\n\t\t\tois.close();\n\t\t} catch (FileNotFoundException fileNotFoundException){\n\t\t\t// Assign default object when the file is not found.\n\t\t\tobject[0] = defaultObject;\n\t\t}\n\t\t\n\t\t// Return object\n\t\treturn object[0];\n\t}", "@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "private void loadMap(String path) {\n\t\ttry {\n\t\t\tfor(Player p : players)\tp.clear();\n\t\t\tmap.players = players;\n\t\t\tmap.setPlayerNumber(playerNumber);\n\t\t\tfor(Player p : map.players) {\n\t\t\t\tp.setMap(map);\n\t\t\t\tp.setArmies(map.getInitialArmiesNumber());\n\t\t\t}\n\t\t\tmap.setPlayerNumber(map.players.size());\n\t\t\tmap.load(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadFlights(String path) throws StorageException {\r\n // Get the file contents\r\n String[] lines = readFile(path);\r\n parseFlights(lines);\r\n }", "private static void setPersistedOSMFilesFromSharedPreferences() {\n Set<String> sharedPrefSet = sharedPreferences.getStringSet(PERSISTED_OSM_FILES, loadedOSMFiles);\n persistedOSMFiles = new HashSet<>();\n for (String path : sharedPrefSet) {\n if ((new File(path).exists())) {\n persistedOSMFiles.add(path);\n }\n }\n updateSharedPreferences();\n }", "@Test\n public void testSaveStoredData() throws Exception {\n System.out.println(\"saveStoredData\");\n instance.saveStoredData();\n File f = new File(Store.class.getClassLoader().getResource(\"store.data\").getPath());\n assertTrue(f.isFile());\n }", "public void readFileContent(String path) {\n\t\ttry (FileReader fr = new FileReader(path); BufferedReader br = new BufferedReader(fr);) {\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tStudent student = this.convertStringToStudent(line);\n\t\t\t\tthis.addStudent(student);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"File read failed.\", e);\n\t\t}\n\t}", "@Override\n public void load() {\n }", "Data() throws IOException {\n // Initialise new default path from scratch\n path = Path.of(\"src/main/data/duke.txt\");\n new File(\"src/main/data\").mkdirs();\n new File(path.toString()).createNewFile();\n }", "private void loadGameFiles(){\n\t}" ]
[ "0.7285609", "0.7042441", "0.68076277", "0.6788597", "0.65279114", "0.64664114", "0.6373016", "0.63620496", "0.63494545", "0.63330805", "0.62977386", "0.62905025", "0.62363446", "0.62363213", "0.62150043", "0.62070256", "0.62070256", "0.6202723", "0.6160145", "0.6160145", "0.61399907", "0.613697", "0.6123854", "0.6103507", "0.6103507", "0.6101621", "0.6083595", "0.6080545", "0.6080545", "0.60803384", "0.60680884", "0.606113", "0.60462624", "0.6045976", "0.6038477", "0.6036046", "0.6030846", "0.6030672", "0.60284907", "0.6024526", "0.60149884", "0.5991704", "0.59525114", "0.5948265", "0.59448844", "0.5929165", "0.59224945", "0.59128654", "0.5910954", "0.58935434", "0.58919317", "0.58783937", "0.586249", "0.58536947", "0.5852648", "0.58522606", "0.58455056", "0.5842879", "0.5834141", "0.58255243", "0.58221", "0.5818678", "0.58142227", "0.5813844", "0.581343", "0.5806651", "0.579588", "0.57928133", "0.57906973", "0.57836795", "0.5774826", "0.57733995", "0.57679576", "0.57671684", "0.5766004", "0.57503957", "0.57381743", "0.5733378", "0.5729472", "0.5726854", "0.5726621", "0.57262933", "0.57216096", "0.57190454", "0.56995595", "0.5687735", "0.5682455", "0.5678541", "0.5673911", "0.5668244", "0.56631285", "0.5658545", "0.5658215", "0.56543285", "0.56384826", "0.56260693", "0.5625726", "0.56227046", "0.56182516", "0.5613885", "0.5610484" ]
0.0
-1
this method will transport to the about page
@FXML private void handleAboutButton(ActionEvent event) { Switchable.switchTo("AboutView"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showAbout() {\n\t\t/* track \"About\" */\n\t\ttracker.trackEvent(\"Listings\", \"Click\", \"About\", 0);\n\n\t\tUri uri = Uri.parse(\"http://static.flipzu.com/about-android.html\");\n\t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n\t\tstartActivity(intent);\n\t}", "private void showAbout() {\r\n\t\tshowMessage(\"About\", \" Curtis Baldwin's Intelligent Building\"); // About message created when about button\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// pressed\r\n\t}", "protected void aboutUs(ActionEvent ae) {\n\t\tString info = \"【猿来入此】出品\\n\";\n\t\tinfo += \"网址:http://programmer.ischoolbar.com \\n\";\n\t\tinfo += \"每天更新一个项目,并附带视频教程!\";\n\t\tString[] buttons = {\"迫不及待去看看!\",\"心情不好以后再说!\"};\n\t\tint ret = JOptionPane.showOptionDialog(this, info, \"关于我们\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.DEFAULT_OPTION, new ImageIcon(LoginFrm.class.getResource(\"/images/logo.png\")), buttons, null);\n\t\tif(ret == 0){\n\t\t\t//采用Java 调用系统浏览器打开制定\n\t\t\ttry {\n\t\t\t\tURI uri = new URI(\"http://programmer.ischoolbar.com\");\n\t\t\t\tDesktop.getDesktop().browse(uri);\n\t\t\t\t//Runtime.getRuntime().exec(\"explorer http://programmer.ischoolbar.com\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(this, \"你真是狠心,坏淫!\");\n\t\t}\n\t}", "private void showAboutDialog() {\n\n view.aboutDialog();\n }", "private void openAbout() {\r\n \tIntent intent = new Intent(this, AboutActivity.class);\r\n \tstartActivity(intent);\r\n }", "private void showAbout() {\n toolbar.setTitle(R.string.about);\n AboutFragment aboutFragment = new AboutFragment();\n displaySelectedFragment(aboutFragment);\n }", "public abstract String about();", "public void handleAbout() {\n displayAuxiliaryWindow(aboutWindow);\n }", "@FXML public void showAbout() {\n\t\tPopupMessage.getInstance().showAlert(AlertType.INFORMATION, \n\t\t\t\t\t\t\t\t\t\t\taboutTitle,\n\t\t\t\t\t\t\t\t\t\t\taboutHeader, \n\t\t\t\t\t\t\t\t\t\t\taboutDetails);\n\t}", "protected void aboutUs(ActionEvent ae) {\n\t\tString info =\"欢迎您使用该系统!!!\\n\";\n\t\tinfo +=\"愿为您提供最好的服务!\\n\";\n\t\tinfo +=\"最好的防脱发洗发水!!!\";\n\t\t//JOptionPane.showMessageDialog(this,info);\n\t\tString[] buttons = {\"迫不及待去看看!\",\"心情不好以后再说!\"};\n\t\tint ret=JOptionPane.showOptionDialog(this, info,\"关于我们\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.DEFAULT_OPTION, new ImageIcon(LoginFrm.class.getResource(\"/images/logo.png\")), buttons, null);\n\t\tif(ret==0) \n\t\t{\n\t\t\ttry {\n\t\t\t\tURI uri = new URI(\"https://s.taobao.com/search?q=%E9%98%B2%E8%84%B1%E5%8F%91%E6%B4%97%E5%8F%91%E6%B0%B4&imgfile=&commend=all&ssid=s5-e&search_type=item&sourceId=tb.index&spm=a21bo.2017.201856-taobao-item.1&ie=utf8&initiative_id=tbindexz_20170306\");\n\t\t\t\tDesktop.getDesktop().browse(uri);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(this, \"你真是狠心,坏淫!\");\n\t\t}\n\t}", "public static Result aboutUsPage() {\n\t\treturn ok(views.html.aboutUsPage.render());\n\t}", "void aboutMenuItem_actionPerformed(ActionEvent e) {\n AboutDialog dlg = new AboutDialog(this, \"About InfoFilter Application\", true);\n Point loc = this.getLocation();\n\n dlg.setLocation(loc.x + 50, loc.y + 50);\n dlg.show();\n }", "public void execute(){\r\n\t\tapplicationController.about();\r\n\t}", "public static void goToAboutWindow()\n {\n AboutWindow aboutWindow = new AboutWindow();\n aboutWindow.setVisible(true);\n aboutWindow.setFatherWindow(actualWindow, false);\n }", "public void helpAbout_actionPerformed(ActionEvent e) {\n AboutDialog dlg = new AboutDialog(this, \"About InfoFilter Application\", true);\n Point loc = this.getLocation();\n\n dlg.setLocation(loc.x + 50, loc.y + 50);\n dlg.show();\n }", "private void about() {\n System.out.println(Strings.MAIN_ABOUT_MESSAGE);\n System.out.println();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdialogAbout();\r\n\t\t\t}", "public void processAbout() {\n AppMessageDialogSingleton dialog = AppMessageDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"About This Application\", \"Application Name: Metro Map Maker\\n\"\n + \"Written By: Myungsuk Moon and Richard McKenna\\n\"\n + \"Framework Used: DesktopJavaFramework (by Richard McKenna)\\n\"\n + \"Year of Work: 2017\");\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_about:\n \t \t//Toast.makeText(getApplicationContext(),\"Show About\", Toast.LENGTH_LONG).show();\n \t \tAboutDialog about = new AboutDialog(this);\n \t \tabout.setTitle(\"About Streetview\");\n \t\t\t\tabout.show();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public void showAbout(View view){\n startActivity(intent);\n }", "public void helpAboutAction() {\n new HelpAbout(this.parentFrame);\n }", "public void GoToAbout(View view) {\n Intent intent = new Intent(this, About.class);\n startActivity(intent);\n }", "public static void showAboutUs() throws IOException {\n Main.FxmlLoader(ABOUTUSPAGE_PATH);\n }", "private void dialogAbout() {\n\t\tGraphicalUserInterfaceAbout.start();\r\n\t}", "@FXML\r\n private void handleAbout() {\r\n FxUtil.showAlert(Alert.AlertType.INFORMATION, mainApp.getResourceMessage().getString(\"about.title\"), String.format(mainApp.getResourceMessage().getString(\"about.header\"), Resource.VERSION), String.format(mainApp.getResourceMessage().getString(\"about.text\"), Resource.VERSION));\r\n }", "private void actionOnClicAbout() {\r\n\t\tAboutCalSevWindow aboutWin = new AboutCalSevWindow();\r\n\t\taboutWin.setVisible(true);\r\n\t}", "public static void actionPerformed()\r\n {\r\n AboutWindow.showAboutWindow();\r\n }", "private void aboutHandler() {\n JOptionPane.showMessageDialog(\n this.getParent(),\n \"YetAnotherChessGame v1.0 by:\\nBen Katz\\nMyles David\\n\"\n + \"Danielle Bushrow\\n\\nFinal Project for CS2114 @ VT\");\n }", "protected void aboutUs(ActionEvent arg0) {\n\t\tJOptionPane.showMessageDialog(this,\r\n\t\t\t\t\"A Curriculum Design of DBMS By psiphonc in NOV.2019\");\r\n\t}", "public void about()\n\t{\n\t\treadout.setText(\"Thank you for using haste by Beau Bouchard 2013\");\n\t\toutputText(\"\");\n\t}", "public void aboutApp() {\n\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/AboutApp.fxml\"), I18n.getResourceBundle());\n\n\t\tUtilMethods.createDialog(loader, controller.getStage());\n\n\t}", "void showAbout() {\n\t\tif (aboutScreen == null) {\n\t\t aboutScreen = new Form(\"About AMMS Mansion demo\");\n\t\t aboutScreen.append(\"This MIDlet demonstrates the 3D audio capabilities of AMMS API.\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t aboutScreen.append(\"Copyright (c) 2006 Nokia. All rights reserved.\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t}\n\t\taboutScreen.addCommand(toggleCommand);\n\t\taboutScreen.setCommandListener(this);\n\t\tdisplay.setCurrent(aboutScreen);\n }", "private void openAbout() {\r\n\t\tJDialogAbout jDialogAbout = new JDialogAbout();\r\n\t\tjDialogAbout.setVisible(true);\r\n\t}", "public aboutIF() {\n initComponents();\n \n }", "@RequestMapping(value = {\"/about\"}, method = RequestMethod.GET)\n public String aboutPage(ModelMap model) {\n model.addAttribute(LOGGED_USER, userService.getPrincipal());\n return ABOUT;\n }", "public void onClickAbout(View view) {\n Intent intent = new Intent(this, AboutActivity.class);\n startActivity(intent);\n }", "public void onClickAbout (View v)\n\t{\n\t\tstartActivity (new Intent(getApplicationContext(), AboutViewController.class));\n\t}", "private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}", "@FXML\n private EventHandler<ActionEvent> handleAbout() {\n\t\treturn new EventHandler<ActionEvent>() {\n public void handle(ActionEvent e) {\n \t Alert alert = new Alert(AlertType.INFORMATION);\n\t\t alert.setTitle(messages.getString(\"menu_about\"));\n\t\t alert.setHeaderText(messages.getString(\"menu_about\")+\" \"+messages.getString(\"MainApp_title\"));\n\t\t String about_info = messages.getString(\"about_website\") + \" \" + messages.getString(\"MainApp_website\");\n\t\t alert.setContentText(about_info);\n\t\t alert.showAndWait();\n }\n\t\t};\n }", "public void aboutMenu(ActionEvent actionEvent) {\n anchorHelp.setVisible(true);\n paneNotation.setVisible(false);\n paneAbout.setVisible(true);\n }", "public void ClickAboutUs(View view){\n redirectActivity(this,AboutUs.class);\n }", "@Override\n public void actionPerformed( ActionEvent e ) {\n setContentPanel( about2 );\n }", "@Action\n public void showAboutBox()\n {\n if (aboutBox == null)\n {\n JFrame mainFrame = SWAPdmtApp.getApplication().getMainFrame();\n aboutBox = new SWAPdmtAboutBox(mainFrame);\n aboutBox.setLocationRelativeTo(mainFrame);\n }\n SWAPdmtApp.getApplication().show(aboutBox);\n }", "public AboutAction() {\r\n _dialog = new AboutDialog(this);\r\n }", "@RequestMapping(value = \"about.do\", method = RequestMethod.GET)\n public String getAbout(HttpServletRequest request, Model model) {\n logger.debug(\"About page Controller:\");\n return \"common/about\";\n }", "private void showAbout() {\n JOptionPane.showMessageDialog(this,\n \"TalkBox\\n\" + VERSION,\n \"About TalkBox\",\n JOptionPane.INFORMATION_MESSAGE);\n }", "private void helpAbout() {\n JOptionPane.showMessageDialog(this, new ConsoleWindow_AboutBoxPanel1(), \"About\", JOptionPane.PLAIN_MESSAGE);\n }", "public void handleAbout(ApplicationEvent evt) {\n HelpManager hm = (HelpManager) bio.getManager(HelpManager.class);\n if (hm == null) evt.setHandled(false);\n else {\n evt.setHandled(true);\n hm.helpAbout();\n }\n }", "public void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(MainActivity.this,about.class);\n\t\t intent.setAction(\"about\");\n\t\t showactivity(intent);\n\t\t\t}", "private void jMenu_AboutMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu_AboutMouseClicked\n new About().setVisible(true);\n }", "public void aboutOnClick(View view) {\n // Configure \"About\" dialog\n AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n dialog.setTitle(getResources().getString(R.string.about_title));\n dialog.setCancelable(false);\n dialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Do nothing, just dismiss the dialog\n }\n });\n\n dialog.setMessage(getDeviceReport());\n\n dialog.show();\n }", "public static void prikaziAboutUs() {\r\n\t\tguiAboutUs = new GUIAboutUs(teretanaGui, true);\r\n\t\tguiAboutUs.setLocationRelativeTo(null);\r\n\t\tguiAboutUs.setVisible(true);\r\n\t}", "private void gotoInfo() {\n Intent launchInfo = new Intent(this, Info.class);\n startActivity(launchInfo);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnew AlertDialog.Builder(Portal.this)\n\t\t\t\t.setTitle(R.string.about_me)\n\t\t\t\t.setMessage(R.string.about_me_message)\n\t\t\t\t.setNeutralButton(R.string.close, new DialogInterface.OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.show();\n\t\t\t}", "public void AboutDialog() {\r\n final Dialog dialog = new Dialog(this); // Context, this, etc.\r\n dialog.setContentView(R.layout.about_dialog);\r\n dialog.setTitle(R.string.dialog_title);\r\n\r\n Button dialogButton = (Button) dialog.findViewById(R.id.dialog_cancel);\r\n // if button is clicked, close the custom dialog\r\n dialogButton.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n dialog.dismiss();\r\n }\r\n });\r\n\r\n\r\n dialog.show();\r\n }", "private void displayAboutDialog() {\n final String message = \"AUTHORS\\n\" + \"Kaitlyn Kinerk and Alan Fowler\\n\"\n + \"TCSS 305 - UW Tacoma - 6/8/2016\\n\" + \"\\nIMAGE CREDIT\\n\"\n + \"Background: \"\n + \"http://wallpapercave.com/purple-galaxy-wallpaper\";\n JOptionPane.showMessageDialog(null, message, \"About\", JOptionPane.PLAIN_MESSAGE,\n new ImageIcon(\"icon.gif\"));\n }", "@Override\r\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"个人中心\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t}", "public void setAbout(String about) {\n this.about = about;\n }", "private JFrame showAbout(){\n JFrame aboutFrame = new JFrame(\"About\");\n aboutFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n aboutFrame.setResizable(false);\n aboutFrame.setLocationRelativeTo(frame);\n\n JLabel applicationName = new JLabel(\"Roham-H HTTP Client\");\n JLabel developerName = new JLabel(\"Developer: Roham Hayedi\");\n JLabel developerAUTID = new JLabel(\"ID: 9831107\");\n JLabel developerEmail = new JLabel(\"Email: rohamhayedi@gmail.com\");\n JPanel aboutPanel = new JPanel(new GridLayout(0, 2));\n JPanel aboutMainPanel = new JPanel(new BorderLayout());\n aboutFrame.setContentPane(aboutMainPanel);\n aboutMainPanel.add(applicationName, BorderLayout.NORTH);\n aboutMainPanel.add(aboutPanel, BorderLayout.CENTER);\n aboutPanel.add(developerName);\n aboutPanel.add(developerAUTID);\n aboutPanel.add(developerEmail);\n aboutFrame.pack();\n return aboutFrame;\n }", "public void onAboutItemClick(MenuItem item) {\n AboutActivity fragment = new AboutActivity();\n presentFragment(fragment,\"about\",false);\n }", "@Override\r\n\tpublic void aboutToBeShown() {\n\t\tsuper.aboutToBeShown();\r\n\t}", "public void aboutInit(MenuItem menuItem){\n Intent aboutUsIntent = new Intent(MainActivity.this, about.class);\n startActivity(aboutUsIntent);\n }", "private void showAboutActivity(String name){\n Intent i = new Intent(this, WelcomeActivity.class);\n i.putExtra(\"userName\",name);\n //se muestra la segunda actividad\n startActivity(i);\n\n\n }", "@RequestMapping(value = \"/aboutme\", produces = \"text/html;charset=utf-8\")\n\tpublic String toaboutme(Model model, HttpServletRequest request, HttpServletResponse response,\n\t\t\t@CookieValue(value = \"city\", defaultValue = \"-1\") int city) {\n\t\t\n\t\treturn \"index_menu/aboutme\";\n\t}", "public String getAbout();", "@RequestMapping(value = \"/about\")\n\tpublic ModelAndView index() {\n\t\treturn new ModelAndView(\"pepco.about\");\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.about);\r\n\t}", "public void showAboutWindow() {\n /*\n * Note: on Windows, this is called from the Windows system tray\n * handler thread (created in the Windows DLL), and not from the\n * Swing Event handler thread. It is unsafe to call\n * GUIMediator.shutdownAboutWindow();\n * directly as Swing is not synchronized!\n * Instead, we should create an AWT Event and post it to the\n * default Toookit's EventQueue, and the application should\n * implement a Listener for that Event.\n */\n SwingUtilities.invokeLater(\n new Runnable() {\n public void run() {\n GUIMediator.showAboutWindow();\n }\n });\n }", "@Click public void aboutEmailButton() {\n\n Intent emailIntent = new Intent(\n Intent.ACTION_SENDTO, Uri.parse(\"mailto:\" + Uri.encode(EMAIL))\n );\n //emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n //emailIntent.putExtra(Intent.EXTRA_TEXT, body);\n\n //startActivity(emailIntent);\n //startActivity(Intent.createChooser(emailIntent, \"Send an email\"));\n\n try {\n startActivity(emailIntent);\n } catch (ActivityNotFoundException e) {\n app.toasty(R.string.error_no_email_client);\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent =new Intent();\n\t\t\t\tintent.setClass(mContext, AboutActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public static void navigateToAboutYou() throws Exception{\t\r\n\t\ttestInfo.log(Status.INFO, \"Navigate to About You page\");\r\n\t\tIWanna.waitForElement(\"linkTermsAndConditions\", 10);\r\n\t\tIWanna.click(\"linkTermsAndConditions\");\r\n\t\tIWanna.wait(1);\r\n\t\tIWanna.click(\"btnDone\"); \r\n\t\tIWanna.click(\"cbAcceptTerms\");\r\n\t\tIWanna.click(\"btnContinue\");\r\n\t\tIWanna.waitForElement(\"aboutYouHeader\", 5);\r\n\t\tscreenShotPath = Executor.capture();\r\n\t\tif (IWanna.isElementPresent(\"aboutYouHeader\")){\t\t\t\r\n\t\t\ttestInfo.log(Status.PASS, \"Navigation to About You page was successful. \" + testInfo.addScreenCaptureFromPath(screenShotPath));\r\n\t\t\tdriver.switchTo().defaultContent();\r\n\t\t}\r\n\t\telse{\r\n\t\t\ttestInfo.log(Status.FAIL, \"Navigation to About You page failed. \" + testInfo.addScreenCaptureFromPath(screenShotPath));\r\n\t\t}\t\r\n\t\tAssert.assertTrue(driver.findElement(By.xpath(pro.getProperty(\"aboutYouHeader\"))).isDisplayed());\t\t\t\t\t\t\r\n\t}", "public About() {\n initComponents();\n }", "public void jMenuHelpAbout_actionPerformed(ActionEvent e) {\n\t\tMainFrame_AboutBox dlg = new MainFrame_AboutBox(this);\n\t\tDimension dlgSize = dlg.getPreferredSize();\n\t\tDimension frmSize = getSize();\n\t\tPoint loc = getLocation();\n\t\tdlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);\n\t\tdlg.setModal(true);\n\t\tdlg.show();\n\t}", "@GetMapping(\"/about\")\n\tpublic String showAbout() {\n\t\treturn \"about\";\n\t}", "@Override\r\n public void doHelpAction() {\n BIReportService.getInstance().traceHelpClick(project.getBasePath(), ConversionHelpEnum.PATH_SETTING);\r\n\r\n ApplicationManager.getApplication().invokeLater(() -> {\r\n BrowserUtil.browse(allianceDomain + HmsConvertorBundle.message(\"directory_url\"));\r\n }, ModalityState.any());\r\n }", "public String getAbout(){\n return aboutMe;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == R.id.action_Index)\n {\n Intent Intent = new Intent();\n Intent.setClass(this, MainActivity.class);\n startActivity(Intent);\n }\n else if (id == R.id.action_settings) {\n return true;\n }\n else if(id == R.id.action_about)\n {\n AlertDialog.Builder AuthorAbout = new AlertDialog.Builder(this);\n\n AuthorAbout.setTitle(\"關於本系統作者\");\n AuthorAbout.setMessage(\"管理員 歐晉佑\");\n\n DialogInterface.OnClickListener AboutListener = new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface di,int i)\n {\n Toast t = Toast.makeText(SystemIndexActivity.this,\"Hellow\",Toast.LENGTH_SHORT);\n t.show();\n }\n };\n AuthorAbout.setPositiveButton(\"我了解了\", AboutListener);\n AuthorAbout.show();\n }\n else if (id == R.id.action_reset)\n {\n\n }\n return super.onOptionsItemSelected(item);\n }", "public void setAbout(String aboutMessage) {\n this.about = aboutMessage;\n }", "public String getAbout() {\n return about;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.action_about) {\n\t\t\taboutDialog.show();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "private void aboutButtonActionPerformed(java.awt.event.ActionEvent evt) {\r\n\t\t\tAboutBox aboutBox = new AboutBox(mazeFrame, true);\r\n\t\t\taboutBox.setVisible(true);\r\n\t\t}", "public void tohome (View view){\n Intent i = new Intent(this,Intro.class);\n startActivity(i);\n }", "public String getAbout() {\n return about;\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(HelpActivity.this, HomeActivity.class);\n startActivity(i);\n }", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL + \"support\");\r\n }", "@FXML\n private void aboutMenuItem() {\n\n // Creating an alert dialog\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"About\");\n alert.setHeaderText(\"Poster Grabber 1.0\");\n alert.setContentText(\"Poster Grabber is a very simple tool that grabs movie's poster in any desired quality.\\nIt's highly dependant on TheMovieDB API, and won't function without an internet connection.\");\n alert.initOwner(primaryStage);\n\n // Setting custom style\n DialogPane dialogPane = alert.getDialogPane();\n dialogPane.getStylesheets().add(getClass().getResource(\"/AboutDialog.css\").toExternalForm());\n dialogPane.getStyleClass().add(\"myDialog\");\n\n // Displaying the alert dialog\n alert.show();\n }", "public AboutAction(CyApplicationManager appMgr,CySwingApplication swingApp) {\n\t\tsuper(Messages.AC_ABOUT,appMgr,swingApp);\n\t\tsetPreferredMenu(\"Plugins.\" + Messages.AC_MENU_ANALYSIS);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.about) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "public void homeButtonClicked(ActionEvent event) throws IOException {\n Parent homeParent = FXMLLoader.load(getClass().getResource(\"Home.fxml\"));\n Scene homeScene = new Scene(homeParent, 1800, 700);\n\n //gets stage information\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n window.setTitle(\"Home Page\");\n window.setScene(homeScene);\n window.show();\n }", "public void onClick(View v) {\n\t\tIntent in1=new Intent(getApplicationContext(),About.class);\n\t\tstartActivity(in1);\n\t\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.about) {\n\t\t\tAboutDialogFragment aboutDialogFragment=new AboutDialogFragment();\n\t\t\taboutDialogFragment.show(getSupportFragmentManager(), ABOUT_DIALOG_TAG);\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "public void goToUserPage(ActionEvent event) throws IOException { //this is going to close the current window and open a new window\n\t\t//this should also display the User Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/User_Page.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"User Page\");\n\t\tapp_stage.show();\n\t}", "public static void showAboutWindow()\n {\n if (aboutWindow == null)\n {\n aboutWindow = new AboutWindow(null);\n\n /*\n * When the global/shared AboutWindow closes, don't keep a reference\n * to it and let it be garbage-collected.\n */\n aboutWindow.addWindowListener(new WindowAdapter()\n {\n @Override\n public void windowClosed(WindowEvent e)\n {\n if (aboutWindow == e.getWindow())\n aboutWindow = null;\n }\n });\n }\n aboutWindow.setVisible(true);\n }", "public void onClickAbout (View v)\n{\n startActivity (new Intent(getApplicationContext(), AboutActivity.class));\n}", "public void goToHome() throws IOException {\n\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"index.xhtml\");\n\t}", "private void openHome() {\n Intent intent = new Intent(this, WelcomeActivity.class);\n startActivity(intent);\n\n finish();\n }", "public AboutPanel() {\n super();\n initialize();\n }", "public void goToFriendListPage(ActionEvent event) throws IOException { //this is going to close the current window and open a new window\n\t\t//this should also display the User Page\n\t\tParent user_page = FXMLLoader.load(getClass().getResource(\"/view/FriendList_Page.fxml\"));\n\t\tScene userpage_scene = new Scene(user_page);\n\t\tStage app_stage = (Stage) ((Node) (event.getSource())).getScene().getWindow();\n\t\tapp_stage.setScene(userpage_scene);\n\t\tapp_stage.setTitle(\"Friend List\");\n\t\tapp_stage.show();\n\t}", "private void CallHomePage() {\n\t\t\n\t\tfr = new FragmentCategories();\n\t\tFragmentManager fm = getFragmentManager();\n\t\tFragmentTransaction fragmentTransaction = fm.beginTransaction();\n\t\tfragmentTransaction.replace(R.id.fragment_place, fr);\n\t\tfragmentTransaction.addToBackStack(null);\n\t\tfragmentTransaction.commit();\n\n\t}", "public About() {\n \n Toolkit tk = Toolkit.getDefaultToolkit();\n Dimension screen = tk.getScreenSize();\n int x = Math.max(0, (screen.width - this.getWidth()) / 2);\n int y = Math.max(0, (screen.height -this.getHeight()) / 2);\n this.setLocation(x-230, y-230);\n \n initComponents();\n }" ]
[ "0.764873", "0.7327289", "0.71743584", "0.7154697", "0.7118258", "0.7108712", "0.70830536", "0.7074829", "0.70395076", "0.70205104", "0.70105606", "0.697863", "0.69709855", "0.6953073", "0.69470096", "0.6936091", "0.68871856", "0.6874939", "0.68305314", "0.6793497", "0.67746145", "0.6763379", "0.67560375", "0.67196107", "0.66970104", "0.6695153", "0.66891193", "0.6661568", "0.66444576", "0.6628513", "0.66177726", "0.66102946", "0.66009724", "0.6588413", "0.6578541", "0.65708005", "0.65703726", "0.6552626", "0.6525594", "0.6520722", "0.6487004", "0.64776987", "0.6463083", "0.6448338", "0.6427692", "0.6418567", "0.63630265", "0.6350425", "0.6339606", "0.63174456", "0.6296791", "0.629653", "0.629021", "0.62898415", "0.62804437", "0.6262245", "0.622319", "0.6215184", "0.62119275", "0.62097764", "0.6174283", "0.6167523", "0.61667264", "0.61605257", "0.61561406", "0.6129166", "0.6126667", "0.6116128", "0.61136293", "0.6094878", "0.6094418", "0.6087133", "0.6076722", "0.6071886", "0.6064393", "0.60541767", "0.60527796", "0.6049767", "0.6043637", "0.6031647", "0.60290295", "0.6025676", "0.6023742", "0.6018865", "0.6017854", "0.60167164", "0.60144424", "0.6007985", "0.6006651", "0.5993838", "0.5993348", "0.59927654", "0.5977162", "0.5977111", "0.5972172", "0.59547615", "0.59499663", "0.59408456", "0.59393764", "0.592818" ]
0.6578118
35
Compteur protected int max; //Compteur max
public Counter() { //this.max = max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final int getMax() {\n\treturn(this.max);\n }", "public abstract int getMaximumValue();", "public int getMaxValue(){\n\t\treturn maxValue;\n\t}", "int getMaximum();", "public int getMaximum() {\r\n return max;\r\n }", "public int getMaxValue() {\n return maxValue;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "int getMax( int max );", "public int getMax()\n {\n return 0;\n }", "private void setMax(int max) { this.max = new SimplePosition(false,false,max); }", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "int getMax();", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "void setMaximum(int max);", "public int getChromNum()\r\n {\r\n return max;\r\n }", "public int getMaximumInteger() {\n/* 244 */ return (int)this.max;\n/* */ }", "public int getMax(){\n return tab[rangMax()];\n }", "public void setMax(int max) {\n this.max = max;\n }", "public void setMax(int max) {\n this.max = max;\n }", "public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}", "public int max() {\n\t\treturn 0;\n\t}", "protected final Comparable getMax()\r\n {\r\n return myMax;\r\n }", "public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }", "public int getMaxIntValue();", "public int getMax() {\n\t\treturn mMax;\n\t}", "int max();", "public void setMaximum(Number max) {\n this.max = max;\n }", "public int getMaximum() {\n return this.iMaximum;\n }", "public void SetMaxVal(int max_val);", "protected final void setMax(Comparable max)\r\n {\r\n myMax = max;\r\n }", "public int getMaxAmount() {\n return _max;\n }", "int getMaxInt();", "@In Integer max();", "@In Integer max();", "@Override\n\tpublic int max() {\n\t\treturn 4;\n\t}", "public Long getMaxValue() {\n return maxValue;\n }", "public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }", "void setMaxValue();", "public int GetMaxVal();", "public void setMax(int max)\n\t{\n\t\tif (max < 0)\n\t\t\tthrow new IllegalArgumentException(\"max < 0\");\n\t\tthis.max = max;\n\t}", "public int getMaxActive();", "public abstract T getMaxValue();", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }", "public Integer max() {\n return this.max;\n }", "public void setMaxAmount(int max) {\n _max = max;\n }", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "public void setMaxValue(int maxValue) {\n this.maxValue = maxValue;\n }", "public long getMax() {\n return m_Max;\n }", "public double getMaximum() {\n return (max);\n }", "public abstract int maxIndex();", "public Max()\r\n {\r\n }", "public static void setMaxAu(int max) {\n\t\tmaxAu = max;\n\t}", "public int getMaximumNumber() {\n\t\treturn 99999;\n\t}", "E maxVal();", "public void setMaxAlturaCM(float max);", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "double getMax();", "double getMax();", "public void setMax ( Point max ) {\r\n\r\n\tsetB ( max );\r\n }", "public String getMaxValue () {\n return maxValue;\n }", "public E max() {\n\n }", "public Object getMaxValue() {\n\t\treturn null;\n\t}", "public Quantity<Q> getMax() {\n return max;\n }", "public int getMaxAmount() {\n return maxAmount;\n }", "public M csmiIdMax(Object max){this.put(\"csmiIdMax\", max);return this;}", "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "public Point getMax () {\r\n\r\n\treturn getB();\r\n }", "public long maxValue() {\n return 0;\n }", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "public int donnePoidsMax() { return this.poidsMax; }", "@Override\r\n\tpublic String getReferenceKey() {\n\t\treturn \"max\";\r\n\t}", "public int getDMAX() {\n\t\t\treturn DMAX;\r\n\t\t}", "public String getMax() {\n return max;\n }", "@Override\r\n\tpublic int randOfMax(int max) {\n\t\tRandom r = new Random();\r\n\t\t\r\n\t\tint i = r.nextInt(max);\r\n\t\twhile(0==i){//the restriction of the Random Number\r\n\t\t\ti = r.nextInt(max);\r\n\t\t}\r\n\t\treturn i;\r\n\t}", "int maxNoteValue();", "@Test\n\tpublic void intMax() {\n\t\tint actualValue = Maximum.testMaximum(30, 550, 5);\n\t\tAssert.assertEquals(550, actualValue);\n\t}", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "public int getVitesseMax()\t{\r\n \treturn this.vitesseMax;\r\n }", "public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}", "abstract int getMaxLevel();", "public double getMaximumValue() { return this.maximumValue; }", "protected String getMaximum()\n {\n return maximum;\n }", "public M csmiPlaceMax(Object max){this.put(\"csmiPlaceMax\", max);return this;}", "double getMaxAmountl() {\n\t\treturn MAX_AMOUNT;\n\t}", "public void setMaxValue(int x) {\r\n\t\tmaxValue = x;\r\n\t}", "public int getMaxGenerations() { return maxGenerations; }", "public int getSumaMax() {\r\n\t\treturn sumaMax;\r\n\t}", "public int getxMax() {\n\t\treturn xMax;\n\t}", "int getMaxCount();", "int getMaxCount();", "int askForTempMax();" ]
[ "0.83267564", "0.8082314", "0.7988196", "0.79821366", "0.7976495", "0.79334027", "0.7855463", "0.7855463", "0.7855463", "0.7791012", "0.7788363", "0.77808267", "0.7771531", "0.7771531", "0.77697027", "0.7764885", "0.7692016", "0.7667361", "0.7661412", "0.7618769", "0.758968", "0.758968", "0.75770783", "0.7543791", "0.7524675", "0.7508647", "0.74905336", "0.74691", "0.7438327", "0.74287486", "0.7426261", "0.74055344", "0.73391557", "0.7326964", "0.7314922", "0.73145205", "0.73145205", "0.7293401", "0.726003", "0.7250764", "0.7250369", "0.7249932", "0.72498953", "0.72188073", "0.7202339", "0.7198412", "0.71592206", "0.7136435", "0.71291804", "0.71042806", "0.71030563", "0.70967215", "0.7094817", "0.70943785", "0.7079926", "0.7068669", "0.706685", "0.7066737", "0.7059576", "0.7055364", "0.70505875", "0.70505875", "0.703566", "0.7030186", "0.7012419", "0.70034677", "0.6998729", "0.6976319", "0.69695085", "0.69614327", "0.6959745", "0.6951763", "0.6945565", "0.69263023", "0.6905572", "0.6903769", "0.68872315", "0.688039", "0.68779254", "0.6873853", "0.6853741", "0.68509096", "0.68509096", "0.68509096", "0.68509096", "0.68509096", "0.68509096", "0.6842937", "0.6842869", "0.68289316", "0.682826", "0.6822259", "0.68149537", "0.681477", "0.6813445", "0.68061805", "0.6805745", "0.68042445", "0.6802825", "0.6802825", "0.67980313" ]
0.0
-1
Pass reference to the requestsQueue to the RequestHandler
public RequestHandler(ThreadPoolExecutor taskExecutor) { super(); this.taskExecutor = taskExecutor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void requestHandler(Object context)\n {\n final String funcName = \"requestHandler\";\n @SuppressWarnings(\"unchecked\")\n TrcRequestQueue<Request>.RequestEntry entry = (TrcRequestQueue<Request>.RequestEntry) context;\n Request request = entry.getRequest();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.TASK, \"request=%s\", request);\n }\n\n request.canceled = entry.isCanceled();\n if (!request.canceled)\n {\n if (request.readRequest)\n {\n request.buffer = readData(request.address, request.length);\n if (debugEnabled)\n {\n if (request.buffer != null)\n {\n dbgTrace.traceInfo(funcName, \"readData(addr=0x%x,len=%d)=%s\",\n request.address, request.length, Arrays.toString(request.buffer));\n \n }\n }\n }\n else\n {\n request.length = writeData(request.address, request.buffer, request.length);\n }\n }\n\n if (request.completionEvent != null)\n {\n request.completionEvent.set(true);\n }\n\n if (request.completionHandler != null)\n {\n request.completionHandler.notify(request);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.TASK);\n }\n }", "private void retainQueue() {\n if (mRequestQueue == null) {\n mRequestQueue = new RequestQueue(mProxy.getContext());\n }\n mQueueRefCount++;\n }", "private RequestQueue getRequestQueue() {\n if (mRequestQueue == null) {\n mRequestQueue = Volley.newRequestQueue(getApplicationContext());\n }\n\n return mRequestQueue;\n }", "public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }", "public RequestQueue getRequestQueue() {\n if (requestQueue == null) { // If RequestQueue is null the initialize new RequestQueue\n requestQueue = Volley.newRequestQueue(appContext.getApplicationContext());\n }\n return requestQueue; // Return RequestQueue\n }", "public void setRequestQueue(BlockingQueue q)\n {\n queue = q;\n }", "public void handleRequest(Request req) {\n\n }", "public void addQueue(){\n StringRequest stringRequest = new StringRequest(Request.Method.GET, page.getUrl(),\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //textView.setText(getBody(response));\n textView.setText(HtmlCompat.fromHtml(getBody(response),0));\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n textView.setText(\"Invalid URL\");\n }\n });\n\n queue.add(stringRequest);\n }", "public RequestQueue getRequestQueue() {\n if (mRequestQueue == null) {\n mRequestQueue = Volley.newRequestQueue(getApplicationContext());\n }\n\n return mRequestQueue;\n }", "public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }", "public <T> void addToRequestQueue(Request<T> request) {\n getRequestQueue().add(request); // Add the specified request to the request queue\n }", "public HttpRequestThread(RequestQueue reqQueue) throws Exception {\n\t\t\tthis.reqQueue = reqQueue;\n\t\t\tthis.port = reqQueue.server.port;\n\t\t\t//this.noArgs = reqQueue.server.noArgs;\n\t\t\tthis.sessions = reqQueue.server.sessions;\n\t\t\tthis.webApps = reqQueue.server.webApps;\n\t\t}", "public <T> void addToRequestQueue(Request<T> req) {\n req.setTag(TAG);\n getRequestQueue().add(req);\n }", "public <T> void addToRequestQueue(Request<T> req) {\n req.setTag(TAG);\n getRequestQueue().add(req);\n }", "public <T> void addToRequestQueue(Request<T> req) {\n req.setTag(TAG);\n getRequestQueue().add(req);\n }", "public void onQueue();", "public void run() {\n\t\t\t\twhile (queue.size() > 0) {\n\t\t\t\t\tJobQueue urlList = queue.poll();\n\t\t\t\t\tdoRequests(urlList);\n\t\t\t\t}\n\t\t\t}", "public static void initQueue(Context context) {\n if (requestQueue == null) {\n requestQueue = Volley.newRequestQueue(context.getApplicationContext());\n }\n }", "@Provides\n @Singleton\n public RequestQueue provideRequestQueue(Context context) {\n return Volley.newRequestQueue(context);\n }", "public void addRequest(T request) {\n\t\tinputQueue.add(request);\n\t}", "private IOHandler(){\n download_queue = new ArrayList<>(); \n initialize();\n }", "public <T> void addToRequestQueue(Request<T> req) {\n // set the default tag if tag is empty\n req.setTag(TAG);\n\n getRequestQueue().add(req);\n }", "public RequestUrlHandler() {\n // requestService = SpringContextHolder.getBean(ScfRequestService.class);\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"application/json\");\n try (PrintWriter out = response.getWriter()) {\n JSONArray jArr = new JSONArray();\n ArrayList<Queue> queueList = QueueDAO.getQueue();\n for(Queue q : queueList){\n JSONObject queue = new JSONObject();\n queue.put(\"patientID\", q.getPatientID());\n queue.put(\"visitID\", q.getVisitID());\n queue.put(\"timestamp\", q.getTimestamp());\n queue.put(\"status\", q.getStatus());\n queue.put(\"name\", q.getName());\n jArr.add(queue);\n }\n out.println(jArr.toString());\n response.setStatus(HttpServletResponse.SC_OK);\n }\n }", "BaseRequest<T> queue(RequestQueue queue) {\n queue.add(this);\n return this;\n }", "public void cancelAndReleaseQueue() {\n if (mRequestHandle != null) {\n mRequestHandle.cancel();\n mRequestHandle = null;\n }\n releaseQueue();\n }", "public void handleRequest () {\n\t// TODO: move this method to separate thread, \n\t// TODO: it may block in many places.\n\tRequestHandler rh = new RequestHandler ();\t\n\tCache<HttpHeader, HttpHeader> cache = proxy.getCache ();\n\tString method = request.getMethod ();\n\tif (!method.equals (\"GET\") && !method.equals (\"HEAD\"))\n\t cache.remove (request);\n\t\t\n\trh.entry = cache.getEntry (request);\n\tif (rh.entry != null)\n\t rh.dataHook = rh.entry.getDataHook (proxy.getCache ());\n\n\tcheckNoStore (rh.entry);\n\tif (!rh.cond.checkMaxStale (request, rh) && checkMaxAge (rh))\n\t setMayUseCache (false);\n\t\n\trh.conditional = rh.cond.checkConditional (this, request, rh);\n\tif (partialContent (rh)) \n\t fillupContent (rh);\n\tcheckIfRange (rh);\n\n\tboolean mc = getMayCache ();\n\tif (getMayUseCache ()) {\n\t // in cache?\n\t if (rh.entry != null) {\n\t\tCacheChecker cc = new CacheChecker ();\n\t\tif (cc.checkCachedEntry (this, request, rh)) {\n\t\t return;\n\t\t}\n\t }\n\t}\n\t\n\tif (rh.content == null) {\n\t // Ok cache did not have a usable resource, \n\t // so get the resource from the net.\n\t // reset value to one before we thought we could use cache...\n\t mayCache = mc;\n\t SWC swc = new SWC (this, proxy.getOffset (), request, requestBuffer,\n\t\t\t tlh, clientResourceHandler, rh);\n\t swc.establish ();\n\t} else {\n\t resourceEstablished (rh);\n\t}\n }", "public void queueEstimationRequest(Request req) {\n queue.add(req);\n\n if (queueNotEmpty.availablePermits() <= 0) {\n // try to not issue too many permits (>1 make the worker spin needlessly)\n queueNotEmpty.release();\n }\n }", "private void getData() {\n\n //Adding the method to the queue by calling the method getDataFromServer\n requestQueue.add(getDataFromServer(pos));\n\n }", "void onSqsRequestAttempt(String internalQueueName);", "private void workOnQueue() {\n }", "protected void onQueued() {}", "public void passReq(Packet request){\r\n\t\ttry { bQueue.put(request);\r\n\t\t} catch (InterruptedException e) { e.printStackTrace(); }\r\n\t}", "@Override\n public void addRequest(Request<?> request, Object tag) {\n request.setTag(tag);\n getRequestQueue().add(request);\n }", "void handleRequest();", "@Override\n public void forward(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {\n\n HttpServletRequest request = (HttpServletRequest) servletRequest;\n HttpServletResponse response = (HttpServletResponse) servletResponse;\n\n response.resetBuffer();\n\n if (request.getDispatcherType().equals(DispatcherType.ASYNC)) {\n try (DefaultWebApplicationRequest asyncRequest = new DefaultWebApplicationRequest()) {\n asyncRequest.setWebApplication(servletEnvironment.getWebApplication());\n asyncRequest.setContextPath(request.getContextPath());\n asyncRequest.setDispatcherType(DispatcherType.ASYNC);\n asyncRequest.setAsyncSupported(servletEnvironment.asyncSupported);\n\n if (path != null) {\n setForwardAttribute(request, asyncRequest, AsyncContext.ASYNC_CONTEXT_PATH);\n setForwardAttribute(request, asyncRequest, AsyncContext.ASYNC_PATH_INFO);\n setForwardAttribute(request, asyncRequest, AsyncContext.ASYNC_QUERY_STRING);\n setForwardAttribute(request, asyncRequest, AsyncContext.ASYNC_REQUEST_URI);\n setForwardAttribute(request, asyncRequest, AsyncContext.ASYNC_SERVLET_PATH);\n\n String servletPath = !path.contains(\"?\") ? path : path.substring(0, path.indexOf(\"?\"));\n asyncRequest.setServletPath(servletPath);\n\n String queryString = !path.contains(\"?\") ? null : path.substring(path.indexOf(\"?\") + 1);\n asyncRequest.setQueryString(queryString);\n\n } else {\n asyncRequest.setServletPath(\"/\" + servletEnvironment.getServletName());\n }\n\n CurrentRequestHolder currentRequestHolder = (CurrentRequestHolder) request.getAttribute(CURRENT_REQUEST_ATTRIBUTE);\n if (currentRequestHolder != null) {\n currentRequestHolder.setRequest(asyncRequest);\n asyncRequest.setAttribute(CURRENT_REQUEST_ATTRIBUTE, currentRequestHolder);\n }\n\n try {\n servletEnvironment.getWebApplication().linkRequestAndResponse(asyncRequest, servletResponse);\n servletEnvironment.getServlet().service(asyncRequest, servletResponse);\n servletEnvironment.getWebApplication().unlinkRequestAndResponse(asyncRequest, servletResponse);\n } catch (IOException | ServletException exception) {\n throw exception;\n } finally {\n if (currentRequestHolder != null) {\n currentRequestHolder.setRequest(request);\n }\n }\n response.flushBuffer();\n }\n } else {\n try (DefaultWebApplicationRequest forwardedRequest = new DefaultWebApplicationRequest()) {\n forwardedRequest.setWebApplication(servletEnvironment.getWebApplication());\n forwardedRequest.setContextPath(request.getContextPath());\n\n if (path != null) {\n setForwardAttribute(request, forwardedRequest, RequestDispatcher.FORWARD_CONTEXT_PATH);\n setForwardAttribute(request, forwardedRequest, RequestDispatcher.FORWARD_PATH_INFO);\n setForwardAttribute(request, forwardedRequest, RequestDispatcher.FORWARD_QUERY_STRING);\n setForwardAttribute(request, forwardedRequest, RequestDispatcher.FORWARD_REQUEST_URI);\n setForwardAttribute(request, forwardedRequest, RequestDispatcher.FORWARD_SERVLET_PATH);\n\n String servletPath = !path.contains(\"?\") ? path : path.substring(0, path.indexOf(\"?\"));\n forwardedRequest.setServletPath(servletPath);\n\n String queryString = !path.contains(\"?\") ? null : path.substring(path.indexOf(\"?\") + 1);\n forwardedRequest.setQueryString(queryString);\n\n } else {\n forwardedRequest.setServletPath(\"/\" + servletEnvironment.getServletName());\n }\n\n CurrentRequestHolder currentRequestHolder = (CurrentRequestHolder) request.getAttribute(CURRENT_REQUEST_ATTRIBUTE);\n if (currentRequestHolder != null) {\n currentRequestHolder.setRequest(forwardedRequest);\n forwardedRequest.setAttribute(CURRENT_REQUEST_ATTRIBUTE, currentRequestHolder);\n }\n\n try {\n servletEnvironment.getWebApplication().linkRequestAndResponse(forwardedRequest, servletResponse);\n servletEnvironment.getServlet().service(forwardedRequest, servletResponse);\n servletEnvironment.getWebApplication().unlinkRequestAndResponse(forwardedRequest, servletResponse);\n } catch (IOException | ServletException exception) {\n throw exception;\n } finally {\n if (currentRequestHolder != null) {\n currentRequestHolder.setRequest(request);\n }\n }\n response.flushBuffer();\n }\n }\n }", "public AsynchronousReplier(String requestReceiverQueue) throws Exception {\n super();\n gateway = new MessagingGateway(requestReceiverQueue);\n gateway.setListener(new MessageListener() {\n\n @Override\n public void onMessage(Message message) {\n onRequest((ObjectMessage) message);\n }\n });\n this.activeRequests = new Hashtable<Serializable, Message>();\n }", "public void incrementActiveRequests() \n {\n ++requests;\n }", "public void resendRequestingQueue() {\n Logger.m1416d(TAG, \"Action - resendRequestingQueue - size:\" + this.mRequestingQueue.size());\n printRequestingQueue();\n printRequestingCache();\n while (true) {\n Requesting requesting = (Requesting) this.mRequestingQueue.pollFirst();\n if (requesting == null) {\n return;\n }\n if (requesting.request.getCommand() == 2) {\n this.mRequestingQueue.remove(requesting);\n this.mRequestingCache.remove(requesting.request.getHead().getRid());\n } else {\n requesting.retryAgain();\n sendCommandWithLoggedIn(requesting);\n }\n }\n }", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n req.setRetryPolicy(new DefaultRetryPolicy(5000, 2, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n getRequestQueue().add(req);\n }", "private synchronized void onRequest(ObjectMessage message) {\n try {\n Serializable request = message.getObject(); //serializer.requestFromString(message.getText());\n activeRequests.put(request, message);\n requestListener.receivedRequest(request);\n } catch (JMSException ex) {\n Logger.getLogger(AsynchronousReplier.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void addToMyRequestQueue(Request request) throws InvalidObjectException{\n try {\n getMyRequestQueue().add(request); //Adds request to the internal RequestQueue of myInstance\n } catch (InvalidObjectException e) {\n throw e;\n }\n }", "@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}", "public interface ResponseHandlerInterface {\n\n /**\n * Returns data whether request completed successfully\n *\n * @param response HttpResponse object with data\n * @throws java.io.IOException if retrieving data from response fails\n */\n void sendResponseMessage(HttpResponse response) throws IOException;\n\n /**\n * Notifies callback, that request started execution\n */\n void sendStartMessage();\n\n /**\n * Notifies callback, that request was completed and is being removed from thread pool\n */\n void sendFinishMessage();\n\n /**\n * Notifies callback, that request (mainly uploading) has progressed\n *\n * @param bytesWritten number of written bytes\n * @param bytesTotal number of total bytes to be written\n */\n void sendProgressMessage(int bytesWritten, int bytesTotal);\n\n /**\n * Notifies callback, that request was cancelled\n */\n void sendCancelMessage();\n\n /**\n * Notifies callback, that request was handled successfully\n *\n * @param statusCode HTTP status code\n * @param headers returned headers\n * @param responseBody returned data\n */\n void sendSuccessMessage(int statusCode, Header[] headers, byte[] responseBody);\n\n /**\n * Returns if request was completed with error code or failure of implementation\n *\n * @param statusCode returned HTTP status code\n * @param headers returned headers\n * @param responseBody returned data\n * @param error cause of request failure\n */\n void sendFailureMessage(int statusCode, Header[] headers, byte[] responseBody, Throwable error);\n\n /**\n * Notifies callback of retrying request\n *\n * @param retryNo number of retry within one request\n */\n void sendRetryMessage(int retryNo);\n\n /**\n * Returns URI which was used to request\n *\n * @return uri of origin request\n */\n public URI getRequestURI();\n\n /**\n * Returns Header[] which were used to request\n *\n * @return headers from origin request\n */\n public Header[] getRequestHeaders();\n\n /**\n * Helper for handlers to receive Request URI info\n *\n * @param requestURI claimed request URI\n */\n public void setRequestURI(URI requestURI);\n\n /**\n * Helper for handlers to receive Request Header[] info\n *\n * @param requestHeaders Headers, claimed to be from original request\n */\n public void setRequestHeaders(Header[] requestHeaders);\n\n /**\n * Can set, whether the handler should be asynchronous or synchronous\n *\n * @param useSynchronousMode whether data should be handled on background Thread on UI Thread\n */\n void setUseSynchronousMode(boolean useSynchronousMode);\n\n /**\n * Returns whether the handler is asynchronous or synchronous\n *\n * @return boolean if the ResponseHandler is running in synchronous mode\n */\n boolean getUseSynchronousMode();\n}", "public HandlerExecutionChain getHandler(HttpServletRequest request) {\n\t\tString url = request.getServletPath();\n\t\tSystem.out.println(url+\" 123\");\n\t\tController ctl = (Controller) ApplicationContext.getBean(url);\n\t\tHandlerExecutionChain chain = new HandlerExecutionChain();\n\t\tchain.setHandler(ctl);\n\t\treturn chain;\n\t}", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n req.setRetryPolicy(new DefaultRetryPolicy(90 * 1000, 0, 1.0f));\n getRequestQueue().add(req);\n }", "Object handle(Object request);", "public void setHttpRequest( HttpRequest req ) {\r\n\trequest=req;\r\n }", "static QueueDispatcher getURLReplacingQueueDispatcher(final String url) {\n final QueueDispatcher dispatcher = new QueueDispatcher() {\n protected final BlockingQueue<MockResponse>\n responseQueue =\n new LinkedBlockingQueue<MockResponse>();\n\n @Override\n public MockResponse dispatch(RecordedRequest request) throws InterruptedException {\n MockResponse response = responseQueue.take();\n if (response.getBody() != null) {\n String newBody = new String(response.getBody()).replace(\":\\\"URL\", \":\\\"\" + url);\n response = response.setBody(newBody);\n }\n return response;\n }\n\n @Override\n public void enqueueResponse(MockResponse response) {\n responseQueue.add(response);\n }\n };\n\n return dispatcher;\n }", "@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n getRequestQueue().add(req);\n }", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n getRequestQueue().add(req);\n }", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n getRequestQueue().add(req);\n }", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n getRequestQueue().add(req);\n }", "protected abstract void nextRequest ();", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n req.setRetryPolicy(new DefaultRetryPolicy(20 * 1000, 0,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n\n getRequestQueue().add(req);\n }", "void setRequest(HttpServletRequest req) {\r\n\t\t_req = req;\r\n\t\t_preq=null;\r\n\t}", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n\t\treq.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n\t\tgetRequestQueue().add(req);\n\t}", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n\t\treq.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n\t\tgetRequestQueue().add(req);\n\t}", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n // set the default tag if tag is empty\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n\n VolleyLog.d(\"Adding request to queue: %s\", req.getUrl());\n\n getRequestQueue().add(req);\n }", "public int size()\n\t{\n\t\treturn requestQueue != null ? requestQueue.size() : 0;\n\t}", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag); //TAG=category last line of mainactivity\n getRequestQueue().add(req);\n }", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "public static RequestQueue newRequestQueue(Context context, HttpStack stack) {\n File cacheDir = new File(context.getExternalCacheDir(), DEFAULT_CACHE_DIR);\n String userAgent = \"volley/0\";\n try {\n String packageName = context.getPackageName();\n PackageInfo info = context.getPackageManager().getPackageInfo(packageName, 0);\n userAgent = packageName + \"/\" + info.versionCode;\n } catch (PackageManager.NameNotFoundException e) {\n }\n\n if (stack == null) {\n if (Build.VERSION.SDK_INT >= 9) {\n stack = new HurlStack();\n } else {\n // Prior to Gingerbread, HttpUrlConnection was unreliable.\n // See: http://android-developers.blogspot.com/2011/09/androids-http-clients.html\n// stack = new HttpClientStack(AndroidHttpClient.newInstance(userAgent));\n }\n }\n\n Network network = new BasicNetwork(stack);\n\n // 修改缓存大小\n RequestQueue queue = new RequestQueue(new DiskBasedCache(cacheDir, 200 * 1024 * 1024), network);\n queue.start();\n\n return queue;\n }", "public void addRequest(Request req) {\n\n }", "public static synchronized permanentRequestQueue newPermRequestQueue(Context cont){\n myPermanentRequestQueue = new permanentRequestQueue(cont); //Instantiates new static member\n return myPermanentRequestQueue;\n }", "private void queueModified() {\n\tmServiceExecutorCallback.queueModified();\n }", "public void request() {\n }", "void processQueue();", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "private void viewPendingRequests() {\n\n\t}", "HttpServletRequest getCurrentRequest();", "public interface RequestHandler {\n\tpublic Map<String,Object> handleRequest(Map<String,Object> request,\n\t\t\t InetAddress client);\n}", "void setRequest(Request req);", "public void run() {\n long creationInterval = MILLISEC_PER_SEC / this.generationRate;\n\n int curIndex = 0;\n long startTime, endTime, diff, sleepTime, dur = this.test_duration;\n\n do {\n // startTime = System.nanoTime();\n startTime = System.currentTimeMillis();\n\n Request r = new DataKeeperRequest((HttpClient) this.clients[curIndex], this.appserverID, this.url);\n curIndex = (curIndex + 1) % clientsPerNode;\n this.requests.add(r);\n\n try {\n r.setEnterQueueTime();\n this.requestQueue.put(r);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n // endTime = System.nanoTime();\n endTime = System.currentTimeMillis();\n diff = endTime - startTime;\n dur -= diff;\n sleepTime = creationInterval - diff;\n if (sleepTime < 0) {\n continue;\n }\n\n try {\n // Thread.sleep(NANO_PER_MILLISEC / sleepTime, (int) (NANO_PER_MILLISEC % sleepTime));\n Thread.sleep(sleepTime);\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n\n dur -= sleepTime;\n } while (dur > 0);\n\n try {\n this.requestQueue.put(new ExitRequest());\n this.requestQueueHandler.join();\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n public void handleRequest(HttpServerExchange exchange) throws Exception {\n if (exchange.isInIoThread()) {\n exchange.dispatch(this);\n return;\n }\n\n // We check if the engine was initially loaded or at least tried to be loaded\n if (currentEngine.get() == null) {\n Optional<ScriptRunner> optRunner = loadAndSetScriptRunner();\n if (Boolean.parseBoolean(refresh)) {\n optRunner.ifPresent(runner -> {\n reloadOnChange(runner.getFile());\n });\n }\n }\n\n Optional<ScriptRunner> runner = currentEngine.get();\n if (runner.isPresent()) {\n try {\n Invocable invocable = (Invocable) runner.get().getEngine();\n JSFilterData data = new JSFilterData(exchange, next, runner.get().getScriptLogger());\n invocable.invokeFunction(\"handleRequest\", data);\n } catch (ScriptException | NoSuchMethodException invocationException) {\n LOGGER.warning(\"undertow-jsfilters: failure calling method '\" + \"handleRequest\" + \"' in file => \" + this.fileName);\n LOGGER.throwing(fileName, \"handleRequest\", invocationException);\n next.handleRequest(exchange);\n return;\n }\n } else {\n next.handleRequest(exchange);\n return;\n }\n }", "void onHTTPRequest(HTTPRequest request, HTTPResponse response);", "public <T> void addToRequestQueue(Request<T> req, String tag) {\r\n // set the default tag if tag is empty\r\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\r\n getRequestQueue().add(req);\r\n }", "@Override\n\tpublic List<Map<String,String>> dispatchRequest(Map<String, String[]> request) {\n\n\t\t// ********* LOGGING ********* \n\t\tSystem.out.println(\"reached DispatchRequest\");\n\t\tSystem.out.println(\"Request Keys : \");\n\t\tSystem.out.println(request.keySet());\n\t\t// ********* LOGGING ********* \n\n\n\t\tString classPrefix = request.get(\"requestID\")[0]; \n\n\t\t// ********* LOGGING ********* \n\t\tSystem.out.println(\"class name : \"+PACKAGE_NAME+classPrefix+CLASS_SUFFIX);\n\t\t// ********* LOGGING ********* \n\n\t\t// obtain class reference\t\t\n\t\tiManagementRequestHandlerObject = (IManagementRequestHandler) \n\t\t\t\tiReflectionManagerObject.getClass(PACKAGE_NAME+classPrefix+CLASS_SUFFIX);\n\n\t\t// ********* LOGGING *********\n\t\tSystem.out.println(\"object reference : \"+ iManagementRequestHandlerObject);\n\t\t// ********* LOGGING *********\n\n\t\t// Delegate the request to the appropriate class.\n\t\treturn (iManagementRequestHandlerObject.handleManagementRequest(request));\n\n\t}", "public int numberOfRequestsEnqueued() {\n int totalRequests = 0;\n for (ElevatorController controller : elevatorControllers.values()) {\n totalRequests += controller.getRequestsQueue().size();\n }\n return totalRequests;\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}", "public <T> void addToRequestQueue(Request<T> req, String tag) {\n // set the default tag if tag is empty\n req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);\n getRequestQueue().add(req);\n }", "private VolleySingleton(Context context){\n // Hacemos el contexto para todo el tiempo de vida de la aplicación, no solo para una sola actividad.\n mRequestQueue = Volley.newRequestQueue(context.getApplicationContext());\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "private Queue(){\r\n\t\tgenerateQueue();\r\n\t}", "private void addRequests(RequestFromSelf value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureRequestsIsMutable();\n requests_.add(value);\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "public void queueUsage() {\n\t\t//use LinkedList as a queue\n\t\tQueue<String> q = new LinkedList<String>();\n\t\tq.add(\"1\");\n\t\tq.add(\"2\");\n\t\tq.add(\"3\");\n\t\tq.add(\"10\");\n\t\tq.add(\"11\");\n\t\tint[] a;\n\n\t\tLinkedBlockingQueue<String> bq = new LinkedBlockingQueue<String>();\n\t\t\n\t\t//ArrayBlockingQueue needs to set the size when created.\n\t\tArrayBlockingQueue<String> aq = new ArrayBlockingQueue<String>(100);\n\t\t\n\t\tPriorityBlockingQueue<String> pq = new PriorityBlockingQueue<String>();\n\t\t\n//\t\tDelayQueue<String> dq = new DelayQueue<String>(); \n\t\t\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public Collection<IRequestDelegate> getRequestDelegates()\n {\n return _chunkPatternProcessors;\n }", "public void addRequest(Request q) {\n\t\trequestList.add(q);\n\t}", "private int indexOfRequestToServe() {\n // if there is no barrier currently active, avoid the iteration\n if (this.spmdManager.isCurrentBarriersEmpty()) {\n return 0;\n } else { // there is at least one active barrier\n int index = -1;\n boolean isServable = false;\n Iterator it = this.requestQueue.iterator();\n \n // look for the first request in the queue we can serve\n while (!isServable && it.hasNext()) {\n index++;\n MethodCall mc = ((Request) it.next()).getMethodCall();\n \n // FT : mc could be an awaited request\n if (mc == null) {\n return -1;\n }\n isServable = this.spmdManager.checkExecution(mc.getBarrierTags());\n }\n return isServable ? index : (-1);\n }\n }", "void runQueue();" ]
[ "0.6952046", "0.6879867", "0.6717795", "0.66154724", "0.6460537", "0.6370836", "0.6337217", "0.62917084", "0.6265865", "0.6207712", "0.6172747", "0.6132846", "0.61007047", "0.61007047", "0.61007047", "0.60951895", "0.59884536", "0.59881383", "0.5979929", "0.5959248", "0.5949789", "0.5921096", "0.5894103", "0.58725554", "0.58634496", "0.57997656", "0.57841104", "0.57609826", "0.5747836", "0.57044727", "0.5696634", "0.569075", "0.56901455", "0.5653789", "0.56484145", "0.56433177", "0.5640403", "0.5609267", "0.56056213", "0.556558", "0.5560548", "0.5557478", "0.55456996", "0.5534133", "0.55187845", "0.5517902", "0.5499494", "0.54983", "0.5483875", "0.5482641", "0.5478432", "0.5472845", "0.5472845", "0.5472845", "0.5472845", "0.5471237", "0.5471081", "0.54586333", "0.5453622", "0.5453622", "0.54535836", "0.54528064", "0.5447041", "0.54303485", "0.5425447", "0.5413402", "0.5413093", "0.5411675", "0.540814", "0.5405683", "0.53933877", "0.53908676", "0.5385572", "0.5383722", "0.5378777", "0.53631383", "0.53624463", "0.5357781", "0.53482944", "0.5334644", "0.53331834", "0.53224576", "0.5319454", "0.5319154", "0.53043365", "0.52889663", "0.5282195", "0.5281681", "0.52809095", "0.52809095", "0.5272765", "0.52671564", "0.5266615", "0.5266615", "0.5264641", "0.52626944", "0.52571595", "0.5245024", "0.52444816", "0.52374315" ]
0.5729639
29
Parse HTTP requests with the following form: jobid=1&taskcommand=sleep+240s
Map<String, String> parseHttpSchedulerRequest(String httpRequest) { String[] requestArguments = httpRequest.split("&"); Map<String, String> argsMap = new HashMap<>(); if (requestArguments.length != 2 && requestArguments.length != 1 ) { System.err.println("Invalid HTTP request: " + httpRequest); return null; } else if (requestArguments.length == 2) { int counter = 0; for ( String arg : requestArguments ) { String[] keyValuePair = arg.split("="); if (counter == 0) { if ( keyValuePair[0].equals("job-id") ) { assert keyValuePair[1].matches("[0-9]+"); argsMap.put( keyValuePair[0], keyValuePair[1]); } else { System.err.println("Invalid argument - expecting job-id"); } } else if (counter == 1) { if ( keyValuePair[0].equals("task-command") ) { argsMap.put( keyValuePair[0], keyValuePair[1]); } else { System.err.println("Invalid argument - expecting task-command"); } } counter++; } } else if (requestArguments.length == 1) { String[] keyValuePair = requestArguments[0].split("="); if ( keyValuePair[0].equals("probe") ) argsMap.put( keyValuePair[0], keyValuePair[1]); else System.err.println("Invalid argument - expecting probe request"); } return argsMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Schedule[] parse(String url, String name) throws IOException;", "public void parse() {\n if (commandSeparate.length == 1) {\n parseTaskType();\n } else if (commandSeparate.length == 2) {\n parseTaskType();\n index = commandSeparate[1];\n taskName = commandSeparate[1];\n } else {\n parseTaskType();\n parseTaskName();\n parseTaskDate();\n }\n }", "private void readCommand(String[] splitRequest, TaskManager taskManager) {\n if (splitRequest.length >= 2) {\n ArrayList list = new ArrayList<Task>();\n switch (splitRequest[1]) {\n case \"all\":\n output.println(\"READ COMMAND\");\n list = taskManager.getTaskList();\n sendTasks(list);\n break;\n case \"today\":\n output.println(\"READ COMMAND\");\n list = taskManager.getTaskListForToday();\n sendTasks(list);\n break;\n case \"before\":\n output.println(\"READ COMMAND\");\n list = taskManager.getTaskListBeforeToday();\n sendTasks(list);\n break;\n case \"after\":\n output.println(\"READ COMMAND\");\n list = taskManager.getTaskListAfterToday();\n sendTasks(list);\n break;\n default:\n output.println(\"WRONG PARAMETER\");\n output.println(\"To read task enter: 'r all/today/before/after'\");\n }\n } else {\n output.println(\"WRONG PARAMETER\");\n output.println(\"To read task enter: 'r all/today/before/after'\");\n }\n }", "public void parsing() throws JSONException {\r\n\t\ttry {\r\n\t\tHttpParams httpParameters = new BasicHttpParams();\r\n\t\tint timeoutConnection = 30000;\r\n\t\tHttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\r\n\t\tint timeoutSocket = 31000;\r\n\t\tHttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\r\n\t\tHttpClient client = new DefaultHttpClient(httpParameters);\r\n\t\tHttpPost httpost = new HttpPost(Url_Address.url_Home+\"/FetchPendingRideRequests\");//Url_Address.url_promocode);\r\n\t\tJSONObject json = new JSONObject();\r\n\t\t\r\n\t\tjson.put(\"Trigger\", \"FetchPendingRideRequests\");\r\n\t\t\r\n\t\tjson.put(\"Role\", \"Rider\");\r\n\t\tSystem.err.println(\"Rider\");\r\n\t\r\n\t\tjson.put(\"Id\", prefs.getString(\"userid\", null));\r\n\t\tSystem.err.println(prefs.getString(\"userid\", null));\r\n\t\t\r\n\t\tjson.put(\"Trigger\", \"queue\");\r\n\t\tSystem.err.println(\"rider queue\");\r\n\t //\t \r\n\t\thttpost.setEntity(new StringEntity(json.toString()));\r\n\t\thttpost.setHeader(\"Accept\", \"application/json\");\r\n\t\thttpost.setHeader(\"Content-type\", \"application/json\");\r\n\t\t\r\n\t\tHttpResponse response = client.execute(httpost);\r\n\t\tHttpEntity resEntityGet = response.getEntity();\r\n\t\tString jsonstr=EntityUtils.toString(resEntityGet);\r\n\t\tif(jsonstr!=null)\r\n\t\t{\r\n\t\t Log.i(tag,\" result-->>>>> \"+ jsonstr);\r\n\t\t}\r\n\t\tJSONObject obj=new JSONObject(jsonstr);\r\n\t\tString\tjsonResult=obj.getString(\"result\");\r\n\t\tString\tpending_jsonMessage=obj.getString(\"message\");\r\n\t\t\t\r\n\t\t\tString PendingRequestList=\tobj.getString(\"PendingRequestList\");\r\n\t\t\tLog.i(tag, \"PendingRequestList queue: \"+PendingRequestList);\r\n\t\t\t\r\n\t\t\tJSONArray jsonarray=obj.getJSONArray(\"PendingRequestList\");\r\n\t\r\n\t\t\t\r\n\t\tfor(int i=0;i<jsonarray.length();i++){\r\n\t\t\t\t\r\n\t\t\tJSONObject obj2=jsonarray.getJSONObject(i);\r\n\t\t\t\r\n\t\t\tString tripId=obj2.getString(\"tripId\");\r\n\t\t\tLog.i(tag, \"tripId: \"+tripId);\r\n\t\t\t\r\n\t\t\tString\triderId=\tobj2.getString(\"riderId\");\r\n\t\t\tLog.i(tag, \"riderId: \"+riderId);\r\n\t\t\t\r\n\t\t\tString driverId=\tobj2.getString(\"driverId\");\r\n\t\t\tLog.i(tag, \"driverId: \"+driverId);\r\n\t\t\t\r\n\t\t\tString driver_first=\tobj2.getString(\"driver_first\");\r\n\t\t\tLog.i(tag, \"driver_first: \"+driver_first);\r\n\t\t\t\r\n\t\t\tString driver_last=\tobj2.getString(\"driver_last\");\r\n\t\t\tLog.i(tag, \"driver_last: \"+driver_last);\r\n\t\t\t\r\n\t\t\tString trip_miles_est=\tobj2.getString(\"trip_miles_est\");\r\n\t\t\tLog.i(tag, \"trip_miles_est: \"+trip_miles_est);\r\n\t\t\t\r\n\t\t\tString trip_time_est=\tobj2.getString(\"trip_time_est\");\r\n\t\t\tLog.i(tag, \"trip_time_est: \"+trip_time_est);\r\n\t\t\t\r\n\t\t\tString start_loc=\tobj2.getString(\"start_loc\");\r\n\t\t\tLog.i(tag, \"start_loc: \"+start_loc);\r\n\t\t\t\r\n\t\t\tString destination_loc=\tobj2.getString(\"destination_loc\");\r\n\t\t\tLog.i(tag, \"destination_loc: \"+destination_loc);\r\n\t\t\t\r\n\t\t\tString request_type=\tobj2.getString(\"request_type\");\r\n\t\t\tLog.i(tag, \"request_type: \"+request_type);\r\n\t\t\t\r\n\t\t\tString trip_request_date=\tobj2.getString(\"trip_request_date\");\r\n\t\t\tLog.i(tag, \"request_type: \"+trip_request_date);\r\n\t\t\t\r\n\t\t\tString driver_image=\tobj2.getString(\"driver_image\");\r\n\t\t\tLog.i(tag, \"driver_image: \"+driver_image);\r\n\t\t\t\r\n\t\t\tString rider_image=\tobj2.getString(\"rider_image\");\r\n\t\t\tLog.i(tag, \"rider_image: \"+rider_image);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString setfare=\tobj2.getString(\"setfare\");\r\n\t\t\tLog.i(tag, \"setfare: \"+setfare);\r\n\t\t\t\r\n\t\t\tString offered_fare=\tobj2.getString(\"offered_fare\");\r\n\t\t\tLog.i(tag, \"offered_fare: \"+offered_fare);\r\n\t\t\t\r\n\t\t\tString driver_rating=\tobj2.getString(\"driver_rating\");\r\n\t\t\tLog.i(\"tag:\", \"riderRating: \"+driver_rating);\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tString status=\tobj2.getString(\"status\");\r\n\t\t\tLog.i(tag, \"status: \"+status);\r\n\t\t\t\r\n\t\t\tString vehicle_color=\tobj2.getString(\"vehicle_color\");\r\n\t\t\tLog.i(tag, \"vehicle_color: \"+vehicle_color);\r\n\t\t\t\r\n\t\t\tString vehicle_type=\tobj2.getString(\"vehicle_type\");\r\n\t\t\tLog.i(\"tag:\", \"vehicle_type: \"+vehicle_type);\r\n\t\t\t\r\n\t\t\tString vehicle_name=\tobj2.getString(\"vehicle_name\");\r\n\t\t\tLog.i(\"tag:\", \"vehicle_name: \"+vehicle_name);\r\n\r\n\t\t\t\t\r\n\t\t\tString vehicle_img=\tobj2.getString(\"vehicle_img\");\r\n\t\t\tLog.i(\"tag:\", \"vehicle_img: \"+vehicle_img);\r\n\t\t\r\n\t\t\tString vehicle_year=\tobj2.getString(\"vehicle_year\");\r\n\t\t\tLog.i(\"tag:\", \"vehicle_year: \"+vehicle_year);\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tLog.i(tag, \"Result: \"+jsonResult);\r\n\t\t\tLog.i(tag, \"Message :\"+pending_jsonMessage);\r\n\t\t\t\r\n\t\t\tarraylist_destination.add(destination_loc);\r\n\t\t\tarraylist_driverid.add(driverId);\r\n\t\t\tarraylist_riderid.add(riderId);\r\n\t\t\tarraylist_drivername.add(driver_first);\r\n\t\t\tarraylist_pickuptime.add(trip_request_date);\r\n\t\t\tarraylist_tripid.add(tripId);\r\n\t\t\tarraylist_driver_image.add(driver_image);\r\n\t\t\tarraylist_rider_image.add(rider_image);\r\n\t\t\tarraylist_distance.add(trip_miles_est);\r\n\t\t\tarraylist_requesttype.add(request_type);\r\n\t\t\tarraylist_start.add(start_loc);\r\n\t\t\tarraylist_actualfare.add(setfare);\r\n\t\t\tarraylist_suggestion.add(offered_fare);\r\n\t\t\tarraylist_eta.add(trip_time_est);\r\n\t\t\tarraylist_driverrating.add(driver_rating);\r\n\t\t\tarraylist_status.add(status);\r\n\t\t\tarraylist_vehicle_color.add(vehicle_color);\r\n\t\t\tarraylist_vehicle_type.add(vehicle_type);\r\n\t\t\tarraylist_vehicle_name.add(vehicle_name);\r\n\t\t\tarraylist_vehicle_img.add(vehicle_img);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tarraylist_vehicle_year.add(vehicle_year);\r\n\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t catch(Exception e){\r\n\t\t System.out.println(e);\r\n\t\t Log.d(tag, \"Error :\"+e); } \r\n\t\t\t}", "public abstract List<C_result> processJob(C_request processing_cmd);", "private String getResultByUrl(String url) {\r\n\r\n\t\tRequestConfig.Builder requestBuilder = RequestConfig.custom();\r\n\t\trequestBuilder = requestBuilder.setConnectTimeout(75000);\r\n\t\trequestBuilder = requestBuilder.setConnectionRequestTimeout(75000);\r\n\t\trequestBuilder.setSocketTimeout(75000);\r\n\r\n\t\tHttpClientBuilder builder = HttpClientBuilder.create();\r\n\t\tbuilder.setDefaultRequestConfig(requestBuilder.build());\r\n\t\tclient = builder.build();\r\n\r\n\t\trequest = new HttpGet(url);\r\n\t\trequest.addHeader(\"Accept\", \"application/json\");\r\n\r\n\t\tHttpResponse response = null;\r\n\t\tString r = \"\";\r\n\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Sending request: \" + url);\r\n\t\t\t\t\tresponse = client.execute(request);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} catch (ConnectionPoolTimeoutException e) {\r\n\t\t\t\t\tSystem.out.println(\"Connection timeout. Trying again...\");\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(10);\r\n\t\t\t\t\t} catch (InterruptedException ex) {\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Response Code : \"\r\n\t\t\t\t\t+ response.getStatusLine().getStatusCode());\r\n\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(response.getEntity()\r\n\t\t\t\t\t.getContent()));\r\n\r\n\t\t\tStringBuffer result = new StringBuffer();\r\n\t\t\tString line = \"\";\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tresult.append(line);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(result + \"\\n\");\r\n\t\t\ttry {\r\n\t\t\t\tTimeUnit.SECONDS.sleep(1);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tr = result.toString();\r\n\t\t\tGson gson = new GsonBuilder().setPrettyPrinting().create();\r\n\r\n\t\t\tJsonObject jsonResult = gson.fromJson(result.toString(),\r\n\t\t\t\t\tJsonObject.class);\r\n\t\t\tif (jsonResult.get(\"backoff\") != null) {\r\n\t\t\t\tint backoff = (jsonResult.get(\"backoff\")).getAsInt();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Received backoff. Waiting for \"\r\n\t\t\t\t\t\t\t+ backoff + \"seconds...\");\r\n\t\t\t\t\tTimeUnit.SECONDS.sleep(backoff + 5);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "public static String[] parseHudsonWebURL( String jobURL )\n {\n //!!!! PLEASE note that this code is copied to SourceTreeInfoComposite to avoid interdependencies\n // any change done here has to be duplicated there..\n String serverName = null;\n String jobName = null;\n\n Pattern p = Pattern.compile( \"(.*)/job/([^/]*)/*.*\" );\n Matcher m = p.matcher( jobURL );\n if ( !m.find() )\n return null;\n\n serverName = m.group( 1 );\n jobName = m.group( 2 );\n\n Pattern viewPattern = Pattern.compile( \"(.*)/view.*\" );\n Matcher m2 = viewPattern.matcher( m.group( 1 ) );\n if ( m2.find() )\n serverName = m2.group( 1 );\n return new String[] { serverName, jobName };\n }", "public void sendGetRequest() {\r\n\t\tString[] requests = this.input.substring(4, this.input.length()).split(\" \"); \r\n\t\t\r\n\t\tif(requests.length <= 1 || !(MyMiddleware.readSharded)){\r\n\t\t\tnumOfRecipients = 1;\r\n\t\t\trecipient = servers.get(loadBalance());\r\n\r\n\t\t\trecipient.send(this, input);\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\t\r\n\t\t\tif(requests.length <= 1) {\r\n\t\t\t\tnumOfGets++;\r\n\t\t\t\ttype= \"10\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumOfMultiGets++;\r\n\t\t\t\ttype = requests.length+\"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString reply = recipient.receive();\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\t\t\t\r\n\t\t\tint hit = 0;\r\n\t\t\thit += reply.split(\"VALUE\").length - 1;\r\n\t\t\tmiss += requests.length-hit;\r\n\r\n\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tsendBack(currentJob.getClient(), reply);\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnumOfMultiGets++;\r\n\t\t\ttype = requests.length+\"\";\r\n\t\t\tnumOfRecipients = servers.size();\r\n\t\t\trequestsPerServer = requests.length / servers.size();\r\n\t\t\tremainingRequests = requests.length % servers.size() ;\r\n\t\t\t\r\n\t\t\t//The worker thread sends a number of requests to each server equal to requestsPerServer \r\n\t\t\t//and at most requestsPerServer + remainingRequests\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < servers.size(); i++) {\r\n\t\t\t\tmessage = requestType;\r\n\t\t\t\tfor(int j = 0; j < requestsPerServer; j++){\r\n\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\tmessage += requests[requestsPerServer*i+j];\r\n\t\t\t\t\tif(i < remainingRequests) {\r\n\t\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\t\tmessage += requests[requests.length - remainingRequests + i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tservers.get(i).send(this, message);\r\n\t\t\t}\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\tint hit = 0;\r\n\t\t\tfor(ServerHandler s : servers) {\r\n\t\t\t\tString ricevuto = s.receive();\r\n\t\t\t\thit += ricevuto.split(\"VALUE\").length - 1;\r\n\t\t\t\treplies.add(ricevuto);\r\n\t\t\t}\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\r\n\t\t\tmiss += requests.length-hit;\r\n\t\t\t\r\n\t\t\tfinalReply = \"\";\r\n\t\t\tfor(String reply : replies) {\r\n\t\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\t\treplies.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treply = reply.substring(0, reply.length() - 3);\r\n\t\t\t\t\tfinalReply += reply;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalReply += \"END\";\r\n\t\t\tsendBack(currentJob.getClient(), finalReply);\r\n\t\t\treplies.clear();\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "@GET\n @Path(\"/job/{id}/tasks\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJobTasks(@PathParam(\"id\") String jobId) {\n LGJob lg = Utils.getJobManager().getJob(jobId);\n if (null == lg) {\n return Response.status(404).entity(\"Not found\").build();\n }\n JSONObject result = new JSONObject();\n result.put(\"tasks\",getTasksHelper(lg));\n return Response.status(200).entity(result.toString(1)).build();\n }", "long[] getServiceNameTasks(java.lang.String serviceName, java.lang.String status, java.lang.String action) throws java.io.IOException;", "public static String parse(String command) throws IOException {\n assert tasks.size() >= 0;\n\n if (command.equals(\"bye\")) {\n return executeExit();\n } else if (command.equals(\"list\")) {\n return executeList();\n } else if (command.equals(\"yes\") || command.equals(\"no\")) {\n return executeDuplicateHandling(command);\n } else if (command.startsWith(\"done\")) {\n return executeDone(command);\n } else if (command.startsWith(\"delete\")) {\n return executeDelete(command);\n } else if (command.startsWith(\"find\")) {\n return executeFind(command);\n } else {\n return executeTask(command);\n }\n }", "public void doRequests(JobQueue urlList) {\n\t\tsynchronized(connections) {\n\t\t\t++connections;\n\t\t}\n \tHttpHost httpHost = new HttpHost(urlList.getHost());\n \t\n\t\twhile (! urlList.isEmpty()) {\n\t\t\tJob2 job = urlList.poll();\n\t\t\t\n\t \t// Do a HEAD request\n\t \tHttpRequest httpRequest = new HttpHead(job.getPath());\n\n\t\t\tString url = urlList.getUrl(job);\n\t\t\tLOG.info(\"Submitting \" + url);\n\n\t\t\ttry {\n\t\t\t\tHttpResponse httpResponse = httpClient.execute(httpHost, httpRequest);\n\t\t\t\tStatusLine statusLine = httpResponse.getStatusLine();\n\t\t\t\tLOG.info(statusLine.getStatusCode() + \" on \" + url);\n\t\t\t\t\n\t\t\t} catch (ClientProtocolException cpe) {\n\t\t\t\tLOG.info(\"CPE on \" + url, cpe);\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tLOG.info(\"IOE on \" + url, ioe);\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tsynchronized(connections) {\n\t\t\t--connections;\n\t\t\tif (connections == 0) {\n\t\t\t\tsynchronized(monitor) {\n\t\t\t\t\tmonitor.notify();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected String doInBackground(String... strings) {\n String response = \"\";\n try {\n URL url = new URL(strings[0]);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(\"GET\");\n con.setConnectTimeout(5000);\n con.setReadTimeout(5000);\n con.connect();\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n\n String inputLine;\n StringBuffer content = new StringBuffer();\n while ((inputLine = in.readLine()) != null) {\n content.append(inputLine);\n }\n in.close();\n response = content.toString();\n parseValuesFromResponse(response, strings[1]);\n } catch (Exception e){\n e.printStackTrace();\n }\n return null;\n }", "@GET\n @Path(\"/job/{id}/metrics\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJobByIdMetrics(@PathParam(\"id\") String jobId) {\n LGJob lg = Utils.getJobManager().getJob(jobId);\n if (null == lg) {\n return Response.status(404).entity(\"Not found\").build();\n }\n JSONObject jobResult = new JSONObject();\n Map<String, LGTask> tasks = lg.getTasks();\n\n // BUild history graph size per task (bar graph)\n List<LGJobHistory> history = lg.getJobHistory();\n JSONArray graphPerTask = new JSONArray();\n JSONArray idPerTask = new JSONArray();\n JSONArray adapterPerTask = new JSONArray();\n JSONArray errorPerTask = new JSONArray();\n\n JSONArray adapterPie = new JSONArray();\n JSONArray adapterPieLabels= new JSONArray();\n HashMap<String, Integer> adapterPieCounters = new HashMap<String,Integer>();\n for(LGJobHistory l: history) {\n if (l.getCommandType() == 1) {\n LGTask t = tasks.get(l.getTaskId());\n if (t == null) {\n log.error(\"Missing task for taskid:\"+l.getTaskId());\n } else {\n\n String adapter = t.getAdapterName();\n int graphChange = l.getGraphChanges();\n graphPerTask.put(graphChange);\n idPerTask.put(l.getTaskId());\n adapterPerTask.put(adapter);\n int count = graphChange;\n if (adapterPieCounters.containsKey(adapter)) {\n count = adapterPieCounters.get(adapter).intValue();\n count += graphChange;\n }\n adapterPieCounters.put(adapter,count);\n int error = 0;\n if (t.getStatus() != t.TASK_STATUS_COMPLETE) {\n error = 1;\n }\n errorPerTask.put(error);\n }\n }\n }\n\n for (Map.Entry<String, Integer> entry : adapterPieCounters.entrySet()) {\n String adapter = entry.getKey();\n Integer value = entry.getValue();\n adapterPieLabels.put(adapter);\n adapterPie.put(value.intValue());\n }\n\n jobResult.put(\"graph_changes_per_task\",graphPerTask);\n jobResult.put(\"id_per_task\",idPerTask);\n jobResult.put(\"adapter_per_task\",adapterPerTask);\n jobResult.put(\"error_per_task\",errorPerTask);\n jobResult.put(\"adapter_pie_labels\",adapterPieLabels);\n jobResult.put(\"adapter_pie\",adapterPie);\n\n return Response.status(200).entity(jobResult.toString(1)).build();\n }", "public void run()\n {\n try\n { \n // here we process input from the Browser\n BufferedReader br = new BufferedReader(new InputStreamReader(this.is));\n \n String cmd_line = null;\n \n String request_type = null;\n String request_path = null;\n String path_token = null;\n Hashtable<String, String> headers = new Hashtable<String, String>();\n Hashtable<String, String> formContent = new Hashtable<String, String>();\n Hashtable<String, String> urlGetParameters = new Hashtable<String, String>();\n Hashtable<String, String> cookies = new Hashtable<String, String>();\n String raw_form_data = \"\";\n String get_params = \"\";\n \n try\n {\n // Recieve GET/POST line and process\n cmd_line = br.readLine();\n this.myServer.logln(this.clientHostname, \"-> \" + cmd_line);\n StringTokenizer request = new StringTokenizer(cmd_line);\n \n while (request.hasMoreTokens())\n {\n String currentToken = request.nextToken();\n if (\"GET\".equals(currentToken) && request.hasMoreTokens())\n {\n path_token = URLDecoder.decode(request.nextToken(),\"UTF-8\");\n request_type = \"GET\";\n }\n if (\"POST\".equals(currentToken) && request.hasMoreTokens())\n {\n path_token = URLDecoder.decode(request.nextToken(),\"UTF-8\");\n request_type = \"POST\";\n }\n }\n \n // handle get parameters\n int qidx = path_token.indexOf(\"?\");\n if (qidx > -1)\n {\n request_path = path_token.substring(0,qidx);\n get_params = path_token.substring(qidx+1);\n StringTokenizer get_data = new StringTokenizer(get_params, \"&\");\n while (get_data.hasMoreTokens())\n {\n String currentToken = get_data.nextToken();\n if (currentToken.indexOf(\"=\") > -1 && !currentToken.endsWith(\"=\"))\n {\n StringTokenizer get_entry = new StringTokenizer(currentToken, \"=\");\n String g_key = get_entry.nextToken();\n String g_value = get_entry.nextToken();\n urlGetParameters.put(g_key, g_value);\n \n this.myServer.logln(this.clientHostname, \"-> (GETPARAMETER) {\" + g_key + \"} \" + g_value);\n }\n }\n } else {\n request_path = path_token;\n }\n \n while (!\"\".equals(cmd_line))\n {\n cmd_line = br.readLine();\n //this.myServer.logln(this.clientHostname, \"-> \" + cmd_line);\n if (!\"\".equals(cmd_line))\n {\n StringTokenizer header_parts = new StringTokenizer(cmd_line, \":\");\n // lets store the request headers just incase \n String h_key = header_parts.nextToken();\n String h_value = header_parts.nextToken().trim();;\n headers.put(h_key, h_value);\n this.myServer.logln(this.clientHostname, \"-> (HEADER) {\" + h_key + \"} \" + h_value);\n }\n }\n \n // Is there a cookie?\n String cookie = headers.get(\"Cookie\");\n if (cookie != null)\n {\n StringTokenizer cookie_data = new StringTokenizer(cookie, \";\");\n while (cookie_data.hasMoreTokens())\n {\n StringTokenizer this_cookie = new StringTokenizer(cookie_data.nextToken().trim(), \"=\");\n String c_key = this_cookie.nextToken();\n String c_value = this_cookie.nextToken();\n if (!cookies.containsKey(c_key))\n {\n cookies.put(c_key, c_value);\n this.myServer.logln(this.clientHostname, \"-> (COOKIE) {\" + c_key + \"} \" + c_value);\n } else {\n cookies.put(c_key, c_value);\n this.myServer.logln(this.clientHostname, \"<> (COOKIE) {\" + c_key + \"} *OVERWRITE* \" + c_value);\n }\n }\n this.myServer.logln(this.clientHostname, \"-> (END OF COOKIES)\");\n }\n \n // what do we if there was a post!\n if (request_type.equals(\"POST\"))\n {\n int content_length = Integer.valueOf(headers.get(\"Content-Length\")).intValue();\n this.myServer.logln(this.clientHostname, \"*** POST DATA\");\n int bytein = -2;\n int byteCount = 0;\n StringBuffer form_raw = new StringBuffer(\"\");\n while (bytein != -1 && byteCount < content_length)\n {\n bytein = br.read();\n byteCount++;\n if (bytein > -1) form_raw.append((char) bytein);\n }\n raw_form_data = form_raw.toString();\n if (this.myServer.isShowData())\n {\n this.myServer.getDebugStream().println(\"--------------Inbound Data-------------\");\n this.myServer.getDebugStream().println(raw_form_data); \n this.myServer.getDebugStream().println(\"---------------------------------------\");\n }\n \n }\n \n // what do we do if it was a form post?\n if (\"application/x-www-form-urlencoded\".equals(headers.get(\"Content-Type\")))\n {\n this.myServer.logln(this.clientHostname, \"*** application/x-www-form-urlencoded\");\n StringTokenizer form_data = new StringTokenizer(raw_form_data, \"&\");\n while (form_data.hasMoreTokens())\n {\n String currentToken = form_data.nextToken();\n if (currentToken.indexOf(\"=\") > -1)\n {\n StringTokenizer form_entry = new StringTokenizer(currentToken, \"=\");\n String f_key = form_entry.nextToken();\n String f_value = URLDecoder.decode(form_entry.nextToken(),\"UTF-8\");\n formContent.put(f_key, f_value);\n this.myServer.logln(this.clientHostname, \"-> (FORMDATA) {\" + f_key + \"} \" + f_value);\n }\n }\n }\n } catch (Exception rex) {\n this.myServer.logln(\"Placebo\", \"Exception: \" + rex.toString() + \" / \" + rex.getMessage());\n }\n \n if (request_type != null)\n {\n HttpRequest req_obj = new HttpRequest(request_path, request_type, headers, cookies, formContent, raw_form_data, urlGetParameters, get_params, this.connection, this.myServer);\n this.myServer.routeRequest(req_obj);\n }\n } catch (Exception x) {}\n }", "public static void main2(String args[]) {\n String s1 = \"2009-03-10T16:08:55.184 -0600 [ 16621850][ 162233] INFO - thredds.server.opendap.NcDODSServlet - Remote host: 128.117.140.71 - Request: \\\"GET /thredds/dodsC/model/NCEP/NAM/CONUS_80km/NAM_CONUS_80km_20090309_0000.grib1.dods?Geopotential_height%5B7:1:7%5D%5B0:10:10%5D%5B0:1:64%5D%5B0:1:92%5D HTTP/1.1\\\"\";\r\n // 1 2 3 4 5 6 7 8 9\r\n Pattern p1 = Pattern.compile(\"^(\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+\\\\.\\\\d+ -\\\\d+) \\\\[(.*)]\\\\[(.*)] (\\\\w+)[\\\\s]+- ([^-]+) - Remote host: ([^-]+) - Request: \\\"(\\\\w+) (.*) (.*)\");\r\n\r\n show(s1, p1);\r\n\r\n // 1 2 3 4 5 6 7 8 9\r\n String s2 = \"2009-03-10T16:08:54.617 -0600 [ 16621283][ 162230] INFO - thredds.server.opendap.NcDODSServlet - Request Completed - 200 - -1 - 47\";\r\n // 1 2 3 4 5 6 7 8 9\r\n Pattern p2 = Pattern.compile(\"^(\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+\\\\.\\\\d+ -\\\\d+) \\\\[(.*)]\\\\[(.*)] (\\\\w+)[\\\\s]+- ([^-]+) - Request Completed - (\\\\d+) - (.*) - (.*)\");\r\n// Pattern p1 = Pattern.compile(\"^(\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+\\\\.\\\\d+ -\\\\d+) \\\\[(.*)]\\\\[(.*)] (\\\\w+)[\\\\s]+- ([^-]+) - Remote host: ([^-]+) - Request: \\\"(\\\\w+) (.*) (.*)\");\r\n\r\n show(s2, p2);\r\n\r\n// Pattern p2 = Pattern.compile(\"^(\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+\\\\.\\\\d+ -\\\\d+) \\\\[(.*)]\\\\[(.*)] (\\\\w+)[\\\\s]+- ([^-]+) - Request Completed - (\\\\d+) - (.*) - (.*)\");\r\n// Pattern p1 = Pattern.compile(\"^(\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+\\\\.\\\\d+ -\\\\d+) \\\\[(.*)]\\\\[(.*)] (\\\\w+)[\\\\s]+- ([^-]+) - Remote host: ([^-]+) - Request: \\\"(\\\\w+) (.*) (.*)\");\r\n Pattern p3 = Pattern.compile(\"^(\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+\\\\.\\\\d+ -\\\\d+) \\\\[(.*)]\\\\[(.*)] (\\\\w+)[\\\\s]+- ([^-]+) - (.*)\");\r\n\r\n show(s1, p3);\r\n show(s2, p3);\r\n\r\n }", "public void Parse() \n\tthrows BadRequestException, LengthRequestException {\n\n\t// Reading the first word of the request\n\tStringBuilder command = new StringBuilder();\n\tint c = 0;\n\ttry {\n\t while((c = userInput.read()) != -1) {\n\t\tif ((char)c == ' ')\n\t\t break;\n\t\tcommand.append((char)c);\n\t }\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\t\n\n\t// Read the file key\n\tStringBuilder key = new StringBuilder();\n\ttry {\n\t while((c = userInput.read()) != -1) {\n\t\tif ((char)c == ' ')\n\t\t break;\n\t\tkey.append((char)c);\n\t }\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\n\n\t// Bad key\n\tif(key.toString().length() != 32){\n\t throw new BadRequestException(\"Wrong key length\");\n\t}\n\tthis.key = key.toString();\n\n\t// Search the file in the files in shared\n\tIterator<CookieFile> it = files.iterator();\n\twhile (it.hasNext()) { \n\t CookieFile f = it.next();\n\n\t if (f.getKey().equals(this.key)) {\n\t\tf.toString();\n\t\tthis.file = f;\n\t\tbreak;\n\t }\n\t}\n\n\t// check the first \"[\"\n\ttry {\n\t c = userInput.read();\n\t if( (char)c != '[')\n\t\tthrow new BadRequestException(\"Parser unable to understand this request\");\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\n\n\t// get the pieces\n\twhile(true) {\n\t int index;\n\t String data;\n\t try {\n\t\t// get the index\n\t\tStringBuilder sbIndex = new StringBuilder();\n\t\tint ck;\n\t\twhile((ck = userInput.read()) != -1) {\n\t\t if ((char)ck == ':')\n\t\t\tbreak;\n\t\t sbIndex.append((char)ck);\n\t\t}\n\t\tindex = Integer.parseInt(sbIndex.toString(), 10);\n\n\t\t// get the pieces\n\t\tif (index != file.getNbPieces()) {\n\t\t char dataBuffer[] = new char[2732/*pieceLength*/];\n\t\t userInput.read(dataBuffer, 0, 2732/*pieceLength*/);\n\n\t\t data = new String(dataBuffer);\n\t\t Piece p = new Piece(index, data);\n\t\t pieces.add(p);\n\t\t if ((ck = userInput.read()) != -1){\n\t\t\tif((char)ck == ']'){\n\t\t\t return;\n\t\t\t}\n\t\t\telse if ((char)ck != ' '){\n\t\t\t throw new BadRequestException(\"Parser unable to understand this request\");\n\t\t\t}\n\t\t }\n\t\t}\n\t\t// The last piece\n\t\telse { \n\n\t\t StringBuilder lastPiece = new StringBuilder();\n\t\t while((ck = userInput.read()) != -1) {\n\t\t\tif ((char)ck == ']')\n\t\t\t break;\n\t\t\tlastPiece.append((char)ck);\n\t\t }\n\n\t\t data = lastPiece.toString();\n\t\t Piece p = new Piece(index, data);\n\t\t pieces.add(p);\n\t\t return;\n\t\t}\n\t } catch (IOException e) {\n\t\tSystem.err.println(\"read:\"+ e.getMessage());\n\t }\n\t}\n }", "private static String executeRequest(String url) throws IOException {\n\n\t\tLog.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t\n\t\tSocket s = new Socket(IP, PORT);\n\t\tPrintStream ps = new PrintStream(s.getOutputStream());\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"PS OPENED\");\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(\n\t\t\t\ts.getInputStream()));\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"BR OPENED\");\n\t\tps.println(url);\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"URL PRNTED\");\n\t\tString response = r.readLine();\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"RESPONSE: \" + response);\n\t\treturn response;\n\n\t\t// boolean unsuccessful = true;\n\t\t// int tries = 0;\n\t\t// String response = \"\";\n\t\t// while(unsuccessful && tries != 3){\n\t\t// unsuccessful = false;\n\t\t// URL requestUrl = new URL(url);\n\t\t// HttpsURLConnection connection = (HttpsURLConnection)\n\t\t// requestUrl.openConnection();\n\t\t// try{\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t// connection.setRequestMethod(\"GET\");\n\t\t// connection.getResponseCode();\n\t\t//\n\t\t// //connection.\n\t\t//\n\t\t// connection.connect();\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\t// //Needs error checking on connection\n\t\t//\n\t\t// InputStream in = new\n\t\t// BufferedInputStream(connection.getInputStream());\n\t\t// BufferedReader reader = new BufferedReader(new\n\t\t// InputStreamReader(in));\n\t\t// StringBuffer buffer = new StringBuffer();\n\t\t// String line;\n\t\t//\n\t\t// //reads response in and appends it to buffer\n\t\t// do{\n\t\t// line = reader.readLine();\n\t\t// buffer.append(line);\n\t\t// }while (line != null);\n\t\t//\n\t\t// //disconnects the HttpURLConnection so other requests can be made\n\t\t// connection.disconnect();\n\t\t// //Log.d(RiotJsonRequest.class.getSimpleName() , \"RECEIVED: \" +\n\t\t// buffer.toString());\n\t\t// response = buffer.toString();\n\t\t// }catch(Exception e){\n\t\t// String code = Integer.toString(connection.getResponseCode());\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , \"CODE: \" + code);\n\t\t// if(code.equals(\"404\")){\n\t\t// return code;\n\t\t// }\n\t\t// unsuccessful = true;\n\t\t// tries++;\n\t\t// connection.disconnect();\n\t\t// connection = null;\n\t\t// requestUrl = null;\n\t\t// try {\n\t\t// Thread.sleep(1000);\n\t\t// } catch (InterruptedException e1) {\n\t\t// e1.printStackTrace();\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t// return response;\n\t}", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "@Override\n\t\tprotected ArrayList<Program> doInBackground(String... params) {\n\t\t\ttry {\n\t\t\t\tURL url = new URL(params[0]);\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) url\n\t\t\t\t\t\t.openConnection();\n\t\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\t\tcon.connect();\n\t\t\t\tint statusCode = con.getResponseCode();\n\t\t\t\tif (statusCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(con.getInputStream()));\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = reader.readLine();\n\t\t\t\t\twhile (line != null) {\n\t\t\t\t\t\tsb.append(line);\n\t\t\t\t\t\tline = reader.readLine();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn ContentUtil.ContentJSONParser.parsePrograms(sb\n\t\t\t\t\t\t\t.toString());\n\t\t\t\t}\n\n\t\t\t} catch (IOException | JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "private static String execute(SplitUrlEvent event) throws Exception {\n long startTime = System.currentTimeMillis();\n for (int i = 0; i < 10000; i++) {\n event.execute();\n }\n long endTime = System.currentTimeMillis();\n return String.format(\"%s: %s\",\n event.getClass().getName().equals(\n com.playtech.assignment.regex.event.RegexSplit.class.getName()) ? \"Regex\" : \"State\",\n (endTime - startTime) * 0.001 + \" s\");\n\n }", "public void parse()\n\t{\n\t\ttry\n\t\t{\n\t\t\tstatus = program();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}", "public String[] getJobsWaiting();", "public void getJobs(String response) {\n\t\tDocument doc = Jsoup.parse(response);\r\n\t\tElements body = doc.getElementsByTag(\"tbody\");\r\n\t\tElement listOfJobs = body.get(3);\r\n\t\tElements groupOfJobs = listOfJobs.children(); //25 jobs\r\n\r\n\t\tfor (Element job: groupOfJobs) {\r\n\t\t\tJob newJob = createJob(job);\r\n\t\t\tmListOfJobs.add(newJob);\r\n\t\t}\r\n\t\tif (mAdapter != null) {\r\n\t\t\tmAdapter.notifyDataSetChanged();\r\n\t\t}\r\n\t}", "java.lang.String getJobId();", "void getRequests();", "public static String parseRequest(String message){\n\t\tchar[] b = message.toCharArray();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tif('*'==b[0]){\n\t\t\tString[] list = message.split(\"<br>\");\n\t\t\t//int len = Integer.valueOf(String.valueOf(b[1]));//numbers of arguments\n\t\t\t//String[] args = new String[len];\n\t\t\tfor(int i=2;i<list.length;){\n\t\t\t\tsb.append(list[i]).append(\" \");\n\t\t\t\ti = i+2;\n\t\t\t}\n\t\t}else{\n\t\t\tSystem.out.println(\"格式错误\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public void parsePost()\n {\n Hashtable table = new Hashtable();\n try\n {\n\n String[] pairs = Utilities.splitString(content, \"&\");\n for (int i = 0; i < pairs.length; i++)\n {\n String[] pair = Utilities.splitString(pairs[i], \"=\");\n table.put(pair[0], pair[1]);\n }\n Variables.updateTableWithTable(table);\n Variables.save();\n }\n catch (Exception e)\n {\n Utilities.debugLine(\"WebServer.parsePost(): ERROR\" + content, DEBUG);\n }\n Utilities.debugLine(\"WebServer.parsePost(): Variables were \" + content, DEBUG);\n Utilities.debugLine(\"WebServer.parsePost(): HASHTABLE = \" + table.toString(), DEBUG);\n\n }", "public void readRequest()\n {\n t1.start();\n StringBuffer sb = new StringBuffer(BUFFER_SIZE);\n char c;\n int sequentialBreaks = 0;\n while (true)\n {\n try\n {\n if (in.available() > 0)\n {\n c = (char) in.read();\n\n //keep track of the number of \\r or \\n s read in a row.\n if (c != '\\n' && c != '\\r')\n sequentialBreaks = 0;\n else\n sequentialBreaks++;\n\n //If there is an error, or we read the \\r\\n\\r\\n EOF, break the read loop.\n //We don't want to read too far.\n if (c == -1 || sequentialBreaks == 4)\n break;\n else\n sb.append(c);\n }\n }\n catch (Exception e)\n {\n sendError();\n }\n }\n header += sb.toString().trim();\n Utilities.debugLine(\"WebServer.readRequest(): Header was \\n\" + header, DEBUG);\n\n Utilities.debugLine(\"WebServer read bytes completed in \" + t1.get(), running);\n lastTime = t1.get();\n\n parseHeader();\n\n Utilities.debugLine(\"WebServer parse header completed in \" + (t1.get() - lastTime), running);\n lastTime = t1.get();\n\n readContent();\n\n Utilities.debugLine(\"WebServer parseHeader completed in \" + (t1.get() - lastTime), running);\n lastTime = t1.get();\n\n process();\n\n Utilities.debugLine(\"WebServer processing and reply completed in \" + (t1.get() - lastTime), running);\n }", "public void accessWebService() {\n\r\n JsonReadTask task = new JsonReadTask();\r\n // passes values for the urls string array\r\n task.execute(new String[] { url });\r\n }", "public String createTask(JSONRequest request, long delay, boolean interval, boolean sequential);", "@Override\n\tprotected int checkParseRequest(StringBuilder request) {\n\t\tif (request != null && request.length() > 3 && request.charAt(3) == '=') { // simplerpc?jzn=604107&jzp=1&jzc=1&jzz=WLL100...\n\t\t\t// parse XSS query\n\t\t\tint length = request.length();\n\t\t\t\n\t\t\tint jzzStarted = -1;\n\t\t\tint jzzStopped = -1;\n\t\t\t\n\t\t\tint jznStarted = -1;\n\t\t\tint jznStopped = -1;\n\t\t\t\n\t\t\tint jzpStarted = -1;\n\t\t\tint jzpStopped = -1;\n\t\t\t\n\t\t\tint jzcStarted = -1;\n\t\t\tint jzcStopped = -1;\n\t\t\t\n\t\t\tint unknownStarted = -1;\n\t\t\tint unknownStopped = -1;\n\n\t\t\tchar c3 = request.charAt(0);\n\t\t\tchar c2 = request.charAt(1);\n\t\t\tchar c1 = request.charAt(2);\n\t\t\tfor (int i = 3; i < length; i++) {\n\t\t\t\tchar c0 = request.charAt(i);\n\t\t\t\tif (jznStarted != -1) {\n\t\t\t\t\tif (jznStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // got jzn=...\n\t\t\t\t\t\t\tjznStopped = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (jzpStarted != -1) {\n\t\t\t\t\tif (jzpStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // got jzp=...\n\t\t\t\t\t\t\tjzpStopped = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (jzcStarted != -1) {\n\t\t\t\t\tif (jzcStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // got jzc=...\n\t\t\t\t\t\t\tjzcStopped = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (jzzStarted != -1) {\n\t\t\t\t\tif (jzzStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // got jzz=\n\t\t\t\t\t\t\tjzzStopped = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (unknownStarted != -1) {\n\t\t\t\t\tif (unknownStopped == -1) {\n\t\t\t\t\t\tif (c0 == '&') { // gotcha\n\t\t\t\t\t\t\tunknownStopped = i;\n\t\t\t\t\t\t\tunknownStarted = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (c0 == '=' && c2 == 'z' && c3 == 'j') { // jz?=\n\t\t\t\t\tif (c1 == 'n') {\n\t\t\t\t\t\tjznStarted = i + 1;\n\t\t\t\t\t\tjznStopped = -1;\n\t\t\t\t\t} else if (c1 == 'p') {\n\t\t\t\t\t\tjzpStarted = i + 1;\n\t\t\t\t\t\tjzpStopped = -1;\n\t\t\t\t\t} else if (c1 == 'c') {\n\t\t\t\t\t\tjzcStarted = i + 1;\n\t\t\t\t\t\tjzcStopped = -1;\n\t\t\t\t\t} else if (c1 == 'z') {\n\t\t\t\t\t\tjzzStarted = i + 1;\n\t\t\t\t\t\tjzzStopped = -1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunknownStarted = i + 1;\n\t\t\t\t\t\tunknownStopped = -1;\n\t\t\t\t\t}\n\t\t\t\t\tc2 = 0;\n\t\t\t\t\tc1 = 0;\n\t\t\t\t\tc0 = 0;\n\t\t\t\t} else if (c0 == '=') {\n\t\t\t\t\tunknownStarted = i + 1;\n\t\t\t\t\tunknownStopped = -1;\n\t\t\t\t\tc2 = 0;\n\t\t\t\t\tc1 = 0;\n\t\t\t\t\tc0 = 0;\n\t\t\t\t}\n\t\t\t\tc3 = c2;\n\t\t\t\tc2 = c1;\n\t\t\t\tc1 = c0;\n\t\t\t}\n\t\t\t\n\t\t\tString jzzRequest = null;\n\t\t\tif (jzzStarted != -1) {\n\t\t\t\tif (jzzStopped == -1) {\n\t\t\t\t\tjzzStopped = length;\n\t\t\t\t}\n\t\t\t\tjzzRequest = request.substring(jzzStarted, jzzStopped);\n\t\t\t}\n\n\t\t\t// jzz without jzn is considered as XHR requests!\n\t\t\tif (jzzRequest == null || jzzRequest.trim().length() == 0) {\n\t\t\t\t//response = generateXSSErrorResponse();\n\t\t\t\trequestData = request.toString();\n\t\t\t\treturn -1; // error\n\t\t\t}\n\t\t\t\n\t\t\tif (jznStarted != -1) {\n\t\t\t\tif (jznStopped == -1) {\n\t\t\t\t\tjznStopped = length;\n\t\t\t\t}\n\t\t\t\trequestID = request.substring(jznStarted, jznStopped);\n\t\t\t}\n\t\t\tif (requestID != null && requestID.length() != 0) {\n\t\t\t\t// when jzn is defined, it's considered as a script request!\n\t\t\t\t\n\t\t\t\t// make sure that servlet support cross site script request\n\t\t\t\t// always support cross site script requests\n\t\t\t\tif (!PipeConfig.supportXSS) {\n\t\t\t\t\tresponse = new HttpQuickResponse(\"text/javascript\", \"net.sf.j2s.ajax.SimpleRPCRequest\" +\n\t\t\t\t\t\t\t\".xssNotify(\\\"\" + requestID + \"\\\", \\\"unsupported\\\");\");\n\t\t\t\t\treturn -1; // error\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// check script request counts\n\t\t\t\tString count = null;\n\t\t\t\tif (jzpStarted != -1) {\n\t\t\t\t\tif (jzpStopped == -1) {\n\t\t\t\t\t\tjzpStopped = length;\n\t\t\t\t\t}\n\t\t\t\t\tcount = request.substring(jzpStarted, jzpStopped);\n\t\t\t\t}\n\t\t\t\tint partsCount = 1;\n\t\t\t\tif (count != null) {\n\t\t\t\t\tboolean formatError = false;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpartsCount = Integer.parseInt(count);\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tformatError = true; \n\t\t\t\t\t}\n\t\t\t\t\tif (formatError || partsCount <= 0) {\n\t\t\t\t\t\tresponse = generateXSSErrorResponse();\n\t\t\t\t\t\treturn -1; // error\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (partsCount != 1) {\n\t\t\t\t\t// check whether servlet can deal the requests\n\t\t\t\t\tif (partsCount > PipeConfig.maxXSSParts) {\n\t\t\t\t\t\tresponse = new HttpQuickResponse(\"text/javascript\", \"net.sf.j2s.ajax.SimpleRPCRequest\" +\n\t\t\t\t\t\t\t\t\".xssNotify(\\\"\" + requestID + \"\\\", \\\"exceedrequestlimit\\\");\");\n\t\t\t\t\t\treturn -1; // error\n\t\t\t\t\t}\n\t\t\t\t\t// check curent request index\n\t\t\t\t\tString current = null;\n\t\t\t\t\tif (jzcStarted != -1) {\n\t\t\t\t\t\tif (jzcStopped == -1) {\n\t\t\t\t\t\t\tjzcStopped = length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = request.substring(jzcStarted, jzcStopped);\n\t\t\t\t\t}\n\t\t\t\t\tint curPart = 1;\n\t\t\t\t\tif (current != null) {\n\t\t\t\t\t\tboolean formatError = false;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcurPart = Integer.parseInt(current);\n\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\tformatError = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (formatError || curPart > partsCount) {\n\t\t\t\t\t\t\tresponse = generateXSSErrorResponse();\n\t\t\t\t\t\t\treturn -1; // error\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlong now = System.currentTimeMillis();\n\t\t\t\t\tfor (Iterator<SimpleHttpRequest> itr = allSessions.values().iterator(); itr.hasNext();) {\n\t\t\t\t\t\tSimpleHttpRequest r = (SimpleHttpRequest) itr.next();\n\t\t\t\t\t\tif (now - r.jzt > PipeConfig.maxXSSLatency) {\n\t\t\t\t\t\t\titr.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] parts = null;\n\t\t\t\t\t\n\t\t\t\t\tSimpleHttpRequest sessionRequest = null;\n\t\t\t\t\t// store request in session before the request is completed\n\t\t\t\t\tif (session == null) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tStringBuilder builder = new StringBuilder(32);\n\t\t\t\t\t\t\tfor (int i = 0; i < 32; i++) {\n\t\t\t\t\t\t\t\tint r = (int) Math.round((float) Math.random() * 61.1); // 0..61, total 62 numbers\n\t\t\t\t\t\t\t\tif (r < 10) {\n\t\t\t\t\t\t\t\t\tbuilder.append((char) (r + '0'));\n\t\t\t\t\t\t\t\t} else if (r < 10 + 26) {\n\t\t\t\t\t\t\t\t\tbuilder.append((char) ((r - 10) + 'a'));\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbuilder.append((char) ((r - 10 - 26) + 'A'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsession = builder.toString();\n\t\t\t\t\t\t} while (allSessions.get(session) != null);\n\t\t\t\t\t\tsessionRequest = new SimpleHttpRequest();\n\t\t\t\t\t\tallSessions.put(session, sessionRequest);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsessionRequest = allSessions.get(session);\n\t\t\t\t\t\tif (sessionRequest == null) {\n\t\t\t\t\t\t\tsessionRequest = new SimpleHttpRequest();\n\t\t\t\t\t\t\tallSessions.put(session, sessionRequest);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (sessionRequest.jzn == null) {\n\t\t\t\t\t\tsessionRequest.jzt = now;\n\t\t\t\t\t\tparts = new String[partsCount];\n\t\t\t\t\t\tsessionRequest.jzn = parts;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparts = sessionRequest.jzn;\n\t\t\t\t\t\tif (partsCount != parts.length) {\n\t\t\t\t\t\t\tresponse = generateXSSErrorResponse();\n\t\t\t\t\t\t\treturn -1; // error\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tparts[curPart - 1] = jzzRequest;\n\t\t\t\t\tfor (int i = 0; i < parts.length; i++) {\n\t\t\t\t\t\tif (parts[i] == null) {\n\t\t\t\t\t\t\t// not completed yet! just response and wait next request.\n\t\t\t\t\t\t\tresponse = new HttpQuickResponse(\"text/javascript\", \"net.sf.j2s.ajax.SimpleRPCRequest\" +\n\t\t\t\t\t\t\t\t\t\".xssNotify(\\\"\" + requestID + \"\\\", \\\"continue\\\"\" +\n\t\t\t\t\t\t\t\t\t((curPart == 1) ? \", \\\"\" + session + \"\\\");\" : \");\"));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\n\t\t\t\t\tallSessions.remove(session);\n\t\t\t\t\t\n\t\t\t\t\tStringBuilder builder = new StringBuilder(16192);\n\t\t\t\t\tfor (int i = 0; i < parts.length; i++) {\n\t\t\t\t\t\tbuilder.append(parts[i]);\n\t\t\t\t\t\tparts[i] = null;\n\t\t\t\t\t}\n\t\t\t\t\trequest.delete(0, request.length()).append(builder.toString());\n\t\t\t\t} else {\n\t\t\t\t\trequest.delete(0, request.length()).append(jzzRequest);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trequest.delete(0, request.length()).append(jzzRequest); // no request id, normal request\n\t\t\t}\n\t\t} // end of XSS script query parsing\n\t\treturn 0;\n\t}", "protected String getResponse(String input) {\n boolean isTerminated;\n String result;\n input = input.trim();\n try {\n Command c = Parser.parse(input);\n result = c.execute(tasklist, ui, storage);\n isTerminated = c.isTerminated();\n } catch (Exception e) {\n return e.toString();\n }\n if (isTerminated) {\n return ui.sendBye();\n }\n return result;\n }", "public void parseResponse();", "public HarvestResult executeGetRequest() throws ParseException, IOException {\n final HttpGet get = new HttpGet(petition.getUrl()\n + generateQueryParams());\n\n HttpResponse httpResult = null;\n T21HttpClientWithSSL httpClient = petition.getHttpClient();\n\n get.setHeaders(generateHeaders(get));\n int statusCode = HttpStatus.SC_NOT_FOUND;\n logPetition(get);\n httpResult = httpClient.execute(get);\n statusCode = httpResult.getStatusLine().getStatusCode();\n TLog.i(\"Status code = \" + statusCode);\n String answer = getJsonFromRequest(httpResult);\n HarvestResult result = generateResult(answer, statusCode, httpClient);\n return result;\n }", "private void parse(String str) {\n if (str == null) {\n throw new IllegalArgumentException(\"Empty job execution instruction found!\");\n }\n String[] parts = str.split(\" \");\n if (parts.length == 1) {\n parseSpecial(str);\n } else if (parts.length == 5) {\n try {\n setMinutes(parseMinutes(parts[0].trim().toLowerCase()));\n setHours(parseHours(parts[1].trim().toLowerCase()));\n setDaysOfMonth(parseDaysOfMonth(parts[2].trim().toLowerCase()));\n setMonths(parseMonths(parts[3].trim().toLowerCase()));\n setDaysOfWeek(parseDaysOfWeek(parts[4].trim().toLowerCase()));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Schedule \" + str + \" is malformed:\" + e.getMessage());\n }\n } else {\n throw new IllegalArgumentException(\"Schedule \" + str + \" is malformed!\");\n }\n }", "public static String parser(String input) throws IOException{\n\t\tif (input == null)\n\t\t\treturn \"Null input!\";\n\t\t\n\t\telse if (input.startsWith(\"HTTPClient \")){\n\t\t\tinput = input.replace(\"HTTPClient \", \"\"); // Cut HTTPClient of the string so we can handle the command more easily.\n\t\t\t\t\t\t\n\t\t\tif(\"exit\".equals(input))\n\t\t\t\treturn EXIT();\n\t\t\t\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tString[] splitted = input.split(\"\\\\s+\"); // Split around spaces\n\t\t\t\tString command = splitted[0];\n\t\t\t\tString uri = splitted[1];\n\t\t\t\tint port = Integer.parseInt(splitted[2]);\n\t\t\t\tSystem.out.println(uri);\n\t\t\t\tSystem.out.println(port);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (command.startsWith(\"HEAD\")){\n\t\t\t\t\treturn HEAD(uri, port);\n\t\t\t\t}\n\t\t\t\n\t\t\t\telse if (command.startsWith(\"GET\")){\n\t\t\t\t\treturn GET(uri, port);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (command.startsWith(\"PUT\")){\n\t\t\t\t\treturn PUT(uri, port);\n\t\t\t\t}\n\t\t\t\n\t\t\t\telse if (command.startsWith(\"POST\")){ \n\t\t\t\t\treturn POST(uri, port);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn \"\";\n\t}", "public void status_wait(UploadHandle h) throws Exception {\n \tStatusHandler sturl = (StatusHandler) h;\n String status = \"NA\";\n Integer time_check = 0;\n while(time_check < sturl.timeout && !status.equals(\"SUCCESS\"))\n {\n HttpResponse response = client.get(new URI(sturl.status_url));\n String statusxml = this.read_http_entity(response.getEntity());\n Document doc = this.db.parse(new ByteArrayInputStream(statusxml.getBytes(\"UTF-8\")));\n XPathExpression status_xpath = this.xPath.compile(\"//step[@id='\"+sturl.step.toString()+\"']/@status\");\n NodeList nodeList = (NodeList)status_xpath.evaluate(doc, XPathConstants.NODESET);\n for(int i=0; i<nodeList.getLength(); i++)\n {\n Node childNode = nodeList.item(i);\n status = childNode.getNodeValue();\n }\n Thread.sleep(1 * 1000);\n time_check++;\n }\n if(time_check == sturl.timeout) { throw new InterruptedException(\"Unable to check for completed upload status.\"); }\n }", "private static Map<Task, Double> getResponseFor(Request request) throws ParseException {\n List<Task> availableTasks = new ArrayList<>();// taskDAO.getFutureTasks();\n Byom bakshi = instantiateSatyanveshi();\n return bakshi.getScoresMap(availableTasks, request);\n }", "List<SdkHttpRequest> getRequests();", "String getRequest(String url);", "private int sendJob(HttpURLConnection connection) {\n int responseCode = -1;\n String response = \"\";\n try {\n responseCode = connection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n String line;\n StringBuilder buf = new StringBuilder();\n try (BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {\n while ((line = br.readLine()) != null) {\n buf.append(line);\n }\n }\n response = buf.toString();\n } else {\n response = \"\";\n }\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"io exception\");\n }\n Log.i(LOG_TAG, response);\n return responseCode;\n }", "@Override\n\tprotected String doInBackground(String... params) {\n\t\tSystem.out.println(\"parser in action before sending raw data\");\n\t\tString[] pairs = params[0].split(\" \");\n\t\tSystem.out.println(\"login length\"+pairs.length);\n\t\tfor (int i = 0; i < pairs.length; i++) {\n\t\t\tString pair = pairs[i];\n\t\t\tString[] keyValue = pair.split(\":\");\n\t\t\tif(keyValue.length>1){\n\t\t\tmap.put(keyValue[0], keyValue[1]);\n\t\t\t}\n\t\t}\n\t\tif(params[0].startsWith(\"login\")){\n\t\t\tmessage.append(\"validate \"+\"PH:\"+map.get(\"PH\")+\" user:\"+map.get(\"user\")+\" Pass:\"+map.get(\"pass\"));\t\n\t\t}\n\t\n\t\t\n\t\treturn message.toString();\n\t}", "protected void parseTask(XmlElement taskXmlElement) {\n\n Node taskNode = processBuilder.getNodeBuilder().setIncomingBehaviour(new SimpleJoinBehaviour())\n .setOutgoingBehaviour(new TakeAllSplitBehaviour())\n .setActivityBehavior(new AutomatedDummyActivity(\"Doing something\")).buildNode();\n\n parseGeneralInformation(taskXmlElement, taskNode);\n getNodeXmlIdTable().put((String) taskNode.getAttribute(\"idXml\"), taskNode);\n\n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseTask(taskXmlElement, taskNode, processBuilder);\n }\n }", "private static String editUrlMonitor(HttpServletRequest request, HttpServletResponse response)\n/* */ throws Exception\n/* */ {\n/* 90 */ String xmlString = \"\";\n/* 91 */ String monType = \"UrlMonitor\";\n/* 92 */ int pollInterval = 5;\n/* 93 */ int timeOut = 5;\n/* 94 */ String query1 = \"\";\n/* 95 */ String query2 = \"\";\n/* 96 */ String resID = \"\";\n/* 97 */ String reqParams = \"\";\n/* 98 */ String displayname = \"\";\n/* 99 */ String httpCondition = \"\";\n/* 100 */ String httpValue = \"\";\n/* 101 */ String strUrl = \"\";\n/* 102 */ MockHttpServletRequest MSreq = new MockHttpServletRequest();\n/* 103 */ MSreq.setContentType(\"text/xml; charset=UTF-8\");\n/* 104 */ AMActionForm amform = new AMActionForm();\n/* 105 */ MSreq.addParameter(\"actionmethod\", \"updateUrlMonitor\");\n/* 106 */ AMConnectionPool cp = AMConnectionPool.getInstance();\n/* 107 */ ResultSet rs1 = null;\n/* 108 */ ResultSet rs2 = null;\n/* */ try {\n/* 110 */ AMLog.debug(\"REST API : inside editUrlMonitor\");\n/* 111 */ if (request.getParameter(\"resourceid\") != null) {\n/* 112 */ query1 = \"select AM_ManagedObject.DISPLAYNAME as displayname,AM_URL.URLID as resourceid, AM_URL.URL as url, AM_URL.USERID as userName, \" + DBQueryUtil.decodeBytes(\"password\") + \" as password, AM_URL.QUERYSTRING as reqParams, AM_URL.METHOD as urlMethod,AM_URL.AVAILABILITYSTRING as checkForContent,AM_URL.PollInterval as pollInterval, AM_URL.UNAVAILABILITYSTRING as errorIfMatch, AM_URL.VERIFY as verifyError,AM_URL.TIMEOUT as timeout from AM_ManagedObject, AM_URL where AM_ManagedObject.RESOURCEID=AM_URL.URLID and AM_ManagedObject.TYPE='UrlMonitor' and AM_URL.URLID='\" + request.getParameter(\"resourceid\") + \"'\";\n/* */ }\n/* 114 */ else if (request.getParameter(\"url\") != null) {\n/* 115 */ query1 = \"select AM_ManagedObject.DISPLAYNAME as displayname,AM_URL.URLID as resourceid, AM_URL.URL as url, AM_URL.USERID as userName, \" + DBQueryUtil.decodeBytes(\"password\") + \" as password, AM_URL.QUERYSTRING as reqParams, AM_URL.METHOD as urlMethod,AM_URL.AVAILABILITYSTRING as checkForContent,AM_URL.PollInterval as pollInterval, AM_URL.UNAVAILABILITYSTRING as errorIfMatch, AM_URL.VERIFY as verifyError,AM_URL.TIMEOUT as timeout from AM_ManagedObject, AM_URL where AM_ManagedObject.RESOURCEID=AM_URL.URLID and AM_ManagedObject.TYPE='UrlMonitor' and AM_URL.URL like '\" + request.getParameter(\"url\") + \"'\";\n/* */ }\n/* 117 */ else if (request.getParameter(\"displayname\") != null) {\n/* 118 */ query1 = \"select AM_ManagedObject.DISPLAYNAME as displayname,AM_URL.URLID as resourceid, AM_URL.URL as url, AM_URL.USERID as userName, \" + DBQueryUtil.decodeBytes(\"password\") + \" as password, AM_URL.QUERYSTRING as reqParams, AM_URL.METHOD as urlMethod,AM_URL.AVAILABILITYSTRING as checkForContent,AM_URL.PollInterval as pollInterval, AM_URL.UNAVAILABILITYSTRING as errorIfMatch, AM_URL.VERIFY as verifyError,AM_URL.TIMEOUT as timeout from AM_ManagedObject, AM_URL where AM_ManagedObject.RESOURCEID=AM_URL.URLID and AM_ManagedObject.TYPE='UrlMonitor' and AM_ManagedObject.DISPLAYNAME='\" + request.getParameter(\"displayname\") + \"'\";\n/* */ }\n/* */ else {\n/* 121 */ AMLog.debug(\"REST API : Some parameter missing for edit URL.For editing URL monitor either one of the following 'type with resourceid' or 'type with url' or 'type with displayname' is needed.\");\n/* 122 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.editURL.paramMissing\"), \"4314\");\n/* 123 */ return xmlString;\n/* */ }\n/* */ \n/* 126 */ rs1 = AMConnectionPool.executeQueryStmt(query1);\n/* 127 */ String verifyError; if (rs1.next()) {\n/* 128 */ resID = rs1.getString(\"resourceid\");\n/* 129 */ reqParams = rs1.getString(\"reqParams\") != null ? rs1.getString(\"reqParams\") : \"\";\n/* 130 */ displayname = rs1.getString(\"displayname\");\n/* 131 */ query2 = \"select NAME, CRITICALTHRESHOLDCONDITION as httpCondition, CRITICALTHRESHOLDVALUE as httpValue from AM_THRESHOLDCONFIG where DESCRIPTION='##Threshod for URL##' and NAME='Threshold\" + resID + \"' order by ID desc\";\n/* */ \n/* 133 */ MSreq.addParameter(\"urlid\", rs1.getString(\"resourceid\"));\n/* 134 */ strUrl = rs1.getString(\"url\");\n/* 135 */ if (request.getParameter(\"timeout\") != null) {\n/* */ try {\n/* 137 */ timeOut = Integer.parseInt(request.getParameter(\"timeout\"));\n/* 138 */ MSreq.addParameter(\"timeout\", \"\" + timeOut);\n/* */ } catch (Exception exc) {\n/* 140 */ AMLog.debug(\"REST API : The timeout should be a valid one.\");\n/* 141 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.timeout.notvalidmessage\"), \"4216\");\n/* 142 */ return xmlString;\n/* */ }\n/* */ } else {\n/* 145 */ timeOut = Integer.parseInt(rs1.getString(\"timeout\"));\n/* 146 */ timeOut /= 1000;\n/* 147 */ MSreq.addParameter(\"timeout\", \"\" + timeOut);\n/* */ }\n/* 149 */ amform.setTimeout(timeOut);\n/* 150 */ if (request.getParameter(\"pollInterval\") != null) {\n/* */ try {\n/* 152 */ pollInterval = Integer.parseInt(request.getParameter(\"pollInterval\"));\n/* */ \n/* 154 */ MSreq.addParameter(\"pollInterval\", \"\" + pollInterval);\n/* */ } catch (Exception ex) {\n/* 156 */ AMLog.debug(\"REST API : The pollInterval should be a valid whole number.\");\n/* 157 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.pollinter.notvalidmessage\"), \"4201\");\n/* 158 */ return xmlString;\n/* */ }\n/* */ } else {\n/* 161 */ pollInterval = Integer.parseInt(rs1.getString(\"pollInterval\"));\n/* 162 */ pollInterval /= 60000;\n/* */ \n/* 164 */ MSreq.addParameter(\"pollInterval\", \"\" + pollInterval);\n/* */ }\n/* 166 */ amform.setPollInterval(pollInterval);\n/* 167 */ if (request.getParameter(\"urlMethod\") != null) {\n/* 168 */ if ((request.getParameter(\"urlMethod\").equals(\"P\")) || (request.getParameter(\"urlMethod\").equals(\"G\"))) {\n/* 169 */ MSreq.addParameter(\"method\", request.getParameter(\"urlMethod\"));\n/* */ } else {\n/* 171 */ AMLog.debug(\"REST API : The urlMethod should be P or G.\");\n/* 172 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.urlmethodempty.msg\"), \"4311\");\n/* 173 */ return xmlString;\n/* */ }\n/* */ } else {\n/* 176 */ MSreq.addParameter(\"method\", rs1.getString(\"urlMethod\"));\n/* */ }\n/* 178 */ if (request.getParameter(\"verifyError\") != null) {\n/* 179 */ if (request.getParameter(\"verifyError\").equals(\"true\")) {\n/* 180 */ MSreq.addParameter(\"verifyerror\", \"true\");\n/* 181 */ } else if (request.getParameter(\"verifyError\").equals(\"false\")) {\n/* 182 */ MSreq.addParameter(\"verifyerror\", \"\");\n/* */ } else {\n/* 184 */ AMLog.debug(\"REST API : The verifyError should be true or false.\");\n/* 185 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.editURL.verifyErrorMsg\"), \"4315\");\n/* 186 */ return xmlString;\n/* */ }\n/* */ } else {\n/* 189 */ verifyError = \"1\".equals(rs1.getString(\"verifyError\")) ? \"true\" : \"\";\n/* 190 */ MSreq.addParameter(\"verifyerror\", verifyError);\n/* */ }\n/* 192 */ MSreq.addParameter(\"userid\", request.getParameter(\"userName\") != null ? request.getParameter(\"userName\") : rs1.getString(\"userName\"));\n/* 193 */ MSreq.addParameter(\"errorcontent\", request.getParameter(\"errorIfMatch\") != null ? request.getParameter(\"errorIfMatch\") : rs1.getString(\"errorIfMatch\"));\n/* 194 */ MSreq.addParameter(\"checkfor\", request.getParameter(\"checkForContent\") != null ? request.getParameter(\"checkForContent\") : rs1.getString(\"checkForContent\"));\n/* 195 */ MSreq.addParameter(\"password\", request.getParameter(\"password\") != null ? request.getParameter(\"password\") : rs1.getString(\"password\"));\n/* 196 */ MSreq.addParameter(\"requestparams\", request.getParameter(\"requestParams\") != null ? request.getParameter(\"requestParams\") : reqParams);\n/* */ } else {\n/* 198 */ AMLog.debug(\"REST API : The url is not created before.\");\n/* 199 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.editURL.errorMsg\"), \"4316\");\n/* 200 */ return xmlString;\n/* */ }\n/* 202 */ if (request.getParameter(\"displayname\") != null) {\n/* 203 */ displayname = request.getParameter(\"displayname\");\n/* */ }\n/* 205 */ if (request.getParameter(\"url\") != null) {\n/* 206 */ strUrl = request.getParameter(\"url\");\n/* */ }\n/* 208 */ MSreq.addParameter(\"monitorname\", displayname);\n/* 209 */ MSreq.addParameter(\"url\", strUrl);\n/* 210 */ int httpvalueInt = 200;\n/* 211 */ httpCondition = \"GT\";\n/* 212 */ rs2 = AMConnectionPool.executeQueryStmt(query2);\n/* 213 */ if (rs2.next())\n/* */ {\n/* 215 */ httpCondition = rs2.getString(\"httpCondition\");\n/* 216 */ httpvalueInt = Integer.parseInt(rs2.getString(\"httpValue\"));\n/* */ }\n/* */ \n/* 219 */ if (request.getParameter(\"httpCondition\") != null) {\n/* 220 */ if ((request.getParameter(\"httpCondition\").equals(\"LT\")) || (request.getParameter(\"httpCondition\").equals(\"GT\")) || (request.getParameter(\"httpCondition\").equals(\"EQ\")) || (request.getParameter(\"httpCondition\").equals(\"NE\")) || (request.getParameter(\"httpCondition\").equals(\"LE\")) || (request.getParameter(\"httpCondition\").equals(\"GE\")))\n/* */ {\n/* 222 */ httpCondition = request.getParameter(\"httpCondition\");\n/* */ } else {\n/* 224 */ AMLog.debug(\"REST API : The httpCondition should be LT or GT or EQ or NE or LE or GE.\");\n/* 225 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.httpcondition.msg\"), \"4313\");\n/* 226 */ return xmlString;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 231 */ if (request.getParameter(\"httpValue\") != null) {\n/* */ try {\n/* 233 */ httpvalueInt = Integer.parseInt(request.getParameter(\"httpValue\"));\n/* */ } catch (Exception ex) {\n/* 235 */ AMLog.debug(\"REST API : The httpValue should be a valid Integer.\");\n/* 236 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.api.httpvalue.integermessage\"), \"4312\");\n/* 237 */ return xmlString;\n/* */ }\n/* */ }\n/* */ \n/* 241 */ MSreq.addParameter(\"httpcondition\", httpCondition);\n/* 242 */ MSreq.addParameter(\"httpvalue\", \"\" + httpvalueInt);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try\n/* */ {\n/* 250 */ if (rs1 != null) {\n/* 251 */ rs1.close();\n/* */ }\n/* 253 */ if (rs2 != null) {\n/* 254 */ rs2.close();\n/* */ }\n/* */ } catch (Exception ex1) {\n/* 257 */ ex1.printStackTrace();\n/* */ }\n/* */ try\n/* */ {\n/* 261 */ MSreq.addParameter(\"type\", monType);\n/* 262 */ MSreq.addParameter(\"montype\", monType);\n/* 263 */ MSreq.addParameter(\"isAPI\", \"true\");\n/* 264 */ amform.setType(monType);\n/* 265 */ amform.setDisplayname(displayname);\n/* */ \n/* 267 */ CreateUrlMonitor creUrlMon = new CreateUrlMonitor();\n/* 268 */ creUrlMon.updateUrlMonitor(null, null, MSreq, response);\n/* 269 */ return AddMonitorAPIUtil.MessageXML(request, response, \"editUrlMonitor\", FormatUtil.getString(\"URL Monitor edited successfully.\"));\n/* */ }\n/* */ catch (Exception ex3) {\n/* 272 */ ex3.printStackTrace();\n/* 273 */ String errorMsg = ex3.getMessage();\n/* 274 */ AMLog.debug(\"REST API : Error: \" + errorMsg);\n/* 275 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"Error\") + \": \" + errorMsg, \"4444\");\n/* 276 */ AMLog.debug(\"REST API : Error in editing monitor by API\" + errorMsg);\n/* */ }\n/* */ }\n/* */ catch (Exception ex2)\n/* */ {\n/* 244 */ ex2.printStackTrace();\n/* 245 */ AMLog.debug(\"REST API : Server error.\");\n/* 246 */ xmlString = URITree.generateXML(request, response, FormatUtil.getString(\"am.webclient.apikey.wrongserver.message\"), \"4128\");\n/* 247 */ return xmlString;\n/* */ } finally {\n/* */ try {\n/* 250 */ if (rs1 != null) {\n/* 251 */ rs1.close();\n/* */ }\n/* 253 */ if (rs2 != null) {\n/* 254 */ rs2.close();\n/* */ }\n/* */ } catch (Exception ex1) {\n/* 257 */ ex1.printStackTrace();\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 277 */ return xmlString;\n/* */ }", "public static Request parseRequest(BufferedReader input) throws IOException, IllegalStateException, SocketException\n {\n Request request = new Request();\n String line;\n Matcher matcher;\n\n // Parsing request method & uri\n if ((line = input.readLine()) == null) throw new SocketException(\"Client disconnected\");\n\n matcher = regexMethod.matcher(line);\n if (matcher.find()) {\n request.method = RtspMethod.valueOf(matcher.group(1));\n request.uri = matcher.group(2);\n LogHelper.e(TAG, \"Line: \" + line);\n LogHelper.e(TAG, \"Parsing request method & uri: \" + request.method + \" --> \" + request.uri);\n\n // Parsing headers of the request\n while ((line = input.readLine()) != null && line.length() > 3) {\n matcher = regexHeader.matcher(line);\n if (matcher.find()) {\n request.headers.put(matcher.group(1).toLowerCase(Locale.US), matcher.group(2));\n LogHelper.e(TAG, \"Parsing headers of the request: \" + line + \" | \" +\n matcher.group(1).toLowerCase(Locale.US) + \" --> \" + matcher.group(2));\n }\n }\n if (line == null) throw new SocketException(\"Client disconnected\");\n\n // It's not an error, it's just easier to follow what's happening in logcat with the request in red\n LogHelper.e(TAG, request.method + \" \" + request.uri);\n }\n\n return request;\n }", "public GetRequest(String pathInfo) throws ServletException {\r\n\r\n\t\tMatcher matcher;\r\n\r\n\t\tif (pathInfo != null) {\r\n\r\n\t\t\tmatcher = regExQueuePattern.matcher(pathInfo);\r\n\t\t\tif (matcher.find()) {\r\n\t\t\t\trequestID = Integer.parseInt(matcher.group(1));\r\n\t\t\t\tisQueuePolling = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tmatcher = regExResponsePattern.matcher(pathInfo);\r\n\t\t\tif (matcher.find()) {\r\n\t\t\t\trequestID = Integer.parseInt(matcher.group(1));\r\n\t\t\t\tisQueuePolling = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(PROXY + \"Invalid URI.\");\r\n\t\tthrow new ServletException(PROXY + \"Invalid URI.\");\r\n\t}", "@Override\n\tpublic String getResult(Map<String, String> params) throws Exception {\n\t\tlong playerId = Long.valueOf(params.get(\"playerId\"));\n\t\tint taskId = Integer.parseInt(params.get(\"taskId\"));//ID\n\t\tint process = Integer.parseInt(params.get(\"process\"));\n\t\t\n\t\tGamePlayer player = WorldMgr.getPlayerFromCache(playerId);\n\t\tif (player != null && player.getPlayerState() == PlayerState.ONLINE) {\n\t\t\tRealTask task = player.getTaskInventory().getTaskInfos().get(taskId);\n\t\t\tif(task!=null){\n\t\t\t\ttask.updateProcess(process);\n\t\t\t}else{\n\t\t\t\tTaskCfg cfg = TaskTemplateMgr.getTaskCfg(taskId);\n\t\t\t\t\n\t\t\t\tif(cfg!=null){\n\t\t\t\t\tList<Integer> ids = new ArrayList<>();\n\t\t\t\t\tfor (RealTask t: player.getTaskInventory().getTaskInfos().values()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(t.getConfig().getTaskLink() == cfg.getTaskLink()){\n\t\t\t\t\t\t\tids.add(t.getInfo().getTaskId());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor (int id : ids) {\n\t\t\t\t\t\tplayer.getTaskInventory().del(id);\n\t\t\t\t\t\tTaskOperateRespMsg.Builder resp = TaskOperateRespMsg.newBuilder();\n\t\t\t\t\t\tresp.setTaskId(id);\n\t\t\t\t\t\tresp.setOperate(3);\n\t\t\t\t\t\tPBMessage pkg = MessageUtil.buildMessage(Protocol.U_RESP_TASKOPERATE, resp);\n\t\t\t\t\t\tplayer.sendPbMessage(pkg);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tTaskInfo updateT = new TaskInfo();\n\t\t\t\t\tupdateT.setPlayerId(player.getPlayerId());\n\t\t\t\t\tupdateT.setProcess(0);\n\t\t\t\t\tupdateT.setTaskId(cfg.getTaskId());\n\t\t\t\t\tupdateT.setState(TaskInfo.UN_ACCEPT);\n\t\t\t\t\tupdateT.setUpdateTime(new Date());\n\t\t\t\t\tupdateT.setCreateTime(new Date());\n\t\t\t\t\tupdateT.setOp(Option.Insert);\n\t\t\t\t\tRealTask newTask = new RealTask(cfg, updateT, player);\n\t\t\t\t\tplayer.getTaskInventory().add(newTask);\n\t\t\t\t\tnewTask.doAccept();\n\t\t\t\t\tnewTask.updateProcess(process);\n\t\t\t\t\treturn HttpResult.getResult(Code.SUCCESS, \"*_*taskGm exec success*_*\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn HttpResult.getResult(Code.SUCCESS, \"*_*taskGm exec fail*_*\");\n\t}", "public String getJobId();", "private int ParseRQ(byte[] buf, StringBuffer requestedFile) {\n // See \"TFTP Formats\" in TFTP specification for the RRQ/WRQ request contents\n StringBuilder stringBuilder = new StringBuilder();\n\n for (int i = 2; i < buf.length; i++) {\n\n if ((char) buf[i] == '\\0') {\n break;\n } else {\n stringBuilder.append((char) buf[i]);\n }\n }\n\n requestedFile.append(stringBuilder.toString());\n ByteBuffer wrap = ByteBuffer.wrap(buf);\n int opcode = wrap.getShort();\n\n return opcode;\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString urlParameters=null;\n\t\t\ttry {\n\t\t\t\turlParameters= \"busno=\"+URLEncoder.encode(sbsno,\"UTF-8\")+\"&&\"\n\t\t\t\t\t\t+\"stop=\"+URLEncoder.encode(s_bstop,\"UTF-8\")+\"&&\"\n\t\t\t\t\t\t+\"bustime=\"+URLEncoder.encode(s_btime,\"UTF-8\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tupresp = Connectivity.excutePost(Constants.BUSSTOPUPDATE_URL,\n urlParameters);\n\t\t\treturn upresp;\n\t\t}", "@Override\r\n\t\tprotected String doInBackground(Integer... params) {\n\t\t\t\r\n\t\t\tif (isCancelled()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Simulates a background task\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresultstring = getResultFromGET();\r\n\t\t\t\r\n\t\t\treturn resultstring;\r\n\t\t}", "private void parseProtocol(String protocol) {\n try (Scanner sc = new Scanner(protocol)) {\n //parse first line\n this.method = Method.valueOf(sc.next());\n this.url = sc.next();\n String httpVersion = sc.next();\n this.version = Double.parseDouble(httpVersion.substring(5));\n\n while (sc.hasNext(\".+:\")) {\n String header = sc.next();\n header = header.substring(0, header.indexOf(':'));\n String value = sc.next() + sc.nextLine();\n this.headings.put(header, value);\n }\n }\n\n }", "private Tuple<String,String> extractQueryAndQueryExecution(String query){\n\t\tString[] elements = query.split(\"--\");\n\t\treturn new Tuple<String,String>(elements[0].trim(), elements[1].trim());\n\t}", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "private List<Request> getStartRequest () {\n String startUrl = \"http://www.yidianzixun.com/home/q/news_list_for_channel?channel_id=sc4&cstart=20&cend=30&infinite=true&refresh=1&__from__=pc&multi=5&appid=web_yidian\";\n List<Request> list = new ArrayList<>();\n list.add(new Request(startUrl).putExtra(RequestExtraKey.KEY_BEGIN_DATE, getStartTime()));\n return list;\n }", "private boolean processRequest(Connection conn)\n {\n String line = null;\n URL url;\n String path;\n\n /*\n * Read the request line.\n */\n try {\n line = DataInputStreamUtil.readLineIntr(conn.getInputStream());\n }\n catch(InterruptedException e) {\n logError(\"Cannot read request line: connection timeout\");\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST, \"connection timeout\");\n return false;\n }\n catch(IOException e) {\n logError(\"Cannot read request line: I/O error\"\n + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.SRVCE_NOT_AVAILABLE,\n \"I/O error\" + getExceptionMessage(e));\n return false;\n }\n\n /*\n * Parse the request line, and read the request headers.\n */\n try {\n _req.read(line);\n }\n catch(MalformedURLException e) {\n logError(\"Malformed URI in HTTP request\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Invalid URI in HTTP request\"\n + getExceptionMessage(e));\n return false;\n }\n catch(MalformedHTTPReqException e) {\n logError(\"Malformed HTTP request\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Invalid HTTP request\" + getExceptionMessage(e));\n return false;\n }\n catch(InterruptedException e) {\n logError(\"Cannot read request: connection timeout\");\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST, \"connection timeout\");\n return false;\n }\n catch(IOException e) {\n logError(\"Cannot read request: I/O error\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.SRVCE_NOT_AVAILABLE,\n \"I/O error\" + getExceptionMessage(e));\n return false;\n }\n\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"Request: '\" + _req.getReqLine() + \"'\");\n }\n\n /*\n * Process the request based on the request-URI type. The asterisk\n * option (RFC2068, sec. 5.1.2) is not supported.\n */\n if ( (path = _req.getPath()) != null) {\n return redirectClient(path);\n }\n else {\n if ( (url = _req.getURL()) != null) {\n // The redirector is being accessed as a proxy.\n\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Cannot retrieve URL \" + url\n + \"\\n<P>\\n\"\n + \"Invalid URL: unexpected access protocol \"\n + \"(e.g., `http://')\\n\");\n }\n else {\n logError(\"unsupported request-URI: \" + _req.getReqLine());\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"unsupported request-URI\");\n }\n return false;\n }\n }", "@Override\n\t\tprotected String doInBackground(String... args) {\n\t\t\t\tLog.i(\"doInBackground\", \"Starting\");\n\t\t\t//\tLog.i(\"params: \", params.toString());\n\t\t\t\ttry {\n\t\t\t\t\t//JSONObject json = jsonParser.makeHttpRequest(driversUpdateUrl + \"/\" + mDriverEmail + \".json\", \"POST\", params);\n\t\t\t\t\tList<NameValuePair> jobParams = new ArrayList<NameValuePair>();\n\t\t\t\t\tjobParams.add(new BasicNameValuePair(\"driver_id\", mDriverId));\n\t\t\t\t\tjobParams.add(new BasicNameValuePair(\"key\", \"9c36c7108a73324100bc9305f581979071d45ee9\"));\n\t\t\t\t\tJSONObject jsonJobs = jsonParser.makeHttpRequest(getDriverJobsUrl, \"POST\", jobParams);\n\t\t\t\t\tLog.i(\"beforeJsonJobs\", \"hello\");\n\t\t\t\t\tLog.i(\"jsonJobs\", jsonJobs.toString());\n\t\t\t\t\tList<NameValuePair> locationParams = new ArrayList<NameValuePair>();\n\t\t\t\t\tlocationParams.add(new BasicNameValuePair(\"key\", \"9c36c7108a73324100bc9305f581979071d45ee9\"));\n\t\t\t\t\tJSONObject jsonLocations = jsonParser.makeHttpRequest(getLocationsUrl, \"POST\", locationParams);\n\t\t\t\t\t//Log.i(\"1: \", jsonJobs.getString(\"name\"));\n\t\t\t\t\t//Log.i(\"2: \", jsonJobs.getString(\"Job.name\"));\n\t\t\t\t\t//Log.i(\"count: \", \"s: \" + jsonJobs.getJSONArray(\"message\").length());\n\t\t\t\t\t//jsonJobs.getJSONArray(\"message\").getJSONObject(0).getJSONObject(\"Job\"));\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//if(json.getString(\"message\").equals(\"Driver Updated\")){\n\t\t\t\t\t\t//\tLog.i(\"Well done\", \"Well done\");\n\t\t\t\t\t\t//\tuserDB.open();\n\t\t\t\t\t\t//\tuserDB.updateUserRecord(\"synced\", \"Yes\", mDriverId);\n\t\t\t\t\t\t//\tuserDB.close();\n\t\t\t\t\t\t\tjobsDB.open();\n\t\t\t\t\t\t\tjobPackagesDB.open();\n\t\t\t\t\t\t\tLog.i(\"DB Open\", \"Yes\");\n\t\t\t\t\t\t\tfor(int i=0; i<jsonJobs.getJSONArray(\"message\").length(); i++){\n\t\t\t\t\t\t\t\tLog.i(\"for\", \"for started\");\n\t\t\t\t\t\t\t\tLog.i(\"1: \", jsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").toString());\n\t\t\t\t\t\t\t\t//Log.i(\"1: \", jsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"DriverVehicleJob\").toString());\n\t\t\t\t\t\t\t\t//Log.i(\"1: \", jsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"DriverVehicleJob\").getString(\"driver_id\"));\n\t\t\t\t\t\t\t\t//Log.i(\"2: \", jsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"DriverVehicleJob\").getJSONObject(0).getString(\"vehicle_id\"));\n\t\t\t\t\t\t\t\tCursor existingJob = jobsDB.getJob(jsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"id\"));\n\t\t\t\t\t\t\t\tif(existingJob.getCount() == 0){\n\t\t\t\t\t\t\t\t\tjobsDB.createJob(\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"id\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"name\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"collection_id\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"dropoff_id\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"status\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"completed_date\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"created\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"modified\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"additional_details\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"due_date\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"DriverVehicleJob\").getJSONObject(0).getString(\"vehicle_id\"),\n\t\t\t\t\t\t\t\t\t\t\t//jsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"DriverVehicleJob\").getString(\"vehicle_id\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Job\").getString(\"created_by\"),\n\t\t\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor(int p=0;p<jsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"JobPackage\").length();p++){\n\t\t\t\t\t\t\t\t\t\tjobPackagesDB.createJobPackage(\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"JobPackage\").getJSONObject(p).getString(\"id\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"JobPackage\").getJSONObject(p).getString(\"job_id\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"JobPackage\").getJSONObject(p).getString(\"package_id\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"JobPackage\").getJSONObject(p).getString(\"notes\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"JobPackage\").getJSONObject(p).getString(\"status\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonJobs.getJSONArray(\"message\").getJSONObject(i).getJSONArray(\"JobPackage\").getJSONObject(p).getString(\"modified\")\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tjobPackagesDB.close();\n\t\t\t\t\t\t\tjobsDB.close();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tLog.i(\"Start\", \"Fetching locations\");\n\t\t\t\t\t\t\t\tlocationsDB.open();\n\t\t\t\t\t\t\t\tfor(int i=0; i<jsonLocations.getJSONArray(\"message\").length(); i++){\n\t\t\t\t\t\t\t\t\tLog.i(\"Location: \", jsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").toString());\n\t\t\t\t\t\t\t\t\t//Log.i(\"1: \", jsonLocations.getJSONArray(\"message\").getJSONObject(1).getString(\"name\"));\n\t\t\t\t\t\t\t\t\tlocationsDB.createLocation(\n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"id\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"name\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"address1\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"address2\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"address3\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"town\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"county\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"postcode\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"location_opening_times_id\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"telephone\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"created\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"modified\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"longitude\"),\n\t\t\t\t\t\t\t\t\t\t\tjsonLocations.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Location\").getString(\"latitude\")\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlocationsDB.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tLog.i(\"Vehicle Start\", \"Fetching Vehicles\");\n\t\t\t\t\t\t\t\tList<NameValuePair> vehiclesParams = new ArrayList<NameValuePair>();\n\t\t\t\t\t\t\t\tvehiclesParams.add(new BasicNameValuePair(\"key\", \"9c36c7108a73324100bc9305f581979071d45ee9\"));\n\t\t\t\t\t\t\t\tJSONObject jsonVehicles = jsonParser.makeHttpRequest(getVehiclesUrl, \"POST\", vehiclesParams);\n\t\t\t\t\t\t\t\tvehiclesDB.open();\n\t\t\t\t\t\t\t\tfor(int i=0; i<jsonVehicles.getJSONArray(\"message\").length(); i++){\n\t\t\t\t\t\t\t\t\tLog.i(\"Vehicle:\", jsonVehicles.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Vehicle\").toString());\n\t\t\t\t\t\t\t\t\tvehiclesDB.createVehicle(\n\t\t\t\t\t\t\t\t\t\t\tjsonVehicles.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Vehicle\").getString(\"id\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonVehicles.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Vehicle\").getString(\"name\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonVehicles.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Vehicle\").getString(\"reg_number\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonVehicles.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Vehicle\").getString(\"description\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonVehicles.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Vehicle\").getString(\"available\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonVehicles.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Vehicle\").getString(\"status\")\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tvehiclesDB.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tLog.i(\"Packages start\", \"Fetching packages\");\n\t\t\t\t\t\t\t\tList<NameValuePair> packagesParams = new ArrayList<NameValuePair>();\n\t\t\t\t\t\t\t\tpackagesParams.add(new BasicNameValuePair(\"key\", \"9c36c7108a73324100bc9305f581979071d45ee9\"));\n\t\t\t\t\t\t\t\tJSONObject jsonPackages = jsonParser.makeHttpRequest(getPackagesUrl, \"POST\", packagesParams);\n\t\t\t\t\t\t\t\tLog.i(\"packages\", jsonPackages.toString());\n\t\t\t\t\t\t\t\tpackagesDB.open();\n\t\t\t\t\t\t\t\tfor(int i=0; i<jsonPackages.getJSONArray(\"message\").length();i++){\n\t\t\t\t\t\t\t\t\tLog.i(\"Package:\", jsonPackages.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Package\").toString());\n\t\t\t\t\t\t\t\t\tpackagesDB.createPackage(\n\t\t\t\t\t\t\t\t\t\t\tjsonPackages.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Package\").getString(\"id\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonPackages.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Package\").getString(\"name\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonPackages.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Package\").getString(\"length\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonPackages.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Package\").getString(\"width\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonPackages.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Package\").getString(\"height\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonPackages.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Package\").getString(\"weight\"), \n\t\t\t\t\t\t\t\t\t\t\tjsonPackages.getJSONArray(\"message\").getJSONObject(i).getJSONObject(\"Package\").getString(\"special_reqs\")\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpackagesDB.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (Exception e){\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tIntent refreshIntent = new Intent(InitDataActivity.this, StartDayActivity.class);\n\t\t\t\tstartActivity(refreshIntent);\n\t\t\t\treturn null;\n\t\t\t}", "private RequestData getJobData(SlingHttpServletRequest request) {\n try {\n String data = request.getParameter(PARAM_DATA);\n if (StringUtils.isNotBlank(data)) {\n return new ObjectMapper().readValue(data, RequestData.class);\n }\n } catch (IOException e) {\n logger.error(\"Unable to parse job data from request: {}\", e.getLocalizedMessage());\n }\n return null;\n }", "public static void main(String[] args){ new ThreadPoolBlockingServer().processRequests(); }", "java.util.List<TransmissionProtocol.Request> \n getRequestList();", "public CommandResult getResponse(String input) {\n try {\n Command command = Parser.parse(input);\n CommandResult output = command.executeCommand(taskList, response, storage);\n return output;\n } catch (DukeException e) {\n return new CommandResult(response.showErrorMsg(e));\n }\n }", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "MovilizerRequest getRequestFromString(String requestString);", "public synchronized void tryExecuteRequests(){\n Object lpid = getLocalProcessID();\n\n JDSUtility.debug(\"[PBFTSever:handle(token)] s\" + lpid + \", at time \" + getClockValue() + \", is going to execute requests.\");\n\n //if(isValid(proctoken)){\n long startSEQ = getStateLog().getNextExecuteSEQ();\n long finalSEQ = getHCWM();//proctoken.getSequenceNumber();\n long lcwm = getLCWM();\n\n PBFTRequestInfo rinfo = getRequestInfo();\n\n int viewn = getCurrentViewNumber();\n\n int f = getServiceBFTResilience();\n\n for(long currSEQ = startSEQ; currSEQ <= finalSEQ && currSEQ > lcwm; currSEQ ++){\n\n if(!(getPrepareInfo().count(viewn, currSEQ) >= (2* f) && getCommitInfo().count(viewn, currSEQ) >= (2 * f +1))){\n return;\n }\n\n if(rinfo.hasSomeRequestMissed(currSEQ)){\n JDSUtility.debug(\"[tryExecuteRequests()] s\" + lpid+ \", at time \" + getClockValue() + \", couldn't executed \" + currSEQ + \" because it has a missed request.\");\n return;\n }\n\n if(rinfo.wasServed(currSEQ)){\n continue;\n }\n\n executeSequencedComand(currSEQ);\n//\n// PBFTPrePrepare preprepare = getPrePrepareInfo().get(viewn, currSEQ);\n//\n// for(String digest : preprepare.getDigests()){\n// StatedPBFTRequestMessage loggedRequest = rinfo.getStatedRequest(digest);\n// PBFTRequest request = loggedRequest.getRequest();//rinfo.getRequest(digest); //statedReq.getRequest();\n//\n// IPayload result = lServer.executeCommand(request.getPayload());\n//\n// PBFTReply reply = createReplyMessage(request, result);\n// loggedRequest.setState(RequestState.SERVED);\n// loggedRequest.setReply(reply);\n//\n// JDSUtility.debug(\n// \"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", executed \" + request + \" (CURR-VIEWN{ \" + viewn + \"}; SEQN{\" + currSEQ + \"}).\"\n// );\n//\n// JDSUtility.debug(\"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", has the following state \" + lServer.getCurrentState());\n//\n// loggedRequest.setReplySendTime(getClockValue());\n//\n// if(rinfo.isNewest(request)){\n// IProcess client = new BaseProcess(reply.getClientID());\n// emit(reply, client);\n// }\n//\n// }//end for each leafPartDigest (tryExecuteRequests and reply)\n \n IRecoverableServer lServer = (IRecoverableServer)getServer();\n JDSUtility.debug(\n \"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", after execute SEQN{\" + currSEQ + \"} has the following \" +\n \"state \" + lServer.getCurrentState()\n );\n\n getStateLog().updateNextExecuteSEQ(currSEQ);\n\n long execSEQ = getStateLog().getNextExecuteSEQ() -1;\n long chkPeriod = getCheckpointPeriod();\n\n\n if(execSEQ > 0 && (((execSEQ+1) % chkPeriod) == 0)){\n PBFTCheckpoint checkpoint;\n try {\n checkpoint = createCheckpointMessage(execSEQ);\n getDecision(checkpoint);\n rStateManager.addLogEntry(\n new CheckpointLogEntry(\n checkpoint.getSequenceNumber(),\n rStateManager.byteArray(),\n checkpoint.getDigest()\n )\n );\n\n\n emit(checkpoint, getLocalGroup().minus(getLocalProcess()));\n handle(checkpoint);\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n if(rinfo.hasSomeWaiting()){\n if(isPrimary()){\n batch();\n }else{\n scheduleViewChange();\n }\n }\n }\n }", "private static void taskProcess(String input)\r\n\t{\r\n\t\tswitch (input.toUpperCase())\r\n\t\t{\r\n\t\t\tcase CREATE:\r\n\t\t\t{\r\n\t\t\t\tPostTaskService postTask = new PostTaskService();\r\n\t\t\t\tpostTask.createTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase GET:\r\n\t\t\t{\r\n\t\t\t\tGetTaskService getTask = new GetTaskService();\r\n\t\t\t\tList<Task> taskList = getTask.getAllTasks();\r\n\t\t\t\tTaskSchedulerUtil.getInstance().printTasks(taskList);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase START:\r\n\t\t\t{\r\n\t\t\t\tStartTaskService startTask = new StartTaskService();\r\n\t\t\t\tstartTask.startTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase END:\r\n\t\t\t{\r\n\t\t\t\tEndTaskService endTask = new EndTaskService();\r\n\t\t\t\tendTask.endTask();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n protected String doInBackground(String... params) {\n URL url;\n HttpURLConnection urlConnection = null;\n StringBuilder result = new StringBuilder();\n try {\n url = new URL(params[0]);\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setConnectTimeout(TIMEOUT_MS);\n urlConnection.setReadTimeout(TIMEOUT_MS);\n InputStream in = urlConnection.getInputStream();\n InputStreamReader isw = new InputStreamReader(in);\n\n int data = isw.read();\n while (data != -1) {\n char current = (char) data;\n data = isw.read();\n result.append(current);\n }\n } catch (Exception e) {\n // TODO: Proper logging\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n return result.toString();\n }", "public static String[] stringByExamsAwaitingDurationApprovalParameters(String str) {\n\t\treturn str.split(\n\t\t\t\t\"examID: |subject: |course: |newDuration: |causeOfChange: |]+\");\n\t}", "protected void processRequest(String input) {\r\n\t \r\n\t String[] variables = input.split(\",\");\r\n\t Message myMessage = new Message(variables[0], Integer.valueOf(variables[1]),Integer.valueOf(variables[2]), variables[3],Integer.valueOf(variables[4]), Boolean.parseBoolean(variables[5]), variables[6]);\r\n\t String action = myMessage.getAction();\r\n\t switch (action) {\r\n\tcase \"Setup\":\r\n\t\tmyMessage.setAction(\"Nothing\");\r\n\t\tthis.myItems = new ArrayList<Message>();\r\n\t\tmyItems.add(myMessage);\r\n\t\tbreak;\r\n\tcase \"Buy\":\r\n\t\tbreak;\r\n\r\n\tcase \"Bid\":\r\n\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\r\n\tcase \"TimeOut\":\r\n\t\tbreak;\r\n\t\r\n\t//Continue without any action\r\n\tcase \"Nothing\":\r\n\t\tbreak;\r\n\t}\r\n\t \r\n\t \r\n\t \r\n\t return;\r\n }", "private void readHttpPath(String line) {\n\t\tString[] parts = line.split(\" \");\n\t\tif (parts.length != 3) {\n\t\t\tchannel.close();\n\t\t} else {\n\t\t\trequest = new Request(parts[1].trim());\n\t\t}\n\t}", "public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}", "public static XmlPullParser loadData(Context context, String verb,\n \t\t\tString system, Bundle params) throws ClientProtocolException,\n \t\t\tIOException, XmlPullParserException {\n \t\tArrayList<NameValuePair> qparams = new ArrayList<NameValuePair>();\n \t\tif (params != null) {\n \t\t\tfor (String name : params.keySet()) {\n \t\t\t\tqparams.add(new BasicNameValuePair(name, params.getString(name)));\n \t\t\t}\n \t\t}\n \n \t\tString server = \"\";\n \t\tString key = \"\";\n \t\tif (system.equals(\"Chicago Transit Authority\")) {\n \t\t\tserver = \"www.ctabustracker.com\";\n \t\t\tkey = \"HeDbySM4CUDgRDsrGnRGZmD6K\";\n \t\t} else if (system.equals(\"Ohio State University TRIP\")) {\n \t\t\tserver = \"trip.osu.edu\";\n \t\t\tkey = \"auixft7SWR3pWAcgkQfnfJpXt\";\n \t\t}\n \n \t\tqparams.add(new BasicNameValuePair(\"key\", key));\n \n \t\t// assemble the url\n \t\tURI uri;\n \t\ttry {\n \t\t\turi = URIUtils.createURI(\"http\", // Protocol\n \t\t\t\t\tserver, // server\n \t\t\t\t\t80, // specified in API documentation\n \t\t\t\t\t\"/bustime/api/v1/\" + verb, // path\n \t\t\t\t\tURLEncodedUtils.format(qparams, \"UTF-8\"), null);\n \t\t} catch (URISyntaxException e) {\n \t\t\t// shouldn't happen\n \t\t\tthrow new RuntimeException(e);\n \t\t}\n \n \t\t// assemble our request\n \t\tHttpClient httpClient = new DefaultHttpClient();\n \t\tHttpGet httpget = new HttpGet(uri);\n \t\tLog.i(TAG, \"Retrieving \" + httpget.getURI().toString());\n \t\t// from localytics recordEvent(context,system,verb,false);\n \n \t\t// ah, the blocking\n \t\tHttpResponse response = httpClient.execute(httpget);\n \n \t\tif (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {\n \t\t\tthrow new RuntimeException(response.getStatusLine().toString());\n \t\t}\n \t\tInputStream content = response.getEntity().getContent();\n \t\tXmlPullParserFactory factory = XmlPullParserFactory.newInstance();\n \t\tXmlPullParser xpp = factory.newPullParser();\n \t\txpp.setInput(content, null);\n \t\treturn xpp;\n \t}", "@Test\n\tpublic void testParseBody() throws IOException {\t\n\t\tSocket socket = null;\n\t\tcheckParseBody(new HTTPRequestHandler(socket, \"log/TestFile.log\"), \"query=jumpers&asin=B123&message=hello!\", \"jumpers\", \"query\");\n\t\tcheckParseBody(new HTTPRequestHandler(socket, \"log/TestFile.log\"), \"query=jumpers&asin=B123&message=hello!\", \"B123\", \"asin\");\n\t\tcheckParseBody(new HTTPRequestHandler(socket, \"log/TestFile.log\"), \"query=jumpers&asin=B123&message=hello!\", \"hello!\", \"message\");\n\t\tcheckParseBody(new HTTPRequestHandler(socket, \"log/TestFile.log\"), \"query=&asin=!@#$%^&*&message=i have space\", null , \"query\");\n\t\tcheckParseBody(new HTTPRequestHandler(socket, \"log/TestFile.log\"), \"query=&asin=!@#$%^&*&message=i have space\", \"!@#$%^\", \"asin\");\n\t\tcheckParseBody(new HTTPRequestHandler(socket, \"log/TestFile.log\"), \"query=&asin=!@#$%^&*&message=i have space\", \"i have space\", \"message\");\n\t}", "@Override\n protected String doInBackground(String... strings) {\n try {\n Client c = new Client(Constants.URL_PROGNOSISCALCULATOR);\n c.setLongTimeout();\n request = strings[0];\n String response = c.sendPostJSON(strings[0]);\n\n ArrayList<PrognosisCalculationResult> items = new ArrayList<>();\n if(response.charAt(0) == '{') {\n JSONObject error = new JSONObject(response);\n if(error.has(\"Error Description\")) {\n this.error = error.getString(\"Error Description\");\n }\n } else {\n JSONArray array = new JSONArray(response);\n for (int i = 0; i < array.length(); i++) {\n JSONObject o = array.getJSONObject(i);\n PrognosisCalculationItem p = new PrognosisCalculationItem(o.getJSONObject(\"prognosis\"));\n Service s = new Service(o.getJSONObject(\"service\"));\n items.add(new PrognosisCalculationResult(p, s));\n }\n this.items = items;\n }\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }", "private int[] createGETrequest(String Request_URI) {\n String requestLine = Utils.textToHexString(\"GET\") + \"20\" + Utils.textToHexString(Request_URI)\n + \"20\" + Utils.textToHexString(\"HTTP/1.1\") + \"0d0a\";\n return Utils.stringToHexArr(requestLine);\n }", "List<LoggingEvent> parse(String xml) throws ParseException;", "@Test\n public void testJobOverviewHandler() throws Exception {\n // this only works if there is no active job at this point\n assertTrue(getRunningJobs(CLUSTER.getClusterClient()).isEmpty());\n\n // Create a task\n final JobVertex sender = new JobVertex(\"Sender\");\n sender.setParallelism(2);\n sender.setInvokableClass(BlockingInvokable.class);\n\n final JobGraph jobGraph = JobGraphTestUtils.streamingJobGraph(sender);\n\n ClusterClient<?> clusterClient = CLUSTER.getClusterClient();\n clusterClient.submitJob(jobGraph).get();\n\n // wait for job to show up\n while (getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {\n Thread.sleep(10);\n }\n\n // wait for tasks to be properly running\n BlockingInvokable.latch.await();\n\n final Duration testTimeout = Duration.ofMinutes(2);\n\n String json =\n TestBaseUtils.getFromHTTP(\"http://localhost:\" + getRestPort() + \"/jobs/overview\");\n\n ObjectMapper mapper = new ObjectMapper();\n JsonNode parsed = mapper.readTree(json);\n ArrayNode jsonJobs = (ArrayNode) parsed.get(\"jobs\");\n assertEquals(1, jsonJobs.size());\n assertThat(\"Duration must be positive\", jsonJobs.get(0).get(\"duration\").asInt() > 0);\n\n clusterClient.cancel(jobGraph.getJobID()).get();\n\n // ensure cancellation is finished\n while (!getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {\n Thread.sleep(20);\n }\n\n BlockingInvokable.reset();\n }", "protected SendMessage doInBackground(String... urls) {\n\n\n HttpURLConnection httpcon;\n\n try {\n\n httpcon = (HttpURLConnection) ((new URL(\"http://anip.xyz:8080/deliver/\").openConnection()));\n httpcon.setDoOutput(true);\n httpcon.setRequestProperty(\"Content-Type\", \"application/json\");\n httpcon.setRequestProperty(\"Accept\", \"application/json\");\n httpcon.setRequestMethod(\"POST\");\n httpcon.connect();\n\n OutputStream os = httpcon.getOutputStream();\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, \"UTF-8\"));\n writer.write(data);\n writer.close();\n os.close();\n Log.i(\"hel\", String.valueOf(httpcon.getErrorStream()) + httpcon.getResponseMessage() + httpcon.getResponseCode());\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(httpcon.getInputStream(), \"UTF-8\"));\n\n String line;\n StringBuilder sb = new StringBuilder();\n\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n br.close();\n Gson gson2 = new Gson();\n Log.i(\"he;;\", sb.toString());\n\n result = gson2.fromJson(sb.toString(), SendMessage.class);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Append Server Response To Content String\n\n\n /*****************************************************/\n return result;\n }", "@Override\n protected String doInBackground(String... is) {\n\n // Progress for second task\n while(progress_status < 100){\n\n progress_status += 2;\n publishProgress(progress_status);\n SystemClock.sleep(SLEEP_DURATION);\n }\n\n // Make sure string is not empty\n if (is[0] != null) {\n\n try {\n // return a displayable string\n return parseXML(is[0]);\n\n } catch (Exception e) {\n Log.e(\"XMLExample\", e.getMessage());\n }\n }\n\n // Return null if something went wring\n return null;\n }", "private String[] parseResponseBody(InputStream aInputStream) {\n\t\tString param[] = new String[3];\n\t\tStringBuffer strBuff = new StringBuffer();\n\t\tStringBuffer allBuff = new StringBuffer();\n\t\tbyte buff[] = new byte[1024];\n\t\tint read;\t\t\n\t\tfinal String PREFIX_SEARCH =\"/watch_fullscreen?video_id=\";\n\t\t\n\t\ttry {\n\t\t\tboolean found1st = false;\n\t\t\tboolean foundPrm = false;\n\t\t\twhile((read = aInputStream.read(buff)) >= 0){\n\t\t\t\tallBuff.append(new String(buff));\n\t\t\t\tfor (int i = 0;i < read;i++){\n\t\t\t\t\tchar c = (char)buff[i];\n\t\t\t\t\tif (c == '/') {\n\t\t\t\t\t\tstrBuff.setLength(0);\n\t\t\t\t\t\tstrBuff.append(c);\n\t\t\t\t\t\tfound1st = true;\n\t\t\t\t\t} else if (found1st) {\n\t\t\t\t\t\tstrBuff.append(c);\n\t\t\t\t\t\tif (strBuff.length() == PREFIX_SEARCH.length()) {\n\t\t\t\t\t\t\tfound1st = false;\n\t\t\t\t\t\t\tif (strBuff.toString().contains(PREFIX_SEARCH)) {\n\t\t\t\t\t\t\t\t//yeah.. we found it\n\t\t\t\t\t\t\t\tfoundPrm = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstrBuff.setLength(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (foundPrm) {\n\t\t\t\t\t\tif (c == '&') {\n\t\t\t\t\t\t\tfor (int y = 0;y < 3; y++) {\n\t\t\t\t\t\t\t\tif (param[y] == null){\n\t\t\t\t\t\t\t\t\t//remove parameter name and '=' \n\t\t\t\t\t\t\t\t\tparam[y] = y > 0 ? strBuff.toString().substring(2) : strBuff.toString();\n\t\t\t\t\t\t\t\t\tif (y == 2) {\n\t\t\t\t\t\t\t\t\t\treturn param;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstrBuff.setLength(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstrBuff.append(c);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tFile f = new File(String.valueOf(System.currentTimeMillis() + \".txt\"));\n\t\t\tFileOutputStream fos = new FileOutputStream(f);\n\t\t\tfos.write(allBuff.toString().getBytes());\n\t\t\tfos.close();\n\t\t\tSystem.out.println(allBuff.toString());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//If we go here, then the given parameter is not valid, or there's an exception\n\t\treturn null;\n\t}", "JobResponse apply();", "@Override\n\tprotected String doInBackground(String... params) {\n\t\t RESTClient request=new RESTClient(getURL());\n\t try {\n\t\t\t\trequest.Execute(RequestMethod.GET);\n\t\t\t\treturn request.getResponse();\n\t\t\t} \n\t catch (Exception e) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t \n\t}", "@Override\n protected String doInBackground(String... params) {\n JSONObject jsonobj;\n jsonobj = new JSONObject();\n try {\n long val = Long.parseLong(Register.frequecy)*60 + System.currentTimeMillis()/1000;\n JSONArray arr = new JSONArray();\n arr.put(bp);arr.put(ecg);arr.put(pulse);\n jsonobj.put(\"sensorId\", arr);\n jsonobj.put(\"frequency\" , 5);\n jsonobj.put(\"tillWhen\" , val);\n StringEntity se = new StringEntity(jsonobj.toString());\n se.setContentType(\"application/json;charset=UTF-8\");\n se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, \"application/json;charset=UTF-8\"));\n HttpClient httpclient = new DefaultHttpClient();\n URL url = new URL(\"http://10.42.0.58:6300/monitor/register_frequency\");\n HttpPost httppostreq = new HttpPost(url.toString());\n httppostreq.setEntity(se);\n HttpResponse response;\n response = httpclient.execute(httppostreq);\n String resp_text = EntityUtils.toString(response.getEntity());\n // Convert String to json object\n JSONObject json = new JSONObject(resp_text);\n id = json.getString(\"id\");\n while(true){\n Thread.sleep(5000);\n String urlGET = \"http://10.42.0.58:6300/monitor/getresults?id=\"+id;\n HttpGet getMethod = new HttpGet(urlGET);\n HttpResponse response1 = null;\n HttpClient httpClient = new DefaultHttpClient();\n response1 = httpClient.execute(getMethod);\n String resp_text1 = EntityUtils.toString(response1.getEntity());\n // Convert String to json object\n JSONObject json1 = new JSONObject(resp_text1);\n String message = json1.getString(\"Message\");\n if(message.equalsIgnoreCase(\"pending\")){\n //publishProgress(\"Session ended\");\n //break;\n continue;\n\n }\n Log.d(\"message\",resp_text1);\n String bpMsg = json1.getString(\"bp\");\n String ecgMsg = json1.getString(\"ecg\");\n String pulseMsg = json1.getString(\"pulse\");\n String msg = json1.getString(\"Message\");\n if(msg.equalsIgnoreCase(\"Last data packet\")){\n publishProgress(\"Session ended\");\n break;\n\n }\n\n /*String bpMsg = Register.bp;\n String ecgMsg = Register.ecg;\n String pulseMsg = Register.pulse;\n publishProgress(bpMsg+\",\"+ecgMsg+\",\"+pulseMsg);\n Random r = new Random();\n ecg = Integer.toString(r.nextInt(100));\n bp = Integer.toString(r.nextInt(100));\n pulse = Integer.toString(r.nextInt(100));*/\n publishProgress(bpMsg+\",\"+ecgMsg+\",\"+pulseMsg);\n }\n //bp = json.getString(\"bp\");\n //pulse = json.getString(\"pulse\");\n //Intent i = new Intent(getApplicationContext(),MainActivity.class);\n //startActivity(i);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n protected String[] doInBackground(String... params) {\n String jsonTags = RequestManger.requestGet(params[0]);\n String jsonRest = RequestManger.requestGet(params[1]);\n return new String[]{(jsonTags),(jsonRest)};\n }", "public int getJobId() ;", "public static ArrayList<Task> parse(String toParse) {\n ArrayList<Task> result = new ArrayList<>();\n Scanner ps = new Scanner(toParse); // passes whole file into the scanner\n while (ps.hasNextLine()) {\n String nLine = ps.nextLine(); // parse one line at a time\n int ref = 3; // reference point\n char taskType = nLine.charAt(ref);\n switch (taskType) {\n case 'T':\n parseTodo(ref, nLine, result);\n break;\n case 'D':\n parseDeadline(ref, nLine, result);\n break;\n case 'E':\n parseEvent(ref, nLine, result);\n break;\n default:\n System.out.println(\"Unknown input\");\n break;\n }\n }\n return result;\n }", "@Override\n protected String doInBackground(String... params) {\n StringBuilder results = new StringBuilder();\n\n try {\n URL url = new URL(params[0]);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\n int statusCode = conn.getResponseCode();\n if (statusCode == 200) {\n InputStream inputStream = new BufferedInputStream(conn.getInputStream());\n\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n results.append(line);\n }\n }\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n return results.toString();\n }", "@Override\n protected Object doInBackground(Object[] objects)\n {\n URL url = null; \n\n try\n {\n url = new URL(requestUrl);\n }\n catch (MalformedURLException e)\n {\n e.printStackTrace();\n }\n\n // Create and open HTTP connection\n HttpURLConnection connection = null;\n try\n {\n connection = (HttpURLConnection) url.openConnection();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n\n try\n {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(line);\n }\n\n bufferedReader.close();\n\n return stringBuilder.toString();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n connection.disconnect();\n }\n\n return null;\n }", "String getResponse(String input) {\n Command command;\n String message;\n try {\n command = Parser.parse(input);\n assert this.tasks != null;\n assert this.ui != null;\n assert this.storage != null;\n message = command.execute(this.tasks, this.ui, this.storage);\n this.storage.updateFile(this.tasks.getTasks());\n } catch (Exception e) {\n return e.toString();\n }\n return \"Duke heard: \" + input + \"\\n\" + message;\n }", "private void parseForRecords() {\r\n\t\tApacheAgentExecutionContext c = (ApacheAgentExecutionContext)this.fContext;\r\n\t\tString text = c.getStatusPageContent();\r\n\t\tif(text == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tswitch(c.getApacheVersion()) {\r\n\t\t\tcase VERSION_IBM_6_0_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_ibm_6_0(text);\r\n\t\t\tbreak;\r\n\t\t\tcase VERSION_ORACLE_1_3_X:\r\n\t\t\tcase VERSION_IBM_1_3_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_1_3_x(text);\r\n\t\t\tbreak;\r\n\t\t\tcase VERSION_ORACLE_2_0_X:\r\n\t\t\tcase VERSION_IBM_2_0_X:\r\n\t\t\t\trecords = ApacheUtils.parseExtendedStatus_1_3_x(text);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tif(records == null) {\r\n\t\t\tfContext.error(new InvalidDataPattern());\r\n\t\t}\r\n\t}", "private String parsePostRequest(StringTokenizer parse) {\n\t\tString fileRequested = parse.nextToken();\r\n\r\n\t\treturn null;\r\n\t}", "Task poll();", "@Override\n protected Void doInBackground(Integer... params) {\n try {\n\n Intent itnt = getIntent();\n String url = getResources().getString(R.string.jobServiceUrl) + \"statistics/getTehnologyTrend?\" + itnt.getStringExtra(\"searchParams\");\n\n// String url = \"http://192.168.1.1:8080/webService/statistics/getTehnologyTrend?tehnologyIds=1,3,6,4,7,10,13&startDate=2014-08-03&endDate=2015-03-03\";\n\n RestService rs = new RestService();\n\n monthlyTrendsList = new ArrayList<MonthlyTrend>();\n monthlyTrendsList = rs.getList(url, MonthlyTrend[].class);\n\n\n } catch (Exception e) {\n Log.e(\"JobListActivity\", e.getMessage(), e);\n }\n\n return null;\n }", "public void listJobExecutions() {\r\n\t\tRestCall caller = new RestCall();\r\n\t\tHttpURLConnection connection = caller.connect(endpoint + tenantId\r\n\t\t\t\t+ \"/job-executions\", null, \"GET\", token);\r\n\t\ttry {\r\n\t\t\tconnection.connect();\r\n\t\t\tSystem.out.println(caller.getResponse(connection));\r\n\t\t\tconnection.disconnect();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void parseCompleteReqMessage() {\r\n byte result = _partialMessage.get(0);\r\n byte opCode = _partialMessage.get(1);\r\n byte numberOfParams = _partialMessage.get(2);\r\n\r\n /* cursor of bytes within 'message'. Parameters start at position 2 */\r\n int messageIndex = 3;\r\n int availableChars = (int) _partialMessage.size();\r\n\r\n List<String> paramList = new ArrayList<>();\r\n String param;\r\n\r\n for (byte i = 0; (i < numberOfParams) && (messageIndex < availableChars); i++) {\r\n param = \"\";\r\n\r\n /* collect data up to terminator */\r\n while ((messageIndex < availableChars) &&\r\n (_partialMessage.get(messageIndex) != '\\0')) {\r\n param += (char)((byte)(_partialMessage.get(messageIndex)));\r\n ++ messageIndex;\r\n }\r\n\r\n /* skip after terminator */\r\n if (messageIndex < availableChars) {\r\n ++ messageIndex;\r\n }\r\n\r\n paramList.add( param);\r\n }\r\n\r\n _replyDispatcher.onReplyReceivedForRequest(opCode, result, paramList);\r\n }", "public Task parseLine(String line) {\n assert(line != null && !line.equals(\"\"));\n\n String[] x = line.split(\"\\\\|\");\n String taskType = x[0].strip();\n boolean isDone = !x[1].strip().equals(\"0\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d MMM yyyy HH:mm\");\n\n if (taskType.equals(\"T\")) {\n return new ToDo(x[2].strip(), isDone);\n } else if (taskType.equals(\"D\")) {\n String by = x[x.length - 1].strip();\n LocalDateTime byy = LocalDateTime.parse(by, formatter);\n return new Deadline(x[2].strip(), isDone, byy);\n } else { // Event\n String at = x[x.length - 1].strip();\n LocalDateTime att = LocalDateTime.parse(at, formatter);\n return new Event(x[2].strip(), isDone, att);\n }\n }", "public int getJobStatus(int jNo);", "public static WSResponse startJob(String conf_id, String url, String record_id) {\n Configuration runConfig = getConfigurationFromDb(conf_id);\n\n List<TextAnnotation> correctInstances = getInstancesFromDb(runConfig);\n List<TextAnnotation> cleansedInstances = getInstancesFromDb(runConfig);\n System.out.println(url);\n LearnerInterface learner = new LearnerInterface(url);\n String jsonInfo = learner.getInfo();\n if (jsonInfo.equals(\"err\")) {\n System.out.println(\"Could not connect to server\");\n return null;\n }\n cleanseInstances(cleansedInstances, jsonInfo);\n if (cleansedInstances == null) {\n System.out.println(\"Error in cleanser\");\n return null;\n }\n Job newJob = new Job(learner, cleansedInstances);\n WSResponse solverResponse = newJob.sendAndReceiveRequestsFromSolver();\n List<TextAnnotation> solvedInstances = newJob.getSolverInstances();\n List<Boolean> skip = newJob.getSkip();\n EvaluationRecord eval = evaluate(runConfig, correctInstances, solvedInstances, skip);\n storeEvaluationIntoDb(eval, record_id);\n System.out.println(solverResponse);\n return solverResponse;\n }", "void dispatchRequest(String urlPath) throws Exception;", "public static void main(String[] args) throws Exception {\n\n\t\tfinal ByteBuffer buffer = ByteBuffer.allocate(8192);\n\t\t\n\t\tTimer timer = new Timer();\n\t\tTimerTask task = new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tlong begin = System.currentTimeMillis();\n\t\t\t\tString params = \"\";\n//\t\t\t\tString params = \"sessionId=10050000000000000100&organId=10010000000000000000&recursion=1\";\n//\t\t\t\tString params = \"sessionId=10050000000000000100&id=10020000000000000000\";\n//\t\t\t\tString params = \"<Request Method=\\\"Get_Resource_Route_Info\\\" Cmd=\\\"3007\\\"><StandardNumber>251010100001000001</StandardNumber></Request>\";\n\t\t\t\tfor (int i = 0; i < 400; i++) {\n//\t\t\t\t\tString params = \"sessionId=10050000000000000000&subType=01&name=DVR-test-\"+i+\"&transport=TCP&mode=compatible&maxConnect=16&channelAmount=32&organId=10010000000000000001&lanIp=192.168.1.\"+i+\"&port=5060&userName=admin&password=123456&heartCycle=120&ptsId=10060000000000000004\";\n\t\t\t\t\tSocketChannel channel = SocketHttpUtil.sendPost(\n\t\t\t\t\t\t\t\"192.168.1.2\", 8080, \n//\t\t\t\t\t\t\t\"/cms/create_dvr.json\",\n//\t\t\t\t\t\t\t\"/cms/get_user.json\",\n//\t\t\t\t\t\t\t\"/cms/get_resource_route_info.xml\",\n//\t\t\t\t\t\t\t\"/cms/list_organ_device.xml\",\n\t\t\t\t\t\t\t\"/cms/test_interface.json\",\n\t\t\t\t\t\t\tparams, \"utf8\");\n\n\t\t\t\t\t\n\t\t\t\t\tint count = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile ((count = channel.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t// donothing\n//\t\t\t\t\t\t\tbuffer.flip();\n//\t\t\t\t\t\t\tbyte[] dst = new byte[count];\n//\t\t\t\t\t\t\tbuffer.get(dst, 0, count);\n//\t\t\t\t\t\t\tSystem.out.print(new String(dst));\n\t\t\t\t\t\t\tbuffer.clear();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (channel != null && channel.isOpen()) {\n//\t\t\t\t\t\t\tchannel.socket().close();\n\t\t\t\t\t\t\tchannel.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlong end = System.currentTimeMillis();\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"use \" + (end - begin) + \" ms\");\n\n\t\t\t}\n\t\t};\n\t\t\n\t\ttimer.scheduleAtFixedRate(task, 0, 1000);\n\t}" ]
[ "0.5302073", "0.5270852", "0.51755893", "0.51240546", "0.5072283", "0.5018725", "0.48358792", "0.4767834", "0.4733322", "0.4712452", "0.47056395", "0.47002548", "0.46728253", "0.46523488", "0.4637754", "0.46377465", "0.4611696", "0.45752478", "0.4572856", "0.45705867", "0.4543804", "0.4537848", "0.45345327", "0.45306942", "0.45213744", "0.45110667", "0.44778505", "0.44775262", "0.44587618", "0.4454676", "0.4447676", "0.44373327", "0.44359854", "0.44300926", "0.4411173", "0.4400634", "0.4377073", "0.43722975", "0.4371479", "0.43707958", "0.43676728", "0.4356016", "0.43525958", "0.43423212", "0.4339831", "0.4336026", "0.43298632", "0.43167177", "0.43140432", "0.4312022", "0.43098515", "0.43085676", "0.43054393", "0.4287733", "0.42874488", "0.4281312", "0.42802134", "0.42783293", "0.42765874", "0.42718825", "0.4267511", "0.42654288", "0.42617065", "0.42580262", "0.42543235", "0.42521286", "0.42454144", "0.42450356", "0.42426318", "0.4241036", "0.4237655", "0.42361286", "0.4236064", "0.42339185", "0.42254132", "0.42198795", "0.42198086", "0.42171466", "0.42163953", "0.42126438", "0.42103982", "0.4204745", "0.42035857", "0.4203388", "0.4202868", "0.41979384", "0.41908783", "0.41903022", "0.41882384", "0.41803813", "0.41795895", "0.41780007", "0.41713563", "0.4166993", "0.41667432", "0.4160117", "0.41591552", "0.41588113", "0.41568688", "0.41550964" ]
0.64423627
0
instructions for computing values
Object visit(CopyInstr ir) { ir._out.accept(this); ir._in.accept(this); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract SoyValue compute();", "public abstract double compute(double value);", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "double getValue();", "double getValue();", "double getValue();", "protected abstract Value evaluate();", "@Override\r\n\tprotected double evaluate(double[] values) throws EvaluationException {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0 ; i < values.length ; i++){\r\n\t\t\tsum += values[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public abstract double calcular();", "@Override\n public Float compute() {\n\treturn calc();\n }", "public void execute() {\n switch (this.opCode) {\n case 'a':\n this.result = this.leftVal + this.rightVal;\n break;\n case 's':\n this.result = this.leftVal - this.rightVal;\n break;\n case 'm':\n this.result = this.leftVal * this.rightVal;\n break;\n case 'd':\n this.result = this.rightVal != 0 ? this.leftVal / this.rightVal : 0.0d;\n break;\n default:\n System.out.println(\"Invalid opCode: \" + this.opCode);\n this.result = 0.0d;\n break;\n }\n numOfCalculations++;\n sumOfResults += result;\n }", "protected abstract double operation(double val);", "public void compute() {}", "public abstract double getValue();", "protected float compute(){\n float result = 0f;\n String[] post = in2post(this.arr);\n result = post2ans(post);\n return result;\n }", "public abstract double computeValue(Density density);", "public abstract double evaluate(double value);", "@Override\n\tpublic List<Double> computeValues() {\n\t\treturn null;\n\t}", "final private void accumulate()\n\t{\n\t\tfinal int argb = target.get().get();\n\t\taccA += ( ( argb >> 24 ) & 0xff ) * weights[ code ];\n\t\taccR += ( ( argb >> 16 ) & 0xff ) * weights[ code ];\n\t\taccG += ( ( argb >> 8 ) & 0xff ) * weights[ code ];\n\t\taccB += ( argb & 0xff ) * weights[ code ];\n\n//\t\tSystem.out.print( \"accumulating value at \" + target );\n//\t\tSystem.out.print( \"with weights [\" );\n//\t\tprintCode();\n//\t\tSystem.out.printf( \"] = %f\" + \"\\n\", weights[ code ] );\n\t}", "public double getValue();", "public void calculate();", "@Override\r\n\tpublic void compute() {\n\t\t\r\n\t}", "private void calculations() {\n\t\tSystem.out.println(\"Starting calculations\\n\");\n\t\tcalcMedian(myProt.getChain(requestedChain));\n\t\tcalcZvalue(myProt.getChain(requestedChain));\n\t\tcalcSVMweightedZvalue(myProt.getChain(requestedChain));\n\t}", "float getValue();", "float getValue();", "float getValue();", "@VTID(14)\r\n double getValue();", "@Override\n\t\tprotected int computeValue() {\n\t\t\treturn squareSide.get() * squareSide.get(); //return squared value\n\t\t}", "@Override\n public double evaluate(DataCenterInterface dataCenter,\n double binCpuRemain,\n double binMemRemain,\n double binActualCpuUsed,\n double binActualMemUsed,\n double itemCpuUsed,\n double itemMemUsed,\n double itemActualCpuUsed,\n double itemActualMemUsed) {\n return 0;\n }", "@Override\n\tpublic void getResultat() {\n\t\tcalcul();\n\t}", "@Override\n\tpublic double evaluate() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "public void evaluate(ContainerValue cont, Value value, List<Value> result);", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "public double calculateValue () {\n return double1 * double2;\n }", "public static void compute() {\n\n }", "public void compute(){\r\n\r\n\t\ttotalCost=(capAmount*CAPCOST)+(hoodyAmount*HOODYCOST)+(shirtAmount*SHIRTCOST);\r\n\t}", "Double getValue();", "public double evaluate(){\n trialsSoFar++;\n double tot = 0;\n int ix = 0;\n while (ix < genome.getGenome().size()) {\n // directly access the current value field of each bandit\n boolean block = true;\n for (int j=0; j<blockSize; j++) {\n if (genome.getGenome().get(ix).getX() != 1)\n block = false;\n ix++;\n }\n if (block) {\n tot += blockSize;\n }\n }\n return tot;\n }", "public final double evaluate(double x,double[] pars){ return value(x,pars); }", "@Override\n\tpublic void calculating() {\n\t\tresult=leftVal-rightVal;\n\t\t\n\t}", "double getBasedOnValue();", "float getEvaluationResult();", "@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}", "public void calcOutput()\n\t{\n\t}", "void evaluate()\n\t{\n\t\toperation.evaluate();\n\t}", "protected abstract float getValue(Entity e,FloatTrait t);", "public abstract float getValue();", "public double getValue(Hashtable positions, int[] conf) {\n\n return 0.0;\n}", "public double evaluate(Context context);", "public abstract double calcSA();", "private double individualEvaluation() {\n\t\t//System.out.println(\"indE\"+ myValues.get(myAction.getPurpose()).getStrength(null));\n\t\treturn myValues.get(myAction.getPurpose()).getStrength(null);\n\t}", "public abstract void compute();", "public void evaluate() {\r\n Statistics.evaluate(this);\r\n }", "public abstract double value(Instance output, Instance example);", "public float calculate(HashMap<String, Float> values) {\n\t\tfloat result = 1.0f; // 1*h1*h2...\n\t\t\n\t\ttry {\n\t\t\tfor(String component : components) {\n\t\t\t\tif(!values.containsKey(component)) throw new Exception(\"Component was not found in the value map.\");\n\t\t\t\tresult *= values.get(component);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tif(error)\n\t\t\tresult = 1 - result;\n\t\t\n\t\treturn result;\n\t}", "@Override\r\n protected double computeValue()\r\n {\n return interpFlow.getValue(Scheduler.getCurrentTime());\r\n }", "@Override\n public void step(final EvaluationContext theContext)\n {\n // pop the top 2 values and add them\n // and push the result onto the value stack\n //\n final Double theSecondOperand = theContext.popValue();\n final Double theFirstOperand = theContext.popValue();\n theContext.pushValue(theFirstOperand * theSecondOperand);\n }", "@Override\n public void step(final EvaluationContext theContext)\n {\n // pop the top 2 values and add them\n // and push the result onto the value stack\n //\n final Double theSecondOperand = theContext.popValue();\n final Double theFirstOperand = theContext.popValue();\n theContext.pushValue(theFirstOperand / theSecondOperand);\n }", "@Override\n\tpublic Number computeMetricValue(Map<String, Number> values) {\n\t\treturn values.values().toArray(new Number[1])[0];\n\t}", "public abstract double[] evaluateAt(double u, double v);", "private void equate()\n\t{\n\t\t\tif(Fun == Function.ADD)\n\t\t\t{\t\t\t\n\t\t\t\tresult = calc.sum ( );\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end ADD condition\n\t\t\t\n\t\t\telse if(Fun == Function.SUBTRACT)\n\t\t\t{\n\t\t\t\tresult = calc.subtract ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end SUBTRACT condition\n\t\t\t\n\t\t\telse if (Fun == Function.MULTIPLY)\n\t\t\t{\n\t\t\t\tresult = calc.multiply ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end MULTIPLY condition\n\t\t\t\n\t\t\telse if (Fun == Function.DIVIDE)\n\t\t\t{\n\t\t\t\tresult = calc.divide ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}\n\t\t\t\t\n\t}", "double getPValue();", "public int value(){ // no input , some output\n\t\t\tSystem.out.println(\"value method\");\n\n\t\t\tint a = 10;\n\t\t\tint b = 20;\n\t\t\tint c = a+b;\n\t\t\treturn c ;\n\t\t}", "protected abstract Object doCalculations();", "R getValue();", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 * n2;\r\n\t}", "public double getValue(double[] parameters);", "public abstract Number calculateDirectValue(Parallax parallax);", "V getValue();", "V getValue();", "V getValue();", "@Override\r\n public void calculate() {\r\n // do the calculations\r\n this.categories = new String[]{\"one\", \"two\"};\r\n this.data = new double[]{75, 50};\r\n }", "@Override\n\tprotected Integer compute() {\n\t\treturn 3;\n\t}", "public abstract Double getDataValue();", "@Override\n public void step(final EvaluationContext theContext)\n {\n // pop the top 2 values and add them\n // and push the result onto the value stack\n //\n final Double theSecondOperand = theContext.popValue();\n final Double theFirstOperand = theContext.popValue();\n theContext.pushValue(theFirstOperand - theSecondOperand);\n }", "@Override\n public double getResult(Map<String, Double> values) {\n List<Node> nodes = getChildNodes();\n double result = nodes.get(0).getResult(values);\n if (nodes.size() > 1) {\n for (int i = 1; i < nodes.size(); i++) {\n result = result / nodes.get(i).getResult(values);\n }\n }\n return result;\n }", "public void MUL( ){\n String tipo1 = pilhaVerificacaoTipos.pop().toString();\n String tipo2 = pilhaVerificacaoTipos.pop().toString();\n String val1 = dads.pop().toString();\n float fresult = -1;\n int iresult = -1;\n String val2 = dads.pop().toString();\n if(val1 != null && val2 != null){\n if (tipo1 != null && tipo2 != null){\n if(tipo1 == \"inteiro\" && tipo2 == \"real\"){\n fresult = Integer.parseInt(val1) * Float.parseFloat(val2);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }else if(tipo1 == \"real\" && tipo2 ==\"inteiro\"){\n fresult = Integer.parseInt(val2) * Float.parseFloat(val1);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }else if(tipo1 == \"real\" && tipo2 ==\"real\"){\n fresult = Float.parseFloat(val2) * Float.parseFloat(val1);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }else if(tipo1 == \"inteiro\" && tipo2 ==\"inteiro\"){\n iresult = Integer.parseInt(val2) * Integer.parseInt(val1);\n dads.push(iresult);\n pilhaVerificacaoTipos.push(\"inteiro\");\n }\n else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(1): essa instrução é válida apenas para valores inteiros ou reais.\";\n numErrVM += 1;\n return;\n }\n }else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(2): não foi possível executar a instrução, tipo null encontrado.\";\n numErrVM += 1;\n return;\n }\n }else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(3): não foi possível executar a instrução, valor null encontrado.\";\n numErrVM += 1;\n return;\n }\n\n\n\n topo += -1;\n ponteiro += 1;\n }", "double get();", "@Override\n protected Vector.VectorBuilder doEvaluate(ArithmeticOperationEnum arithmeticOp, Vector left, Vector right) {\n List<? extends BigDecimal> leftVals = left == null ? null : left.getValues();\n List<? extends BigDecimal> rightVals = right == null ? null : right.getValues();\n\n List<BigDecimal> res = doEval(arithmeticOp, leftVals, rightVals);\n Vector.VectorBuilder ret = Vector.builder();\n ret.setValues(res);\n return ret;\n }", "Result evaluate();", "public float[] compute(float[] values) throws Exception {\r\n input(values);\r\n return compute();\r\n }", "public void execute() throws ProcessException\r\n {\r\n \tdouble input = inputVar.getData().getDoubleValue(); \t\r\n \t\r\n \tswitch (interpolationMethod)\r\n \t{\r\n \t\tcase 1:\r\n \t\t\tcomputeInterpolatedValue1D(input);\r\n \t\t\tbreak; \t\t\t\r\n \t}\r\n \t\r\n \t//System.out.println(getName() + \": \" + input + \" -> \" + outputVars[0].getData().getDoubleValue());\r\n }", "public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}", "public void performEvaluation(){\n if(validateExp(currentExp)){\n try {\n Double result = symbols.eval(currentExp);\n currentExp = Double.toString(result);\n calculationResult.onExpressionChange(currentExp,true);\n count=0;\n }catch (SyntaxException e) {\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n e.printStackTrace();\n }\n }\n\n }", "public void evaluate(ContainerValue c1, ContainerValue c2, List<Value> result);", "@Override\r\n\t\tvoid calculate() {\r\n\t\t\tnum3=num1+num2;\r\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic double value(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\treturn d + ((a - d) / (1 + Math.pow((x+e)/c, b)));\r\n\t\t}", "double compute() {\r\ndouble b, e;\r\nb = (1 + rateOfRet/compPerYear);\r\ne = compPerYear * numYears;\r\nreturn principal * Math.pow(b, e);\r\n}", "@Override\n public double calculate(double input)\n {\n return input/getValue();\n }", "void visit(ArithmeticValue value);", "@Override\n public void step(final EvaluationContext theContext)\n {\n // pop the top 2 values and add them\n // and push the result onto the value stack\n //\n final Double theSecondOperand = theContext.popValue();\n final Double theFirstOperand = theContext.popValue();\n theContext.pushValue(theFirstOperand + theSecondOperand);\n }", "private double getValue() {\n return value;\n }", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "private void iterativeDataPropertyMetrics() {\n\t}", "public double getResult() {\n\t\treturn result; // so that skeleton code compiles\n\t}", "@Override\r\n\tpublic double calculate() {\n\t\treturn n1 / n2;\r\n\t}", "double getSum();" ]
[ "0.7362696", "0.6955321", "0.68321365", "0.6809968", "0.6809968", "0.6809968", "0.66717196", "0.6636939", "0.6582476", "0.6575538", "0.65541434", "0.6550993", "0.6543611", "0.65239245", "0.6496237", "0.64745903", "0.64405763", "0.64315134", "0.6378419", "0.6376208", "0.6370882", "0.637059", "0.63228506", "0.6295694", "0.6295694", "0.6295694", "0.6267767", "0.62578845", "0.6251679", "0.6251305", "0.623666", "0.62290674", "0.6221451", "0.6215616", "0.62005395", "0.61827725", "0.61739147", "0.616556", "0.614157", "0.6129625", "0.6126575", "0.6124913", "0.61203486", "0.61108047", "0.6100994", "0.60749614", "0.6074523", "0.60486305", "0.6031229", "0.6029444", "0.60243386", "0.6023122", "0.6019887", "0.60190594", "0.6017128", "0.6008597", "0.6001422", "0.5998923", "0.59922457", "0.5989968", "0.59898007", "0.5980748", "0.5979889", "0.5972067", "0.5964545", "0.59599406", "0.5955534", "0.59530437", "0.59479076", "0.59479076", "0.59479076", "0.5946413", "0.594521", "0.59428626", "0.59416103", "0.5936536", "0.5934151", "0.5932914", "0.5930071", "0.5920256", "0.591982", "0.59138393", "0.59093773", "0.58819824", "0.5881531", "0.58780026", "0.58770245", "0.5869493", "0.5868516", "0.58680034", "0.585702", "0.5853592", "0.58517814", "0.58517814", "0.58517814", "0.58517814", "0.58517814", "0.5845879", "0.5842467", "0.5833388", "0.5824002" ]
0.0
-1
instructions for memory access
Object visit(ArrReadInstr ir) { ir._out.accept(this); ir._base.accept(this); ir._subscript.accept(this); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int accessMemory(int id, int pageNumber)\n\t{ \n\t\treturn 0;\n\t}", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "long getMemory();", "long getMemory();", "long getMemswap();", "public long memory() {\n\treturn 0;\n }", "public void processMemory()\n {\n try{\n String memory = oReader.readLine();\n int index = 0;\n //adding mememory to and array\n for(int i = 0; i<memory.length()-2; i+=2)\n {\n String hexbyte = memory.substring(i, i+2); //get the byt ein hex\n mem.addEntry(\"0x\"+hexbyte, index, 1);\n index++;\n }\n } catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "long memoryUnused();", "int memSize() {\n return super.memSize() + 4 * 4; }", "public native long memoryConsumed();", "public int getMemoryLoad() { return memoryLoad; }", "void visit(MemoryExpression expression);", "public MainMemory getMem()\n {\n return mem;\n }", "public IMemory getMemory() { return memory; }", "static void inr_mem(String passed){\n\t\tint val = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tval++;\n\t\tmemory.put(memory_address_hl(), decimel_to_hexa_8bit(val));\n\t\tmodify_status(memory.get(memory_address_hl()));\n\t}", "public int getMemory(int index) {\n\t\treturn memory.get(index);\n\t}", "public void visit (MemoryTraceStatement aStmt)\n {\n System.out.println(\"Markus Memory:\");\n for (String key : fMemory.keySet ())\n System.out.println(String.format(\"%s\\t%s\", key, fMemory.get (key))); \n }", "@Override\n\tpublic int read() {\n\t\tint lowByte = getFirstArg();\n\t\tint highByte = getSecondArg();\n\t\tint address = highByte;\n\t\taddress = address << 8;\n\t\taddress |= lowByte;\n\t\treturn CpuMem.getInstance().readMem(address);\n\t}", "public long readMem(int index) throws Exception{\n\t\tif(index >= 0 && index < Constants.MEM_SIZE)\n\t\t\treturn memory[index];\n\t\telse\n\t\t\tthrow new Exception(\"Illegal memory location, trying to access MEM[\"+index+\"]\");\n\t}", "private static Instruction performMemoryOperation(Instruction instruction)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (instruction.getOperation() != null && instruction.getOperation().equals(TypesOfOperations.STORE))\n\t\t\t{\n\t\t\t\tInstruction lastInstructionM = stages.get(\"M\");\n\t\t\t\tif (!lastInstructionM.isNOP() && lastInstructionM.getOperation().equals(\"LOAD\")\n\t\t\t\t\t\t&& (lastInstructionM.getDestination().getKey().equals(instruction.getDestination().getKey())))\n\t\t\t\t{\n\t\t\t\t\tinstruction.setDestination(lastInstructionM.getDestination().getValue());\n\t\t\t\t} else if ((!lastInstructionM.isNOP())\n\t\t\t\t\t\t&& lastInstructionM.getDestination().getKey().equals(instruction.getDestination().getKey()))\n\t\t\t\t{\n\t\t\t\t\tinstruction.setDestination(lastInstructionM.getDestination().getValue());\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tinstruction.setDestination(readRegister(instruction.getDestination()));\n\t\t\t\t}\n\t\t\t\tmemoryBlocks[instruction.getMemoryAddress()] = instruction.getDestination().getValue();\n\t\t\t}\n\t\t\tif (instruction.getOperation() != null && instruction.getOperation().equals(TypesOfOperations.LOAD))\n\t\t\t{\n\t\t\t\tinstruction.setDestination(memoryBlocks[instruction.getMemoryAddress()]);\n\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn instruction;\n\t}", "public native int getTotalMemory();", "long memoryUsed();", "private ByteBuffer passTwo() {\r\n\t\t// int hiAddress = ((((instructionCounter.getCurrentLocation() - 1) / SIXTEEN) + 2) * SIXTEEN) - 1;\r\n\t\tint hiAddress = (instructionCounter.getCurrentLocation() - 1) | 0X0F;\r\n\t\tByteBuffer memoryImage = ByteBuffer.allocate(hiAddress + 1);\r\n\r\n\t\tint lowestLocationSet = instructionCounter.getLowestLocationSet();\r\n\t\tinstructionCounter.reset(lowestLocationSet);\r\n\t\tinstructionCounter.setCurrentLocation(lowestLocationSet);\r\n\t\tint currentLocation;\r\n\t\tString instructionImage;\r\n\t\tSourceLineParts sourceLineParts;\r\n\r\n\t\twhile (!allLineParts.isEmpty()) {\r\n\t\t\tinstructionImage = EMPTY_STRING;\r\n\r\n\t\t\tcurrentLocation = instructionCounter.getCurrentLocation();\r\n\t\t\tsourceLineParts = allLineParts.poll();\r\n\r\n\t\t\tif (sourceLineParts.hasInstruction()) {\r\n\t\t\t\tinstructionImage = setMemoryBytesForInstruction(sourceLineParts);\r\n\t\t\t} else if (sourceLineParts.hasDirective()) {\r\n\t\t\t\tinstructionImage = setMemoryBytesForDirective(sourceLineParts);\r\n\t\t\t} // if\r\n\t\t\tmakeListing(currentLocation, instructionImage, sourceLineParts);\r\n\t\t\tif (!instructionImage.equals(EMPTY_STRING)) {\r\n\t\t\t\tbuildMemoryImage(currentLocation, instructionImage, memoryImage);\r\n\t\t\t} // if\r\n\t\t} // while\r\n\r\n\t\ttpListing.setCaretPosition(0);\r\n\t\tmakeXrefListing();\r\n\t\t// makeMemoryFile(memoryImage);\r\n\t\treturn memoryImage;\r\n\t}", "static void dcr_mem(String passed){\n\t\tint val = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tval--;\n\t\tmemory.put(memory_address_hl(), decimel_to_hexa_8bit(val));\n\t\tmodify_status(memory.get(memory_address_hl()));\n\t}", "public int getDataMemory(int index)\n {\n int retValue = 0;\n try { retValue = data_memory[index].intValue(); }\n catch (ArrayIndexOutOfBoundsException OOB) { }\n return retValue;\n }", "public interface IUnsafe {\n\n byte getByte(long address);\n\n void putByte(long address, byte x);\n\n short getShort(long address);\n\n void putShort(long address, short x);\n\n char getChar(long address);\n\n void putChar(long address, char x);\n\n int getInt(long address);\n\n void putInt(long address, int x);\n\n long getLong(long address);\n\n void putLong(long address, long x);\n\n float getFloat(long address);\n\n void putFloat(long address, float x);\n\n double getDouble(long address);\n\n void putDouble(long address, double x);\n\n int getInt(Object o, long address);\n\n void putInt(Object o, long address, int x);\n\n Object getObject(Object o, long address);\n\n void putObject(Object o, long address, Object x);\n\n boolean getBoolean(Object o, long address);\n\n void putBoolean(Object o, long address, boolean x);\n\n byte getByte(Object o, long address);\n\n void putByte(Object o, long address, byte x);\n\n short getShort(Object o, long address);\n\n void putShort(Object o, long address, short x);\n\n char getChar(Object o, long address);\n\n void putChar(Object o, long address, char x);\n\n long getLong(Object o, long address);\n\n void putLong(Object o, long address, long x);\n\n float getFloat(Object o, long address);\n\n void putFloat(Object o, long address, float x);\n\n double getDouble(Object o, long address);\n\n void putDouble(Object o, long address, double x);\n\n\n\n long getAddress(long address);\n\n void putAddress(long address, long x);\n\n long allocateMemory(long bytes);\n\n long reallocateMemory(long address, long bytes);\n\n void setMemory(Object o, long offset, long bytes, byte value);\n\n default void setMemory(long address, long bytes, byte value) {\n setMemory(null, address, bytes, value);\n }\n\n void copyMemory(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes);\n\n default void copyMemory(long srcAddress, long destAddress, long bytes) {\n copyMemory(null, srcAddress, null, destAddress, bytes);\n }\n\n void freeMemory(long address);\n \n}", "public CPointer<Object> getDrawcache() throws IOException\n\t{\n\t\tlong __dna__targetAddress;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 64);\n\t\t} else {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 64);\n\t\t}\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Object.class};\n\t\treturn new CPointer<Object>(__dna__targetAddress, __dna__targetTypes, __io__blockTable.getBlock(__dna__targetAddress, -1), __io__blockTable);\n\t}", "private synchronized void fetch() throws RuntimeException\n {\n clockTick();\n mLastInstructionAddress = mPC;\n if (mPC >= PROGRAM_MEMORY_SIZE)\n throw new RuntimeException(Constants.Error(Constants.UPPER_MEMORY_LIMIT)); \n\n mMBR = program_memory[mPC++];\n mPC %= mMaxPCValue;\n // These instructions are 32bits wide\n // If the current instruction matches these, read the second word\n if (InstructionDecoder.InstructionLength(mMBR) == 32)\n {\n if (mPC >= PROGRAM_MEMORY_SIZE)\n throw new RuntimeException(Constants.Error(Constants.UPPER_MEMORY_LIMIT));\n mMBR2 = program_memory[mPC++];\n mPC %= mMaxPCValue;\n clockTick();\n }\n else\n mMBR2 = 0; \n }", "static void mvi_to_mem(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tmemory.put(memory_address, passed.substring(6));\n\t}", "public long getWritePointer();", "protected byte direct_read(int address) {\n return segment_data[address];\n }", "public long getReadPointer();", "@Override protected void fetch() throws MainMemory.InvalidAddressException {\n int pcVal = pc.get();\n UnsignedByte[] ins = mem.read (pcVal, 2);\n byte opCode = (byte) (ins[0].value() >>> 4);\n insOpCode.set (opCode);\n insOp0.set (ins[0].value() & 0x0f);\n insOp1.set (ins[1].value() >>> 4);\n insOp2.set (ins[1].value() & 0x0f);\n insOpImm.set (ins[1].value());\n pcVal += 2;\n switch (opCode) {\n case 0x0:\n case 0xb:\n\tlong opExt = mem.readIntegerUnaligned (pcVal);\n\tpcVal += 4;\n\tinsOpExt.set (opExt);\n\tinstruction.set (ins[0].value() << 40 | ins[1].value() << 32 | opExt);\n\tbreak;\n default:\n\tinsOpExt.set (0);\n\tinstruction.set (ins[0].value() << 40 | ins[1].value() << 32);\n }\n pc.set (pcVal);\n }", "public native int getFreeMemory();", "public Memory(int access_time) {\n\t\tthis.mem_array = new String[65536];\n\t\tthis.access_time = access_time;\n\t\tthis.fetch_cycles_left = access_time;\n\t\tthis.load_cycles_left = access_time;\n\t}", "@Override\r\n\tpublic void read(IByteBuffer source, long offset) {\n\r\n\t}", "@Override\n\tpublic void execute(int arg) throws DataAccessException {\n\t\tsuper.execute(memory.getData(arg));\n\t}", "public native long memoryRemaining();", "public synchronized void updateMemory(){\n \tint memory = Math.round(System.getRuntime().totalMemory()/System.getRuntime().freeMemory());\n \tstore(new DisplayableData(\"memory\", \"M\"+memory+\"%\", memory));\n }", "public void seek(long pos) throws IOException {\n/* 155 */ if (pos < 0L) {\n/* 156 */ throw new IOException(PropertyUtil.getString(\"MemoryCacheSeekableStream0\"));\n/* */ }\n/* 158 */ this.pointer = pos;\n/* */ }", "public native int getUsedMemory();", "public int getMemory()\n\t{\n\t\treturn memorySize;\n\t}", "public void onMemoryExceed();", "@Array({161}) \n\t@Field(6) \n\tpublic Pointer<Byte > Memo() {\n\t\treturn this.io.getPointerField(this, 6);\n\t}", "static protected void copyMemory(int source[],int soffset,int dest[],int doffset,int size)\n\t{\n\t\tSystem.arraycopy(source,soffset,dest,doffset,size);\n\t}", "private void setMemorySize() { }", "public abstract long getMemoryBytes(MemoryType memoryType, int minibatchSize, MemoryUseMode memoryUseMode,\n CacheMode cacheMode, DataType dataType);", "private void process(Msg msg) {\n\tUTILS.Constants.MESSAGE_TYPE mt = msg.get_msg_type();\n\tif (mt == Constants.MESSAGE_TYPE.READ_MEM) {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Processing READ_MEM\");\t \n\t }\n\t Address ret_add = msg.get_return_address();\n\t ChunkName n = msg.get_chunk_name();\n\t String data = this.read_from_mem(n);\n\t \n\t Msg reply = new Msg();\n\t reply.set_msg_type(Constants.MESSAGE_TYPE.READ_MEM_REPLY);\n\t reply.set_return_address(my_address);\n\t reply.set_data(data);\n\t try {\n\t\tthis.write_to_NN(reply);\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t }\n\t catch (ClassNotFoundException e) {\n\t\te.printStackTrace();\n\t }\n\t} else if (mt == Constants.MESSAGE_TYPE.WRITE_MEM) {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Processing WRITE_MEM\");\t \n\t }\n\t Address ret_add = msg.get_return_address();\n\t ChunkName n = msg.get_chunk_name();\n\t String data = msg.get_data();\n\t this.write_to_mem(n, data);\n\n\t Msg reply = new Msg();\n\t reply.set_msg_type(Constants.MESSAGE_TYPE.WRITE_MEM_REPLY);\n\t reply.set_return_address(my_address);\n\t try {\n\t\tthis.write_to_NN(reply);\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t }\n\t catch (ClassNotFoundException e) {\n\t\te.printStackTrace();\n\t }\n\t}\n }", "public interface ICpMemory extends ICpDeviceProperty {\n\n\tfinal static char READ_ACCESS \t\t= 'r';\n\tfinal static char WRITE_ACCESS\t\t= 'w';\n\tfinal static char EXECUTE_ACCESS\t= 'x';\n\tfinal static char SECURE_ACCESS\t\t= 's';\n\tfinal static char NON_SECURE_ACCESS\t= 'n';\n\tfinal static char CALLABLE_ACCESS\t= 'c';\n\tfinal static char PERIPHERAL_ACCESS\t= 'p';\n\t\n\t/**\n\t * Checks if the memory shall be used for the startup by linker\n\t * @return true if startup memory\n\t */\n\tboolean isStartup();\n\t\n\t/**\n\t * Returns access string corresponding following regular expression pattern: \"[rwxpsnc]+\"\n\t * @return \"access\" attribute value if present or default derived from ID for deprecated elements \n\t */\n\tString getAccess();\n\n\t/**\n\t * Checks if the memory region represents RAM (\"rwx\")\n\t * @return true if RAM\n\t */\n\tboolean isRAM();\n\n\t/**\n\t * Checks if the memory region represents ROM (\"rx\")\n\t * @return true if ROM\n\t */\n\tboolean isROM();\n\n\t\n\t/**\n\t * Checks if memory has specified access\n\t * @param access : one of <code>rwxpsnc</code> characters\n\t * @return true if memory provides specified access\n\t */\n\tboolean isAccess(char access);\n\t\n\t/**\n\t * Checks if memory has read access\n\t * @return true if memory has read access\n\t */\n\tboolean isReadAccess();\n\t\n\t/**\n\t * Checks if memory has write access\n\t * @return true if memory has write access\n\t */\n\tboolean isWriteAccess();\n\n\t/**\n\t * Checks if memory has execute access\n\t * @return true if memory has execute access\n\t */\n\tboolean isExecuteAccess();\n\n\t\n\t/**\n\t * Checks if memory has secure access\n\t * @return true if memory has secure access\n\t */\n\tboolean isSecureAccess();\n\t\n\t/**\n\t * Checks if memory has non-secure access\n\t * @return true if memory has non-secure access\n\t */\n\tboolean isNonSecureAccess();\n\t\n\t/**\n\t * Checks if memory has callable access\n\t * @return true if memory has callable access\n\t */\n\tboolean isCallableAccess();\n\n\t/**\n\t * Checks if memory has peripheral access\n\t * @return true if memory has peripheral access\n\t */\n\tboolean isPeripheralAccess(); \n\n\t\n}", "public int map(int offset, int size, boolean writable) {\n if (size == 0)\n size = this.size - offset;\n int address = WinSystem.getCurrentProcess().reserveAddress(size + 0x1000, true);\n int directory = WinSystem.getCurrentProcess().page_directory;\n int p = address;\n offset >>>= 12;\n int maxFrames = (((size + 0xFFF) & ~0xFFF) >>> 12) + offset;\n\n // always map the first frame since it contains metadata\n int page = WinSystem.memory.get_page(p, true, directory);\n KernelMemory.setPage(page, frames[0], false, writable);\n p += 0x1000;\n\n for (int i = offset; i < maxFrames; i++) {\n page = WinSystem.memory.get_page(p, true, directory);\n KernelMemory.setPage(page, frames[i + 1], false, writable);\n p += 0x1000;\n }\n open();\n\n Memory.mem_writed(address, getHandle());\n Memory.mem_writed(address + 4, maxFrames - offset + 1);\n return address + 0x1000;\n }", "private Memory memory(Expression expression, cat.footoredo.mx.type.Type type) {\n return new Memory(asmType(type), expression);\n }", "public abstract void get(long position, ByteBuffer dst, int count);", "public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }", "public int getProgramMemory(int index)\n {\n int retValue = 0;\n try { retValue = program_memory[index]; }\n catch (ArrayIndexOutOfBoundsException OOB) { }\n return retValue;\n }", "static void shld_to_mem(String passed){\n\t\tint memo_address = hexa_to_deci(passed.substring(5));\n\t\tmemory.put(memo_address, registers.get('L'));\n\t\tmemo_address++;\n\t\tmemory.put(memo_address, registers.get('H'));\n\t}", "private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }", "public < T > T getMemory ( MemoryKey < T > memoryKey ) {\n\t\treturn extract ( handle -> handle.getMemory ( memoryKey ) );\n\t}", "public long writeMem(int index, long data) throws Exception{\n\t\tif(index >= 0 && index < Constants.MEM_SIZE){\n\t\t\tmemory[index] = data;\n\t\t} else {\n\t\t\tthrow new Exception(\"Invalid memory location!!\");\n\t\t}\n\t\treturn memory[index];\n\t}", "protected abstract SharedMemory make_infos();", "@Override\n\tpublic void updateMemory(Map map) {\n\t\tif(!memory.used)\n\t\t\treset(map);\n\t\tspiral();\n\t}", "public static void readMemory() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_hh_mm\");\n\n\t\t//getting the running container's id\n\t\tHashMap<String,String> hMap = ContainerUtil.getActiveContainers();\n\n\t\t//getting the process IDs for the running conteiners\n\t\tFile[] directories = new File(\"/proc\").listFiles(File::isDirectory);\n\n\t\tfor(Map.Entry<String,String> entry : hMap.entrySet()){\n\n\t\t\t//getting start time of mem copy\n\t\t\tDate startDate = new Date();\n\n\t\t\t//pausing the container to get its memory\n\t\t\tContainerUtil.pauseContainer( entry.getKey() );\n\n\t\t\tfor(File dir : directories) {\n\n\t\t\t\tif(NumberUtils.isNumber(dir.getName())){\n\t\t\t\t\n\t\t\t\t\tString filename = \"/proc/\" + dir.getName() + \"/cgroup\";\n\n\t\t\t\t\t//finding the cgroup file for the containerId\t\t\t\t\t\n\t\t\t\t\ttry(Stream<String> stream = Files.lines(Paths.get(filename))){\n\n\t\t\t\t\t\tif(stream.filter(line -> line.indexOf(entry.getKey()) > 0 ).findFirst().isPresent()){\n\t\t\t\t\t\t\t//change this point to save file to a mapped directory\n\t\t\t\t\t\t\tString outFile = \"./\" +\tentry.getKey() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tentry.getValue() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tdir.getName() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tdateFormat.format(new Date()) + \".mem\";\n\n\t\t\t\t\t\t\tString fileSource = \"/proc/\" + dir.getName() + \"/numa_maps\";\n\n\t\t\t\t\t\t\t//writing memory to file\n\t\t\t\t\t\t\twriteMemToFile(outFile, fileSource);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (IOException e){\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//unpausing the container after memory collection\n\t\t\tContainerUtil.unpauseContainer( entry.getKey() );\n\n\t\t\t//calculating total time for mem copy\n\t\t\tlong seconds = (new Date().getTime() - startDate.getTime());\n\t\t\tSystem.out.println(\" copy time: \" + seconds);\n\t\t}\n\t}", "public void setMemoryEntries(MemoryEntry[] inMemory);", "public int DataMemorySize() { return DATA_MEMORY_SIZE; }", "public void mem_map(long address, long size, int perms) throws UnicornException {\n mem_map(nativeHandle, address, size, perms);\n }", "public interface OpCPUDataInterface{\n /* Returns an array of 2 longs. The first memeber identifies what type of instruction the second long is. */\n public long [] getData(Long index);\n}", "public static void main(String[] args) {\n\t\tUnsafe unsafe = getUnsafe();\r\n\t\ttry {\r\n\t\tSystem.out.println(\"分配内存\");\r\n\t\tlong base = unsafe.allocateMemory(_1GB);\r\n\t\tSystem.in.read();\r\n\t\tSystem.out.println(\"释放内存\");\r\n\t\tunsafe.freeMemory(base);\r\n\t\tSystem.in.read();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void load() {\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Read memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n//\t\tSystem.out.println(\"index\"+Integer.parseInt(mar.substring(0, mar.length() - 2), 2));\r\n\t\tcontent.setStr(getBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)]);\r\n\t\t\r\n\t\twriteMBR(content);\r\n\t\tTraceINF.write(\"Read finished.\");\r\n\t}", "public double recallMemory() {\n return memoryValue;\n }", "@Test\n public void testMemoryMetric() {\n MetricValue mv = new MetricValue.Builder().load(40).add();\n\n MEMORY_METRICS.forEach(cmt -> testUpdateMetricWithoutId(cmt, mv));\n MEMORY_METRICS.forEach(cmt -> testLoadMetric(nodeId, cmt, mv));\n }", "public void runMemoryReference(MemRef r) {\n // Analyze the reference.\n long pageNumber = pageNumber(r);\n int touchedPageCount = touchedPageCount(r);\n for(int i = 0; i < touchedPageCount; i++, pageNumber++) {\n mRefCount++;\n // Check the frame.\n PTE pte = mPageTable.get(pageNumber);\n if(pte == null || !pte.isValid()) {\n mFaultCount++;\n\n // Get the frame to use.\n int target = findTargetToReplace(r);\n if(target >= mFrameNumber) {\n System.out.println(\"findTargetToReplace() returned out-of-bounds frame\" + target );\n System.exit(1);\n }\n // Remove the existing page.\n long oldPTEPageNumber = mMemory[target];\n PTE oldPTE = mPageTable.get(oldPTEPageNumber);\n if(oldPTE != null && oldPTE.isValid()) {\n // Remove the current page.\n mRemoveCount ++;\n if(oldPTE.getMod()){\n mRewriteCount++;\n }\n mPageTable.remove(oldPTEPageNumber);\n }\n\n // Insert the the pte.\n if(pte == null) {\n mPageTable.put(pageNumber, new PTE(target));\n pte = mPageTable.get(pageNumber);\n } else {\n pte.validate(target);\n }\n\n mMemory[target] = pageNumber;\n }\n\n pte.setRef();\n if (r.isWrite()) {\n pte.setMod();\n }\n }\n\n }", "static void ora_with_mem(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tval1 = val1|val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}", "public int read(int address){\n switch (address){\r\n /*\r\n case 0: {\r\n return registers_w[CONTROL_REGISTER_1];\r\n }\r\n\r\n case 3: {\r\n return spriteMemoryCounter;\r\n }\r\n case 5:{\r\n return registers_w[SCROLL_OFFSET];\r\n }\r\n case 6:{\r\n return horizontalTileCounter | (verticalTileCounter << 5) | (horizontalNameCounter << 10) | (verticalNameCounter << 11);\r\n }\r\n */\r\n\t\t\tcase 0: {\r\n\t\t\t\t\t\treturn scanLine;\r\n\t\t\t\t\t\t// hack\r\n\t\t\t}\r\n case 1: {\r\n return registers_w[CONTROL_REGISTER_2];\r\n }\r\n case STATUS_REGISTER:{ // 2\r\n int returnVal = registers_r[STATUS_REGISTER];\r\n registers_r[STATUS_REGISTER] = getBitsUnset(registers_r[STATUS_REGISTER], STATUS_VBLANK); //| STATUS_SPRITE0_HIT);\r\n isFirstWriteToScroll = true;\r\n lastPPUAddressWasHigh = false;\r\n //logger.info(\"Status is: \" + Integer.toHexString(returnVal));\r\n return returnVal;\r\n }\r\n case SPRITE_MEMORY_DATA:{ // 4\r\n return readFromSpriteMemory();\r\n }\r\n case PPU_MEMORY_DATA:{ // 7\r\n int returnVal = 0xFF & registers_r[PPU_MEMORY_DATA]; // buffered read\r\n \r\n //int returnVal = 0xFF & memory.read(ppuMemoryAddress);\r\n\t\t\tint readAddress = horizontalTileCounter \r\n\t\t\t\t\t\t\t\t| (verticalTileCounter << 5)\r\n\t\t\t\t\t\t\t\t| (horizontalNameCounter << 10)\r\n\t\t\t\t\t\t\t\t| (verticalNameCounter << 11)\r\n\t\t\t\t\t\t\t\t| ((fineVerticalCounter & 0x3) << 12);\r\n\r\n\t\t\tif (readAddress == 0x3F10 || readAddress == 0x3F14 || readAddress == 0x3F18 || readAddress == 0x3F1C) {\r\n\t\t\t\treadAddress = readAddress & 0x3F0F;\r\n\t\t\t}\r\n registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(readAddress);\r\n // registers_r[PPU_MEMORY_DATA] = 0xFF & memory.read(ppuMemoryAddress);\r\n incrementCounters();\r\n /*\r\n if ((registers_w[CONTROL_REGISTER_1] & CR1_VERTICAL_WRITE) == 0){\r\n ppuMemoryAddress++;\r\n }\r\n else {\r\n ppuMemoryAddress = (ppuMemoryAddress + 32);\r\n }\r\n */\r\n return returnVal;\r\n }\r\n\r\n default: throw new RuntimeException(\"Invalid read attempt: \" + Integer.toHexString(address));\r\n }\r\n }", "static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x001d\n byte[] r2 = r4.createByteArray()\n java.nio.ByteBuffer r2 = java.nio.ByteBuffer.wrap(r2)\n r0.f18501c = r2\n L_0x001d:\n int r2 = r4.readInt()\n r0.f18500b = r2\n int r2 = r4.readInt()\n if (r2 <= 0) goto L_0x0061\n byte[] r4 = r4.createByteArray()\n int r3 = r0.f18500b\n if (r3 <= 0) goto L_0x005c\n int r1 = r0.f18500b\n if (r1 != r2) goto L_0x0049\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4)\n r0.f18502d = r4\n java.nio.ByteBuffer r4 = r0.f18502d\n r4.position(r2)\n goto L_0x0068\n L_0x0049:\n int r1 = r0.f18500b\n java.nio.ByteBuffer r1 = java.nio.ByteBuffer.allocate(r1)\n r0.f18502d = r1\n java.nio.ByteBuffer r1 = r0.f18502d\n r1.put(r4)\n goto L_0x0068\n L_0x005c:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.wrap(r4, r1, r2)\n goto L_0x0065\n L_0x0061:\n java.nio.ByteBuffer r4 = java.nio.ByteBuffer.allocate(r1)\n L_0x0065:\n r0.f18502d = r4\n L_0x0068:\n boolean r4 = m23372b(r0)\n if (r4 == 0) goto L_0x006f\n return r0\n L_0x006f:\n int r4 = r0.f18500b\n if (r4 <= 0) goto L_0x007d\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n r4.put(r1, r0)\n goto L_0x00a2\n L_0x007d:\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r4 = f18504a\n int r1 = r0.f18499a\n java.lang.Object r4 = r4.get(r1)\n com.qiyukf.nimlib.f.a.a r4 = (com.qiyukf.nimlib.p470f.p471a.C5826a) r4\n if (r4 == 0) goto L_0x00a2\n java.nio.ByteBuffer r1 = r4.f18502d\n java.nio.ByteBuffer r0 = r0.f18502d\n r1.put(r0)\n boolean r0 = m23372b(r4)\n if (r0 == 0) goto L_0x00a2\n android.util.SparseArray<com.qiyukf.nimlib.f.a.a> r0 = f18504a\n int r1 = r4.f18499a\n r0.remove(r1)\n return r4\n L_0x00a2:\n r4 = 0\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.qiyukf.nimlib.p470f.p471a.C5826a.C5829b.m23369a(android.os.Parcel):com.qiyukf.nimlib.f.a.a\");\n }", "public long getFilePointer() {\n/* 141 */ return this.pointer;\n/* */ }", "public MyMemory(int size){\n super(size);\n printSize();\n loadMemory(); //loads memory with instructions to be executed during the instruction cycle\n }", "static void mov_reg_to_memory(String passed){\n\t\tint memory_address = memory_address_hl();\n\t\tmemory.put(memory_address, registers.get(passed.charAt(6)));\n\t}", "public ByteBuf touch(Object hint)\r\n/* 953: */ {\r\n/* 954:958 */ this.leak.record(hint);\r\n/* 955:959 */ return this;\r\n/* 956: */ }", "protected MemObject (int nElem)\n {\n if (nElem > 0) mem = new Object [nElem];\n }", "public void offsetToPointer(ByteCode bc) {\n }", "public abstract long estimateMemorySize();", "private void setData(T data, int size, List<? extends T> memory, T type) { }", "public final byte[] getMemory() {\r\n return this.memory;\r\n }", "@Override\n public DataBuffer reallocate(long length) {\n val oldPointer = ptrDataBuffer.primaryBuffer();\n\n if (isAttached()) {\n val capacity = length * getElementSize();\n val nPtr = getParentWorkspace().alloc(capacity, dataType(), false);\n this.ptrDataBuffer.setPrimaryBuffer(new PagedPointer(nPtr, 0), length);\n\n switch (dataType()) {\n case BOOL:\n pointer = nPtr.asBoolPointer();\n indexer = new DeviceBooleanIndexer((BooleanPointer) pointer);\n break;\n case UTF8:\n case BYTE:\n case UBYTE:\n pointer = nPtr.asBytePointer();\n indexer = new DeviceByteIndexer((BytePointer) pointer);\n break;\n case UINT16:\n case SHORT:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceShortIndexer((ShortPointer) pointer);\n break;\n case UINT32:\n pointer = nPtr.asIntPointer();\n indexer = new DeviceUIntIndexer((IntPointer) pointer);\n break;\n case INT:\n pointer = nPtr.asIntPointer();\n indexer = new DeviceIntIndexer((IntPointer) pointer);\n break;\n case DOUBLE:\n pointer = nPtr.asDoublePointer();\n indexer = new DeviceDoubleIndexer((DoublePointer) pointer);\n break;\n case FLOAT:\n pointer = nPtr.asFloatPointer();\n indexer = new DeviceFloatIndexer((FloatPointer) pointer);\n break;\n case HALF:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceHalfIndexer((ShortPointer) pointer);\n break;\n case BFLOAT16:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceBfloat16Indexer((ShortPointer) pointer);\n break;\n case UINT64:\n case LONG:\n pointer = nPtr.asLongPointer();\n indexer = new DeviceLongIndexer((LongPointer) pointer);\n break;\n }\n\n nativeOps.memcpySync(pointer, oldPointer, this.length() * getElementSize(), 3, null);\n workspaceGenerationId = getParentWorkspace().getGenerationId();\n } else {\n this.ptrDataBuffer.expand(length);\n val nPtr = new PagedPointer(this.ptrDataBuffer.primaryBuffer(), length);\n\n switch (dataType()) {\n case BOOL:\n pointer = nPtr.asBoolPointer();\n indexer = new DeviceBooleanIndexer((BooleanPointer) pointer);\n break;\n case UTF8:\n case BYTE:\n case UBYTE:\n pointer = nPtr.asBytePointer();\n indexer = new DeviceByteIndexer((BytePointer) pointer);\n break;\n case UINT16:\n case SHORT:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceShortIndexer((ShortPointer) pointer);\n break;\n case UINT32:\n pointer = nPtr.asIntPointer();\n indexer = new DeviceUIntIndexer((IntPointer) pointer);\n break;\n case INT:\n pointer = nPtr.asIntPointer();\n indexer = new DeviceIntIndexer((IntPointer) pointer);\n break;\n case DOUBLE:\n pointer = nPtr.asDoublePointer();\n indexer = new DeviceDoubleIndexer((DoublePointer) pointer);\n break;\n case FLOAT:\n pointer = nPtr.asFloatPointer();\n indexer = new DeviceFloatIndexer((FloatPointer) pointer);\n break;\n case HALF:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceHalfIndexer((ShortPointer) pointer);\n break;\n case BFLOAT16:\n pointer = nPtr.asShortPointer();\n indexer = new DeviceBfloat16Indexer((ShortPointer) pointer);\n break;\n case UINT64:\n case LONG:\n pointer = nPtr.asLongPointer();\n indexer = new DeviceLongIndexer((LongPointer) pointer);\n break;\n }\n }\n\n this.underlyingLength = length;\n this.length = length;\n return this;\n }", "public void p() {\n try {\n if (this.f80656a.a().size() > 0) {\n this.f80657b.a((f) new f() {\n public void a(Object obj, boolean z) {\n }\n }, this.f80656a.a());\n }\n if (this.f80658c.a().size() > 0) {\n this.f80657b.b(new f() {\n public void a(Object obj, boolean z) {\n if (obj instanceof String) {\n m.this.f80658c.b();\n }\n }\n }, this.f80658c.a());\n }\n if (this.l.size() > 0) {\n this.f80657b.a(new f(), this.l);\n }\n } catch (Throwable th) {\n by.b(\"convertMemoryToCacheTable happen error: \" + th.toString());\n }\n }", "private MainMemory() {\n\t\tPropertiesParser prop = PropertiesLoader.getPropertyInstance();\n\t\tnumOfbank = prop.getIntProperty(\"sim.mem.numberofbank\", 8);\n\t\tlogger.debug(\"numOfBank in main memory :\"+ numOfbank);\n\t\t\n\t\tinit();\n\t}", "private static void buffer() {\n\t\tSystem.out.println(\"bafor\"+Runtime.getRuntime().freeMemory());\n\t\tByteBuffer mBuffer=ByteBuffer.allocate(10240000);\n\t\tSystem.out.println(\"bafor\"+Runtime.getRuntime().freeMemory());\n// mBuffer.clear();\n System.out.println(\"bafor\"+Runtime.getRuntime().freeMemory());\n\t}", "static void take_memory_values() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\t\tString input = scan.readLine();\n\t\tif(input.equals(\"N\"))\n\t\t\treturn;\n\t\taddress = hexa_to_deci(input);\n\t\tprint_the_address(address);\n\t\tinput = scan.readLine();\n\t\tif(input.length()==2)\n\t\t\tmemory.put(address,input);\n\t\telse{\n\t\t\tmemory.put(address,input.substring(2));\n\t\t\tmemory.put(address+1,input.substring(0,2));\n\t\t}\n\t\t//System.out.println(address+\" \"+memory.get(address));\n\t\ttake_memory_values();\n\t}", "public void run() {\n int lastpage = 0xFFFFFFFF - 0xFFF;\n Page P = (Page) MAGIC.cast2Struct(lastpage);\n P.data[0] = 2;\n\n }", "public interface DirectByteBufferAccess {\n\n /**\n * Returns the native memory address of the given direct byte buffer, or 0\n * if the buffer is not direct or if obtaining the address is not supported.\n * \n * @param buffer the direct byte buffer for which to obtain the address\n * @return the native memory address or 0\n */\n long getAddress(ByteBuffer buffer);\n}", "public interface MemoryInstrumentation {\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory that has been allocated by this instance. The return value is equal to the sum\n * of the values returned by {@link #memoryUsed()} and {@link #memoryUnused()}.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory allocated by this instance\n */\n long memoryAllocated();\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory actually in use by this instance.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory actually in use by this instance\n */\n long memoryUsed();\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory allocated, but not actually in use by this instance.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory allocated but not in use by this instance\n */\n long memoryUnused();\n}", "public int memoryBitOffset ( TypeSpec baseType, int bitOffset, int bitWidth )\n{\n if (LITTLE_ENDIAN)\n return bitOffset;\n else // big endian\n return baseType.width - bitOffset - bitWidth;\n}", "public abstract void read0(int aPosition, PageIOStream aStream);", "public final Instruction memory_op() throws RecognitionException {\r\n Instruction inst = null;\r\n\r\n\r\n Instruction getelementptr_op49 =null;\r\n\r\n Instruction alloca_op50 =null;\r\n\r\n Instruction load_op51 =null;\r\n\r\n Instruction store_op52 =null;\r\n\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:329:5: ( getelementptr_op | alloca_op | load_op | store_op )\r\n int alt46=4;\r\n switch ( input.LA(1) ) {\r\n case GLOBAL_VARIABLE:\r\n {\r\n int LA46_1 = input.LA(2);\r\n\r\n if ( (LA46_1==47) ) {\r\n switch ( input.LA(3) ) {\r\n case 66:\r\n {\r\n alt46=1;\r\n }\r\n break;\r\n case 53:\r\n {\r\n alt46=2;\r\n }\r\n break;\r\n case VOLATILE:\r\n case 74:\r\n {\r\n alt46=3;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 46, 5, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 46, 1, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case LOCAL_VARIABLE:\r\n {\r\n int LA46_2 = input.LA(2);\r\n\r\n if ( (LA46_2==47) ) {\r\n switch ( input.LA(3) ) {\r\n case 66:\r\n {\r\n alt46=1;\r\n }\r\n break;\r\n case 53:\r\n {\r\n alt46=2;\r\n }\r\n break;\r\n case VOLATILE:\r\n case 74:\r\n {\r\n alt46=3;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 46, 5, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 46, 2, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case UNDEF:\r\n {\r\n int LA46_3 = input.LA(2);\r\n\r\n if ( (LA46_3==47) ) {\r\n switch ( input.LA(3) ) {\r\n case 66:\r\n {\r\n alt46=1;\r\n }\r\n break;\r\n case 53:\r\n {\r\n alt46=2;\r\n }\r\n break;\r\n case VOLATILE:\r\n case 74:\r\n {\r\n alt46=3;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 46, 5, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 46, 3, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case VOLATILE:\r\n case 82:\r\n {\r\n alt46=4;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 46, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt46) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:329:7: getelementptr_op\r\n {\r\n pushFollow(FOLLOW_getelementptr_op_in_memory_op1899);\r\n getelementptr_op49=getelementptr_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n inst = getelementptr_op49;\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:330:7: alloca_op\r\n {\r\n pushFollow(FOLLOW_alloca_op_in_memory_op1909);\r\n alloca_op50=alloca_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n inst = alloca_op50;\r\n\r\n }\r\n break;\r\n case 3 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:331:7: load_op\r\n {\r\n pushFollow(FOLLOW_load_op_in_memory_op1919);\r\n load_op51=load_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n inst = load_op51;\r\n\r\n }\r\n break;\r\n case 4 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:332:7: store_op\r\n {\r\n pushFollow(FOLLOW_store_op_in_memory_op1929);\r\n store_op52=store_op();\r\n\r\n state._fsp--;\r\n\r\n\r\n inst = store_op52;\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return inst;\r\n }", "private static void loadMemo() {\n\t\t\n\t}", "public void writeUnsafe(UnsafeMemory um) {\n int mySize = getWriteUnsafeSize();\n um.putInt(mySize);\n //serial\n um.putLong(serialVersionUID);\n\n //class member\n um.putString(fileName);\n\n\n //rocksDbKlueFileName\n um.putString(rocksDbKlueFileName);\n //boolean readOnly\n um.putBoolean(readOnly);\n\n um.putInt(last);\n\n //arrays\n um.put(nameIndex, UnsafeMemory.ARRAYLIST_STRING_TYPE);\n um.put(entries, UnsafeMemory.ARRAYLIST_KID_TYPE);\n um.put(kingdoms,UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n\n\n //No longer stored in memory\n //um.put(sequences,UnsafeMemory.ARRAYLIST_DNABITSTRING_TYPE);\n\n\n\n //ArrayList<Integer> sequenceLength = new ArrayList<Integer>();\n um.put(sequenceLength, UnsafeMemory.ARRAYLIST_INT_TYPE);\n //ArrayList<HashMap<Integer,Character>> exceptionsArr;\n\n int total = 0;\n total += UnsafeMemory.SIZE_OF_INT // byte header\n + UnsafeMemory.SIZE_OF_LONG // SerialUID\n + UnsafeMemory.SIZE_OF_INT; // number of entries\n\n for (int z=0; z < exceptionsArr.size(); z++){\n total += UnsafeMemory.getWriteUnsafeSize(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n um.putInt(total);\n um.putLong(serialVersionUID_ArrayListHashMap_INT_CHAR);\n um.putInt(exceptionsArr.size());\n for (int z=0; z < exceptionsArr.size(); z++){\n um.put(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n }", "public MyMemory(){\n super();\n this.instruction = new Instruction(); //Only the IR register will use this attribute\n }", "public static void main(String[] args) {\n\n printMemory();\n\n byte[] buf1 = new byte[1*1024*1024];\n printMemory(\"分配1M内存\");\n\n byte[] buf2 = new byte[4*1024*1024];\n printMemory(\"分配4M内存\");\n }", "final void release() {\n mem.release();\n }", "static void xra_with_mem(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tval1 = val1&val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}", "int memSize() {\n // treat Code as free\n return BASE_NODE_SIZE + 3 * 4;\n }", "public void read(IORequest request) throws MemoryFault {\n setBaseLimit();\n // sets what we need to be able to read\n int deviceNumber = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc);\n int platter = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 1);\n int platStart = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 2);\n int datasize = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 3);\n int memLoc = machine.memory.load(Process_Table[request.prognum].base + Process_Table[request.prognum].acc + 4) + Process_Table[request.prognum].base;\n// System.out.println(deviceNumber+\"device\");\n// System.out.println(platter+\"plat\");\n// System.out.println(platStart+\"Start\");\n// System.out.println(datasize+\"data\");\n// System.out.println(memLoc+\"mem\");\n\n Process_Table[currentProcess].status = ProcessState.waiting;\n\n machine.devices[deviceNumber].controlRegister.register[0] = DeviceControllerOperations.READ;\n machine.devices[deviceNumber].controlRegister.register[1] = platter;\n machine.devices[deviceNumber].controlRegister.register[2] = platStart;\n machine.devices[deviceNumber].controlRegister.register[3] = datasize;\n machine.devices[deviceNumber].controlRegister.latch();\n for (int i = 0; i < datasize; i++) {\n machine.memory.store(i + memLoc, machine.devices[deviceNumber].buffer[i]);\n\n }\n //System.out.println(waitQ[Machine.DISK1].size() + \" READ\");\n // initiate the latch\n\n }" ]
[ "0.6889206", "0.6496672", "0.6443387", "0.6443387", "0.6311172", "0.61944675", "0.59945446", "0.5940391", "0.59342045", "0.59292865", "0.59125364", "0.59124386", "0.5910969", "0.5910352", "0.5895566", "0.584774", "0.5841807", "0.5823111", "0.58128047", "0.57713515", "0.57695603", "0.57496434", "0.5722362", "0.5712292", "0.5705669", "0.5697803", "0.56956756", "0.56739926", "0.56546664", "0.5645411", "0.5635268", "0.5634766", "0.56283253", "0.5606068", "0.55946267", "0.557566", "0.5562963", "0.5558231", "0.55432034", "0.5529694", "0.5528934", "0.5516877", "0.55135524", "0.5509437", "0.5484268", "0.54824895", "0.5480581", "0.54774773", "0.54713374", "0.54460734", "0.54446036", "0.54415166", "0.5403584", "0.53877926", "0.5380184", "0.5378114", "0.5377128", "0.5375554", "0.53708696", "0.5370035", "0.535934", "0.53568", "0.53540874", "0.53525233", "0.5348413", "0.5343183", "0.5331236", "0.53201604", "0.5315508", "0.5303961", "0.5297483", "0.52906734", "0.5282128", "0.52807367", "0.525965", "0.5254133", "0.5248102", "0.52374023", "0.5229239", "0.52234006", "0.5222366", "0.52143097", "0.5208649", "0.52075475", "0.5200639", "0.5193295", "0.51862013", "0.5184634", "0.51818705", "0.518047", "0.51791704", "0.5176856", "0.51653147", "0.5157845", "0.51561224", "0.51539385", "0.5151037", "0.5150243", "0.51456845", "0.51443446", "0.5133118" ]
0.0
-1
Show the error dialog.
public static void show(final String title, final String message) { Alert alert = new Alert(Alert.AlertType.ERROR); alert.setTitle(title); alert.setHeaderText(null); alert.setContentText(message); alert.showAndWait(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showErrorDialog(int errorCode) {\n\t\t\n }", "public void showError(String error);", "@Override\n public void showError() {\n }", "public void showError(String errorMessage);", "public void showErrorMessageDialog(String error){\n JOptionPane.showMessageDialog(null,error, \"Error\",JOptionPane.ERROR_MESSAGE);\n }", "private void showErrorDialog(String msg) {\n\t\tJFXDialogLayout content = new JFXDialogLayout();\n\t\tcontent.setHeading(new Text(\"ERROR\"));\n\t\tcontent.setBody(new Text(msg));\n\t\tJFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.CENTER);\n\t\t;\n\n\t\tJFXButton button = new JFXButton(\"I understand\");\n\t\tbutton.setButtonType(ButtonType.RAISED);\n\t\tbutton.setCursor(Cursor.HAND);\n\t\tbutton.setOnAction(e -> dialog.close());\n\t\tcontent.setActions(button);\n\t\tdialog.show();\n\t}", "public void showError(String message) {\n JOptionPane.showMessageDialog(this, message, \"Error!\", JOptionPane.ERROR_MESSAGE);\n }", "void showError(String errorMessage);", "void showError(String message);", "void showError(String message);", "private void showErrorDialogue() {\n\t\ttry {\n\t\t\tnew AlertDialog.Builder(mContext)\n\t\t\t\t\t.setTitle(\"Something unfortunate happened...\")\n\t\t\t\t\t.setMessage(\"Your device was not able to verify activation. Please check your internet connection and ensure you are using the latest version of the application.\")\n\t\t\t\t\t.setNeutralButton(\"Close\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.show();\n\t\t} catch (Exception e) {\n\t\t\t//not in main activity, not a problem\n\t\t\tLog.w(TAG, e.getMessage());\n\t\t}\n\t}", "@Override\r\n\tpublic void showErrReq() {\n\t\tdialog.cancel();\r\n\t\tshowNetView(true);\r\n\t}", "private void showErrorDialog(int resultCode) {\n // Get the error dialog from Google Play Services\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(\n resultCode, this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n if (errorDialog != null) {\n // Display error\n errorDialog.show();\n }\n }", "private void showError(String msg)\n {\n \tJOptionPane.showMessageDialog(this, msg, \"Error\",\n \t\t\t\t JOptionPane.ERROR_MESSAGE);\n }", "private void showError(String text, String title){\n JOptionPane.showMessageDialog(this,\n text, title, JOptionPane.ERROR_MESSAGE);\n }", "void displayUserTakenError(){\n error.setVisible(true);\n }", "public void showErrorDialog(String header, String content) {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(header);\n Label label = new Label(content);\n label.setWrapText(true);\n alert.getDialogPane().setContent(label);\n alert.showAndWait();\n }", "public abstract void showErrorBox(Throwable error);", "protected void showErrorDialog(String msg) {\n JOptionPane.showMessageDialog(mainFrame, msg, errorDialogTitle, JOptionPane.ERROR_MESSAGE);\n }", "private void showErrorAlert()\n {\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \tbuilder.setMessage(getResources().getString(R.string.app_error_str))\n \t .setCancelable(false)\n \t .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n \t public void onClick(DialogInterface dialog, int id) {\n \t dialog.cancel();\n \t }\n \t });\n \t \n \tAlertDialog alert = builder.create();\n \talert.show();\n }", "public void showError(String message) {\n showMessageDialog(null, message, \"Error\", JOptionPane.ERROR_MESSAGE);\n }", "public void showExceptionDialog(Exception InputException)\r\n {\r\n JOptionPane.showMessageDialog(MainFrame,\r\n InputException.getMessage(),\r\n \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }", "public void showLoadingError() {\n showError(MESSAGE_LOADING_ERROR);\n }", "protected void showAlertDialog(Exception e) {\n\t\tshowAlertDialog(\"Error\", e.toString());\n\t}", "private void showErrorDialog(int errorCode) {\n // Create a fragment for the error dialog\n ErrorDialogFragment dialogFragment = new ErrorDialogFragment();\n // Pass the error that should be displayed\n Bundle args = new Bundle();\n args.putInt(DIALOG_ERROR, errorCode);\n dialogFragment.setArguments(args);\n dialogFragment.show(getFragmentManager(), \"errordialog\");\n }", "private void showErrorDialog(int errorCode) {\n // Create a fragment for the error dialog\n ErrorDialogFragment dialogFragment = new ErrorDialogFragment();\n // Pass the error that should be displayed\n Bundle args = new Bundle();\n args.putInt(DIALOG_ERROR, errorCode);\n dialogFragment.setArguments(args);\n dialogFragment.show(getFragmentManager(), \"errordialog\");\n }", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "private void showErrorDialog(int errorCode) {\n\n\t\t// Get the error dialog from Google Play services\n\t\tDialog errorDialog = GooglePlayServicesUtil.getErrorDialog(\n\t\t\t\terrorCode,\n\t\t\t\tthis,\n\t\t\t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t// If Google Play services can provide an error dialog\n\t\tif (errorDialog != null) {\n\n\t\t\t// Create a new DialogFragment in which to show the error dialog\n\t\t\tErrorDialogFragment errorFragment = new ErrorDialogFragment();\n\n\t\t\t// Set the dialog in the DialogFragment\n\t\t\terrorFragment.setDialog(errorDialog);\n\n\t\t\t// Show the error dialog in the DialogFragment\n\t\t\terrorFragment.show(getSupportFragmentManager(), LocationUtils.APPTAG);\n\t\t}\n\t}", "private void showErrorDialog(int errorCode) {\n\n\t\t// Get the error dialog from Google Play services\n\t\tDialog errorDialog = GooglePlayServicesUtil.getErrorDialog(errorCode, getActivity(), LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t// If Google Play services can provide an error dialog\n\t\tif (errorDialog != null) {\n\t\t\terrorDialog.show();\n\t\t}\n\t}", "private void showError(String message){\n\t\tsetupErrorState();\n\t\tsynapseAlert.showError(message);\n\t}", "private void displayError(Exception ex)\n {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Error dialog\");\n alert.setHeaderText(null);\n alert.setContentText(ex.getMessage());\n\n alert.showAndWait();\n }", "public void showErrorMessage(String msg) {\r\n JOptionPane.showMessageDialog(this,\r\n\t\t\t\t msg, TmplResourceSingleton.getString(\"error.dialog.header\"),\r\n\t\t\t\t JOptionPane.ERROR_MESSAGE);\r\n }", "private void displayErrorDialog(String message) {\n AlertDialog.Builder builder;\n\n builder = new AlertDialog.Builder(this);\n builder.setTitle(getString(R.string.er_error))\n .setMessage(message)\n .setNegativeButton(getString(R.string.bt_close), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n }).setIcon(android.R.drawable.stat_notify_error).show();\n }", "public void showErrorDialog(final int code) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Dialog d = GooglePlayServicesUtil.getErrorDialog(\n code,\n FilmgurActivity.this,\n 100);\n d.show();\n }\n });\n }", "private void showErrorDialog(int errorCode) {\n // Create a fragment for the error dialog\n GoogleApiHelper.ErrorDialogFragmentWithCallback dialogFragment = new GoogleApiHelper.ErrorDialogFragmentWithCallback();\n\n dialogFragment.setOnDialogDismissedListener(new GoogleApiHelper.OnDialogDismissedListener() {\n @Override\n public void onDialogDismissed() {\n mResolvingError = false;\n }\n });\n\n // Pass the error that should be displayed\n Bundle args = new Bundle();\n args.putInt(DIALOG_ERROR, errorCode);\n dialogFragment.setArguments(args);\n dialogFragment.show(getActivity().getSupportFragmentManager(), \"errordialog\");\n }", "public static void showError (Exception e)\n\t{\n\t\tString message = getErrorMessage(e);\n\t\n\t\t// filter out cancelled actions by the user which end up as\n\t\t// ModelExceptions after veto\n\t\tif (message != null)\n\t\t{\n\t\t\tNotifyDescriptor desc = new NotifyDescriptor.Message(\n\t\t\t\tmessage, NotifyDescriptor.ERROR_MESSAGE);\n\n\t\t\tDialogDisplayer.getDefault().notify(desc);\n\t\t}\n\t}", "private void errorPopUp() {\n new AlertDialog.Builder(mActivity)\n .setTitle(\"Oops\")\n .setMessage(\"Please choose an emotional state or enter a date and time\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Go back without changing anything\n dialogInterface.dismiss();\n }\n })\n .create()\n .show();\n }", "public void showErrorMessage() {\n\t\tthis.vm = null;\n\t\tplayButton.setText(\"►\");\n\n\t\tthis.remove(visualizerPanel);\n\t\tvisualizerPanel = new ErrorCard();\n\t\tvisualizerPanel.setPreferredSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT));\n\t\tthis.add(visualizerPanel);\n\t}", "public void displayError(String e){\n\t\tJOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n\t}", "private void showErrorDialog(int errorCode) {\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(\n errorCode,\n this,\n LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n // If Google Play services can provide an error dialog\n if (errorDialog != null) {\n\n // Create a new DialogFragment in which to show the error dialog\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n\n // Set the dialog in the DialogFragment\n errorFragment.setDialog(errorDialog);\n\n // Show the error dialog in the DialogFragment\n errorFragment.show(getSupportFragmentManager(), LocationUtils.APPTAG);\n }\n }", "void showError() {\n Toast.makeText(this, \"Please select answers to all questions.\", Toast.LENGTH_SHORT).show();\n }", "public static void showErrorMessage(String errorMessage) {\n\t\tMessageDialog messageDialog = new MessageDialog(\n\t\t\tnull,\n\t\t\t\"Error during code generation\",\n\t\t\tnull,\n\t\t\terrorMessage,\n\t\t\tMessageDialog.ERROR,\n\t\t\tnew String[]{\"Ok\"}, 0);\n\t\tmessageDialog.open();\n\t}", "public static void showErrorDialog(String title, String message) {\n\t\tJOptionPane.showMessageDialog(null, message, title, JOptionPane.ERROR_MESSAGE);\n\t}", "void errorBox(String title, String message);", "public void showErrorMessage() {\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n mMoviesList.setVisibility(View.INVISIBLE);\n }", "private void displayError(Exception e)\n\t{\n\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\te.toString(),\n\t\t\t\t\"EXCEPTION\",\n\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t}", "private void showErroAlert(String errorMessage) {\n LOGGER.log(Level.INFO, \"Showing Alert window with error message...\");\n Alert errorAlert = new Alert(Alert.AlertType.ERROR, errorMessage, ButtonType.OK);\n errorAlert.show();\n }", "public ErrorAlert(String message) {\r\n\r\n JOptionPane.showMessageDialog(MainWindow.getInstance(), message);\r\n\r\n }", "private void showError() {\n errorTextView.setVisibility(View.VISIBLE);\n errorButton.setVisibility(View.VISIBLE);\n errorButton.setEnabled(true);\n recyclerView.setVisibility(View.INVISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.INVISIBLE);\n }", "public errPopUp(String value) {\n initComponents();\n errorMsg.setText(value);\n this.setVisible(false);\n }", "private void showErrorMessage() {\n // hide the view for the list of movies\n mMoviesRecyclerView.setVisibility(View.INVISIBLE);\n // show the error message\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n }", "protected void showErrorDialog(String msg) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(com.mytechia.robobo.framework.R.string.title_error_dialog).\n setMessage(msg);\n builder.setPositiveButton(com.mytechia.robobo.framework.R.string.ok_msg, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n System.exit(0);\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }", "public void ErrorMessage(String error) {\n \tJOptionPane.showMessageDialog(parent, error);\n }", "public void showErrorMessage(final String message) {\r\n JOptionPane.showMessageDialog(window, message, getTitle(), JOptionPane.ERROR_MESSAGE);\r\n }", "public void show(Object errorMessage){\n\t\tSystem.out.println(\"Woops, something bad happened\");\n\t\tSystem.out.println(errorMessage);\n\t}", "public void displayError(String message){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "private void showErrorDialog(String message){\n new AlertDialog.Builder(this)\n .setTitle(\"Error\")\n .setMessage(message)\n .setPositiveButton(android.R.string.ok,null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "private void showErrorMessage() {\n gridview.setVisibility(View.INVISIBLE);\n // Then, show the error\n errorTextView.setVisibility(View.VISIBLE);\n }", "public static void showErrorDialog(Shell shell, String message) {\r\n\t\tshowDialog(shell, \"Error\", message, SWT.ICON_ERROR);\r\n\t}", "public synchronized void showErrorMessage(String message) {\r\n \t\tComponent parent = mainWindow;\r\n \t\tif (resultsWindow != null && resultsWindow.hasFocus()) {\r\n \t\t\tparent = resultsWindow;\r\n \t\t}\r\n \t\tJOptionPane.showMessageDialog(parent, message, \"Error\", JOptionPane.ERROR_MESSAGE);\r\n \t}", "public static void showErrorPanel(String title, String msg) {\n final DialogBox dialogBox = new DialogBox();\r\n dialogBox.setText(\"Remote Procedure Call\");\r\n dialogBox.setAnimationEnabled(true);\r\n final Button closeButton = new Button(\"Close\");\r\n // We can set the id of a widget by accessing its Element\r\n closeButton.getElement().setId(\"closeButton\");\r\n final HTML serverResponseLabel = new HTML();\r\n VerticalPanel dialogVPanel = new VerticalPanel();\r\n dialogVPanel.addStyleName(\"dialogVPanel\");\r\n dialogVPanel.add(new HTML(\"<br><b>Server replies:</b>\"));\r\n dialogVPanel.add(serverResponseLabel);\r\n dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);\r\n dialogVPanel.add(closeButton);\r\n dialogBox.setWidget(dialogVPanel);\r\n\r\n // Add a handler to close the DialogBox\r\n closeButton.addClickHandler(new ClickHandler() {\r\n\r\n @Override\r\n public void onClick(ClickEvent event) {\r\n dialogBox.hide();\r\n }\r\n });\r\n\r\n // Show the error message to the user\r\n dialogBox.setText(title);\r\n serverResponseLabel.addStyleName(\"serverResponseLabelError\");\r\n serverResponseLabel.setHTML(msg);\r\n dialogBox.center();\r\n closeButton.setFocus(true);\r\n }", "private void showError(String error){\n errorInformation.setText(error);\n errorPane.setVisible(true);\n fadeEffect(0,1,150,errorPane);\n playSound(\"src/media/sound/error.mp3\");\n }", "private void error(String message) { \n Alert alert = new Alert(Alert.AlertType.ERROR, message);\n alert.setTitle(I18n.tr(\"imagesizedialog.error.title\"));\n alert.setContentText(message);\n alert.showAndWait();\n }", "private void showErrorDialog(String message) {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Oops\")\n .setMessage(message)\n .setPositiveButton(android.R.string.ok, null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "public void showBadInputMessage() {\n\t\tJOptionPane.showMessageDialog(frame, \"Vänligen skriv siffror mellan 1 och \" + size);\n\t}", "public static void showDialog(final String title, final Exception exception) {\n ErrorDialog dialog = new ErrorDialog(title, exception);\n dialog.setVisible(true);\n }", "void showError (String occurredWhile, String error) {\n\n// creates the VerticalBox for all elements\n VBox pane = new VBox();\n\n// creates all necessary labels, adds them to errPane\n Label genLabel = new Label(\"Error occured while \" + occurredWhile + \":\");\n Label errLabel = new Label(error);\n genLabel.setStyle(\"-fx-padding: 10, 10, 10, 10;\");\n errLabel.setStyle(\"-fx-padding: 10, 10, 10, 10;\");\n pane.getChildren().addAll(genLabel, errLabel);\n\n// creates a Scene, applies stylesheets\n Scene scene = new Scene(pane);\n scene.getStylesheets().add(getClass().getResource(\"stylesheet.css\").toExternalForm());\n scene.getStylesheets().add(stylesheet.toString());\n\n// creates a new errorWindow\n errorWindow = new Stage();\n errorWindow.setTitle(\"Error\");\n errorWindow.setResizable(false);\n errorWindow.setScene(scene);\n errorWindow.show();\n }", "private void showErrorMessage(String errorMessage)\n {\n JOptionPane.showMessageDialog(null, ERRMSG_NAME_MISSING,\n HERO_ERROR_TITLE, JOptionPane.ERROR_MESSAGE);\n _nameField.requestFocusInWindow();\n }", "private void showErrorDialog(){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.booking_not_created));\n builder.setMessage(getString(R.string.customer_already_has_active_booking_error));\n builder.setIcon(R.drawable.ic_error_black_24dp);\n builder.setCancelable(false);\n // When users confirms dialog, close the activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n // Close the Activity..\n finish();\n });\n\n AlertDialog dialog = builder.create();\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n }", "public void displayErrorMessage(String errorMess)\n {\n JOptionPane.showMessageDialog(this,errorMess);\n }", "private void displayError(String errorText) {\n\t\tMessageBox messageBox = new MessageBox(shell, SWT.OK);\n\t\tmessageBox.setMessage(errorText);\n\t\tmessageBox.setText(\"Alert\");\n\t\tmessageBox.open();\n\t}", "private void errorAlert(String msg) {\n Alert dialog = new Alert(Alert.AlertType.ERROR);\n dialog.setTitle(\"Error\");\n dialog.setHeaderText(\"!!\");\n dialog.setContentText(msg);\n dialog.show();\n }", "public static void setErrorMessage(String text) {\n\t JOptionPane optionPane = new JOptionPane(text,JOptionPane.ERROR_MESSAGE);\n\t JDialog dialog = optionPane.createDialog(\"Erro\");\n\t dialog.setAlwaysOnTop(true);\n\t dialog.setVisible(true);\n\t}", "private void printErrorAlert(String title, String header, String message) {\r\n\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\r\n\t\tif(title.length()>0)\r\n\t\t\talert.setTitle(title);\r\n\t\tif(header.length()>0)\r\n\t\t\talert.setHeaderText(header);\r\n\t\tif(message.length()>0)\r\n\t\t\talert.setContentText(message);\r\n\t\tStage stage = (Stage) alert.getDialogPane().getScene().getWindow();\r\n\t\tstage.getIcons().add(new Image(this.getClass().getResource(\"x.png\").toString()));\r\n\t\talert.showAndWait();\r\n\t}", "public void showError (String message) {\r\n if(myAnimation != null){\r\n myAnimation.stop();\r\n }\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(ALERT_MESSAGE);\r\n alert.setContentText(message);\r\n alert.show();\r\n }", "private void showAlertDBError() {\n showAlertSelectionFail(\"Database error\", \"Could not establish a connection to the database. Please visit the database settings to verify your connection.\");\n }", "public ErrorGUI() {\n\t\terror = new Error();\n\t\t\n\t}", "private void showConnectionError() {\n String couldNotConnect = Localization.lang(\"Could not connect to the update server.\");\n String tryLater = Localization.lang(\"Please try again later and/or check your network connection.\");\n if (manualExecution) {\n JOptionPane.showMessageDialog(this.mainFrame, couldNotConnect + \"\\n\" + tryLater,\n couldNotConnect, JOptionPane.ERROR_MESSAGE);\n }\n this.mainFrame.output(couldNotConnect + \" \" + tryLater);\n }", "private void showErrorMessage() {\n /* First, hide the currently visible data */\n mRecyclerView.setVisibility(View.INVISIBLE);\n /* Then, show the error */\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n mLayout.setVisibility(View.INVISIBLE);\n }", "public void showLoadingError() {\n System.out.println(\"Duke has failed to load properly.\");\n }", "private static void displayError(Shell shell, String msg) {\n MessageBox mbox = new MessageBox(shell, SWT.ICON_ERROR|SWT.OK);\n mbox.setMessage(msg);\n mbox.setText(\"USBDM - Can't create launch configuration\");\n mbox.open();\n }", "public static void showErrorDialog(Shell shell, Exception e) {\r\n\t\tString message = \"Oops... an unexpected error occurred\";\r\n\t\tif (e != null) {\r\n\t\t\tif (e instanceof MusicTunesException) {\r\n\t\t\t\tmessage = e.getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\tshowErrorDialog(shell, message);\r\n\t}", "private void showInvalidFileFormatError()\n {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Image Load Error\");\n alert.setHeaderText(null);\n alert.setContentText(\"The file was not recognized as an image file.\");\n\n alert.showAndWait();\n }", "public static void showErrorDialog(final Shell shell, Throwable t) {\n\t\tMultiStatus status = createMultiStatus(t.getLocalizedMessage(), t);\n\t\t// show error dialog\n\t\tErrorDialog.openError(shell, \"Error\", \"This is an error\", status);\n\t}", "private JFrame popError() {\n\t\tJFrame f = new JFrame();\n\t\tf.setTitle(\"Error!\");\n\t\tf.setSize(200, 200);\n\t\tf.setLocationRelativeTo(null);\n\t\tJPanel showResult = new JPanel();\n\t\tJTextArea area = new JTextArea(\"No such Record!\");\n\t\tshowResult.add(area);\n\t\tf.add(showResult);\n\t\tf.setVisible(true);\n\t\treturn f;\n\t}", "public static AbstractErrDialog waitForErrorDialog() {\n\t\treturn waitForDialogComponent(AbstractErrDialog.class);\n\t}", "void showError(Throwable throwable);", "public static void showDialog(final Window parent, final String title, final String message, final Exception exception) {\n ErrorDialog dialog = new ErrorDialog(parent, title, message, exception);\n dialog.setVisible(true);\n }", "private void openSelectedProfileError() {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Error Opening Profile\");\n alert.setHeaderText(null);\n alert.setContentText(\"An error occurred while opening the selected profile.\");\n alert.showAndWait();\n }", "public void showInputError() {\n\n resultLabel.setText(\"Choose another space!\");\n\n }", "private void showErrorMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Error message initiated. Error Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n alert.showAndWait();\r\n }", "@Override\n\tpublic void setFailedError() {\n\t\tnew Customdialog_Base(this, \"정보가 올바르지 않습니다.\").show();\n\t}", "public static void showDialog(final Window parent, final String title, final Exception exception) {\n ErrorDialog dialog = new ErrorDialog(parent, title, exception);\n dialog.setVisible(true);\n }", "protected static synchronized void writeError(String errorMessage) {\n JOptionPane optionPane = new JOptionPane(errorMessage, JOptionPane.ERROR_MESSAGE);\n JDialog dialog = optionPane.createDialog(\"Error\");\n dialog.setAlwaysOnTop(true);\n dialog.setVisible(true);\n }", "private void showErrorMessage() {\n /* First, hide the currently visible data */\n mRecyclerView.setVisibility(View.INVISIBLE);\n /* Then, show the error */\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n }", "void showErrorMsg(String string);", "private void showErrorMessage() {\n // First, hide the currently visible data\n mRecyclerView.setVisibility(View.INVISIBLE);\n\n // Then, show the error\n mErrorMessageDisplay.setVisibility(View.VISIBLE);\n }", "private void displayGenericError(String errorMessage)\n {\n AlertDialog errorDialog = AlertBuilder.buildErrorDialog(this, errorMessage);\n errorDialog.show();\n }", "public static void mensagemErroCadastrar() {\n\t\tJOptionPane.showMessageDialog(null, \"Erro ao cadastrar. Revise os dados inseridos.\", \"Erro\", JOptionPane.ERROR_MESSAGE, new ImageIcon(Toolkit.getDefaultToolkit().getImage(CadastroQuartos.class.getResource(\"/Imagens/Erro32.png\"))));\n\t}", "public void ShowMessageBox(String text)\n {\n ShowMessageBox(getShell(), \"Error\", text, 0);\n }", "private void showErrorView() {\n Log.d(\"lodd\", \"showSuccessView: hjfj91919515\");\n\n }" ]
[ "0.77130747", "0.7592926", "0.7504593", "0.7473358", "0.74248326", "0.73979336", "0.7356027", "0.7336659", "0.72817427", "0.72817427", "0.72682625", "0.7254706", "0.7253152", "0.72058743", "0.7186312", "0.71762776", "0.7158946", "0.7155386", "0.71436423", "0.713336", "0.71014154", "0.70755833", "0.70407903", "0.7027834", "0.70009315", "0.70009315", "0.699345", "0.69846016", "0.6969462", "0.69558877", "0.6946493", "0.6945972", "0.6940789", "0.6915208", "0.6909344", "0.6907956", "0.69037396", "0.68924457", "0.6888088", "0.68723553", "0.6835118", "0.6808526", "0.6785157", "0.67823434", "0.6773102", "0.6772087", "0.67639935", "0.673445", "0.6732448", "0.67239666", "0.6722663", "0.6717596", "0.67133385", "0.67109865", "0.6700694", "0.6685377", "0.667119", "0.6661491", "0.66591465", "0.6657809", "0.6631186", "0.66127276", "0.65982956", "0.6594291", "0.65852904", "0.65593815", "0.65539587", "0.6553304", "0.65517074", "0.65449136", "0.65402126", "0.6539786", "0.65380025", "0.6528025", "0.6516158", "0.65005034", "0.64975667", "0.6486876", "0.6486477", "0.6482529", "0.6480744", "0.6465129", "0.6463654", "0.64618325", "0.6458816", "0.64556384", "0.6454456", "0.6450085", "0.6436315", "0.64248174", "0.6411959", "0.6407813", "0.6400254", "0.6400074", "0.6399564", "0.6390715", "0.63886374", "0.63833505", "0.6370477", "0.6364765", "0.63595957" ]
0.0
-1
Si crea una variabile d'istanza di classe ImageView
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //Si associa come View radice il layout descritto da main.xml iv = (ImageView) findViewById(R.id.imageView1); //Si prende il riferimento all'imageview creata nel layout main.xml ToggleButton state = (ToggleButton) findViewById(R.id.toggleButton1); //Si prende il rifermimeto al togglebutton, ovvero un bottone che ha //associato anche uno stato, checked o unchecked state.setOnCheckedChangeListener(new OnCheckedChangeListener() { //Si aggancia al togglebutton un listener che permette di ascoltare lo stato del bottone public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) //Questo metodo permette di cambiare l'immagine associata all'imageview nel layout,in funzione dello stato del bottone { { if (isChecked) { iv.setImageResource(R.drawable.button_pause); //Se lo stato del bottone è checked,allora viene associato all'imageview l'immagine button_pause } else { iv.setImageResource(R.drawable.button_play); //Se lo stato del bottone è unchecked,allora viene associato all'imageview l'immagine button_play } } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createImageView() {\n /**\n * We use @{@link AdjustableImageView} so that we can have behaviour like setAdjustViewBounds(true)\n * for Android below API 18\n */\n viewsToBeInflated.add(new AdjustableImageView(getActivityContext()));\n }", "public taskimage(ImageView t134){\n t34=t134;\n\n\n }", "protected ImageView getImageView(){\n\t\treturn iv1;\n\t}", "private void setupView() {\n\t\timg=(ImageView) findViewById(R.id.imageView1);\n\t}", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "private void init(){\n\t\tmIV = new ImageView(mContext);\r\n\t\tFrameLayout.LayoutParams param1 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n\t\tmIV.setLayoutParams(param1);\r\n\t\tmIV.setScaleType(ScaleType.FIT_XY);\r\n//\t\tmIVs[0] = iv1;\r\n\t\tthis.addView(mIV);\r\n//\t\tImageView iv2 = new ImageView(mContext);\r\n//\t\tFrameLayout.LayoutParams param2 = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT\r\n//\t\t\t\t, FrameLayout.LayoutParams.MATCH_PARENT);\r\n//\t\tiv2.setLayoutParams(param2);\r\n//\t\tiv2.setScaleType(ScaleType.CENTER_CROP);\r\n//\t\tmIVs[1] = iv2;\r\n//\t\tthis.addView(iv2);\r\n\t\tthis.mHandler = new Handler();\r\n\t}", "void mo36481a(int i, ImageView imageView, Uri uri);", "void mo36483b(int i, ImageView imageView, Uri uri);", "void mo6660a(Context context, String str, ImageView imageView, C1492a aVar);", "private void initUI() {\n\t\timageview = (ImageView) v.findViewById(R.id.shezhi);\r\n\t\timageview.setOnClickListener(this);\r\n\r\n\t\tmytaobao = (ImageView) v.findViewById(R.id.taobao_go);\r\n\t\tmytaobao.setOnClickListener(this);\r\n\r\n\t\twuliu = (ImageView) v.findViewById(R.id.wuliu);\r\n\t\twuliu.setOnClickListener(this);\r\n\r\n\t\tgouwuche = (ImageView) v.findViewById(R.id.gouwuche);\r\n\t\tgouwuche.setOnClickListener(this);\r\n\r\n\t\tchadingdan = (ImageView) v.findViewById(R.id.dingdan);\r\n\t\tchadingdan.setOnClickListener(this);\r\n\r\n\t\tshoucang = (ImageView) v.findViewById(R.id.shoucang);\r\n\t\tshoucang.setOnClickListener(this);\r\n\t}", "private View crearImageView(Drawable d, int w, int h) {\n Drawable clone = d.getConstantState().newDrawable();\n clone.setBounds(0, 0, w, h);\n\n ImageView imBkg = new ImageView(getApplicationContext());\n imBkg.setBackground(clone);\n\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(w, h);\n imBkg.setLayoutParams(layoutParams);\n\n imBkg.setBackground(clone);\n\n imBkg.setOnTouchListener(crearListener());\n//\n// imBkg.setMaxWidth(,fotoBase.getWidth(),fotoBase.getHeight()));\n return imBkg;\n\n }", "public View getGraphic(T anItem)\n{\n Image img = getImage(anItem);\n return img!=null? new ImageView(img) : null;\n}", "void mo36480a(int i, int i2, ImageView imageView, Uri uri);", "@NonNull\r\n @Override\r\n public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n\r\n ImageView view = new ImageView(getApplicationContext());\r\n\r\n\r\n return new RecyclerView.ViewHolder(view) {\r\n\r\n };\r\n }", "public void setImageView(ImageView imageView){\r\n _imageView = imageView;\r\n }", "public void setImageView(ImageView imageView){\r\n _imageView = imageView;\r\n }", "@Override\n\tpublic Class<?> SupportViewType() {\n\t\treturn ImageView.class;\n\t}", "private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }", "void mo36482a(ImageView imageView, Uri uri);", "ImageViewTouchBase getMainImage();", "public void initView(Context context) {\n this.imageView = new ImageView(context);\n this.imageView.setPadding(22, 22, 22, 22);\n this.imageView.setImageResource(R.mipmap.start_circle3x);\n addView(this.imageView);\n }", "AsyncImageView getIconView();", "private void setImageRestaurant(String type, ImageView imageView){\n\n switch (type){\n case Restaurante.TYPE_ITALIAN:\n imageView.setImageResource(R.drawable.italian);\n break;\n case Restaurante.TYPE_MEXICAN:\n imageView.setImageResource(R.drawable.mexicano);\n break;\n case Restaurante.TYPE_ASIAN:\n imageView.setImageResource(R.drawable.japones);\n break;\n case Restaurante.TYPE_BURGER :\n imageView.setImageResource(R.drawable.hamburguesa);\n break;\n case Restaurante.TYPE_TAKEAWAY :\n imageView.setImageResource(R.drawable.takeaway);\n default:\n imageView.setImageResource(R.drawable.restaurante);\n break;\n }\n\n }", "private void change_im_val(int boo, ImageView im_obj){\r\n if(boo == 200){ //IMAGEN SI EL VEHICULO ES CORRECTO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img57a.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN VEHICULO\r\n im_obj.setImage(new Image(getClass().getResourceAsStream(\"/Images/img61a.png\")));\r\n }\r\n }", "public void addNewPicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(this.type == \"generic\") {\n //add the new pciture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"picture\") {\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }\n }", "private ImageView setStartMenuImage() {\r\n Image image = null;\r\n try {\r\n image = new Image(new FileInputStream(\"images/icon1.png\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n ImageView imageView = new ImageView(image);\r\n imageView.setFitHeight(HEIGHT / 4);\r\n imageView.setPreserveRatio(true);\r\n return imageView;\r\n }", "public void changePicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(type == \"generic\") {\n //add the new picture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"picture\"){\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n }", "private void findViews() {\n jurgen = (ImageView) findViewById(R.id.jurgen_view);\n jurgen.setTag(JURGEN_VIEW_TAG);\n joost = (ImageView) findViewById(R.id.joost_view);\n joost.setTag(JOOST_VIEW_TAG);\n nick = (ImageView) findViewById(R.id.nick_view);\n nick.setTag(NICK_VIEW_TAG);\n stijn = (ImageView) findViewById(R.id.stijn_view);\n stijn.setTag(STIJN_VIEW_TAG);\n }", "public S<T> image(String name){\n\t\tname = name.trim();\n\t\tBoolean b = false;\n\t\t\n\t\tint theid = activity.getResources().getIdentifier(\n\t\t\t\tname, \"drawable\", activity.getApplicationContext().getPackageName());\n\t\t\n\t\ttry {\n\t\t\tif(t instanceof ImageView)\n\t\t\t{\n\t\t\t\tjava.net.URL url = new URL(name);\n\n\t }\n\t\t\t\n\t\t} catch (MalformedURLException e) {\n\t\t\tb = true;\n\t\t}\n\t\t\n\t\tif(b){\n\t\t\t\n\n\t\t\t\n\t\t\tif(t instanceof ImageView){\n\t\t\t\t((ImageView)t).setImageResource(theid);\n\t\t\t}\n\t\t\tif(t instanceof ImageButton){\n\t\t\t\t((ImageButton)t).setImageResource(theid);\n\t\t\t}\n\t\t\tif(t instanceof LinkedList){\n\t\t\t\tLinkedList<View> auxl = (LinkedList<View>)t;\n\t\t\t\tfor (View v : auxl) {\n\t\t\t\t\tt= (T) v;\n\t\t\t\t\timage(name);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tt= (T) auxl;\n\t\t\t}\n\t\t}else{\n\t \n\t // Imageview to show\n\t int loader = R.drawable.ic_launcher;\n\t // ImageLoader class instance\n\t ImageLoader imgLoader = new ImageLoader(activity.getApplicationContext(),loader);\n\t // whenever you want to load an image from url\n\t // call DisplayImage function\n\t // url - image url to load\n\t // loader - loader image, will be displayed before getting image\n\t // image - ImageView \n\t imgLoader.DisplayImage(name, loader, (ImageView)t);\n\t\t}\n\t\treturn this;\n\t}", "void setImageProperty() {\n\t\t imgView.setImageResource(R.drawable.weathericon);\n\t\tMatrix matrix = new Matrix();\n\t\trotate += 30;\n\t\tif (rotate == 360) {\n\t\t\trotate = 0;\n\t\t}\n\t\tfloat centerX = imgView.getWidth() / 2;\n\t\tfloat centerY = imgView.getHeight() / 2;\n\t\tmatrix.setRotate(rotate, centerX, centerY);\n\t\t//matrix.setTranslate(10, 20);\n\t\timgView.setImageMatrix(matrix); \n\t\t//ScaleType type = ScaleType.\n\t\t\n\t\t//imgView.setScaleType(scaleType);\n\t \n\t}", "public void mo5975l() {\n new C1292f(this.f5384D.getmImageView(), new int[]{R.drawable.iqoo_btn_play_15, R.drawable.iqoo_btn_play_14, R.drawable.iqoo_btn_play_13, R.drawable.iqoo_btn_play_12, R.drawable.iqoo_btn_play_11, R.drawable.iqoo_btn_play_10, R.drawable.iqoo_btn_play_9, R.drawable.iqoo_btn_play_8, R.drawable.iqoo_btn_play_7, R.drawable.iqoo_btn_play_6, R.drawable.iqoo_btn_play_5, R.drawable.iqoo_btn_play_4, R.drawable.iqoo_btn_play_3, R.drawable.iqoo_btn_play_2, R.drawable.iqoo_btn_play_1, R.drawable.iqoo_btn_play_0}, new int[]{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3});\n }", "public void setImageView(ImageView imageView) {\r\n _imageView = imageView;\r\n }", "public interface IImaeView<T> extends IView<T> {\n\n void getImageRandom(ImageRes imageRes);\n}", "public void mo60894a() {\n int i;\n this.f61656f = new SmartAvatarImageView(getContext());\n if (C6399b.m19946v()) {\n ((C13438a) this.f61656f.getHierarchy()).mo32891a((int) R.color.a5q, C13423b.f35599g);\n }\n addView(this.f61656f, getAvatarLayoutParams());\n LayoutParams a = m76775a(getVerifyIconSize());\n this.f61651a = new ImageView(getContext());\n int i2 = R.drawable.amq;\n try {\n this.f61651a.setImageDrawable(getResources().getDrawable(R.drawable.amq));\n } catch (NotFoundException unused) {\n }\n this.f61651a.setVisibility(8);\n LayoutParams a2 = m76775a(getVerifyIconSize());\n this.f61652b = new ImageView(getContext());\n try {\n this.f61652b.setImageDrawable(getResources().getDrawable(R.drawable.amq));\n } catch (NotFoundException unused2) {\n }\n this.f61652b.setVisibility(8);\n this.f61653c = new ImageView(getContext());\n try {\n ImageView imageView = this.f61653c;\n Resources resources = getResources();\n if (C6399b.m19944t()) {\n i = R.drawable.amp;\n } else {\n i = R.drawable.amq;\n }\n imageView.setImageDrawable(resources.getDrawable(i));\n } catch (NotFoundException unused3) {\n }\n this.f61653c.setVisibility(8);\n this.f61654d = new ImageView(getContext());\n try {\n this.f61654d.setImageDrawable(getResources().getDrawable(R.drawable.amm));\n } catch (NotFoundException unused4) {\n }\n this.f61654d.setVisibility(8);\n this.f61655e = new ImageView(getContext());\n try {\n ImageView imageView2 = this.f61655e;\n Resources resources2 = getResources();\n if (C6399b.m19944t()) {\n i2 = R.drawable.amp;\n }\n imageView2.setImageDrawable(resources2.getDrawable(i2));\n } catch (NotFoundException unused5) {\n }\n this.f61655e.setVisibility(8);\n addView(this.f61651a, a);\n addView(this.f61652b, a2);\n addView(this.f61653c, a2);\n addView(this.f61654d, a2);\n addView(this.f61655e, a2);\n }", "ImageView getAvatarImageView();", "@Override\n\t\t\t\tpublic void onObtainDrawable(Drawable drawable, ImageView imageView) {\n\t\t\t\t}", "ImageView getView() {\n return view;\n }", "public CustomImageView(Context context, OnTouchListener listener, Object object, int ID) {\n super(context);\n\n setOnTouchListener(listener);\n setId(ID);\n\n switch (object) {\n case CARD:\n isCard = true;\n break;\n case STACK:\n isStack = true;\n }\n }", "@Override\n\tprotected void onFinishInflate() {\n\t\tsuper.onFinishInflate();\n\t\tSehenswuerdigkeit ziel = Spiel.getInstance().getSpielerAnDerReihe().getZiel();\n\t\tthis.setImageResource(getResources().getIdentifier(ziel.getMotivURL(), \"drawable\", \"com.dhbw.dvst\"));\n\t\t\n\t}", "public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n ImageView imgView = new ImageView(getActivity());\n imgView.setImageResource(R.drawable.img1);\n return imgView;\n }", "public View getGraphicAfter(T anItem)\n{\n Image img = getImageAfter(anItem);\n return img!=null? new ImageView(img) : null;\n}", "@Override\n protected void initView(View view) {\n super.initView(view);\n picture1 = (ImageView) rootview.findViewById(R.id.picture1);\n picture2=(ImageView) rootview.findViewById(R.id.picture2);\n\n }", "public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }", "private Images() {}", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "public void AddImgToRecyclerView()\n {\n imgsource = new Vector();\n Resources res = getResources();\n imgsource.add(res.getIdentifier(\"@drawable/add_overtime_schedule\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/add_overtime\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/clock_in\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/vacation\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/document\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/order\", null, getPackageName()));\n }", "private void m10994a(String str, int i) {\n View reusedImageView = getReusedImageView();\n reusedImageView.setTag(str);\n reusedImageView.setId(i);\n reusedImageView.setOnClickListener(this);\n Object obj = str.startsWith(\"http://\") ? str + \"?imageView2/2/w/\" + ((this.f9968i * 4) / 5) : \"file://\" + str;\n if (!TextUtils.isEmpty(obj)) {\n Picasso.with(this.f9965f).load(obj).fit().error(C1373R.drawable.bg_1b1b1b).placeholder(C1373R.drawable.bg_1b1b1b).centerCrop().into(reusedImageView);\n }\n this.f9972m.addView(reusedImageView, i);\n }", "public interface GlideInterface<T extends View> {\n /**\n * 展示图片\n */\n void displayImage(Context context, Object path, T imageView);\n /**\n * 展示图片\n * 自定义默认加载中图片\n */\n void displayImage(Context context, Object path, T imageView, int loadPic);\n /**\n * 设置圆角图片\n *用CircleImageView 类替代\n */\n void displayCircularImage(Context context, Object path, T imageView, int loadPic);\n /**\n * 设置圆角图片 , 自定义圆角大小\n *用CircleImageView 类替代\n */\n void displayRoundedCornerImage(Context context, Object path, T imageView, Integer size, int loadPic);\n\n /**\n * 自适应图片\n */\n void displayMatchImage(Context context, Object path, T imageView, int loadPic);\n\n T createImageView(Context context);\n}", "public ImageView getImage() {\n ImageView and = new ImageView(Image);\n and.setFitWidth(70);\n and.setFitHeight(50);\n return and;\n }", "private Images() {\n \n imgView = new ImageIcon(this,\"images/View\");\n\n imgUndo = new ImageIcon(this,\"images/Undo\");\n imgRedo = new ImageIcon(this,\"images/Redo\");\n \n imgCut = new ImageIcon(this,\"images/Cut\");\n imgCopy = new ImageIcon(this,\"images/Copy\");\n imgPaste = new ImageIcon(this,\"images/Paste\");\n \n imgAdd = new ImageIcon(this,\"images/Add\");\n \n imgNew = new ImageIcon(this,\"images/New\");\n imgDel = new ImageIcon(this,\"images/Delete\");\n \n imgShare = new ImageIcon(this,\"images/Share\");\n }", "@Override\n public Object instantiateItem(ViewGroup container, int position) {\n ImageView imageView = new ImageView(getContext());\n imageView.setImageURI(m_step.getImage(position).getImageURI());\n\n container.addView(imageView, new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT\n ));\n return imageView;\n }", "public interface ILoadImgListener {\r\n public void load(String url, ImageView img);\r\n //public void load(String url, ImageView img, int round);\r\n}", "private void initializeView() {\n InputStream is1 = getContext().getResources().openRawResource(+R.drawable.congratulations);\n mMovie1 = Movie.decodeStream(is1);\n InputStream is2 = getContext().getResources().openRawResource(+R.drawable.giffy3);\n mMovie2 = Movie.decodeStream(is2);\n InputStream is3 = getContext().getResources().openRawResource(+R.drawable.giffy4);\n mMovie3 = Movie.decodeStream(is1);\n InputStream is4 = getContext().getResources().openRawResource(+R.drawable.giphy1);\n mMovie4 = Movie.decodeStream(is4);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_dialouge, container, false);\n\n ImageView image = (ImageView) v.findViewById(R.id.imageView);\n DogList myActivity = (DogList) getActivity();\n\n int iconresID = getResources().getIdentifier(myActivity.getClickedImage().toLowerCase(),\"drawable\", myActivity.getPackageName());\n\n image.setImageResource(iconresID);\n\n return v;\n }", "private int seleccionarImagenTipo(int position){\n if(pedido.get(position).getCategoria().equalsIgnoreCase(\"compañia\")){\n return R.drawable.amigos;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"informatica\")){\n return R.drawable.ordenador;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"clases\")){\n return R.drawable.clases;\n }else if (pedido.get(position).getCategoria().equalsIgnoreCase(\"menaje/hogar\")){\n return R.drawable.herramientas;\n }\n return 0;\n }", "private void initImages() {\n mImageView1WA = findViewById(R.id.comment_OWA);\n mImageView6DA = findViewById(R.id.comment_btn_6DA);\n mImageView5DA = findViewById(R.id.comment_btn_5DA);\n mImageView4DA = findViewById(R.id.comment_btn_4DA);\n mImageView3DA = findViewById(R.id.comment_btn_3DA);\n mImageView2DA = findViewById(R.id.comment_btn_2DA);\n mImageViewY = findViewById(R.id.comment_btn_1DA);\n\n imageList.add(mImageViewY);\n imageList.add(mImageView2DA);\n imageList.add(mImageView3DA);\n imageList.add(mImageView4DA);\n imageList.add(mImageView5DA);\n imageList.add(mImageView6DA);\n imageList.add(mImageView1WA);\n\n }", "@Override\n protected void findViewById() {\n ivGraffit = (ImageView) findView(R.id.ivGraffit);\n\n }", "private void m16075b() {\n this.f13513b = (ImageView) getInflater().inflate(C0633g.abc_list_menu_item_icon, this, false);\n addView(this.f13513b, 0);\n }", "@Override\n public void onCreateImageSpace(int index, String src, int left, int top, int width, int height) {\n ImgContainer container = imgContainerMap.get(index);\n\n if (container == null){\n container = new ImgContainer(getContext(), adapter, index, src);\n container.width = width;\n container.height = height;\n container.containerView.setTag(R.id.htmltextview_viewholder_index, index);\n container.containerView.setTag(R.id.htmltextview_viewholder_type, VIEWHOLDER_TYPE_IMG);\n overlay.addView(container.containerView);\n\n imgContainerMap.put(index, container);\n }\n\n LayoutParams lp = new LayoutParams(width, height);\n lp.setMargins(left, top, 0, 0);\n container.containerView.setLayoutParams(lp);\n\n recycleCheck();\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n// Image image = new Image(\"/Icons/communication.jpg\");\r\n// ImageView iv = new ImageView();\r\n// imgA.setImage(image);\r\n }", "public ViewHolder(View view) {\r\n super(view);\r\n img = (ImageView) view.findViewById(R.id.recycleimg);\r\n// picture_text = (TextView) view.findViewById(R.id.picture_text);\r\n// picture_img = (TextView) view.findViewById(R.id.picture_img);\r\n// picture_heart = (TextView) view.findViewById(R.id.picture_heart);\r\n// picture_date = (TextView) view.findViewById(R.id.picture_date);\r\n// picture_num = (TextView) view.findViewById(R.id.picture_num);\r\n }", "public void ImageCreate(){\n Picasso.get().load(url).into(imageView);\n }", "@Override\r\n\tpublic View makeView() {\n\t\tImageView image = new ImageView(this);\r\n\t\t// cente会让居中显示并缩放\r\n\t\timage.setScaleType(ScaleType.FIT_CENTER);\r\n\t\treturn image;\r\n\t}", "public interface ImageView {\n void addImages(List<ImageBean> list);\n void showProgress();\n void hideProgress();\n void showLoadFailMsg();\n}", "public Coloca_imagen(){\n \n \n }", "public ImageView getImage(String image) {\r\n\r\n Image shippPic = new Image(image);\r\n ImageView shipImage = new ImageView();\r\n shipImage.setImage(shippPic);\r\n shipImage.setFitWidth(blockSize);\r\n shipImage.setFitHeight(blockSize);\r\n return shipImage;\r\n }", "private void init_star() {\n\t\tstar_11 = (ImageView) findViewById(R.life.service_star1);\r\n\t\tstar_12 = (ImageView) findViewById(R.life.service_star2);\r\n\t\tstar_13 = (ImageView) findViewById(R.life.service_star3);\r\n\t\tstar_14 = (ImageView) findViewById(R.life.service_star4);\r\n\t\tstar_15 = (ImageView) findViewById(R.life.service_star5);\r\n\t\tstar_21 = (ImageView) findViewById(R.life.environment_star1);\r\n\t\tstar_22 = (ImageView) findViewById(R.life.environment_star2);\r\n\t\tstar_23 = (ImageView) findViewById(R.life.environment_star3);\r\n\t\tstar_24 = (ImageView) findViewById(R.life.environment_star4);\r\n\t\tstar_25 = (ImageView) findViewById(R.life.environment_star5);\r\n\t\tstar_31 = (ImageView) findViewById(R.life.pricecost_star1);\r\n\t\tstar_32 = (ImageView) findViewById(R.life.pricecost_star2);\r\n\t\tstar_33 = (ImageView) findViewById(R.life.pricecost_star3);\r\n\t\tstar_34 = (ImageView) findViewById(R.life.pricecost_star4);\r\n\t\tstar_35 = (ImageView) findViewById(R.life.pricecost_star5);\r\n\t}", "@BindingAdapter({\"bind:ImagePath\"})\n public static void setFlag(ImageView view, String ImagePath) {\n\n Picasso.get()\n .load(ImagePath)\n .placeholder(R.drawable.placeholder)\n// .resize(150,100)\n .error(R.drawable.placeholder)\n .into(view);\n }", "@Override\n\tprotected void initView() {\n\t\tiv_content = (ImageView) findViewById(R.id.music_content);\n\t\tiv_music = (ImageView) findViewById(R.id.music_me_iv);\n\t\tiv_queen = (ImageView) findViewById(R.id.music_queen_iv);\n\t\ttv_music = (TextView) findViewById(R.id.music_me_tv);\n\t\ttv_queen = (TextView) findViewById(R.id.music_queen_tv);\n\t\tiv_music.setOnClickListener(this);\n\t\tiv_queen.setOnClickListener(this);\n\t\t\n\t\tbitmap=DisplayUtil.readBitMap(getApplicationContext(), R.drawable.music_part1);\n\t\tiv_content.setImageBitmap(bitmap);\n\n\t}", "public GameView() {\n this.astronautaImage = new Image(getClass().getResourceAsStream(\"/res/astronauta.gif\"));\n this.ovniImage = new Image(getClass().getResourceAsStream(\"/res/ovni1.png\"));\n this.ovni2Image = new Image(getClass().getResourceAsStream(\"/res/ovni1.png\"));\n this.ovnidestructibleImage = new Image(getClass().getResourceAsStream(\"/res/ovnidestructible.png\"));\n this.wallImage = new Image(getClass().getResourceAsStream(\"/res/wall.png\"));\n this.pistolaImage = new Image(getClass().getResourceAsStream(\"/res/pistola.png\"));\n this.alienEggImage = new Image(getClass().getResourceAsStream(\"/res/alienEgg.png\"));\n }", "private void initPoint() {\n\t\tfor (int i = 0; i < images.length; i++) {\r\n\t\t\tView view = new View(SnaDetailsActivity.this);\r\n\t\t\tparamsL.setMargins(YangUtils.dip2px(SnaDetailsActivity.this, 5), 0, 0, 0);\r\n\t\t\tview.setLayoutParams(paramsL);\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tview.setBackgroundResource(R.drawable.sy_03);\r\n\t\t\t} else {\r\n\t\t\t\tview.setBackgroundResource(R.drawable.sy_05);\r\n\t\t\t}\r\n\r\n\t\t\tviews.add(view);\r\n\t\t\tll_point.addView(view);\r\n\t\t}\r\n\t}", "public void setAddFriendImageView() {\n mFriendIv.setImageDrawable(mView.getResources().getDrawable(R.drawable.add_friend));\n }", "public void setImageView(double x, double y) {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image);\n \tboss.setTranslateX(x);\n \tboss.setTranslateY(y);\n }", "@Override\r\n\tpublic void init() {\n\t\timg = new ImageClass();\r\n\t\timg.Init(imgPath);\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n imginfo=(TextView)super.findViewById(R.id.imginfo);\n img=(ImageView)super.findViewById(R.id.img);\n img.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n imginfo.setText(\"x=\"+event.getX()+\",y=\"+event.getY());\n return false;\n }\n });\n }", "public interface ImageListener {\n void displayImage(Image image, ImageView target);\n}", "private void setPic() {\n int targetW =20;// mImageView.getWidth();\n int targetH =20;// mImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;//设置仅加载位图边界信息(相当于位图的信息,但没有加载位图)\n\n //返回为NULL,即不会返回bitmap,但可以返回bitmap的横像素和纵像素还有图片类型\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n mImageView.setImageBitmap(bitmap);\n }", "public boolean Drawable();", "@Override\n public void setLoadingDrawable(ImageView imageView, Drawable drawable) {\n }", "private void findViews() {\n // Buttons first\n closeBtn = (ImageButton) findViewById(getApplication().getResources().getIdentifier(\"closeBtn\", \"id\", getApplication().getPackageName()));\n shareBtn = (ImageButton) findViewById(getApplication().getResources().getIdentifier(\"shareBtn\", \"id\", getApplication().getPackageName()));\n\n //ProgressBar\n loadingBar = (ProgressBar) findViewById(getApplication().getResources().getIdentifier(\"loadingBar\", \"id\", getApplication().getPackageName()));\n // Image Container\n image = (TouchImageView) findViewById(getApplication().getResources().getIdentifier(\"imageView\", \"id\", getApplication().getPackageName()));\n \n\n // Title TextView\n titleTxt = (TextView) findViewById(getApplication().getResources().getIdentifier(\"titleTxt\", \"id\", getApplication().getPackageName()));\n }", "@Override\r\n\t\t\t\tprotected void updateView(AbsListView view, View convertView, int position) {\n\t\t\t\t\tImageView img = (ImageView) convertView.findViewById(mImageViewId);\r\n\t\t\t\t\tif(img != null) {\r\n\t\t\t\t\t\tString url = (String) img.getTag();\r\n\t\t\t\t\t\tint type = retrieveType(url);\r\n\t\t\t\t\t\tswitch(type) {\r\n\t\t\t\t\t\tcase TYPE_URL:\r\n\t\t\t\t\t\t\tsetRemoteImage(img, url, position);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase TYPE_RESOURCES:\r\n\t\t\t\t\t\t\tsetResourceImage(img, Integer.valueOf(retrieveKey(url)), getRequestMinWidth(), 0);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase TYPE_STORAGE:\r\n\t\t\t\t\t\t\tsetStorageImage(img, retrieveKey(url), getRequestMinWidth(), 0);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase TYPE_ASSETS:\r\n\t\t\t\t\t\t\tsetAssetsImage(img, retrieveKey(url), getRequestMinWidth(), 0);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "public ImageView getImageView() {\n return (ImageView) getView().findViewById(imageViewId);\n }", "private void showImageDetail() {\n }", "public void drawImage() {\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n imageView.setVisibility(View.VISIBLE);\n Glide.with(MainActivity.this).load(iURI).fitCenter().into(imageView);\n }", "public ImageView getId_image_item_shown() {\n return mHolder.id_image_item_shown;\n }", "public void addImageViewStatic(int idUI, ImageView imageView) {\n\t\t\ticon.append(idUI, imageView);\n\t\t}", "private View createIcon() {\r\n\t\tImageView img = new ImageView(getContext());\r\n\t\tLayoutParams imglp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\timglp.gravity = Gravity.CENTER_VERTICAL;\r\n\t\timglp.rightMargin = 5;\r\n\t\timg.setLayoutParams(imglp);\r\n\r\n\t\timg.setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.account));\r\n\t\treturn img;\r\n\t}", "public ImageView loadTheMan()\n {\n try \n {\n Image theMan = new Image(new FileInputStream(\"theMan.jpg\"), 800, 800, true, true);\n ImageView theManView = new ImageView(theMan);\n theManView.setTranslateX(0);\n theManView.setTranslateY(-210);\n theManView.setScaleX(0.3);\n theManView.setScaleY(0.3);\n return theManView;\n } \n catch (FileNotFoundException ex) \n {\n Logger.getLogger(TycoonGUI.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n }", "void setImage(IViewModel image);", "private void setPhotoAttcher() {\n\n }", "public void setImage(){\n\n Bundle extras = getIntent().getExtras();\n String image = extras.getString(\"pic\");\n String imageFlower = extras.getString(\"picflower\");\n\n\n\n if(image != null) {\n int pic = getResources().getIdentifier(image + \".png\",\"drawable\",getPackageName());\n\n achvImage.setImageResource(pic);\n achvImage.setVisibility(View.VISIBLE);\n\n }else {\n int flowerPic = getResources().getIdentifier(imageFlower + \".jpg\", \"drawable\", getPackageName());\n achvImage.setImageResource(flowerPic);\n achvImage.setVisibility(View.VISIBLE);\n }\n\n achvImage.setImageResource(R.drawable.medaldetails);\n\n\n String text = extras.getString(\"text\");\n achvDetails.setText(text);\n\n String title = extras.getString(\"title\");\n achvTitle.setText(title);\n\n int points1 = extras.getInt(\"points\");\n points.setText(\"Points: \" + points1);\n\n\n String desText1 = extras.getString(\"achDesA\");\n des1.setText(desText1);\n\n\n\n\n }", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "@Override\r\n\t\t\t\t\tpublic void result(String b, View v) {\n\t\t\t\t\t\tImageView im = (ImageView) v;\r\n\t\t\t\t\t\tint index = (Integer) v.getTag();\r\n\t\t\t\t\t\tBitmap bmp = ImageUtils.getBitmapFromFile(\r\n\t\t\t\t\t\t\t\tnew File(list.get(index).path), 300, 300);\r\n\t\t\t\t\t\tif (bmp == null) {\r\n\t\t\t\t\t\t\tim.setImageResource(R.drawable.default_avatar);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tim.setImageBitmap(bmp);\r\n\t\t\t\t\t\t\tbmp = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}", "public interface Image {\n\n /**\n * Get number of pixels horizontally\n *\n * @return int number of pixels horizontally\n */\n int getWidth();\n\n /**\n * Get number of pixels vertically\n *\n * @return int number of pixels vertically\n */\n int getHeight();\n\n /**\n * Get the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the red value\n */\n int getRed(int x, int y);\n\n\n /**\n * Get the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the green value\n */\n int getGreen(int x, int y);\n\n /**\n * Get the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the blue value\n */\n int getBlue(int x, int y);\n\n /**\n * Set the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setRed(int x, int y, int value);\n\n\n /**\n * Set the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setGreen(int x, int y, int value);\n\n /**\n * Set the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setBlue(int x, int y, int value);\n}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t\tsetContentView(R.layout.act_imageview_src);\r\n\t\t\r\n\t\tinitLayout();\r\n\t\tinitListener();\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id)\n {\n\n Ion.with(getContext())\n .load(classi_images.get(position))\n .withBitmap()\n .placeholder(R.raw.loading)\n .error(R.drawable.error)\n .animateLoad(R.anim.zoom_in)\n .animateIn(R.anim.fade_in)\n .intoImageView(clasified_image);\n }", "public Tower (ImageView test) {\n super.setImageView(test);\n }", "public View getGraphic()\n{\n // Get image for file\n //Image img = _type==FileType.PACKAGE_DIR? Package : ViewUtils.getFileIconImage(_file);\n Image img = ViewUtils.getFileIconImage(_file);\n View grf = new ImageView(img); grf.setPrefSize(18,18);\n \n // If error/warning add Error/Warning badge as composite icon\n /*BuildIssue.Kind status = _proj!=null? _proj.getRootProject().getBuildIssues().getBuildStatus(_file) : null;\n if(status!=null) {\n Image badge = status==BuildIssue.Kind.Error? ErrorBadge : WarningBadge;\n ImageView bview = new ImageView(badge); bview.setLean(Pos.BOTTOM_LEFT);\n StackView spane = new StackView(); spane.setChildren(grf, bview); grf = spane;\n }*/\n \n // Return node\n return grf;\n}", "public interface SmokingSituationView {\n\n void setViewCheck(ImageView vCheck, ImageView vBg);\n void showProgress();\n void hideProgress();\n void openNext();\n}", "public PlayerView(Context context, @Nullable AttributeSet attributeSet, int i2) {\n super(context, attributeSet, i2);\n boolean z2;\n int i3;\n int i4;\n boolean z3;\n boolean z4;\n int i5;\n boolean z5;\n int i6;\n int i7;\n int i8;\n boolean z7;\n boolean z8;\n a aVar = new a();\n this.a = aVar;\n if (isInEditMode()) {\n this.b = null;\n this.c = null;\n this.d = null;\n this.e = null;\n this.f = null;\n this.g = null;\n this.h = null;\n this.i = null;\n this.j = null;\n this.k = null;\n ImageView imageView = new ImageView(context);\n if (Util.SDK_INT >= 23) {\n Resources resources = getResources();\n imageView.setImageDrawable(resources.getDrawable(R.drawable.exo_edit_mode_logo, null));\n imageView.setBackgroundColor(resources.getColor(R.color.exo_edit_mode_background_color, null));\n } else {\n Resources resources2 = getResources();\n imageView.setImageDrawable(resources2.getDrawable(R.drawable.exo_edit_mode_logo));\n imageView.setBackgroundColor(resources2.getColor(R.color.exo_edit_mode_background_color));\n }\n addView(imageView);\n return;\n }\n int i9 = R.layout.exo_player_view;\n this.s = true;\n if (attributeSet != null) {\n TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, R.styleable.PlayerView, 0, 0);\n try {\n int i10 = R.styleable.PlayerView_shutter_background_color;\n boolean hasValue = obtainStyledAttributes.hasValue(i10);\n int color = obtainStyledAttributes.getColor(i10, 0);\n int resourceId = obtainStyledAttributes.getResourceId(R.styleable.PlayerView_player_layout_id, i9);\n boolean z9 = obtainStyledAttributes.getBoolean(R.styleable.PlayerView_use_artwork, true);\n int resourceId2 = obtainStyledAttributes.getResourceId(R.styleable.PlayerView_default_artwork, 0);\n boolean z10 = obtainStyledAttributes.getBoolean(R.styleable.PlayerView_use_controller, true);\n int i11 = obtainStyledAttributes.getInt(R.styleable.PlayerView_surface_type, 1);\n int i12 = obtainStyledAttributes.getInt(R.styleable.PlayerView_resize_mode, 0);\n int i13 = obtainStyledAttributes.getInt(R.styleable.PlayerView_show_timeout, 5000);\n boolean z11 = obtainStyledAttributes.getBoolean(R.styleable.PlayerView_hide_on_touch, true);\n boolean z12 = obtainStyledAttributes.getBoolean(R.styleable.PlayerView_auto_show, true);\n i8 = obtainStyledAttributes.getInteger(R.styleable.PlayerView_show_buffering, 0);\n this.r = obtainStyledAttributes.getBoolean(R.styleable.PlayerView_keep_content_on_player_reset, this.r);\n boolean z13 = obtainStyledAttributes.getBoolean(R.styleable.PlayerView_hide_during_ads, true);\n this.s = obtainStyledAttributes.getBoolean(R.styleable.PlayerView_use_sensor_rotation, this.s);\n obtainStyledAttributes.recycle();\n i6 = i11;\n i9 = resourceId;\n z8 = z12;\n i3 = i13;\n z2 = z10;\n z7 = z13;\n i4 = resourceId2;\n z3 = z9;\n z4 = hasValue;\n i5 = color;\n z5 = z11;\n i7 = i12;\n } catch (Throwable th) {\n obtainStyledAttributes.recycle();\n throw th;\n }\n } else {\n z8 = true;\n z7 = true;\n i8 = 0;\n i7 = 0;\n i6 = 1;\n z5 = true;\n i5 = 0;\n z4 = false;\n z3 = true;\n i4 = 0;\n i3 = 5000;\n z2 = true;\n }\n LayoutInflater.from(context).inflate(i9, this);\n setDescendantFocusability(262144);\n AspectRatioFrameLayout aspectRatioFrameLayout = (AspectRatioFrameLayout) findViewById(R.id.exo_content_frame);\n this.b = aspectRatioFrameLayout;\n if (aspectRatioFrameLayout != null) {\n aspectRatioFrameLayout.setResizeMode(i7);\n }\n View findViewById = findViewById(R.id.exo_shutter);\n this.c = findViewById;\n if (findViewById != null && z4) {\n findViewById.setBackgroundColor(i5);\n }\n if (aspectRatioFrameLayout == null || i6 == 0) {\n this.d = null;\n } else {\n ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(-1, -1);\n if (i6 == 2) {\n this.d = new TextureView(context);\n } else if (i6 == 3) {\n SphericalGLSurfaceView sphericalGLSurfaceView = new SphericalGLSurfaceView(context);\n sphericalGLSurfaceView.setSingleTapListener(aVar);\n sphericalGLSurfaceView.setUseSensorRotation(this.s);\n this.d = sphericalGLSurfaceView;\n } else if (i6 != 4) {\n this.d = new SurfaceView(context);\n } else {\n this.d = new VideoDecoderGLSurfaceView(context);\n }\n this.d.setLayoutParams(layoutParams);\n aspectRatioFrameLayout.addView(this.d, 0);\n }\n this.j = (FrameLayout) findViewById(R.id.exo_ad_overlay);\n this.k = (FrameLayout) findViewById(R.id.exo_overlay);\n ImageView imageView2 = (ImageView) findViewById(R.id.exo_artwork);\n this.e = imageView2;\n this.o = z3 && imageView2 != null;\n if (i4 != 0) {\n this.p = ContextCompat.getDrawable(getContext(), i4);\n }\n SubtitleView subtitleView = (SubtitleView) findViewById(R.id.exo_subtitles);\n this.f = subtitleView;\n if (subtitleView != null) {\n subtitleView.setUserDefaultStyle();\n subtitleView.setUserDefaultTextSize();\n }\n View findViewById2 = findViewById(R.id.exo_buffering);\n this.g = findViewById2;\n if (findViewById2 != null) {\n findViewById2.setVisibility(8);\n }\n this.q = i8;\n TextView textView = (TextView) findViewById(R.id.exo_error_message);\n this.h = textView;\n if (textView != null) {\n textView.setVisibility(8);\n }\n int i14 = R.id.exo_controller;\n PlayerControlView playerControlView = (PlayerControlView) findViewById(i14);\n View findViewById3 = findViewById(R.id.exo_controller_placeholder);\n if (playerControlView != null) {\n this.i = playerControlView;\n } else if (findViewById3 != null) {\n PlayerControlView playerControlView2 = new PlayerControlView(context, null, 0, attributeSet);\n this.i = playerControlView2;\n playerControlView2.setId(i14);\n playerControlView2.setLayoutParams(findViewById3.getLayoutParams());\n ViewGroup viewGroup = (ViewGroup) findViewById3.getParent();\n int indexOfChild = viewGroup.indexOfChild(findViewById3);\n viewGroup.removeView(findViewById3);\n viewGroup.addView(playerControlView2, indexOfChild);\n } else {\n this.i = null;\n }\n PlayerControlView playerControlView3 = this.i;\n this.v = playerControlView3 != null ? i3 : 0;\n this.y = z5;\n this.w = z8;\n this.x = z7;\n this.m = z2 && playerControlView3 != null;\n hideController();\n k();\n PlayerControlView playerControlView4 = this.i;\n if (playerControlView4 != null) {\n playerControlView4.addVisibilityListener(aVar);\n }\n }" ]
[ "0.7239204", "0.7004003", "0.69691616", "0.68702465", "0.68321943", "0.6775475", "0.65919536", "0.65878135", "0.6578456", "0.65260845", "0.65131456", "0.64747185", "0.64649075", "0.64119667", "0.63880265", "0.63880265", "0.6370062", "0.63679177", "0.63649553", "0.63586414", "0.63506925", "0.63337326", "0.6330084", "0.63234407", "0.6258311", "0.6171695", "0.61563766", "0.6138281", "0.61370534", "0.612373", "0.6121335", "0.6097279", "0.60942835", "0.6090002", "0.6081434", "0.6061847", "0.6056457", "0.6046342", "0.6029389", "0.6011868", "0.6007186", "0.60029685", "0.59843725", "0.598232", "0.5978141", "0.5953051", "0.58988655", "0.5896229", "0.5888488", "0.5888289", "0.5851084", "0.58482194", "0.5846283", "0.5841013", "0.5832248", "0.58233476", "0.5818171", "0.58168876", "0.58162975", "0.5810923", "0.5808183", "0.58008975", "0.57997465", "0.57901585", "0.57790446", "0.5765497", "0.5762226", "0.5761154", "0.57599914", "0.57550067", "0.57534707", "0.57530755", "0.57508016", "0.5747389", "0.5738711", "0.57310516", "0.5730898", "0.5724302", "0.57204455", "0.5718775", "0.57016045", "0.5696152", "0.569352", "0.56887925", "0.5682033", "0.5673732", "0.567368", "0.56637776", "0.56563705", "0.5648686", "0.56475955", "0.5641203", "0.56390756", "0.562728", "0.5626884", "0.5614145", "0.56068957", "0.56010747", "0.56009656", "0.55978584", "0.5597745" ]
0.0
-1
Si aggancia al togglebutton un listener che permette di ascoltare lo stato del bottone
public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) //Questo metodo permette di cambiare l'immagine associata all'imageview nel layout,in funzione dello stato del bottone { { if (isChecked) { iv.setImageResource(R.drawable.button_pause); //Se lo stato del bottone è checked,allora viene associato all'imageview l'immagine button_pause } else { iv.setImageResource(R.drawable.button_play); //Se lo stato del bottone è unchecked,allora viene associato all'imageview l'immagine button_play } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BtnOnOffListener(){\r\n\t\t\t\t\r\n\t\t\tprocessGestureEventHelper( false);\r\n\t\t}", "public void onClick(View v) {\n if(DataHolder.theSoundSetting == 1){\n DataHolder.theSoundSetting = 2;\n modeButton.setText(\"Vibrate Only Mode\");\n }\n else if(DataHolder.theSoundSetting == 2){\n DataHolder.theSoundSetting = 3;\n modeButton.setText(\"Normal Mode\");\n }\n else if(DataHolder.theSoundSetting == 3){\n DataHolder.theSoundSetting = 4;\n modeButton.setText(\"Silent Mode\");\n }\n else if(DataHolder.theSoundSetting == 4){\n DataHolder.theSoundSetting = 1;\n modeButton.setText(\"Sound Only Mode\");\n }\n\n }", "@Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n if (b){ //switch is ON\n reminderLayout.setVisibility(View.VISIBLE); //show the reminder\n }\n else{ //switch is OFF\n reminderLayout.setVisibility(GONE); //remove the reminder\n }\n hasReminder = b; //set the reminder state to be saved\n }", "public void setupToggleButtons(){\n\t\ttoggle_textContacts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (isChecked) {\n\t\t // The toggle is enabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstTextContacts())\n\t\t\t {\n\t\t\t \tshowTextContactsTutorialDialog();\n\t\t\t }\n\t\t\t \n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t textContactsSmallFrame.setLayoutParams(layout_desc);\n\t\t } else {\n\t\t \t// resize the frame to just show the top button\n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(0, 0);\n\t\t textContactsSmallFrame.setLayoutParams(layout_desc);\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\ttoggle_NFRadio.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (!isChecked) {\n\t\t // The toggle is disabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstMusic())\n\t\t\t {\n\t\t\t \tshowMusicTutorialDialog();\n\t\t\t }\n\t\t \t// resize the frame to just show the top button\n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t NFRadioSmallFrame.setLayoutParams(layout_desc);\n\t\t } else {\n\t\t \t// the toggle is enabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstNewsFeed())\n\t\t\t {\n\t\t\t \tshowNewsTutorialDialog();\n\t\t\t }\n\t\t\t \n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(0, 0);\n\t\t NFRadioSmallFrame.setLayoutParams(layout_desc);\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\ttoggle_ShakeToWake.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t \tif(isChecked&&prefsHandler.getSettings().getIsFirstShakeToWake())\n\t\t {\n\t\t \t\tshowShakeTutorialDialog();\n\t\t }\n\t\t }\n\t\t});\n\t}", "@Override\n public void onCheckedChanged(CompoundButton toggleButton, boolean isChecked) {\n if (!isChecked) {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_off));\n state[0] = 0;\n } else {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_on));\n state[0] = 255;\n }\n // If the values are modified while the user does not check/unckeck the checkbox, then we update the value from the controller.\n int exist = mode.getPayload().indexOf(c);\n if (exist != -1) {\n mode.getPayload().get(exist).setV(state[0]);\n }\n }", "public void onToggleClicked(View view) {\n\t boolean on = ((ToggleButton) view).isChecked();\n\t \n\t if (on) {\n\t // Enable vibrate\n\t } else {\n\t // Disable vibrate\n\t }\n\t}", "@Override\n\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\t\tswitch (arg0.getId()) {\n\t\t//音量\n\t\tcase R.id.cb0:\n\t\t\tif(arg1){\n\t\t\t\tinc_sound.setVisibility(View.VISIBLE);\n\t\t\t\tSystem.putInt(context.getContentResolver(),\n\t\t\t\t\t\tSystem.VOLUME_SYSTEM, sound.getProgress());\n\t\t\t\taudio.setMode(AudioManager.MODE_NORMAL);\n\t\t\t}else{\n\t\t\t\tinc_sound.setVisibility(View.GONE);\n\t\t\t\tSystem.putInt(context.getContentResolver(),\n\t\t\t\t\t\tSystem.VOLUME_SYSTEM, 0);\n\t\t\t\taudio.setMode(AudioManager.MODE_INVALID);\n\t\t\t}\n\t\t\tbreak;\n\t\t//触摸提示音\n\t\tcase R.id.cb:\n\t\t\tSystem.putInt(context.getContentResolver(),\n\t\t\t\t\tSystem.SOUND_EFFECTS_ENABLED, arg1 ? 1 : 0);\n\t\t\tbreak;\n\t\t//锁屏提示音\n\t\tcase R.id.cb1:\n\t\t\tif(arg1){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t}\n\t\t\tbreak;\n\t\t//亮度调节\n\t\tcase R.id.cb2:\n\t\t\tif(arg1){\n\t\t\t\tSystem.putInt(context.getContentResolver(),\n\t\t\t\t\t\tSystem.SCREEN_BRIGHTNESS_MODE, \n\t\t\t\t\t\tSystem.SCREEN_BRIGHTNESS_MODE_MANUAL);\n\t\t\t\tlight.setEnabled(true);\n\t\t\t}else{\n\t\t\t\tSystem.putInt(context.getContentResolver(),\n\t\t\t\t\t\tSystem.SCREEN_BRIGHTNESS_MODE, \n\t\t\t\t\t\tSystem.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);\n\t\t\t\tlight.setEnabled(false);\n\t\t\t}\n\t\t\tbreak;\n\t\t//屏幕选转\n\t\tcase R.id.cb3:\n\t\t\tFyLog.d(TAG, \"屏幕旋转:\" + arg1);\n\t\t\tif(arg1){\n\t\t\t\tSettings.System.putInt(context.getContentResolver(),\n\t\t\t\t\t\tSettings.System.ACCELEROMETER_ROTATION, 1);\n\t\t\t}else{\n\t\t\t\tSettings.System.putInt(context.getContentResolver(),\n\t\t\t\t\t\tSettings.System.ACCELEROMETER_ROTATION, 0);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "public void onClick(View v) {\n is_enabled=!is_enabled;\n if(!is_enabled){\n textView_current_Status.setText(R.string.switcher_is_being_enabled_please_wait);\n //sayHello();\n Set_Switch_On();\n }else{\n textView_current_Status.setText(R.string.switcher_is_currently_disabled);\n Set_Switch_Off();\n }\n }", "public void buttonListener(){\n soundButton.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n sound = !sound;\n bluetoothIn.obtainMessage(handlerState1, Boolean.toString(sound)).sendToTarget();\n if (sound == true) {\n soundButton.setImageResource(R.drawable.normal_volume);\n soundButton.setScaleType(ImageView.ScaleType.FIT_CENTER);\n Toast.makeText(getBaseContext(), \"Sound Activated\", Toast.LENGTH_SHORT).show();\n } else {\n soundButton.setScaleType(ImageView.ScaleType.FIT_CENTER);\n soundButton.setImageResource(R.drawable.mute_volume);\n Toast.makeText(getBaseContext(), \"Mute\", Toast.LENGTH_SHORT).show();\n } } });\n }", "@Override\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\t\tif(!isChecked ){\n \t\t \n\t\t\t\t\t\tsb.setstatusbar(0);\n \t\t\n \t }else{\n \t // sb = \"0\";\n \t \tsb.setstatusbar(1);\n \t }\n\t\t\t\t\t}", "void updateCommonToggleStatus(boolean shown);", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagHehuo = !bFlagHehuo;\r\n\t\t\t\t hehuo_btn.setChecked(bFlagHehuo);\r\n\t\t\t }", "@Override\n\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\t\t\n\t}", "@Override\n\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\n\t}", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\t\t\t\t\t\t boolean isChecked) {\n\t\t\t\tif(isChecked){\n\t\t\t\t\t//editText1.setText(buttonView.getText()+\"选中\");\n\t\t\t\t\tavcom.FreezeAudio = 0;\n\t\t\t\t}else{\n\t\t\t\t\t//editText1.setText(buttonView.getText()+\"取消选中\");\n\t\t\t\t\tavcom.FreezeAudio = 1;\n\t\t\t\t}\n\t\t\t}", "public void buttonClick() {\n if (soundToggle == true) {\n buttonClick.start();\n } // if\n }", "@Override\n public void onClick(View v) {\n btn.setBackgroundColor(ContextCompat.getColor(context, onColor));\n MediaPlayer mp = MediaPlayer.create(btn.getContext(), audios.get(btn));\n mp.start();\n //Change color of other buttons to off\n for (Button other : audios.keySet()) {\n if (other != btn) {\n other.setBackgroundColor(ContextCompat.getColor(context, offColor));\n }\n }\n\n }", "@Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n String debugStr[]=settings.getLatestSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH);\n if(debugStr!=null) {\n boolean streamOn = Boolean.valueOf(debugStr[3]);\n if(!streamOn){\n //Check that we are connected to the device before try to send command\n if(MainActivity.deviceConnected) {\n overview.orientationSwitch.setChecked(true);\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"true\");\n sendStreamEnabledImuRequest();\n } else {\n overview.orientationSwitch.setChecked(false);\n }\n } else {\n overview.orientationSwitch.setChecked(false);\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"false\");\n sendStreamDisabledImuRequest();\n }\n\n } else {\n //The settings could not be found in the database, insert the setting\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"false\");\n }\n\n\n }", "public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\n if (mStatusSwitch.isChecked()) {\n mGovSystem.setStatus(Constants.GovSystemsStatus.Funcțional);\n } else {\n mGovSystem.setStatus(Constants.GovSystemsStatus.Nefuncțional);\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n final TextView sucursal2 = (TextView) findViewById(R.id.textSucursal2);\n boolean i = buttonView.isChecked();\n if (i == false) {\n// sucursal2.setVisibility(View.VISIBLE);\n sucursal2.animate()\n .translationX(0)\n .alpha(1.0f)\n .setDuration(300)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n super.onAnimationEnd(animation);\n sucursal2.setVisibility(View.VISIBLE);\n }\n });\n\n\n } else if (i == true) {\n// sucursal2.setVisibility(View.GONE);\n sucursal2.animate()\n .translationX(sucursal2.getWidth())\n .alpha(0.0f)\n .setDuration(300)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n super.onAnimationEnd(animation);\n sucursal2.setVisibility(View.GONE);\n }\n });\n\n }\n\n }", "private void toggleMode() {\n\t if(freestyle){\n\t\t Toast.makeText(getApplicationContext(), \"Take a picture in any pose\", Toast.LENGTH_LONG).show();\n\t\t \nmodeTextView.setText(\"Freestyle\");\nnewImgButton.setEnabled(false);\ncountdownView.setEnabled(false);\ncountdownView.setText(\"-\");\nframenumTextView.setEnabled(false);\nframenumTextView.setText(\"-\");\n\t }\n\t else{\n\t\t Toast.makeText(getApplicationContext(), \"Try to match the shape and take a picture\", Toast.LENGTH_LONG).show();\n\t\t modeTextView.setText(\"Match\");\n\t\t newImgButton.setEnabled(true);\n\t\t countdownView.setEnabled(true);\n\t\t framenumTextView.setEnabled(true);\n\t }\n\t \n\t\n}", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t{\n\t\t\t\t\tselect.setChecked(false);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Silent Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tselect.setChecked(true);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", true);\n\t\t\t\t\tmPrefsEditor.apply();\t\t\t\t\t\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Vibration Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tint id = v.getId();\n\n\t\tif (id == R.id.toggleButton) {\n\t\t\tif (toggleButton.isChecked()) {\n\t\t\t\tflashLightOn();\n\t\t\t\ttoggleButton.setTextColor(Color.GREEN);\n\t\t\t} else {\n\t\t\t\tflashLightOff();\n\t\t\t\ttoggleButton.setTextColor(Color.GRAY);\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\t\t\t\t\t\t boolean isChecked) {\n\t\t\t\tif(isChecked){\n\t\t\t\t\t//editText1.setText(buttonView.getText()+\"选中\");\n\t\t\t\t\tavcom.FreezeVideo = 0;\n\t\t\t\t}else{\n\t\t\t\t\t//editText1.setText(buttonView.getText()+\"取消选中\");\n\t\t\t\t\tavcom.FreezeVideo = 1;\n\t\t\t\t}\n\t\t\t}", "public void on_toggle( View view ) {\n if ( toggle.isChecked( ) ) { //if it just toggled on\n Calendar calendar = Calendar.getInstance( ); //get a calendar object\n calendar.set( Calendar.HOUR_OF_DAY, time_picker.getHour( ) ); //set the hour\n calendar.set( Calendar.MINUTE, time_picker.getMinute( ) ); //set the minute\n calendar.set( Calendar.SECOND, 0 ); //set seconds\n Intent intent = new Intent( Alarm.this, AlarmReceiver.class ); //make the intent to alarm receiver\n final EditText edit = ( EditText ) this.findViewById( R.id.reminder_text );\n final String text = edit.getText( ).toString( );\n intent.putExtra( \"msg\", text ); //put the user message in the intent\n pending_intent = PendingIntent.getBroadcast( Alarm.this, 0, intent, 0 ); //get pending intent from intent\n alarm_manager.setExact( AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis( ), pending_intent );\n alarm_set = 1;\n //Toast.makeText( getApplicationContext( ), \"alarm is set\", Toast.LENGTH_SHORT ).show( );\n } else { //if it just toggled off\n //stop the ringtone service if it's playing\n Intent ringing = new Intent( getApplicationContext( ), RingtonePlayingService.class );\n stopService( ringing );\n //cancel the pending intent for alarm\n Intent intent = new Intent( Alarm.this, AlarmReceiver.class );\n pending_intent = PendingIntent.getBroadcast( Alarm.this, 0, intent, 0 );\n alarm_manager.cancel( pending_intent );\n alarm_set = 0;\n //Toast.makeText( getApplicationContext( ), \"alarm disabled\", Toast.LENGTH_SHORT ).show( );\n }\n update_storage( );\n }", "@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }", "public void onToggleClicked(View view) {\n boolean on = ((ToggleButton) view).isChecked();\n if (on) {\n if (!BA.isEnabled()) {\n Intent turnOn = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(turnOn, 0);\n Toast.makeText(getApplicationContext(), \"Turned on\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Already on\", Toast.LENGTH_LONG).show();\n }\n } else {\n BA.disable();\n Toast.makeText(getApplicationContext(), \"Turned off\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\r\n\t\t\t\t public void onClick(View v) {\n\t\t\t\t\t bFlagGongsi = !bFlagGongsi;\r\n\t\t\t\t\t gongsi_btn.setChecked(bFlagGongsi);\r\n\t\t\t\t }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif (button_SFX.getText().equals(\"효과음 : On\")){\n\t\t\t\tsfx=false;\n\t\t\t\tbutton_SFX.setText(\"효과음 : off\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsfx=true;\n\t\t\t\tbutton_SFX.setText(\"효과음 : On\");\n\t\t\t}\n\t\t}", "@Override\n public void onClick(View v) {\n SharedPreferences.Editor prefsEditor = settingsPreferences.edit();\n if (settingsPreferences.getBoolean(TAG_SOUND_NOTIFICATION, false)) {\n prefsEditor.putBoolean(TAG_SOUND_NOTIFICATION, false);\n cbSoundNotify.setImageResource(R.drawable.check2);\n } else {\n prefsEditor.putBoolean(TAG_SOUND_NOTIFICATION, true);\n cbSoundNotify.setImageResource(R.drawable.check0);\n }\n prefsEditor.commit();\n }", "@Override\n\tprotected void setOnClickForButtons() {\n\t\tthis.buttons[0].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getActivity(), MainScreenActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\tMainFunctions.selectedOption = 1;\n\t\t\t\tdestroyServices();\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\t/* message box - onclick event */\n\t\tthis.buttons[1].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdestroyServices();\n\t\t\t\tMainFunctions.selectedOption = 2;\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\t/* one tick sound */\n\t\tfor (int i = 0; i < this.totalButtons; i++){\n\t\t\tfinal String desc = buttons[i].getTag().toString();\n\t\t\tbuttons[i].setOnFocusChangeListener(new View.OnFocusChangeListener() {\n\t\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\t\tif (hasFocus) {\n\t\t\t\t\t\tLog.i(TAG, \"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tlogFunctions.logTextFile(\"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tspeakButton(desc, 1.0f, 1.0f);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void toggle(){\n isOn = !isOn;\n }", "private void settingsBtnListener() {\n settingsBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new SettingsScreen(game));\n }\n });\n }", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t{\n\t\t\t\t\tsilent.setChecked(false);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Vibration Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsilent.setChecked(true);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", false);\n\t\t\t\t\tmPrefsEditor.apply();\t\t\t\t\t\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Silent Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\t\t\t\t\t\t boolean isChecked) {\n\t\t\t\tif(isChecked){\n\t\t\t\t\t//editText1.setText(buttonView.getText()+\"选中\");\n\t\t\t\t\tavcom.BwSelfAdaptSwitch = 1;\n\t\t\t\t}else{\n\t\t\t\t\t//editText1.setText(buttonView.getText()+\"取消选中\");\n\t\t\t\t\tavcom.BwSelfAdaptSwitch = 0;\n\t\t\t\t}\n\t\t\t}", "void enablButtonListener();", "@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n }", "@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tLog.e(TAG, \"toggle onClick enter \");\n\t\t\t\tupdateSurface();\n\t\t\t}", "@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\n if(arg1){\n Log.d(TAG,\"Set audio mute ON.\");\n mAudioControl.setMute(true);\n }\n else{\n Log.d(TAG,\"set audio mute OFF.\");\n mAudioControl.setMute(false);\n }\n }", "@Override\n\tprotected void InitButtonListener() {\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 5;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickOK();\n\t\t\t}\n\t\t});\n\t\timgbtnCancel.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 4;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickCancel();\n\t\t\t}\n\t\t});\n\t\tseekbarLevel.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tBrightnessManualLevel = seekBar.getProgress();\n\t\t\t\tCAN1Comm.Set_BacklightIlluminationLevel_719_PGN61184_109(BrightnessManualLevel + 1);\n\t\t\t\tCAN1Comm.TxCANToMCU(109);\n\t\t\t\tCAN1Comm.TxCMDToMCU(CAN1Comm.CMD_LCD, BrightnessManualLevel + 1);\n\t\t\t\t\n\t\t\t\tParentActivity.BrihgtnessCurrent = BrightnessManualLevel;\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void Toggle() {\n\t \n }", "public void onStatusClicked(View view){\n Log.i(TAG, \"-- ON STATUS CLICKED --\");\n ToggleButton tb = (ToggleButton) view;\n\n //let setStatus change the check status instead\n tb.setChecked(false);\n\n if(!tb.isChecked()){\n Log.i(TAG, \"-- ON STATUS CHECKED --\");\n // Launch the DeviceListActivity to see devices and do scan\n Intent serverIntent = new Intent(this, DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE_INSECURE);\n }\n else{\n Log.i(TAG, \"-- ON STATUS UNCHECKED --\");\n }\n\n }", "@Override\n\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\tif (buttonView.getId() == tgModes[NORMAL].getId()){\n\t\t\t\tif(isChecked){\n\t\t\t\t\ttgModes[SILENT].setChecked(false);\n\t\t\t\t\ttgModes[VIBRATE].setChecked(false);\n\t\t\t\t}\n\t\t\t} else if (buttonView.getId() == tgModes[SILENT].getId()){\n\t\t\t\tif(isChecked){\n\t\t\t\t\ttgModes[NORMAL].setChecked(false);\n\t\t\t\t\ttgModes[VIBRATE].setChecked(false);\n\t\t\t\t}\n\t\t\t} else if (buttonView.getId() == tgModes[VIBRATE].getId()){\n\t\t\t\tif(isChecked){\n\t\t\t\t\ttgModes[SILENT].setChecked(false);\n\t\t\t\t\ttgModes[NORMAL].setChecked(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n public void onClick(View v) {\n if (((ToggleButton) v).isChecked()) {\n ExpandAnimation animation = new ExpandAnimation(ll_setmail, 250);\n ll_setmail.startAnimation(animation);\n } else {\n ExpandAnimation animation = new ExpandAnimation(ll_setmail, 250);\n ll_setmail.startAnimation(animation);\n }\n }", "public void setStatus(int status){\n Log.d(TAG, \"-- SET STATUS --\");\n switch(status){\n //connecting to remote device\n case BluetoothClientService.STATE_CONNECTING:{\n Toast.makeText(this, \"Connecting to remote bluetooth device...\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.connecting_button);\n break;\n }\n //not connected\n case BluetoothClientService.STATE_NONE:{\n Toast.makeText(this, \"Unable to connect to remote device\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.disconnect_button);\n statusButton.setTextOff(getString(R.string.disconnected));\n statusButton.setChecked(false);\n break;\n }\n //established connection to remote device\n case BluetoothClientService.STATE_CONNECTED:{\n Toast.makeText(this, \"Connection established with remote bluetooth device...\", Toast.LENGTH_SHORT).show();\n ToggleButton statusButton = (ToggleButton) this.findViewById(R.id.status_button);\n statusButton.setBackgroundResource(R.drawable.connect_button);\n statusButton.setTextOff(getString(R.string.connected));\n statusButton.setChecked(true);\n //start motion monitor\n motionMonitor = new MotionMonitor(this, mHandler);\n motionMonitor.start();\n break;\n }\n }\n }", "@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\n\t}", "@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n if (((ToggleButton) v).isChecked()) {\n ExpandAnimation animation = new ExpandAnimation(mailbox_setting_detail_layout, 250);\n mailbox_setting_detail_layout.startAnimation(animation);\n } else {\n ExpandAnimation animation = new ExpandAnimation(mailbox_setting_detail_layout, 250);\n mailbox_setting_detail_layout.startAnimation(animation);\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n editor.putBoolean(\"changText\", true);\n } else {\n editor.putBoolean(\"changText\", false);\n }\n editor.commit();\n }", "private void updateButtons() {\n\t\t SwingUtilities.invokeLater(new Runnable() {\n\t\t public void run() { \n\t\t botones[rowId1][columnId1].toggleOnOff();\n\t\t\t botones[rowId1][columnId1].setEnabled(true);\n\t\t\t \n\t\t\t botones[rowId2][columnId2].toggleOnOff();\n\t\t\t botones[rowId2][columnId2].setEnabled(true);\n\t\t\t \n\t\t\t setEnabled(true);\n\t\t\t \n\t\t timerPush.stop();\n\t\t }\n\t\t });\n\t }", "@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n\n\n\n }", "@SuppressWarnings(\"deprecation\")\n\t\t\t\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif(arg1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// 일단 개발자 계정에 문제가 있기에 막아둔다. \n\t\t\t\t\t \n\t\t\t\t\t\t/* facebook.authorize(self, new String[] {}, new DialogListener() {\n\t\t\t\t\t\t\t \n\t\t\t\t public void onComplete(Bundle values) {\n\t\t\t\t \n\t\t\t\t SharedPreferences.Editor editor = mPrefs.edit();\n\t\t\t\t editor.putString(\"access_token\", facebook.getAccessToken());\n\t\t\t\t editor.putLong(\"access_expires\", facebook.getAccessExpires());\n\t\t\t\t editor.commit();\n\t\t\t\t InitFacebook();\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t public void onFacebookError(FacebookError error) {\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t public void onError(DialogError e) {\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t public void onCancel() {\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t\t\t });*/\n\t\t\t\t\t\t \n\n\t\t\t\t\t\t\tself.ShowAlertDialLog( self ,\"에러\" , \"추후에 구현 예정입니다. \" );\n\t\t\n\t\t\t\t\t\t\tInitFacebook();\n\t\t\t\t\t\t \n\t\t\t\t\t \n\n\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t //tvStateofToggleButton.setText(\"OFF\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n if (v == audio) {\n playTheSound(imgPos);\n stop.setVisibility(View.VISIBLE);\n audio.setVisibility(View.INVISIBLE);\n\n //Pareil que pour le bouton audio en inversant les rôles\n }\n\n if (v == stop) {\n playTheSound(imgPos);\n stopTheSound();\n stop.setVisibility(View.INVISIBLE);\n audio.setVisibility(View.VISIBLE);\n }\n }", "public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n // The toggle is enabled (speakers mode)\n //checks if device can support this feature\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n //device is not supported, bring up popup window to tell them!\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this,android.R.style.Theme_DeviceDefault_Dialog_Alert);\n builder.setCancelable(true);\n builder.setTitle(\"Outdated Device!\");\n builder.setMessage(\"Unfortunately, your device is outdated so an alternative beep using your notification sound has been used instead. Please update to Android 6 or higher to continue using the tone.\");\n builder.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n builder.show();\n legacyBeep = true;\n } else {\n headphonesOutput = !headphonesOutput;\n }\n } else {\n // The toggle is disabled (headphones mode)\n legacyBeep=false;\n headphonesOutput = !headphonesOutput;\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n }", "private void announcementBtnListener() {\n announcementBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new AnnouncementsScreen(game));\n }\n });\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(snake.getstatus() == snake.READY)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if(snake.getstatus() == snake.RUNNING)\n\t\t\t\t{\n//\t\t\t\t\tstatusButton.setText(\"start\");\n\t\t\t\t\tstatusButton.setImageResource(R.drawable.start);\n\t\t\t\t\tsnake.pause();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n//\t\t\t\t\tstatusButton.setText(\"pause\");\n\t\t\t\t\tstatusButton.setImageResource(R.drawable.pause);\n\t\t\t\t\tsnake.start();\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (symbel_int == 1) {\r\n\t\t\t\t\tLog.d(\"play_menu\", \"play_menu\");\r\n\t\t\t\t\ttran_sur.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tplay_menu_arrow1.setImageResource(R.drawable.arrow_up);\r\n\t\t\t\t\tsymbel_int = symbel_int * -1;\r\n\t\t\t\t\tpackup();\r\n\t\t\t\t} else if (symbel_int == -1) {\r\n\t\t\t\t\tLog.d(\"play_menu\", \"play_menu\");\r\n\t\t\t\t\ttran_sur.setVisibility(View.GONE);\r\n\t\t\t\t\tplay_menu_arrow1.setImageResource(R.drawable.arrow_down);\r\n\t\t\t\t\tslowdown();\r\n\t\t\t\t\tsymbel_int = symbel_int * -1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (symbel_int == 1) {\r\n\t\t\t\t\tLog.d(\"play_menu\", \"play_menu\");\r\n\t\t\t\t\ttran_sur.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tplay_menu_arrow1.setImageResource(R.drawable.arrow_up);\r\n\t\t\t\t\tsymbel_int = symbel_int * -1;\r\n\t\t\t\t\tpackup();\r\n\t\t\t\t} else if (symbel_int == -1) {\r\n\t\t\t\t\tLog.d(\"play_menu\", \"play_menu\");\r\n\t\t\t\t\ttran_sur.setVisibility(View.GONE);\r\n\t\t\t\t\tplay_menu_arrow1.setImageResource(R.drawable.arrow_down);\r\n\t\t\t\t\tslowdown();\r\n\t\t\t\t\tsymbel_int = symbel_int * -1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (symbel_int == 1) {\r\n\t\t\t\t\tLog.d(\"play_menu\", \"play_menu\");\r\n\t\t\t\t\ttran_sur.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tplay_menu_arrow1.setImageResource(R.drawable.arrow_up);\r\n\t\t\t\t\tsymbel_int = symbel_int * -1;\r\n\t\t\t\t\tpackup();\r\n\t\t\t\t} else if (symbel_int == -1) {\r\n\t\t\t\t\tLog.d(\"play_menu\", \"play_menu\");\r\n\t\t\t\t\ttran_sur.setVisibility(View.GONE);\r\n\t\t\t\t\tplay_menu_arrow1.setImageResource(R.drawable.arrow_down);\r\n\t\t\t\t\tslowdown();\r\n\t\t\t\t\tsymbel_int = symbel_int * -1;\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tif(sw.isChecked())\n\t\t\t{\n\t\t\t\tpartybool=true;\n\t\t\t\tDnDlevel=2;\n\t\t\t\tToast.makeText(con,\"\"+DnDlevel+\" \"+partybool,Toast.LENGTH_LONG).show();\n\t\t\t\tsb.setProgress(100);\n\t\t\t}\n\t\t}", "public void toggle(){\r\n isDown = !isDown;\r\n }", "private void initSwitchEvents(){\n s1.setOnClickListener(v ->\n eventoSuperficie()\n );\n s2.setOnClickListener(v ->\n eventoSemiSumergido()\n );\n s3.setOnClickListener(v ->\n eventoSumergido()\n );\n // Hace click en el estado actual\n switch (PosicionBarrasReactor.getPosicionActual()){\n case SUMERGIDO:\n s3.toggle();\n break;\n case SEMI_SUMERGIDO:\n s2.toggle();\n break;\n case SUPERFICIE:\n s1.toggle();\n break;\n }\n // -\n }", "@Override\n public boolean onClick(View view) {\n updateToggle(view, !mChecked);\n// updateText(view); // automatically\n return true;\n }", "void onSwitched(ToggleableView toggleableView, boolean isOn);", "public void onToggleClicked(View view) {\n boolean on = ((ToggleButton) view).isChecked();\n BackgroundDataBaseTasks tempTask = new BackgroundDataBaseTasks(this);\n points.clear();\n\n if (on) {\n leaderboardType.setText(\"Global Leaderboard\");\n String method = \"friend\";\n try {\n tempTask.delegate = this;\n tempTask.execute(method, \"\").get();\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else {\n leaderboardType.setText(\"Friends Leaderboard\");\n String method = \"friend\";\n try {\n tempTask.delegate = this;\n tempTask.execute(method, friendSQL).get();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\tswitch (buttonView.getId()) {\r\n\t\tcase R.id.message_notify_switch:\r\n\t\t\tmSpUtil.setMsgNotify(isChecked);\r\n\t\t\tbreak;\r\n\t\tcase R.id.message_sound_switch:\r\n\t\t\tmSpUtil.setMsgSound(isChecked);\r\n\t\t\tbreak;\r\n\t\tcase R.id.show_head_switch:\r\n\t\t\tmSpUtil.setShowHead(isChecked);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagZhaopin = !bFlagZhaopin;\r\n\t\t\t\t zhaopin_btn.setChecked(bFlagZhaopin);\r\n\t\t\t }", "private void chatRoomBtnListener() {\n chatRoomBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n }\n });\n }", "private void checkClicked()\n {\n if (Greenfoot.mouseClicked(this))\n {\n if (musicPlaying == true)\n {\n setImage(\"volumeOn.png\");\n GreenfootImage volumeOn = getImage();\n volumeOn.scale(70,70);\n setImage(volumeOn); \n soundtrack.playLoop();\n musicPlaying = false;\n }\n else if (musicPlaying == false)\n {\n setImage(\"volumeOff.png\");\n GreenfootImage volumeOff = getImage();\n volumeOff.scale(70,70);\n soundtrack.stop();\n musicPlaying = true;\n }\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 2;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void handle(ActionEvent event) {\r\n\t\tString command = ((ToggleButton) event.getSource()).getText();\r\n\t\tthis.view.getPaintPanel().setMode(command);\r\n\t\t\r\n\t}", "private void botonFuncional(JButton Boton){\n \n if(!caraUp){\n Boton.setEnabled(false);\n imagen1 =(ImageIcon) Boton.getDisabledIcon();\n v[0] = Boton;\n caraUp = true;\n cara1 = false;\n }\n else {\n Boton.setEnabled(false); \n imagen2 =(ImageIcon) Boton.getDisabledIcon();\n v[1]= Boton;\n cara1 = true;\n ganar();\n }\n }", "public void onCheckedChanged(CompoundButton compoundButton, boolean bl) {\n if (!MbaSettingsActivity.access$000(MbaSettingsActivity.this)) {\n ToggleableSettingItemView toggleableSettingItemView = MbaSettingsActivity.access$100(MbaSettingsActivity.this);\n boolean bl2 = !bl;\n toggleableSettingItemView.setCheckedIgnoringListener(bl2);\n return;\n }\n if (!bl) {\n MbaSettingsActivity.access$200(MbaSettingsActivity.this);\n return;\n }\n MbaSettingsActivity mbaSettingsActivity = MbaSettingsActivity.this;\n Intent intent = EfiListActivity.makeIntent((Context)MbaSettingsActivity.this);\n int n2 = bvv0076vv007600760076v;\n switch (n2 * (n2 + b0076v0076vv007600760076v) % .b0075uuuu0075u0075u0075()) {\n default: {\n bvv0076vv007600760076v = 84;\n b0076v0076vv007600760076v = .b00750075007500750075uu0075u0075();\n if ((.b00750075007500750075uu0075u0075() + .buuuuu0075u0075u0075()) * .b00750075007500750075uu0075u0075() % b007600760076vv007600760076v == bv00760076vv007600760076v) break;\n bvv0076vv007600760076v = .b00750075007500750075uu0075u0075();\n bv00760076vv007600760076v = .b00750075007500750075uu0075u0075();\n }\n case 0: \n }\n mbaSettingsActivity.startActivityForResult(intent, 32);\n }", "@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 1;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\t\tif(!isChecked ){\n \t\t \n \t vibratorv = 0;\n\t\t\t\t\t\tv.setValue(0);\n \t }else{\n \t vibratorv = 1;\n \t \tv.setValue(1);\n \t }\n\t\t\t\t\t}", "public void setBoton() {\n SharedPreferences preferences = getSharedPreferences(STRING_PREFERENCES,MODE_PRIVATE);\n preferences.edit().putBoolean(PREFERENCE_ESTADO_BUTTON_SESION,checkBox.isChecked()).apply();\n\n }", "@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n kc.setChecked(false);\n }\n //do something else\n lbButton = true;\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \tapp.toggleLightMode();\n \tisDark = !isDark;\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 3;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "private void toggleProgress() {\n if (progWheel.getVisibility() == View.VISIBLE) {\n // Needs its own thread for timing control\n Handler handler = new Handler();\n final Runnable r = new Runnable() {\n public void run() {\n if (progWheel.getVisibility()\n == View.VISIBLE) {\n progWheel.setVisibility(View.GONE);\n }\n }\n };\n handler.postDelayed(r, 1);\n } else if (progWheel.getVisibility() == View.GONE) {\n progWheel.spin();\n progWheel.setVisibility(View.VISIBLE);\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n switch (buttonView.getId()){\n case R.id.retina_fd:\n FaceDetectManager.setRetinaFD(isChecked);\n mRetina_FD.setChecked(FaceConstants.RETINA_FD);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_RETINA_FD, FaceConstants.RETINA_FD).commit();\n break;\n\n case R.id.remove_unnormal_switch:\n ConfigLib.isRemoveUnnormalFace = isChecked;\n mRemoveUnnormal.setChecked(ConfigLib.isRemoveUnnormalFace);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_REMOVE_UNNORMAL_FACE, ConfigLib.isRemoveUnnormalFace).commit();\n break;\n\n case R.id.mullive_switch:\n ConfigLib.detectWithLivenessModeUseMul = isChecked;\n mMulLiveness.setChecked(ConfigLib.detectWithLivenessModeUseMul);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_MULIVENESSSS, ConfigLib.detectWithLivenessModeUseMul).commit();\n break;\n\n case R.id.mulassist_switch:\n ConfigLib.detectWithLivenessWithMulAssist = isChecked;\n mMulAssist.setChecked(ConfigLib.detectWithLivenessWithMulAssist);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_MULASSISTSS, ConfigLib.detectWithLivenessWithMulAssist).commit();\n break;\n\n case R.id.cov_switch:\n ConfigLib.detectWithCovStatus = isChecked;\n mCov_switch.setChecked(ConfigLib.detectWithCovStatus);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_COVERMODE, ConfigLib.detectWithCovStatus).commit();\n break;\n\n case R.id.enhance_switch:\n ConfigLib.enhanceMode = isChecked;\n mEnhance_switch.setChecked(ConfigLib.enhanceMode);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_ENHANCEMODE,ConfigLib.enhanceMode).commit();\n break;\n\n case R.id.use_new_switch:\n// Log.d(TAG, \"onCheckedChanged: use_new_switch = \" + isChecked);\n ConfigLib.detectWithLivenessModeUseNew = isChecked;\n mUseNewLiveVersion_switch.setChecked(ConfigLib.detectWithLivenessModeUseNew);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_USENEWLIVEVERSION,ConfigLib.detectWithLivenessModeUseNew).commit();\n break;\n\n case R.id.use_fix_switch:\n ConfigLib.detectWithLivenessModeUseMix = isChecked;\n mUseFixLiveVersion_switch.setChecked(ConfigLib.detectWithLivenessModeUseMix);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_USEFIXLIVEVERSION,ConfigLib.detectWithLivenessModeUseMix).commit();\n break;\n\n case R.id.use_AWRGB_switch:\n ConfigLib.detectWithAwRGBLiveness = isChecked;\n mUseAWRGBLiveVersion_switch.setChecked(ConfigLib.detectWithAwRGBLiveness);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_USEAWRGBLIVEVERSION,ConfigLib.detectWithAwRGBLiveness).commit();\n break;\n\n\n case R.id.infrared_switch:\n ConfigLib.detectWithInfraredLiveness = isChecked;\n mInfrared_switch.setChecked(ConfigLib.detectWithInfraredLiveness);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_DETECTINFRARED,ConfigLib.detectWithInfraredLiveness).commit();\n ToastUtils.showShort(getResources().getString(R.string.reopen));\n break;\n\n case R.id.saveinfrared_switch:\n mSaveInfrared_switch.setChecked(isChecked);\n FaceDetectManager.setInfraredDebugPicsState(isChecked);\n break;\n\n case R.id.saveinfraredlive_switch:\n Constants.DEBUG_SAVE_INFRARED_LIVE = isChecked;\n mSaveInfraredLive_switch.setChecked(Constants.DEBUG_SAVE_INFRARED_LIVE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVEINFRAREDLIVE,Constants.DEBUG_SAVE_INFRARED_LIVE).commit();\n break;\n\n case R.id.saveinfraredfake_switch:\n Constants.DEBUG_SAVE_INFRARED_FAKE = isChecked;\n mSaveInfraredFake_switch.setChecked(Constants.DEBUG_SAVE_INFRARED_FAKE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVEINFRAREDFAKE,Constants.DEBUG_SAVE_INFRARED_FAKE).commit();\n break;\n\n case R.id.saveblur_switch:\n Constants.DEBUG_SAVE_BLUR = isChecked;\n mSaveBlur_switch.setChecked(Constants.DEBUG_SAVE_BLUR);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVEBLURDATA,Constants.DEBUG_SAVE_BLUR).commit();\n break;\n\n case R.id.savenoface_switch:\n Constants.DEBUG_SAVE_NOFACE = isChecked;\n mSaveNoFace_switch.setChecked(Constants.DEBUG_SAVE_NOFACE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVENOFACEDATA,Constants.DEBUG_SAVE_NOFACE).commit();\n break;\n\n case R.id.savess_switch:\n Constants.DEBUG_SAVE_SIMILARITY_SMALL = isChecked;\n mSaveSS_switch.setChecked(Constants.DEBUG_SAVE_SIMILARITY_SMALL);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVESSDATA,Constants.DEBUG_SAVE_SIMILARITY_SMALL).commit();\n break;\n\n case R.id.debug_switch:\n AttConstants.DEBUG = isChecked;\n mDebug_switch.setChecked(AttConstants.DEBUG);\n refreshDebug();\n FaceDetectManager.setDebug(AttConstants.DEBUG);\n AiwinnManager.getInstance().setDebug(AttConstants.DEBUG);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_DEBUG,AttConstants.DEBUG).commit();\n break;\n\n case R.id.info_switch:\n AttConstants.DEBUG_SHOW_FACEINFO = isChecked;\n mInfo_switch.setChecked(AttConstants.DEBUG_SHOW_FACEINFO);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_INOFO,AttConstants.DEBUG_SHOW_FACEINFO).commit();\n break;\n\n case R.id.savefake_switch:\n Constants.DEBUG_SAVE_FAKE = isChecked;\n mSaveF_switch.setChecked(Constants.DEBUG_SAVE_FAKE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_FAKE,Constants.DEBUG_SAVE_FAKE).commit();\n break;\n\n case R.id.savelive_switch:\n Constants.DEBUG_SAVE_LIVE = isChecked;\n mSaveL_switch.setChecked(Constants.DEBUG_SAVE_LIVE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_LIVE,Constants.DEBUG_SAVE_LIVE).commit();\n break;\n\n case R.id.savet_switch:\n Constants.DEBUG_SAVE_TRACKER = isChecked;\n mSaveTracker_switch.setChecked(Constants.DEBUG_SAVE_TRACKER);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_TRACKER,Constants.DEBUG_SAVE_TRACKER).commit();\n break;\n\n case R.id.savetan_switch:\n Constants.DEBUG_SAVE_LIVEPIC_SDK = isChecked;\n mSaveTan_switch.setChecked(Constants.DEBUG_SAVE_LIVEPIC_SDK);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_ST,Constants.DEBUG_SAVE_LIVEPIC_SDK).commit();\n break;\n\n case R.id.saveerror_switch:\n Constants.DEBUG_SAVE_ERROR = isChecked;\n mSaveError_switch.setChecked(Constants.DEBUG_SAVE_ERROR);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SE,Constants.DEBUG_SAVE_ERROR).commit();\n break;\n\n case R.id.savecov_switch:\n ConfigLib.mouthDebug = isChecked;\n mSaveCov_switch.setChecked(ConfigLib.mouthDebug);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SC,ConfigLib.mouthDebug).commit();\n break;\n case R.id.similarity_filter_switch:\n ConfigLib.similarityFilter = isChecked;\n mSimilarityFilter_switch.setChecked(ConfigLib.similarityFilter);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SIMILARITY_FILTER, ConfigLib.similarityFilter).commit();\n break;\n }\n }", "public void receiveMyBtStatus(String status) {\n \t\n \tfinal String s = status;\n \t\n \t\n// \tLog.d(\"handler\", \"receiveMyBtStatus\"); \t\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n // This gets executed on the UI thread so it can safely modify Views\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }\n });\n }", "public void onToggleAnimate(View view) {\n updateEnabledState();\n }", "@Override\n public void onClick(View v) {\n boolean checked = ((Switch)v).isChecked();\n if(checked){\n // when the switch is checked send the state 1 and value of progress to the server\n light_value=\"1\";\n SetData(MainActivity.URL+\"/mobile/set.php?token=\"+token,\"24\",light_value, String.valueOf(seekBar_light_bedroom2.getProgress()));\n }else {\n // when the switch is unchecked send the state 0 and value of progress to the server\n light_value=\"0\";\n SetData(MainActivity.URL+\"/mobile/set.php?token=\"+token,\"24\",light_value, String.valueOf(seekBar_light_bedroom2.getProgress()));\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tllistenBtnset();\n\t\t\t}", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\t\t\t\tprefs.edit().putBoolean(\"silentOnCall\", silentToall.isChecked()).commit();\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\ttwitter.setSource(\"keyrani\");\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\ttwitter.updateStatus(status.getText().toString());\n\t\t\t\t\t\t\n\t\t\t\t\t}catch (Repetition e) {\n\t\t\t\t\t\t Toast.makeText(TwitUpdate.this, \"status tdk boleh sama\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n if (b) {\n // Toast.makeText(getContext(), \"on\", Toast.LENGTH_LONG).show();\n\n context.startService(in);\n\n } else {\n //Toast.makeText(getContext(), \"of\", Toast.LENGTH_LONG).show();\n //in = new Intent(getContext(), HorizantelShake.class);\n context.stopService(in);\n }\n prefs = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor prefEditor = prefs.edit();\n prefEditor.putBoolean(\"service_status\", b);\n prefEditor.commit();\n }", "@Override\n public void onClick(View v) {\n Log.d(TAG, \"Set LCD mute ON. (display OFF)\");\n mDisplayControl.setMute(true);\n try{\n Thread.sleep(3000); //3000É~ÉäïbSleepÇ∑ÇÈ\n }catch(InterruptedException e){}\n\n Log.d(TAG, \"Set LCD mute OFF. (display ON)\");\n mDisplayControl.setMute(false);\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t if( bFlagQiuzhi == false )\r\n\t\t\t\t {\r\n\t\t\t\t\t btn_qiuzhi_switch.setBackgroundResource(R.drawable.btn_anniu_b);\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t\t btn_qiuzhi_switch.setBackgroundResource(R.drawable.btn_anniu_a);\r\n\t\t\t\t }\r\n\t\t\t\t bFlagQiuzhi = !bFlagQiuzhi;\r\n\r\n\t\t\t }", "public void onClick(View v) {\n String textoBtn = pausarReanudar.getText().toString();\n if (textoBtn.equals(\"Pausar\")){\n pausarReanudar.setText(\"Reanudar\");\n timeWhenStopped = tiempo.getBase() - SystemClock.elapsedRealtime();\n tiempo.stop();\n }else{\n pausarReanudar.setText(\"Pausar\");\n tiempo.setBase(SystemClock.elapsedRealtime() + timeWhenStopped);\n tiempo.start();\n }\n }", "private void eventoSumergido(){\n s1.setChecked(false);\n s2.setChecked(false);\n s3.setChecked(true);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np1));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SUMERGIDO);\n }", "@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n li.setChecked(false);\n }\n //do something else\n kgButton = true;\n }", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "private void setToggleEvent(GridLayout mainGrid) {\n for (int i = 0; i < mainGrid.getChildCount(); i++) {\n //You can see , all child item is CardView , so we just cast object to CardView\n final CardView cardView = (CardView) mainGrid.getChildAt(i);\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (cardView.getCardBackgroundColor().getDefaultColor() == -1) {\n //Change background color\n cardView.setCardBackgroundColor(Color.parseColor(\"#FF6F00\"));\n Toast.makeText(BuyChoose.this, \"State : True\", Toast.LENGTH_SHORT).show();\n\n } else {\n //Change background color\n cardView.setCardBackgroundColor(Color.parseColor(\"#FFFFFF\"));\n Toast.makeText(BuyChoose.this, \"State : False\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }", "@Override\n\t\t\tpublic void onSwitchChange(TagButton tagButton, boolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t{\n\t\t\t\t\tToast.makeText(Test.this, \"开\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t{\n\t\t\t\t\t\tToast.makeText(Test.this, \"关\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\t\t\n\t\t\t\t\t\tif(isChecked){ lsb.setlsb(1); }else{lsb.setlsb(0);}\n\t\t\t\t}" ]
[ "0.70542014", "0.6857157", "0.6849664", "0.66027856", "0.65406203", "0.6531448", "0.6527827", "0.6501064", "0.64860326", "0.64665633", "0.6456745", "0.6444631", "0.64390755", "0.64281714", "0.6422961", "0.6415696", "0.6413333", "0.6411547", "0.6401631", "0.6391192", "0.63729155", "0.63649344", "0.635281", "0.63507944", "0.6340218", "0.62995756", "0.6294463", "0.6291512", "0.6291408", "0.6288838", "0.6286342", "0.6283891", "0.62806803", "0.62771004", "0.6275812", "0.6274339", "0.62735295", "0.6271873", "0.6271744", "0.626715", "0.6264747", "0.6260127", "0.6257249", "0.62538445", "0.6236566", "0.62294126", "0.62294126", "0.621445", "0.6209039", "0.61996746", "0.6196701", "0.61908466", "0.6186344", "0.6182569", "0.6176257", "0.61757594", "0.6170886", "0.61644864", "0.61644864", "0.61644864", "0.6164216", "0.6155343", "0.61546516", "0.61462545", "0.61385095", "0.6137292", "0.6115341", "0.61055595", "0.61049676", "0.6104874", "0.6092396", "0.60915667", "0.6089686", "0.60836864", "0.60650486", "0.60647786", "0.60623133", "0.60592693", "0.6058656", "0.6052065", "0.6050415", "0.60451084", "0.60438865", "0.604307", "0.6039824", "0.6039319", "0.6038858", "0.6033779", "0.6022437", "0.6019744", "0.6015109", "0.6012858", "0.6009999", "0.6009511", "0.6008532", "0.6007651", "0.6005607", "0.6003766", "0.6001076", "0.60006666" ]
0.6373608
20
Replies the graph point associated to this AStarNode.
@Pure PT getGraphPoint();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getPoint() {\n return point;\n }", "public double getPoint() {\r\n return point;\r\n }", "public double getPoint() {\r\n return point;\r\n }", "public Point getPoint()\n\t{\n\t\treturn point;\n\t}", "public KDPoint getPoint() {\n\t\treturn new KDPoint(this.loc.lat,this.loc.lng,0.0);\n\t}", "public Point getPoint() {\n return point;\n }", "public Point getPoint(){\n\t\treturn _point;\n\t}", "public Point getPoint() {\n return this.mPoint;\n }", "public PointInSpace getPointInSpace() {\n return point;\n }", "public int getPoint(){\n return point;\n }", "public Vertex getVertex() {\n return curr;\n }", "public Point getCoordinate() {\n return this.coordinate;\n }", "public int pointValue() {\r\n return pointValue;\r\n }", "public Point2D getNodePositionXY () { return n.getXYPositionMap(); }", "public RMPoint getXYP() { return convertPointToShape(new RMPoint(), _parent); }", "public int getXPoint() {\r\n return this.x;\r\n }", "public Node<T1> getPnode() {\r\n\t\treturn pnode;\r\n\t}", "public GraphX getGraphX() {\r\n return graphX;\r\n }", "@Override\r\n\t\tpublic Geom_element getGeom() {\n\t\t\treturn this.point;\r\n\t\t}", "public Graph getGraph() {\n\t\treturn this.Graph;\n\t}", "public Coordinate getCoordinate() {\n\t\treturn super.listCoordinates().get(0);\n\t}", "public Vec4 getReferencePoint()\n {\n return this.currentData.getReferencePoint();\n }", "public Graph getGraph()\n\t{\n\t\treturn graph;\n\t}", "public GPoint getFirstPoint() {\n return(point1);\n }", "GraphNode firstEndpoint() \n\t{\n\t\treturn this.firstEndpoint;\n\t\t\n\t}", "public double getX() {\n\t\treturn point[0];\n\t}", "public Point.Double getPosition(){\r\n return new Point.Double(x, y);\r\n }", "@Override\n\tpublic float getX() {\n\t\treturn currnet().getX();\n\t}", "public Point getLocation() {\n return currentLocation;\n }", "public Point getAWTPoint() {\n\t\treturn new Point(this.x0, this.y0);\n\t}", "public Position<Edge<E>> getPosition() { return pos; }", "public Point getLocation() {\n Map<String, Long> map = (java.util.Map<String, Long>) driver.executeAtom(\n atoms.getLocationJs, false, this);\n return new Point(map.get(\"x\").intValue(), map.get(\"y\").intValue());\n }", "@PropertyMapped\n\tpublic int getPoint() {\n\t\treturn point;\t\t\n\t}", "public Point3D getPoint() {\r\n\t\treturn point;\r\n\t}", "@Pure\n\tpublic SGraph getGraph() {\n\t\treturn this.graph.get();\n\t}", "public native GLatLng getPoint(GInfoWindow self)/*-{\r\n\t\treturn self.getPoint();\r\n\t}-*/;", "public Point getPointA() {\n return pointA;\n }", "public Object getVertex(){\r\n return this.vertex;\r\n }", "public Point getLocPoint(){\n return super.getLocation();\n }", "public final Point getLocation() {\n return this.location ;\n }", "public Point getReferencePoint(){\n return referencePoint;\n }", "public Point getPosition(){\r\n return new Point(this.position);\r\n }", "public Point getLocation() {\n return pos;\n }", "public Point getPosition() {\n return this.position;\n }", "public Graph<Integer> getGraph() {\n return E;\n }", "@Override\n\tpublic Point getLocation() {\n\t\treturn new Point(x,y);\n\t}", "public ParseTree getGraph() {\n return graph;\n }", "public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }", "public Vertex getDestination() {\n return destination;\n }", "public Point getLocation();", "public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}", "protected final IntervalNode getP() {\n\treturn(this.p);\n }", "public int getPointX() {\n return pointX;\n }", "public Point getLocation ( )\r\n\t{\r\n\t\treturn new Point ( currentCol, currentRow );\r\n\t}", "public Object getLocation() {\n return leftSide.getLocation();\n }", "public Point getLocation(){\r\n return super.getLocation();\r\n }", "@Override\r\n public Point getRelatedSceneLocation() {\r\n return getLocationPoint(locationRatio);\r\n }", "public String getSourceFigNodeId() {\n return sourceFigNodeId;\n }", "public Point getMPoint() {\n\t\treturn new Point(getX() + (getWidth() / 2), getY() + (getHeight() / 2));\n\t}", "public GeoPoint position(){\n return position;\n }", "public Point getA() {\n\t\treturn a;\n\t}", "public Cursor getGraphCursor() {\r\n \t\treturn graph.getCursor();\r\n \t}", "public Node getp() {\n\t\treturn this.p;\n\t}", "public Point getLocation() {\n\t\treturn location;\n\t}", "public Vertex getFrom() {\r\n\r\n return from;\r\n }", "protected Graph<VLabel, ELabel> theGraph() {\n return _graph;\n }", "public double getX (){\n if (_parent != null)\n return _node.getLayoutX() + _parent.getX();\n else\n return _node.getLayoutX() ;\n }", "@Schema(description = \"source node of the connection\")\n public String getNodeA() {\n return nodeA;\n }", "public Graph2D getGraph() {\n return mGraph;\n }", "public GraphNode firstEndpoint() {\n\t\t\treturn start;\n\t\t}", "public GeoPoint getPosition() {\n\t\treturn position;\n\t}", "@Override\n public Graph getGraph() {\n return graph;\n }", "public Graph<V, E> getGraph() {\n\t\treturn graph;\n\t}", "public Node getOrigin()\r\n\t{\r\n\t\treturn origin;\r\n\t}", "public Point getPosition(){\n\t\treturn position;\n\t}", "public Coordinate coordinate() {\n\t\treturn coordinate;\n\t}", "public Point getPosition() {\n return new Point(position);\n }", "public int getvertex() {\n\t\treturn this.v;\n\t}", "public Point getPosition() {\n return position;\n }", "public Point getLocation() {\n return location;\n }", "public Point getLocation() {\n\t\treturn location.getCopy();\n\t}", "public final double getX() { return location.getX(); }", "public Graph getGraph();", "public Point getPosition();", "public GpsPoint getGpsLocation() {\n\t\treturn _GPS;\n\t}", "public Coordinates closestPoint() {\n return closestPoint;\n }", "public double getX()\n\t{\n\t\treturn x;\t\t\t\t\t\t\t\t\t\t\t\t// Return point's x-coordinate\n\t}", "public int getX() {\n return this.coordinate.x;\n }", "public ECPoint getPubKeyPoint() {\n return pub.get();\n }", "public double getX() {\n return origin.getX();\n }", "public String getVertex() {\n\t\treturn vertices.get(0);\n\t}", "@ApiModelProperty(required = true, value = \"The node on which the operation was performed.\")\n public BigDecimal getNode() {\n return node;\n }", "public Point3D getLocation() {\n\t\treturn p;\n\t}", "public Vertex getSource() {\n return source;\n }", "public GraphNode firstEndpoint(){\r\n return first;\r\n }", "public Coordinate getCoordinate() {\n\t\treturn this.coordinate;\n\t}", "public int Node() { return this.Node; }", "public Point getLocation() { return loc; }", "Point getPosition();", "Point getPosition();" ]
[ "0.6508157", "0.64955145", "0.64955145", "0.6373522", "0.6325023", "0.63120484", "0.62396854", "0.6223458", "0.6181072", "0.60075724", "0.59718966", "0.5958816", "0.5907179", "0.59007084", "0.59006774", "0.5841908", "0.5821636", "0.57638913", "0.57540923", "0.5746931", "0.57432663", "0.57408214", "0.57354695", "0.57202125", "0.5718715", "0.5717325", "0.57038224", "0.57009345", "0.5694509", "0.5682248", "0.5678889", "0.56767267", "0.56758654", "0.5673345", "0.5655498", "0.56534594", "0.56462383", "0.56383705", "0.56350046", "0.56284565", "0.5627438", "0.5624161", "0.5616071", "0.561307", "0.5602762", "0.56015295", "0.5598614", "0.5592936", "0.5585645", "0.55786645", "0.55715626", "0.5566879", "0.55663335", "0.55630183", "0.55619437", "0.55607206", "0.5556306", "0.5552242", "0.5552057", "0.55505663", "0.55450284", "0.55360407", "0.5525337", "0.5521363", "0.5516304", "0.5515737", "0.5514449", "0.551393", "0.5504447", "0.5498385", "0.549834", "0.54973996", "0.5496845", "0.5496732", "0.5488406", "0.5484372", "0.5481277", "0.5472207", "0.54716027", "0.5465962", "0.5465824", "0.54642254", "0.54625076", "0.5462396", "0.5454689", "0.5454112", "0.5453421", "0.5450279", "0.5447092", "0.54426366", "0.54405785", "0.54384905", "0.54298323", "0.5427274", "0.5424116", "0.54235536", "0.5422778", "0.541885", "0.54146945", "0.54146945" ]
0.76302654
0
Replies the segments which are traversable from this node.
@Pure Iterable<ST> getGraphSegments();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Node> segments() {\n return segments;\n }", "public final ObservableList<T> getSegments() {\n return segments.get();\n }", "public List<Edge> segments() {\n return segments;\n }", "Set<S> getSegments();", "public List<TrackSegment> segments() {\n\t\t\treturn new NonNullList<>(_segments);\n\t\t}", "public LineSegment[] segments() {\n return lineSegments.clone();\n }", "@Override\r\n public List<PathSegment> getPathSegments() {\n return pathSegments;\r\n }", "public LineSegment[] segments() {\n return lineSegments.toArray(new LineSegment[numberOfSegments()]);\n }", "public LineSegment[] segments() {\r\n LineSegment[] toReturn = new LineSegment[lineSegments.length];\r\n System.arraycopy(lineSegments, 0, toReturn, 0, lineSegments.length);\r\n return toReturn;\r\n }", "com.google.ads.googleads.v6.common.Segments getSegments();", "public final ListProperty<T> segmentsProperty() {\n return segments;\n }", "public LineSegment[] segments() {\n LineSegment[] re = new LineSegment[lines.size()];\n lines.toArray(re);\n return re;\n }", "public LineSegment[] segments() {\n LineSegment[] segmentsArray = new LineSegment[segments.size()];\n segmentsArray = segments.toArray(segmentsArray);\n return segmentsArray;\n }", "public List<TrackSegment> getSegments() {\n\t\treturn _segments;\n\t}", "public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }", "public Collection<LazyNode2> getVertices() {\n List<LazyNode2> l = new ArrayList();\n \n for(Path p : getActiveTraverser())\n //TODO: Add cache clearing\n l.add(new LazyNode2(p.endNode().getId()));\n \n return l;\n }", "public Collection<GJPoint2D> vertices() {\n\t\tArrayList<GJPoint2D> vertices = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the control points of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\tvertices.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the set of vertices\n\t\treturn vertices;\n\t}", "public Object getSegment(K node);", "@Override\r\n @TypeInfo(\"ceylon.language.Empty|ceylon.language.Sequence<Element>\")\r\n public ceylon.language.List<? extends Element> segment(\r\n \t\t@Name(\"from\") final Integer from, \r\n \t\t@Name(\"length\") final long length) {\n if (length<=0) return $empty.getEmpty();\r\n if (!defines(from)) return $empty.getEmpty();\r\n Element x = this.first;\r\n for (int i=0; i < from.longValue(); i++) { x = this.next(x); }\r\n Element y = x;\r\n for (int i=1; i < length; i++) { y = this.next(y); }\r\n if (!includes(y)) { y = this.last; }\r\n return new Range<Element>(x, y);\r\n }", "@Override\r\n public List<PathSegment> getPathSegments(boolean arg0) {\n return pathSegments;\r\n }", "java.util.List<speech_formatting.SegmentedTextOuterClass.SentenceSegment> \n getSentenceSegmentList();", "public List<Tile> getPathSegment() {\n return pathSegment;\n }", "public LineSegment[] segments(){\n\t\tPoint[] ptArr = new Point[numpoints];\n\t\tfor(int i =0; i < numpoints; i++){\n\t\t\tfor(int j =0; j < numpoints;j++) ptArr[j] = mypoints[j];\n\t\t\tPoint origin = mypoints[i];\t\t\n\t\t\t//Sort the points using mergeSort for doubles\n\t\t\tArrays.sort(ptArr,origin.slopeOrder());\t\n\t\t\tfindAllCollinearPts(ptArr,origin);\n\t\t}\n\t\treturn getSegments();\n\t}", "public ArrayList <Segment> getSegmentList () {\n\t\treturn mSegmentList;\n\t}", "ArrayList<TTC> generateSegments() {\n if ((START_STATION instanceof Station) && (endStation instanceof Station)) {\n ArrayList<TTC> route = TTC.SUBWAY_LIST.get(NUMBER);\n if (route.contains(START_STATION) && route.contains(endStation)) {\n return generateSegmentsHelper(route);\n } else {\n return new ArrayList<>();\n }\n } else {\n ArrayList<TTC> route = TTC.BUS_MAP.get((START_STATION).getNUMBER());\n if (route.contains(START_STATION) && route.contains(endStation)) {\n return generateSegmentsHelper(route);\n } else {\n return new ArrayList<>();\n }\n }\n }", "public ArrayList getSegments(Output p_output)\n {\n ArrayList result = new ArrayList();\n\n for (Iterator it = p_output.documentElementIterator(); it.hasNext();)\n {\n DocumentElement de = (DocumentElement) it.next();\n\n switch (de.type())\n {\n case DocumentElement.TRANSLATABLE:\n {\n TranslatableElement elem = (TranslatableElement) de;\n\n if (elem.hasSegments())\n {\n ArrayList segments = elem.getSegments();\n\n for (int i = 0, max = segments.size(); i < max; i++)\n {\n SegmentNode node = (SegmentNode) segments.get(i);\n result.add(node.getSegment());\n }\n }\n\n break;\n }\n case DocumentElement.LOCALIZABLE:\n {\n // Thu Dec 04 01:53:59 2003 CvdL: ignore localizables.\n /*\n * LocalizableElement elem = (LocalizableElement)de;\n * result.add(elem.getChunk());\n */\n\n break;\n }\n default:\n // skip all others\n break;\n }\n }\n\n return result;\n }", "public java.util.List<com.eviware.soapui.coverage.SegmentType> getSegmentList()\n {\n final class SegmentList extends java.util.AbstractList<com.eviware.soapui.coverage.SegmentType>\n {\n public com.eviware.soapui.coverage.SegmentType get(int i)\n { return LineTypeImpl.this.getSegmentArray(i); }\n \n public com.eviware.soapui.coverage.SegmentType set(int i, com.eviware.soapui.coverage.SegmentType o)\n {\n com.eviware.soapui.coverage.SegmentType old = LineTypeImpl.this.getSegmentArray(i);\n LineTypeImpl.this.setSegmentArray(i, o);\n return old;\n }\n \n public void add(int i, com.eviware.soapui.coverage.SegmentType o)\n { LineTypeImpl.this.insertNewSegment(i).set(o); }\n \n public com.eviware.soapui.coverage.SegmentType remove(int i)\n {\n com.eviware.soapui.coverage.SegmentType old = LineTypeImpl.this.getSegmentArray(i);\n LineTypeImpl.this.removeSegment(i);\n return old;\n }\n \n public int size()\n { return LineTypeImpl.this.sizeOfSegmentArray(); }\n \n }\n \n synchronized (monitor())\n {\n check_orphaned();\n return new SegmentList();\n }\n }", "public java.util.List<speech_formatting.SegmentedTextOuterClass.SentenceSegment> getSentenceSegmentList() {\n if (sentenceSegmentBuilder_ == null) {\n return java.util.Collections.unmodifiableList(sentenceSegment_);\n } else {\n return sentenceSegmentBuilder_.getMessageList();\n }\n }", "@java.lang.Override\n public java.util.List<speech_formatting.SegmentedTextOuterClass.SentenceSegment> getSentenceSegmentList() {\n return sentenceSegment_;\n }", "List<Segment> getSegments() throws Exception {\n\t\tlogger.log(\"in getSegments\");\n\t\tSegmentsDAO dao = new SegmentsDAO();\n\t\t\n\t\treturn dao.getAllSegments();\n\t}", "com.google.ads.googleads.v6.common.SegmentsOrBuilder getSegmentsOrBuilder();", "public SegmentList getSegmentList()\n\t{\n\t\treturn segmentList;\n\t}", "public com.eviware.soapui.coverage.SegmentType[] getSegmentArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List<com.eviware.soapui.coverage.SegmentType> targetList = new java.util.ArrayList<com.eviware.soapui.coverage.SegmentType>();\n get_store().find_all_element_users(SEGMENT$2, targetList);\n com.eviware.soapui.coverage.SegmentType[] result = new com.eviware.soapui.coverage.SegmentType[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "public List<Segmentation> getSegmentations()\n\t\t\tthrows InvalidParametersException;", "public Vertex<V>[] getEndpoints() { return endpoints; }", "public LinkedList<Point> segmentsToDraw() {\n LinkedList<Point> segmentCoordinates = new LinkedList<Point>();\n for (int segment = 1; segment <= snakeSize; segment++) {\n //search array for each segment number\n for (int x = 0; x < maxX; x++) {\n for (int y = 0; y < maxY; y++) {\n if (snakeSquares[x][y] == segment) {\n //make a Point for this segment's coordinates and add to list\n Point p = new Point(x * SnakeGame.getSquareSize(), y * SnakeGame.getSquareSize());\n segmentCoordinates.add(p);\n }\n }\n }\n }\n return segmentCoordinates;\n\n }", "public List<Segment2> verticalLinesinCell() {\n\n\t\tList<Float> boundings = getBoundingsOfCell();\n\t\tint partitionPrecision = 1000;\n\t\tfloat distanceBtwLineSegments = (boundings.get(1) - boundings.get(0))\n\t\t\t\t/ partitionPrecision;\n\n\t\tList<Segment2> segments = new ArrayList<Segment2>();\n\t\tdouble startingPoint = boundings.get(0);\n\t\tint i = 0;\n\n\t\twhile (startingPoint < boundings.get(1)) {\n\n\t\t\tstartingPoint = boundings.get(0) + i\n\t\t\t\t\t* distanceBtwLineSegments;\n\t\t\tPoint2 source = new Point2(startingPoint,\n\t\t\t\t\tboundings.get(2));\n\t\t\tPoint2 target = new Point2(startingPoint,\n\t\t\t\t\tboundings.get(3));\n\n\t\t\tSegment2 segment = new Segment2(source, target);\n\t\t\ti++;\n\t\t\tsegments.add(segment);\n\t\t}\n\n\t\treturn segments;\n\n\t}", "protected abstract int[] getPathElements();", "private LineSegment[] findSegments() {\n List<LineSegment> segmentList = new ArrayList<>();\n int N = points.length;\n for (int i = 0; i < N; i++) {\n for (int j = i+1; j < N; j++) {\n Double slopePQ = points[i].slopeTo(points[j]);\n for (int k = j+1; k < N; k++) {\n Double slopePR = points[i].slopeTo(points[k]);\n if (slopePQ.equals(slopePR)) {\n for (int l = k + 1; l < N; l++) {\n Double slopePS = points[i].slopeTo(points[l]);\n if (slopePQ.equals(slopePS)) {\n LineSegment lineSegment = new LineSegment(points[i], points[l]);\n segmentList.add(lineSegment);\n }\n }\n }\n }\n }\n }\n return segmentList.toArray(new LineSegment[segmentList.size()]);\n }", "public List<WeightedPoint> getPath()\n {\n return getPath(this.tail);\n }", "public Object[] getStartNodes ();", "public List<Subset> getElements() {\n\t\treturn subSetList;\n\t}", "public Observable<Stop> getStartPoints() {\n\n return loadRoutesData()\n .flatMap(availableRoutes ->\n Observable.from(availableRoutes.routes()))\n .flatMap(route -> Observable.from(route.segments()).first())\n .map(segment -> segment.stops().get(0));\n\n\n }", "public HashSet<Town> getVertices() {\r\n\t\treturn (HashSet<Town>) vertices;\r\n\t}", "@java.lang.Override\n public int getSentenceSegmentCount() {\n return sentenceSegment_.size();\n }", "Iterable<Long> vertices() {\n return nodes.keySet();\n }", "public int numberOfSegments() {\n return segments.size();\n }", "private final List<PLineSegment> getLineSegmentsForSplitLine(SplitLine splitLine) {\n int lineIndex = splitLine.getLineIndex();\n List<PLineSegment> segments = getLineSegments(lineIndex);\n int index = 0;\n ArrayList<PLineSegment> result = new ArrayList<PLineSegment>();\n int start = splitLine.getOffset();\n int end = start + splitLine.getLength();\n \n for (int i = 0; index < end && i < segments.size(); ++i) {\n PLineSegment segment = segments.get(i);\n if (start >= index + segment.getModelTextLength()) {\n index += segment.getModelTextLength();\n continue;\n }\n if (start > index) {\n int skip = start - index;\n segment = segment.subSegment(skip);\n index += skip;\n }\n if (end < index + segment.getModelTextLength()) {\n segment = segment.subSegment(0, end - index);\n }\n result.add(segment);\n index += segment.getModelTextLength();\n }\n return result;\n }", "public Set<T> getRanges();", "@Override\n protected List<Segment> getSegments() {\n return Arrays.asList(\n new Segment(55.2, 55.8, Color.rgb(238, 23, 104)),\n new Segment(56.2, 56.6, Color.rgb(238, 23, 104)),\n new Segment(58.4, 59.9, Color.rgb(184, 92, 184)));\n }", "public Iterator trip() {\n\t\tStack path = new Stack();\n\t\ttry {\n\t\t\t// initializes path to the stack of nodes from starting point to end\n\t\t\t// point\n\t\t\tpath = path(BusLines, BusLines.getNode(start), BusLines.getNode(dest));\n\n\t\t\t// checks if there is a path, otherwise return null\n\t\t\tif (path == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\treturn path.iterator();\n\t\t\t}\n\t\t} catch (GraphException e) {\n\t\t\tSystem.out.println(\"Error: the path does not exists.\");\n\t\t}\n\t\treturn null;\n\n\t}", "public interface ContextPartitionSelectorSegmented extends ContextPartitionSelector {\n /**\n * Returns the partition keys.\n *\n * @return key set\n */\n public List<Object[]> getPartitionKeys();\n}", "java.util.List<speech_formatting.SegmentedTextOuterClass.TokenSegment> \n getTokenSegmentList();", "public Position.PositionList buildSegment() {\n List<Position> positions = new ArrayList<>(3);\n\n // determine the middle point of the descending segment\n Position middlePos;\n if (startPoint.getElevation() > endPoint.getElevation()) {\n middlePos = new Position(\n Position.interpolateGreatCircle(1 - PATH_INTERPOLATE_AMOUNT, startPoint, endPoint), startPoint.getElevation());\n } else {\n middlePos = new Position(\n Position.interpolateGreatCircle(PATH_INTERPOLATE_AMOUNT, startPoint, endPoint), endPoint.getElevation());\n }\n\n // add the last points\n positions.add(middlePos);\n positions.add(endPoint);\n\n return new Position.PositionList(positions);\n }", "public UBA<Line> _toLineSegments()\n {\n UBA<Line> output = new UBA<Line>();\n\n int len = _points.size();\n for(int i = 0; i < len - 1; i++)\n {\n Line line = new Line(i, i + 1, _points);\n output.push(line);\n }\n\n // Add the last point.\n if(_isClosed)\n {\n Line line = new Line(len - 1, 0, _points);\n output.push(line);\n }\n\n return output;\n }", "boolean getSegmented();", "public List<PLineSegment> getLineSegments(int lineIndex) {\n getLock().getReadLock();\n try {\n // Return it straight away if we've already cached it.\n synchronized (segmentCache) {\n if (segmentCache.containsKey(lineIndex)) {\n return segmentCache.get(lineIndex);\n }\n }\n \n // Let the styler have the first go.\n List<PLineSegment> segments = textStyler.getTextSegments(lineIndex);\n \n // Then let the style applicators add their finishing touches.\n String line = getLineContents(lineIndex).toString();\n for (StyleApplicator styleApplicator : styleApplicators) {\n segments = applyStyleApplicator(styleApplicator, line, segments);\n }\n \n // Finally, deal with tabs.\n segments = applyStyleApplicator(tabStyleApplicator, line, segments);\n synchronized (segmentCache) {\n segmentCache.put(lineIndex, segments);\n }\n return segments;\n } finally {\n getLock().relinquishReadLock();\n }\n }", "public AtomicVertex[] getPaths()\n {\n return _paths;\n }", "public static List<GenomeSegment> list() {\n return segmentList;\n }", "public Collection<V> getVertices();", "public Collection<node_info> getV()\n{\n\treturn this.getNodes().values();\n}", "public abstract ScaledPathArray getPathList();", "public Collection getAccessPathEdgeTargets() {\n if (accessPathEdges == null) return Collections.EMPTY_SET;\n return new FlattenedCollection(accessPathEdges.values());\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\t\treturn vertices.iterator();\n\t}", "public DetectLED findSegments() {\n\t\tchains = new ArrayList<Chain>();\n\t\t// Every single line segment is a candidate to build a chain upon it\n\t\t// So let's seed the starting points for all potential chains\n\t\tfor (int i=0; i < lights.size(); i++) {\n\t\t\tfor (int j=0; j < lights.size(); j++) {\n\t\t\t\tif(i != j && lights.get(i).minus(lights.get(j)).norm() < maxSeg) {\n\t\t\t\t\t// Also seed chains for different number of nodes\n\t\t\t\t\t// maxNodes/2 is an arbitrary pick but should be good enough\n\t\t\t\t\tfor(int n = maxNodes; n > maxNodes/2; n--) {\n\t\t\t\t\t\tchains.add(new Chain(i, j, n));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "public Set<MindObject> getDirectSubComponents(){\n return new HashSet<>();\n }", "String getMatchingSegments(Integer pointId);", "@Override\n public Collection<node_data> getV() {\n return this.nodes.values();\n }", "public Point[] getCoordinates() {\n Point[] temp = new Point[segments.length];\n for (int i = 0; i < segments.length; i++) {\n temp[i] = segments[i].getCoordinates();\n }\n return temp;\n }", "@Override\n public Set<Vertex> getVertices() {\n Set<Vertex> vertices = new HashSet<Vertex>();\n vertices.add(sourceVertex);\n vertices.add(targetVertex);\n return vertices;\n }", "public FindSegments() {\n\t\tthis(\"find_segments\", null);\n\t}", "public java.util.List<? extends speech_formatting.SegmentedTextOuterClass.SentenceSegmentOrBuilder> \n getSentenceSegmentOrBuilderList() {\n if (sentenceSegmentBuilder_ != null) {\n return sentenceSegmentBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(sentenceSegment_);\n }\n }", "public Vector<Node> GetAdditionalSubNodes();", "public int numberOfSegments() {\n return this.segments.length;\n }", "public ReadOnlyIterator<ContextNode> getContextNodes();", "@Override\r\n public Collection<node_data> getV() {\r\n return this.graph.values();\r\n }", "public static Collection<Pair<Segment, Segment>> getIntersectingSegments(final PolyLine left,\n final PolyLine right)\n {\n final Collection<Pair<Segment, Segment>> intersectingSegments = new HashSet<>();\n for (final Segment leftSegment : left.segments())\n {\n for (final Segment rightSegment : right.segments())\n {\n if (leftSegment.intersects(rightSegment))\n {\n intersectingSegments.add(Pair.of(leftSegment, rightSegment));\n }\n }\n }\n return intersectingSegments;\n }", "@NonNull\n/* */ private Observable<double[]> touchEventToOutlineSegmentArray() {\n/* 207 */ return this.mTouchEventSubject.serialize().observeOn(Schedulers.computation()).map(new Function<InkEvent, double[]>()\n/* */ {\n/* */ public double[] apply(InkEvent inkEvent) throws Exception {\n/* 210 */ Utils.throwIfOnMainThread();\n/* */ \n/* */ \n/* 213 */ InkEventType eventType = inkEvent.eventType;\n/* 214 */ float x = inkEvent.x;\n/* 215 */ float y = inkEvent.y;\n/* 216 */ float pressure = inkEvent.pressure;\n/* */ \n/* 218 */ return PointProcessor.this.handleTouches(eventType, x, y, pressure);\n/* */ }\n/* */ });\n/* */ }", "int getSegment();", "@Override\n public Object[] getSections () {\n return alphaIndexer.getSections();\n }", "public java.util.List<speech_formatting.SegmentedTextOuterClass.TokenSegment> getTokenSegmentList() {\n if (tokenSegmentBuilder_ == null) {\n return java.util.Collections.unmodifiableList(tokenSegment_);\n } else {\n return tokenSegmentBuilder_.getMessageList();\n }\n }", "public Observable<Stop> getEndPoints() {\n return loadRoutesData()\n .flatMap(availableRoutes ->\n Observable.from(availableRoutes.routes()))\n .flatMap(route -> Observable.from(route.segments()).last())\n .map(segment -> segment.stops().get(segment.stops().size() - 1));\n\n }", "public abstract Collection<String> getSections();", "public Set<V> getVertices();", "public Set<V> getVertices();", "public String getSegment()\n {\n return m_strSegment;\n }", "ILinkedList sublist(int fromIndex, int toIndex);", "@java.lang.Override\n public java.util.List<? extends speech_formatting.SegmentedTextOuterClass.SentenceSegmentOrBuilder> \n getSentenceSegmentOrBuilderList() {\n return sentenceSegment_;\n }", "@GetMapping(\"/unspsc-segments\")\n\tpublic ResponseEntity<?> getAllSegments(Pageable pageable) throws Exception {\n\t\tlog.info(\"API getAllSegments started at \" + LocalTime.now());\n\n\t\tPage<SegmentMasterDTO> segmentMasterDTOList = segmentService.getAllSegments(pageable);\n\n\t\tif (segmentMasterDTOList.isEmpty()) {\n\t\t\tthrow new RecordNotFoundException(messageSourceUtility.getMessage(\"Segment.getAllSegments.noRecords\"),\n\t\t\t\t\tENTITY_NAME);\n\t\t}\n\n\t\tHttpHeaders headers = PaginationUtil\n\t\t\t\t.generatePaginationHttpHeaders(ServletUriComponentsBuilder.fromCurrentRequest(), segmentMasterDTOList);\n\t\tlog.info(\"API getAllSegments ended at \" + LocalTime.now());\n\t\treturn ResponseEntity.ok().headers(headers).body(segmentMasterDTOList.getContent());\n\t}", "public Collection<V> getOtherVertices(V v);", "@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }", "public int getTotalSegments() {\n return totalSegments;\n }", "Set<Vertex> getVertices();", "java.util.List<? extends speech_formatting.SegmentedTextOuterClass.SentenceSegmentOrBuilder> \n getSentenceSegmentOrBuilderList();", "@java.lang.Override\n public java.util.List<speech_formatting.SegmentedTextOuterClass.TokenSegment> getTokenSegmentList() {\n return tokenSegment_;\n }", "Iterator<Vertex<V, E, M>> getVertices() {\n return this.vertices.values().iterator();\n }", "public List<IPos> getCurvePoints() {\n\t\t// Create the array ready to hold all the points\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tList<IPos> points = new ArrayList<IPos>();\n\t\tif (segmentCount > 1) {\n\t\t\t// Get the influencing points, from simple tests 1/3rd the ditance to the next\n\t\t\t// point at the incoming angle seems to work fine.\n\t\t\tstartInfluencePoint = calculateInfluencingPoint(start, influenceDistance, startAngle);\n\t\t\tendInfluencePoint = calculateInfluencingPoint(end, influenceDistance, endAngle);\n\t\t\t// Once those points are removed, remember to change the rail as well or the\n\t\t\t// data will be wrong\n\n\t\t\t// Add the sub points that will create the bend\n\t\t\tfor (int i = 1; i <= segmentCount; i++) {\n\t\t\t\tfloat t = i / (segmentCount + 1f);\n\t\t\t\tfloat x = getCurveValue(start.x(), startInfluencePoint.x(), end.x(), endInfluencePoint.x(), t);\n\t\t\t\tfloat z = getCurveValue(start.z(), startInfluencePoint.z(), end.z(), endInfluencePoint.z(), t);\n\t\t\t\tfloat y = start.y() + ((end.y() - start.y()) * t);\n\t\t\t\tpoints.add(new Pos(x, y, z));\n\t\t\t\t// TODO we could use a lambda expression to create an add directly to the host\n\t\t\t\t// allowing more reusablity\n\t\t\t}\n\n\t\t}\n\t\treturn points;\n\t}", "@Override\n\tpublic ArrayList<Edge<Object>> getPath(String startNode, String endNode) {\n\t\treturn null;\n\t}", "public int getSegmentCount() {\n\t\treturn this.segments.size();\n\t}", "public E[] verticesView ()\n {\n E[] allVertices = (E[]) new Object[lastIndex + 1];\n for (int index = 0; index < allVertices.length; index++)\n allVertices[index] = this.vertices[index];\n\n return allVertices;\n }" ]
[ "0.73105145", "0.7024622", "0.69251895", "0.6770431", "0.6503645", "0.6467901", "0.6314044", "0.6298291", "0.6289457", "0.6226643", "0.6132919", "0.6121007", "0.6101656", "0.6098763", "0.5885728", "0.5880266", "0.5775859", "0.57117707", "0.57076955", "0.5675254", "0.5655248", "0.5641288", "0.5620808", "0.55999184", "0.55910474", "0.55192626", "0.55169106", "0.5476532", "0.546811", "0.5443852", "0.53701466", "0.53517497", "0.53340477", "0.5312694", "0.53032005", "0.52705157", "0.520378", "0.52016145", "0.5159103", "0.51428235", "0.51423514", "0.51218426", "0.5104052", "0.5100491", "0.50984013", "0.50705814", "0.50659156", "0.50630283", "0.50588655", "0.5036093", "0.5035981", "0.49996847", "0.49996668", "0.4984872", "0.49770394", "0.4974944", "0.49747315", "0.49551505", "0.4929141", "0.49158353", "0.49045235", "0.49010074", "0.49003246", "0.48999563", "0.48966658", "0.4892515", "0.489145", "0.48893988", "0.48861194", "0.48805186", "0.4877907", "0.48759222", "0.487553", "0.4874915", "0.4874121", "0.48709315", "0.48626423", "0.48587054", "0.48562503", "0.48545513", "0.4852414", "0.48490658", "0.4831316", "0.4825942", "0.4825942", "0.48232663", "0.48044407", "0.47969642", "0.4779681", "0.4779487", "0.47787556", "0.47743818", "0.47743326", "0.47727627", "0.47606468", "0.47603363", "0.47584805", "0.47543764", "0.47498477", "0.47437847" ]
0.6204691
10
Replies the connection to reach the node.
@Pure ST getArrivalConnection();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Channel connect() {\n\t\tChannelFuture channel = bootstrap.connect(new InetSocketAddress(host, port));\n\n\t\t// wait for the connection to establish\n\t\tchannel.awaitUninterruptibly();\n\n\t\tif (channel.isDone() && channel.isSuccess()) {\n\t\t\treturn channel.getChannel();\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}\n\t}", "public Status connect()\n {\n return connect(5.0);\n }", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "@Override\r\n public Object connect() {\n if(status()){\r\n //creates thread that checks messages in the network\r\n System.out.println(\"notifying network that connection is good\");\r\n notifyObservers(this);\r\n }\r\n return socket;\r\n }", "protected Channel connect() {\n\t\t\tif (channel == null) {\n\t\t\t\tinit();\n\t\t\t}\n\t\t\tSystem.out.println(\"channel === \"+channel);\n\t\t\tif (channel.isDone() && channel.isSuccess())\n\t\t\t\treturn channel.channel();\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}", "public void connect() {}", "public Reply connect(String connectAddress, int connectPort) throws ThingsException, InterruptedException;", "public void connect() {\n if (isShutdown)\n return;\n\n setNewConnection(reconnectInternal());\n }", "public void connect();", "public void connect();", "public void connect();", "public void doConnect() throws IOException {\n if (!sc.finishConnect()) {\n return; // the selector gave a bad hint\n }\n\n // Sending pseudo\n var newConnexio = new ConnexionFrame(pseudo);\n queueMessage(newConnexio.asByteBuffer().flip());\n\n updateInterestOps();\n }", "public WarpConnection getConnection() {\r\n return(this.connection);\r\n }", "NodeConnection createNodeConnection();", "public void doConnect() {\n Debug.logInfo(\"Connecting to \" + client.getServerURI() + \" with device name[\" + client.getClientId() + \"]\", MODULE);\n\n IMqttActionListener conListener = new IMqttActionListener() {\n\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Connected.\", MODULE);\n state = CONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"connect failed\" + exception.getMessage(), MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n // Connect using a non-blocking connect\n client.connect(conOpt, \"Connect sample context\", conListener);\n } catch (MqttException e) {\n // If though it is a non-blocking connect an exception can be\n // thrown if validation of parms fails or other checks such\n // as already connected fail.\n state = ERROR;\n donext = true;\n ex = e;\n }\n }", "@Override\r\n\tpublic ServerBean connect() throws RemoteException {\n\t\tSystem.out.println(\"coming from DealServerImp\");\r\n\t\treturn null;\r\n\t}", "ClientConnection connection();", "public void connecting() {\n\n }", "protected Channel connect() {\n\t\tint port = 6501;\n\t\t\n\t\tSocket socket1 = null, socket2 = null, socket3 = null;\n\t\tboolean fullyConnected = false;\n\t\t\n\t\t// Make several attempts to connect to the server\\\n\t\tlog.debug(\"Attemping connections with server [\" + hostIP + \"] on ports \" + port + \" through \" + (port + 2) + \".\");\n\t\tfor(int attempts = 0; !fullyConnected && attempts < 3; attempts++) {\n\t\t\ttry {\n\t\t\t\t// Connecting to the server using the IP address and port\n\t\t\t\tif(socket1 == null) socket1 = new Socket(InetAddress.getByName(hostIP), port);\n\t\t\t\tif(socket2 == null) socket2 = new Socket(InetAddress.getByName(hostIP), port + 1);\n\t\t\t\tif(socket3 == null) socket3 = new Socket(InetAddress.getByName(hostIP), port + 2);\n\t\t\t\tif(socket1 != null && socket2 != null && socket3 != null) fullyConnected = true;\n\t\t\t}\n\t\t\tcatch(IOException e) {\n\t\t\t\tlog.debug(\"Attempt \" + (attempts + 1) + \" failed. \" + e);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t// Wait a short period before attempting to connect again\n\t\t\t\t\tThread.sleep(50);\n\t\t\t\t} catch (InterruptedException e2) {\n\t\t\t\t\tlog.error(e2.getStackTrace(), e2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(socket1 == null || socket2 == null || socket3 == null) {\n\t\t\tlog.error(\"Connection timeout. (One or more sockets is null)\");\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\tlog.debug(\"Fully Connected:\");\n\t\t\tlog.debug(\"ADD socket [Local: \" + socket1.getLocalPort() + \" Remote: \" + socket1.getPort() + \"]\");\n\t\t\tlog.debug(\"RETRIEVE socket [Local: \" + socket2.getLocalPort() + \" Remote: \" + socket2.getPort() + \"]\");\n\t\t\tlog.debug(\"STREAM socket [Local: \" + socket3.getLocalPort() + \" Remote: \" + socket3.getPort() + \"]\");\n\t\t\tlog.debug(\"Creating channel...\");\n\t\t\tChannel channel = new Channel(socket1, socket2, socket3);\n\t\t\tlog.debug(\"Done.\");\n\t\t\treturn channel;\n\t\t}\n\t}", "public void connect() throws ConnectionFailedException\n {\n isConnected = true;\n }", "private ManagedChannel connect() throws InterruptedException {\n for (int i = 0; i < 20; i++) {\n try {\n new Socket().connect(new InetSocketAddress(\"localhost\", 8081));\n break;\n } catch (IOException e) {\n Thread.sleep(500);\n }\n }\n channel = ManagedChannelBuilder.forAddress(\"localhost\", 8081)\n .usePlaintext()\n .build();\n return channel;\n }", "public static Connection connect(){\n\t\ttry {\n\t\t\tadd = Configure.getADDRESS();\n\t\t\tconn = ConnectionFactory.getConnect(add, Configure.port, \"TCP\");\n\t\t} catch (Exception e) {\n\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t//System.exit(0);\n\t\t}\n\t\treturn conn;\n\t}", "public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "public void connectTo(NAddress address) throws IOException;", "@Override\n public void doConnect() throws IOException {\n if (!sc.finishConnect()) {\n return; // the selector gave a bad hint\n }\n\n // Sending login private\n var bb = ByteBuffer.allocate(1 + Long.BYTES);\n bb.put((byte) 9).putLong(connectId);\n queueMessage(bb.flip());\n\n updateInterestOps();\n }", "public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }", "@Override\n\tpublic void run()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (!establishVpn())\n\t\t\t{\n\t\t\t\taddLog(\"Failed to establish the VPN\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconnectTunnel(getLocalServerAddress(dsp.getString(\"local_port\", \"1080\")), getLocalServerAddress(dsp.getString(\"udp_port\", \"7300\")), true);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\n\t\t}\n\t}", "public abstract void connect() throws UnknownHostException, IOException;", "@Override\n public abstract void connect();", "public Socket connect() {\n\t\ttry{\n\t\t connection = new Socket(serverAddress, port);\n\t\t System.out.println(\"Connessione aperta\");\n\t\t}\n\t\tcatch(ConnectException e){\n\t\t System.err.println(\"Server non disponibile!\");\n\t\t}\n\t\tcatch(UnknownHostException e1){\n\t\t System.err.println(\"Errore DNS!\");\n\t\t}\t\t\n\t\tcatch(IOException e2){//\n\t\t System.err.println(e2);\n\t\t e2.printStackTrace();\n\t\t}\n\t\treturn connection;\n }", "@Override\n public void establishConnectionWithYourTower() {\n }", "public Connection getConnection() {\n \t\treturn this.connect;\n \t}", "public void connect() throws InterruptedException, ClassNotFoundException {\n\ttry {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Attempting to reach NameNode...\");\n\t }\n\t String NAMENODE_IP = this.read_NN_IP();\n\t sock = new Socket(NAMENODE_IP, UTILS.Constants.NAMENODE_PORT);\n\t oos = new ObjectOutputStream(sock.getOutputStream());\n\t Msg greeting = new Msg();\n\t greeting.set_msg_type(Constants.MESSAGE_TYPE.DATANODE_GREETING);\n\t greeting.set_return_address(my_address);\n\t this.write_to_NN(greeting);\n\t this.listen_to_NN(); \n\t} catch (UnknownHostException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } \n }", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void establishNeighborConn() throws Exception {\n\t\tList <Thread> tList = new ArrayList<Thread>();\n\t\tList<Integer> neighborPids = neighborMap.get(pid);\n\t\tnNeighbors = neighborPids.size();\n\t\tfor (int neighborPid : neighborPids) {\n\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString neighborHostname = pidToHostnameMap.get(neighborPid);\n\t\t\t\t\t\tConnection neighborConn = new ServerConnection();\n\t\t\t\t\t\tint port = 10000 + (100*pid) + neighborPid;\n\t\t\t\t\t\tneighborConn.connectRetry(coordinatorHostname, port);\n\t\t\t\t\t\tneighborPidToHostnameMap.put(neighborPid, neighborHostname);\n\t\t\t\t\t\tneighborPidToConnMap.put(neighborPid, neighborConn);\n\t\t\t\t\t\tsendQueues.put(neighborPid, new LinkedList<String>());\n\t\t\t\t\t\tsayHelloToNeighbor(neighborConn);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttList.add(t);\n\t\t\tt.start();\n\t\t}\n\t\tfor (Thread t : tList) {\n\t\t\tt.join();\n\t\t}\n\t\tSystem.out.println(neighborPidToHostnameMap);\n\t\tSystem.out.println(neighborPidToConnMap);\n\t}", "public void connect() {\n try {\n socket = connectToBackEnd();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void connect()\r\n\t{\r\n\t\tkonekcija = ConnectionClass.getConnection(adresa, port, imeBaze, korisnickoIme, sifra);\r\n\t\tSystem.out.println(\"Konekcija otvorena: \"+ konekcija.toString());\r\n\t}", "NetworkClientConnection getConnection(String uriToNode);", "@Override\n\tpublic void run() {\n\t\tthis.irc(\"irc.freenode.net\", mc.thePlayer.getName(), mc.thePlayer.getName(), \"#dyarchy\", 6667);\n\t\tthis.connect();\n\t}", "public Connection getConnection() {\n this.connect();\n return this.connection;\n }", "public static void chooseNeighbour() {\n clique.handler(ConnectReq.class, (i, req) -> {\n int randomIndex = new Random().nextInt(connections.size());\n connections.get(randomIndex).send(req);\n });\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tgotoConnectActivity();\n\t\t\t}", "private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }", "public void connect() throws IOException;", "abstract T connect();", "@Override\n public Boolean call() throws Exception {\n \tMySocket socket = new MySocket(node);\n socket.writeLine(listOfActivePeers);\n socket.close();\n return true;\n }", "public void openConnection() {\n System.out.println(\"Opening connection...\");\n\n try {\n String HOST = \"192.168.4.1\";\n int PORT = 2323;\n connectionSocket = new Socket(HOST, PORT);\n connectionSocket.setTcpNoDelay(true);\n\n writer = new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(connectionSocket.getOutputStream())));\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n\n System.out.println(\"openConnection(): Success\");\n return;\n } catch (UnknownHostException e) {\n System.out.println(\"UnknownHostException at openConnection()\");\n } catch (IOException e) {\n System.out.println(\"IOException at openConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at openConnection()\");\n System.out.println(e.toString());\n }\n\n System.out.println(\"Failed to connect\");\n }", "public static Connect getConnect() {\n\t\treturn connection;\n\t}", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection();", "private static void connectToNameNode(){\n int nameNodeID = GlobalContext.getNameNodeId();\n ServerConnectMsg msg = new ServerConnectMsg(null);\n\n if(comm_bus.isLocalEntity(nameNodeID)) {\n log.info(\"Connect to local name node\");\n comm_bus.connectTo(nameNodeID, msg.getByteBuffer());\n } else {\n log.info(\"Connect to remote name node\");\n HostInfo nameNodeInfo = GlobalContext.getHostInfo(nameNodeID);\n String nameNodeAddr = nameNodeInfo.ip + \":\" + nameNodeInfo.port;\n log.info(\"name_node_addr = \" + String.valueOf(nameNodeAddr));\n comm_bus.connectTo(nameNodeID, nameNodeAddr, msg.getByteBuffer());\n }\n }", "public LWTRTPdu connectRsp() throws IncorrectTransitionException;", "protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }", "protected void doOpenConnection() throws Exception {\n connection.open\n (conn_route, request_spec.context, request_spec.params);\n }", "public void run() {\n while (!interrupted) {\n try {\n if (doDelay) {\n getLogger().debug(\"waiting for \" + reconnectionDelay\n + \" milliseconds before reconnecting.\");\n sleep(reconnectionDelay);\n }\n doDelay = true;\n getLogger().debug(\"Attempting connection to \" + host);\n Socket s = new Socket(host, port);\n setSocket(s);\n getLogger().debug(\n \"Connection established. Exiting connector thread.\");\n break;\n } catch (InterruptedException e) {\n getLogger().debug(\"Connector interrupted. Leaving loop.\");\n return;\n } catch (java.net.ConnectException e) {\n getLogger().debug(\"Remote host {} refused connection.\", host);\n } catch (IOException e) {\n getLogger().debug(\"Could not connect to {}. Exception is {}.\",\n host, e);\n }\n }\n }", "public ProxyConnection fetchConnection() {\n ProxyConnection connection = null;\n\n try {\n connection = connections.take();\n } catch (InterruptedException e) {\n LOGGER.log(Level.ERROR, \"Can't fetch a connection!\", e);\n }\n\n return connection;\n }", "private boolean connect() {\n\t\tif (this.logging) {\n\t\t\tlogger.debug(\"trying to connect to \" + this.remoteName);\n\t\t}\n\n\t\tboolean connected = this.btc.connectTo(this.remoteName, null,\n\t\t\t\tNXTCommFactory.BLUETOOTH, NXTComm.PACKET);\n\t\tif (!connected) {\n\t\t\tif (this.logging) {\n\t\t\t\tlogger.info(\"not connected to \" + this.remoteName);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.dis = new ExtendedDataInputStream(this.btc.getDataIn());\n\t\t\tthis.dos = this.btc.getDataOut();\n\t\t\tif (this.logging) {\n\t\t\t\tlogger.info(\"connected to \" + this.remoteName);\n\t\t\t}\n\t\t}\n\n\t\treturn connected;\n\t}", "@Override\n public Connection call() throws Exception {\n return createConnection();\n }", "public void makeConnection() {\n\t\t// make a socket, output stream, and try connecting to the server\n\t\twhile (!connection) {\n\t\t\ttry {\n\t\t\t\tsocket = new Socket(address, port);\n\t\t\t\toutStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\t\tconnection = true;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error connecting: \" + e.getMessage());\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif (needAutoConnect(addr)) {\n\t\t\t\t\t\tmBleApi.connect(addr);\n\t\t\t\t\t}\n\t\t\t\t}", "public void connect() throws IOException {\n/* 151 */ this.delegate.connect();\n/* */ }", "@Override\n public boolean isConnectable() {\n return true;\n }", "public IConnection getConnection () { \n\t\treturn connection;\n\t}", "public void connect() throws Exception\n {\n if(connected)\n return;\n connectionSocket = new Socket(address, CommonRegister.DEFAULT_PORT);\n localPeerID = ++localPeerIDCount;\n initListener();\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n writer = new PrintWriter(connectionSocket.getOutputStream(),true);\n connected = true;\n }", "public Connection takeConnection() {\n ProxyConnection proxyConnection = null;\n try {\n proxyConnection = connections.take();\n } catch (InterruptedException e) {\n logger.log(Level.ERROR, e);\n Thread.currentThread().interrupt();\n }\n return proxyConnection;\n }", "public void connectedTo(ServerDescriptor desc);", "public Socket connect() {\r\n\t\ts = null;\r\n\t\ttry {\r\n\t\t\ts = new Socket(hostName, port);\r\n\t\t\tdos = Utils.deflatedDataOut(s.getOutputStream(), 8);\r\n\t\t} catch (UnknownHostException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn s;\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "ResponseItem getConnectTo();", "public Connection getConnection() {\r\n\tConnection result = null;\r\n\tif (isConnected()) {\r\n\t result = conn;\r\n\t}\r\n\treturn result;\r\n }", "@Override\n public void run() {\n String id = (identifier != \"\") ? identifier : socket.getInetAddress().toString();\n\n LOGGER.info(\"Got connection from \" + id + \".\");\n peerInput = new PeerInput(socket);\n peerInput.start();\n peerOutput = new PeerOutput(socket);\n initialized = true;\n LOGGER.info(\"Initialized connection \" + id);\n peerOutput.run();\n }", "public void connect(Node node) throws RemoteException, UnknownHostException {\n map = new TreeMap();\n this.chord = node;\n this.nodeKey = node.getNodeKey();\n if (chord.getPredecessor() != null) {\n predKey = chord.getPredecessor().getNodeKey();\n }\n bind(this.nodeKey);\n window.setMapper(this);\n manager = new Thread(this);\n manager.start();\n }", "@Override\n\t\t\tpublic void onConnectRemoteNode(String url) {\t \t\t\t\n\t\t\t}", "public Socket getConnection() {\n return connection;\n }", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "@Override\n\tprotected void runProtocol() throws AtmException\n\t{\n\t\ttrace(\"runProtocol()\");\n\t\twhileConnected();\n\t}", "public static void connect() {\n \t\tconnPool.start();\n \t}", "private void openConnection () {\n String[] labels = {\"Host :\", \"Port :\"};\n String[] initialValues = {\"localhost\", \"1111\"};\n StandardDialogClient openHandler = new StandardDialogClient () {\n\t@Override\n\tpublic void dialogDismissed (StandardDialog d, int code) {\n\t try {\n\t InputDialog inputD = (InputDialog)d;\n\t if (inputD.wasCancelled ()) return;\n\t String[] results = inputD.getResults ();\n\t String host = results[0];\n\t String port = results[1];\n\t TwGateway connection =\n\t (TwGateway)TwGateway.openConnection (host, port);\n\t // The following call will fail if the G2 is secure.\n\t connection.login();\n\t setConnection (connection);\n\t } catch (Exception e) {\n\t new WarningDialog (null, \"Error During Connect\", true, e.toString (), null).setVisible (true);\n\t }\n\t}\n };\t \n\n new ConnectionInputDialog (getCurrentFrame (), \"Open Connection\",\n\t\t\t\t true, labels, initialValues,\n\t\t\t\t (StandardDialogClient) openHandler).setVisible (true);\n }", "public void returnConnection(CONN conn){\n this.queue.offer(conn);\r\n System.out.println(\"Return an connection: \" + conn);\r\n }", "protected Connection getConnection () {\n \t\treturn connection;\n \t}", "@Override\n public boolean connect() {\n\n if (!isConnected) {\n try {\n\n Socket socket = new Socket(hostName, portNumber);\n out = new PrintWriter(socket.getOutputStream(), true);\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n isConnected = true;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return isConnected;\n }", "public void makeConnection() {\n\t\ttry {\n\t\t\tif(sock != null) {\n\t\t\t\ttable.printMsg(\"Cannot join a server twice! You've already connected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsock = new Socket(serverIP, serverPort);\n\t\t\toos = new ObjectOutputStream(sock.getOutputStream());\n\t\t\tois = new ObjectInputStream(sock.getInputStream());\n\t\t\tThread thread = new Thread(new ServerHandler());\n\t\t\tthread.start();\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Cannot Join Server.\");\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "protected abstract void onConnect();", "public Connection getConnection() {\r\n return connection;\r\n }", "public Connection getConnection() {\r\n return connection;\r\n }", "protected void handleConnect()\n throws ConnectionFailedException\n { \n int registryPort = getRegistryPort(locator);\n Home home = null;\n Exception savedException = null;\n Iterator it = getConnectHomes().iterator();\n \n while (it.hasNext())\n {\n //TODO: -TME Need to figure this out a little better as am now dealing with\n // with 2 ports, the rmi server and the registry.\n try\n {\n home = (Home) it.next();\n String host = home.host;\n final int port = home.port;\n locator.setHomeInUse(home);\n storeLocalConfig(configuration);\n log.debug(this + \" looking up registry: \" + host + \",\" + port);\n final Registry registry = LocateRegistry.getRegistry(host, registryPort);\n log.debug(this + \" trying to connect to: \" + home);\n Remote remoteObj = lookup(registry, \"remoting/RMIServerInvoker/\" + port);\n log.debug(\"Remote RMI Stub: \" + remoteObj);\n setServerStub((RMIServerInvokerInf) remoteObj);\n connected = true;\n break;\n }\n catch(Exception e)\n {\n savedException = e;\n connected = false;\n RemotingRMIClientSocketFactory.removeLocalConfiguration(locator);\n log.trace(\"Unable to connect RMI invoker client to \" + home, e);\n\n }\n }\n\n if (server == null)\n {\n String message = this + \" unable to connect RMI invoker client\";\n log.debug(message);\n throw new CannotConnectException(message, savedException);\n }\n }", "private void attemptToConnect() {\n LOG.warn(\"Attempting to connect....\");\n \n if (// No connection configuration\n getConnectionConfiguration() == null &&\n (getServerHostname() == null || getServerPort() == 0 ||\n getServiceName() == null || getFromAddress() == null ||\n getPassword() == null || getResource() == null)\n \n ||\n \n // Already logged in.\n getConnection() != null && getConnection().isAuthenticated()) {\n \n return;\n }\n \n try {\n if (getConnectionConfiguration() == null) {\n setConnectionConfiguration(new ConnectionConfiguration(\n getServerHostname(), getServerPort(), getServiceName()));\n }\n\n connect();\n }\n catch (Throwable t) {\n LOG.error(t);\n }\n }", "public void attemptReconnect() {\n\t\tConnection.this.reliabilityManager.attemptConnect();\n\t}", "private synchronized void doConnect() {\n try {\n String host = agent.getHost();\n int port = agent.getPort();\n log.fine(\"Connecting to server \" + host + ':' + port);\n socket = new Socket(host, port);\n input = socket.getInputStream();\n output = new OutputStreamWriter(socket.getOutputStream());\n disconnected = false;\n new Thread(this).start();\n\n // Automatically login! -> give an auth to the agent...\n TACMessage msg = new TACMessage(\"auth\");\n msg.setParameter(\"userName\", agent.getUser());\n msg.setParameter(\"userPW\", agent.getPassword());\n msg.setMessageReceiver(agent);\n sendMessage(msg);\n\n } catch (Exception e) {\n disconnected = true;\n log.log(Level.SEVERE, \"connection to server failed:\", e);\n socket = null;\n }\n }", "public Connection getConnection(){\r\n\t\treturn connection;\r\n\t}", "private Connection getConn(){\n \n return new util.ConnectionPar().getConn();\n }", "protected void connectionEstablished() {}", "private void cmdNet() {\n int port = 1777;\n try {\n Log.verbose(\"waiting for connection on port \" + port + \"...\");\n ServerSocket socket = new ServerSocket(port);\n Socket client = socket.accept();\n InetAddress clientAddr = client.getInetAddress();\n Log.verbose(\"connected to \" + clientAddr.getHostName() + \"/\"\n + client.getPort());\n Readline readline = new SocketReadline(client, true, \"net>\");\n fReadlineStack.push(readline);\n } catch (IOException ex) {\n Log.error(\"Can't bind or listen on port \" + port + \".\");\n }\n }", "public Connection ObtenirConnexion(){return cn;}", "public boolean Connect() throws IllegalStateException {\r\n\t\t\tString host;\r\n\t\t\tint port;\r\n\t\t\tif ( currHostPort == null ) {\r\n\t\t\t\tthrow new IllegalStateException(\"No iterator element.\");\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\thost = currHostPort.getHost();\r\n\t\t\t\tport = currHostPort.getPort();\r\n\t\t\t\tsocket = new DatagramSocket();\r\n\t\t\t\tinetaddr = InetAddress.getByName(host);\r\n\t\t\t\tsocket.connect(inetaddr, port);\r\n\t\t\t\tsocket.setSoTimeout(connTimeout);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tcatch(Exception e) {\t\t\t\t\t// UnknownHostException / IOException / NullPointerException\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "public Connection getConnection()\n\t{\n\t\treturn wConn;\n\t}", "public Connection getConnection()\n\t{\n\t\treturn connection;\n\t}", "@Override\n public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e) {\n Logger.println(\"Connection from: \" + ((InetSocketAddress) ctx.getChannel().getRemoteAddress()).getAddress().getHostAddress()\n \t\t+ \" - Hostname: \" + ((InetSocketAddress) ctx.getChannel().getRemoteAddress()).getHostName());\n }" ]
[ "0.64945984", "0.6470262", "0.63545954", "0.6280531", "0.6260176", "0.6203972", "0.5979317", "0.5975911", "0.5965966", "0.5965966", "0.5965966", "0.5964429", "0.59575224", "0.5946907", "0.5913225", "0.59129184", "0.58964944", "0.58759844", "0.5861131", "0.5849004", "0.584008", "0.583666", "0.582391", "0.5780902", "0.57374185", "0.57087946", "0.5693071", "0.56917566", "0.56524915", "0.56426084", "0.564193", "0.56390125", "0.56280637", "0.5613726", "0.558509", "0.558509", "0.55839473", "0.5560663", "0.55518585", "0.55079174", "0.55035365", "0.54953265", "0.5464393", "0.5461226", "0.5461056", "0.54545283", "0.54511774", "0.54503196", "0.5448735", "0.5435445", "0.54339916", "0.54339916", "0.54339916", "0.5432703", "0.542312", "0.5411212", "0.5408197", "0.5402503", "0.5398389", "0.5393058", "0.5389438", "0.5386234", "0.5384703", "0.5372738", "0.536979", "0.5367203", "0.53660333", "0.53642154", "0.5362951", "0.5361286", "0.53549623", "0.53517985", "0.53488183", "0.53474504", "0.5343017", "0.5338979", "0.5335783", "0.53298676", "0.5329764", "0.53287154", "0.53191996", "0.5317477", "0.5316614", "0.53032374", "0.5301713", "0.5296941", "0.5292355", "0.5292355", "0.528055", "0.52791744", "0.5279155", "0.5278154", "0.5271903", "0.52710557", "0.5270757", "0.5263362", "0.52554864", "0.5252727", "0.52413857", "0.523493", "0.52317595" ]
0.0
-1
Set the connection to reach the node.
ST setArrivalConnection(ST connection);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void setConnection(Connection connection) {\n this.conn = connection;\n }", "public void setConnection(Connection conn);", "public void setConnection(Connection value) {\r\n connection = value;\r\n }", "public void setConnection(nodePositions connection, Room room) {\n connections[connection.getNumVal()] = room;\n }", "public void setConnection(Connection connection) {\n this.connection = connection;\n }", "public void setConn(Connection connection){\n\t\tthis.conn = connection;\n\t}", "public void setConnection(Connection connection)\n\t{\n\t\twConn = connection;\n\t}", "void setConnection(Connection con);", "public void setConnection(Connection connection) {\n\t\tthis.connection = connection;\n\t}", "public void setConn(Connection conn) {this.conn = conn;}", "public void setConnection(TSConnection conn) {\n\t\tm_kit.setConnection(conn);\n\t}", "public void setConn(Connection conn)\r\n\t{\r\n\t\tthis.conn = conn;\r\n\t}", "public void setConn(Connection conn) {\n this.conn = conn;\n }", "public void setConn(Connection conn) {\r\n this.conn = conn;\r\n }", "public void setConnection(WarpConnection connection) {\r\n this.connection=connection;\r\n }", "public void setConnection(String sConnection) throws IOException;", "public void setConn(Connection conn)\n\t{\n\t\tthis.conn = conn;\n\t}", "public void setConnection(TwAccess connection){\n //stop listening to old current connection\n if (currentConnection != null)\n currentConnection.removeG2ConnectionListener(g2ConnectionAdapter);\n //set new current connection\n currentConnection = connection;\n if (currentConnection != null){\n try{\n\tstate_ = currentConnection.getG2State();\n }\n catch(G2AccessException ex){\n\tcom.gensym.message.Trace.exception(ex);\n\tString cxnString = currentConnection.toShortString();\n\tcurrentConnection = null;\n\tnoConnection();\n\tString msg = ex.getMessage();\n\tif (msg == null)\n\t new WarningDialog(null, i18n.getString(\"Error\"), true, i18n.format(\"AccessError\", cxnString), null).setVisible(true);\n\telse\n\t new WarningDialog(null, i18n.getString(\"Error\"), true, i18n.format(\"AccessErrorWithReason\", cxnString, msg), null).setVisible(true);\n }\n //start listening to new current connection\n currentConnection.addG2ConnectionListener(g2ConnectionAdapter);\n }\n updateAvailability();\n }", "public Builder setConnection(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n connection_ = value;\n onChanged();\n return this;\n }", "public Builder setConnection(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n connection_ = value;\n onChanged();\n return this;\n }", "public Builder setConnection(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n connection_ = value;\n onChanged();\n return this;\n }", "public Builder setConnection(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n connection_ = value;\n onChanged();\n return this;\n }", "public void setConnection(ConnectionField conn)\n\tthrows SdpException {\n\tif (conn == null)\n\t throw new SdpException(\"The conn is null\");\n\tconnectionField = conn;\n \n }", "public void setServerConnection(ServerConnection toConnection)\n {\n m_oServerConnection = toConnection;\n }", "private void setNodeConnectionList(ArrayList<Pair<String, Integer>> nodeConnectionList)\n\t{\n\t\totherNodes = nodeConnectionList; // set this field.\n\t}", "public void setNodeElement(NodeElement element) {\n this.nodeElement = element;\n this.sourceConnections = this.nodeElement.getSourceConnections();\n this.targetConnections = this.nodeElement.getTargetConnections();\n }", "public synchronized void setConnect(boolean connect) {\n wantConnect = connect;\n }", "private void setNodeConnectionRequirement() {\n for (NodeRecord node : registeredNodes.values()) {\n node.setNumberOfConnectionsNodeNeedsToInitiate(requiredConnections);\n }\n }", "public void setConnection(Connection connection) {\n //doNothing\n }", "public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}", "public void connect() {\n if (isShutdown)\n return;\n\n setNewConnection(reconnectInternal());\n }", "public void setConnection(IRemoteConnection connection) {\n \t\tfSelectionListernersEnabled = false;\n \t\thandleRemoteServiceSelected(connection);\n \t\thandleConnectionSelected();\n \t\tfSelectionListernersEnabled = true;\n \t}", "public void connect() {}", "public void setConnection(String id, String name) {\n \t\tIRemoteServices services = getRemoteServices(id);\n \t\tif (services != null) {\n \t\t\tIRemoteConnection connection = getRemoteConnection(services, name);\n \t\t\tif (connection != null) {\n \t\t\t\tsetConnection(connection);\n \t\t\t}\n \t\t}\n \t}", "protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }", "public void setConnection( String connection )\n {\n this.connection = connection;\n }", "private void setConnection (TwGateway newCxn) {\n boolean connected = (newCxn != null);\n closeXn.setEnabled (connected);\n openXn.setEnabled (!connected);\n getWksp.setEnabled (connected);\n KbWorkspace[] showingWorkspaces = multiWkspView.getWorkspaces ();\n System.out.println (\"Removing \" + showingWorkspaces.length + \" workspaces!\");\n for (int i=0; i<showingWorkspaces.length; i++)\n multiWkspView.removeWorkspace (showingWorkspaces[i]);\n Rectangle frameRect = getCurrentFrame().getBounds ();\n getCurrentFrame().setBounds(frameRect.x, frameRect.y,\n\t\t\t\tframeRect.width + 1, frameRect.height + 1);\n connection = newCxn;\n }", "public void connect() throws ConnectionFailedException\n {\n isConnected = true;\n }", "public void connect()\r\n\t{\r\n\t\tkonekcija = ConnectionClass.getConnection(adresa, port, imeBaze, korisnickoIme, sifra);\r\n\t\tSystem.out.println(\"Konekcija otvorena: \"+ konekcija.toString());\r\n\t}", "public void setLink( IntNode _node ) {\r\n\t\t\tlink = _node;\r\n\t\t}", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "public void connect() {\n try {\n socket = connectToBackEnd();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public NodeConnections(int node, String connections) {\n\t\tthis.node = node;\n\t\taddConnections(connections);\n\t}", "public void setConnectionField(ConnectionField c) {\n\tconnectionField = c;\n }", "private void setNodeIdRemote(SxpConnection connection) {\n try {\n connection.setNodeIdRemote(NodeIdConv.createNodeId(connection.getDestination().getAddress()));\n } catch (UnknownNodeIdException e) {\n LOG.error(\"{} Unknown message relevant peer node ID\", connection, e);\n }\n }", "public void connectTo(NAddress address) throws IOException;", "public void setConnection(boolean connection) {\r\n\t\tthis.connection = connection;\r\n\t}", "NodeConnection createNodeConnection();", "public void setClient(ConnectionToClient client) {\n this.client = client;\n }", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "public void connect();", "public void connect();", "public void connect();", "public void connectTo( Wire w ) {\n inCount = inCount + 1;\n }", "private void connectToAll() {\n for (AStarNode node : getNodes()) {\n node.resetConnection();\n for (AStarNode connect : getNodes()) {\n if (isValid(node, connect)) {\n node.connect(connect);\n }\n }\n }\n }", "public void setNode(ResidentNode node) {\r\n\t\tthis.node = node;\r\n//\t\tif (this.node != null && this.node.getMFrag() != null) {\r\n//\t\t\tthis.mebn = this.node.getMFrag().getMultiEntityBayesianNetwork();\r\n//\t\t}\r\n\t}", "public void connect(Node node) throws RemoteException, UnknownHostException {\n map = new TreeMap();\n this.chord = node;\n this.nodeKey = node.getNodeKey();\n if (chord.getPredecessor() != null) {\n predKey = chord.getPredecessor().getNodeKey();\n }\n bind(this.nodeKey);\n window.setMapper(this);\n manager = new Thread(this);\n manager.start();\n }", "public void connectTo(Airport that)\n\t{\n\t\tthis.connections.add(that);\n\t}", "public abstract void setNodes();", "public void setConnected(boolean connected);", "private void establishConnection() {\n\n try {\n\n for(Clone clone:this.clones){\n ClearConnection connection = new ClearConnection();\n connection.connect(clone.getIp(), clone.getOffloadingPort(), 5 * 1000);\n this.connections.add(connection);\n }\n\n this.protocol = new ERAMProtocol();\n this.ode = new ERAMode();\n\n } catch (Exception e) {\n Log.e(TAG,\"Connection setup with the Remote Server failed - \" + e);\n }\n }", "protected void setConnectionData(IMemento memento, Node source, Node target, NodeContainer root) {\n\t}", "public void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error connecting: \" + e.getMessage());\n\t\t}\n\t}", "public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public void autoConnect() {\n Log.i(TAG, \"HERE AUTOCONNECT\");\n connect(staticIp, staticPort);\n }", "public void createConnection() {\n final Property targetProperty = getTargetProperty();\n if (targetProperty != null) {\n targetProperty.setSource(getSourceProperty());\n }\n }", "public void connecting() {\n\n }", "public Status connect()\n {\n return connect(5.0);\n }", "public void setCurrentNode(int node) {\n\t\tthis.currentNode = node;\n\t}", "public void setConnectionId(long id) {\n connId = id;\n }", "public void setConnected(boolean c) {\n this.connected = c;\n }", "public void setConnectionType(Class<? extends Connection> connectionType)\r\n/* 20: */ {\r\n/* 21: 64 */ this.connectionType = connectionType;\r\n/* 22: */ }", "@Override\r\n\tpublic void setNode(Node node) {\n\t\tthis.node = (MessagingNode) node;\r\n\t}", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "private void openConnection () {\n String[] labels = {\"Host :\", \"Port :\"};\n String[] initialValues = {\"localhost\", \"1111\"};\n StandardDialogClient openHandler = new StandardDialogClient () {\n\t@Override\n\tpublic void dialogDismissed (StandardDialog d, int code) {\n\t try {\n\t InputDialog inputD = (InputDialog)d;\n\t if (inputD.wasCancelled ()) return;\n\t String[] results = inputD.getResults ();\n\t String host = results[0];\n\t String port = results[1];\n\t TwGateway connection =\n\t (TwGateway)TwGateway.openConnection (host, port);\n\t // The following call will fail if the G2 is secure.\n\t connection.login();\n\t setConnection (connection);\n\t } catch (Exception e) {\n\t new WarningDialog (null, \"Error During Connect\", true, e.toString (), null).setVisible (true);\n\t }\n\t}\n };\t \n\n new ConnectionInputDialog (getCurrentFrame (), \"Open Connection\",\n\t\t\t\t true, labels, initialValues,\n\t\t\t\t (StandardDialogClient) openHandler).setVisible (true);\n }", "@Override\n public void establishConnectionWithYourTower() {\n }", "public void setNetworkReachable(boolean value);", "@Override\n public abstract void connect();", "public void setNetworkConnection(boolean airplaneMode, boolean wifi, boolean data) {\n\n long mode = 1L;\n\n if (wifi) {\n mode = 2L;\n } else if (data) {\n mode = 4L;\n }\n\n ConnectionState connectionState = new ConnectionState(mode);\n ((AndroidDriver) getDriver()).setConnection(connectionState);\n System.out.println(\"Your current connection settings are :\" + ((AndroidDriver) getDriver()).getConnection());\n }", "public void connect(String ipAddress) {\n if (logger.isActivated()) {\n logger.info(\"Network access connected (\" + ipAddress + \")\");\n }\n this.ipAddress = ipAddress;\n }", "public KadNode setNode(Node node) {\r\n\t\tthis.node = node;\r\n\t\treturn this;\r\n\t}", "public void setConnected(boolean connected) {\n isConnected = connected;\n }", "public void setSocket(SocketWrapper socket);", "public void setConnection(C4Client client) {\n this.client = client;\n }", "public void connect() {\n\t\tint index = shell.getConnectionsCombo().getSelectionIndex();\n\t\tif (profiles.length == 0 || index < 0 || index >= profiles.length) {\n\t\t\tupdateSelection();\n\t\t\treturn;\n\t\t}\n\t\tIConnectionProfile profile = profiles[index];\n\t\tshell.setEnabled(false);\n\t\tnetworkManager.connect(profile, (s, r) -> {\n\t\t\tif (s) {\n\t\t\t\tcompleted = true;\n\t\t\t\tclose();\n\t\t\t} else {\n\t\t\t\tplugin.sync(() -> {\n\t\t\t\t\tMessageBox messageBox = new MessageBox(shell.isDisposed() ? null : shell, SWT.ICON_ERROR);\n\t\t\t\t\tmessageBox.setMessage(\"Failed to connect!\\n\" + r);\n\t\t\t\t\tmessageBox.open();\n\t\t\t\t\tshell.setEnabled(true);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "public void setPeer(Peer peer);", "public void setNext(Node node)\n\t{\n\t\tnodeLinks.setNext(node);\n\t}", "@Override\n\tpublic void setConnectTimeout(long arg0) {\n\n\t}", "public void addConnection(Integer node) {\n\t\t\n\t\tconnections.add(node);\n\t\tthis.d++;\n\t}", "public void doConnect() throws IOException {\n if (!sc.finishConnect()) {\n return; // the selector gave a bad hint\n }\n\n // Sending pseudo\n var newConnexio = new ConnexionFrame(pseudo);\n queueMessage(newConnexio.asByteBuffer().flip());\n\n updateInterestOps();\n }", "public void setTCPConnection(TCPConnectionHandler tcp) {\r\n\t\tthis.tcp = tcp;\r\n\t}", "public void setNode(String node)\n {\n this.node = node;\n }", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "public void openConnection() {\n System.out.println(\"Opening connection...\");\n\n try {\n String HOST = \"192.168.4.1\";\n int PORT = 2323;\n connectionSocket = new Socket(HOST, PORT);\n connectionSocket.setTcpNoDelay(true);\n\n writer = new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(connectionSocket.getOutputStream())));\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n\n System.out.println(\"openConnection(): Success\");\n return;\n } catch (UnknownHostException e) {\n System.out.println(\"UnknownHostException at openConnection()\");\n } catch (IOException e) {\n System.out.println(\"IOException at openConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at openConnection()\");\n System.out.println(e.toString());\n }\n\n System.out.println(\"Failed to connect\");\n }", "@Override\r\n\t\tpublic void onConnect(Connection connection) {\n\r\n\t\t}", "public void tunnel() {\r\n\t\tboolean status = true;\r\n\t\tfor (CellStorage i : node) {\r\n\t\t\tif (i.getCell().tunnelTo != null) {\r\n\t\t\t\tCellStorage tunnelTo = null;\r\n\t\t\t\t// Searching for destinated node from the tunnel\r\n\t\t\t\tfor (int k = 0; k < node.size(); k++) {\r\n\t\t\t\t\tif (node.get(k).getCell() == i.getCell().tunnelTo) {\r\n\t\t\t\t\t\ttunnelTo = node.get(k);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti.setTunnel(tunnelTo);\r\n\r\n\t\t\t\t// Calling validateConnection method to make sure that no duplicated connection\r\n\t\t\t\t// is made.\r\n\t\t\t\t// Create new connection if no duplicate.\r\n\r\n\t\t\t\tstatus = validateConnection(i, tunnelTo);\r\n\t\t\t\tif (status == false) {\r\n\t\t\t\t\tHashMapConnectedNodes tunnelSet = new HashMapConnectedNodes();\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(i.getIndex(), i);\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(tunnelTo.getIndex(), tunnelTo);\r\n\t\t\t\t\thshMConnectedNodes.add(tunnelSet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public synchronized void startConnection ()\r\n\t{\r\n \t\tsynchronized (this)\r\n \t\t{\r\n \t\t\tif (_roboCOM!=null) return;\r\n\t\t\t\r\n\t\t\tuitoken++;\r\n\t\t\t_roboCOM = new TCPClient (MsgQueue,cm,uitoken);\r\n\r\n\t\t\t// debug parameters\r\n\t\t\t_roboCOM.msgHello=\"Start Connection ACCE\";\r\n\t\t\t\t\t\t\t\r\n\t \t \tnew Thread (_roboCOM).start();\r\n \t\t}\r\n\t}", "public void setConnectionContext(final ChannelHandlerContext ctx) {\n while (true) {\n final ChannelHandlerContext oldCtx = connectionCtx.get();\n if (connectionCtx.compareAndSet(oldCtx, ctx)) {\n return;\n }\n }\n }" ]
[ "0.6926809", "0.68713164", "0.6866145", "0.6743354", "0.6689071", "0.65888566", "0.65861464", "0.6564312", "0.64838237", "0.6368557", "0.63265544", "0.6319325", "0.6284634", "0.62844527", "0.62794334", "0.62734526", "0.6258158", "0.62002265", "0.6156094", "0.6156094", "0.6156094", "0.6156094", "0.6151808", "0.6073384", "0.60733575", "0.5983878", "0.59413964", "0.5918476", "0.5856026", "0.5855256", "0.58492327", "0.58465296", "0.5784361", "0.56920815", "0.5672625", "0.5598403", "0.5580989", "0.5576317", "0.5574862", "0.5563163", "0.5561318", "0.55561066", "0.5536076", "0.55243206", "0.5519356", "0.5516872", "0.5491619", "0.5487526", "0.547692", "0.54700446", "0.5465123", "0.5465123", "0.5465123", "0.5463964", "0.54536825", "0.54526097", "0.5438765", "0.54340637", "0.54274285", "0.54256797", "0.54209787", "0.54191417", "0.5397379", "0.5372205", "0.5358343", "0.5358343", "0.5357943", "0.5355616", "0.535108", "0.53331214", "0.5332346", "0.5322298", "0.5313337", "0.5298614", "0.52793914", "0.5273594", "0.52702105", "0.52652895", "0.52319616", "0.5221825", "0.5219444", "0.5215214", "0.52126443", "0.52054286", "0.52034867", "0.51953614", "0.5190983", "0.5185084", "0.5182546", "0.5157014", "0.5154421", "0.5141307", "0.51380694", "0.51327187", "0.5131189", "0.5128827", "0.5115877", "0.51155674", "0.5112858", "0.5106844" ]
0.5866217
28
Replies the cost to reach the node.
@Pure double getCost();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}", "double getCost();", "double getCost();", "public abstract float getEstimatedCost(AStarNode paramAStarNode);", "@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}", "public abstract float getCost(AStarNode paramAStarNode);", "public float getCost()\r\n/* 13: */ {\r\n/* 14:10 */ return this.costFromStart + this.estimatedCostToGoal;\r\n/* 15: */ }", "Integer cost(PathFindingNode node, PathFindingNode neighbour);", "@Override\n\tpublic double cost() {\n\t\treturn water.cost()+10;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}", "private double actionCost(StarNode node) {\n StarNode previous = node.getPreviousNode();\n double xDist = previous.getXCoord() - node.getXCoord();\n double yDist = previous.getYCoord() - node.getYCoord();\n double totalDist = Math.sqrt(xDist*xDist + yDist*yDist);\n node.setG(previous.getG() + totalDist);\n return node.getG();\n }", "public double getCost() {\r\n\t \treturn(cost);\r\n\t}", "@Override\n public double getCost() {\n return cost;\n }", "public int getCost()\n\t{\n\t\treturn m_nTravelCost;\n\t}", "public double getCost() {\r\n\t\treturn cost;\r\n\t}", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "public double getCost()\r\n\t{\treturn this.cost;\t}", "public double getCost() {\n\t\treturn cost;\n\t}", "@Pure\n\tdouble getEstimatedCost();", "public double cost()\n\t{\n\t\treturn _dblCost;\n\t}", "public double getCost() {\n\n\t\treturn cost;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}", "int getCost();", "int getCost();", "int getCost();", "public double getCost() {\r\n return cost;\r\n }", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "public double getCost() {\n return cost;\n }", "public double getCost() {\n return cost;\n }", "@Override\r\n public int getCost() {\r\n return cost;\r\n }", "@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}", "public void calculateCost() {\n\t\tthis.cost = 0.0;\n\t\t\n\t\tint i, count = this.cities.size()-1;\n\t\tfor (i = 0; i < count; i++)\n\t\t\tthis.cost += this.cities.get(i).distances[this.cities.get(i+1).index];\n\n\t\tthis.cost += this.cities.get(count).distances[this.cities.get(0).index];\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public double getCost()\n\t{\n\t\treturn 0.9;\n\t}", "public double cost()\n\t{\n\t\treturn (price * weight);\n\t}", "public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}", "@Override\n public long cost() {\n return 100;\n }", "public double getCost() {\n\t\treturn costOverride > 0 ? costOverride : getDefaultCost();\n\t}", "public abstract double getCost();", "public double getTotalCost() {\r\n\t\treturn cost;\r\n\t}", "public double getCost() {\n\t\treturn 1.25;\n\t}", "@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}", "double getTotalCost();", "public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}", "public int getCost() {\n \t\treturn cost;\n \t}", "public double getcost() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn room.getcost() + cost;\r\n\t}", "public double cost() {\n return roomType.cost() + COST;\n }", "public int getCost(){\r\n\t\treturn this.cost;\r\n\t}", "public int getCost() {\n return cost;\n }", "public int getCost() {\n\t\treturn cost;\n\t}", "public int getCost()\r\n\t{\n\t\treturn 70000;\r\n\t}", "public int getCost() {\n return cost;\n }", "public int getCost() {\n return cost;\n }", "double getSolutionCost();", "public double getCost(){\n return cost;\n }", "@Override\r\n\tpublic double getCost() {\n\t\treturn 0;\r\n\t}", "@Override\n public double getCost() {\n\t return 13;\n }", "public Number getCost()\r\n {\r\n return (m_cost);\r\n }", "public BigDecimal getCost() {\r\n return cost;\r\n }", "public int getCost()\n {\n return cost;\n }", "public double getTotalCost() {\r\n return totalCost;\r\n }", "public void calculateCost(AStarNode parentNode, AStarNode endNode)\n \t{\n \t\tthis.costFromStart = parentNode.getCostFromStart() + node.getCost();\n \t\tthis.heuristic = ModelUtils.INSTANCE.getDistance(this.getPosition(), endNode.getPosition());\n \t\tthis.totalCost = this.costFromStart + this.heuristic;\n \t\tthis.parent = parentNode;\n \t}", "public BigDecimal getCost() {\n return this.cost;\n }", "public Integer getCost() {\r\n\t\treturn cost;\r\n\t}", "public double getCost(ReadOnlyProperty<Double> linkCost){\r\n\t\tdouble travelCost = 0;\r\n\t\tfor(int l: getLinks()){\r\n\t\t\ttravelCost += getLinkProbability(l) * linkCost.get(l);\r\n\t\t}\r\n\t\treturn travelCost;\r\n\t}", "public double calculateCostInclusive() {\n\t\tdouble accumulatedCost = 0;\n\t\taccumulatedCost += calculateEuclideanDistance(host.grid.getLocation(host), solutionRepresentation.get(0));\n\t\taccumulatedCost += calculateCostExclusive();\n\t\t\n\t\treturn accumulatedCost;\n\t}", "@Override\r\n\tpublic int cost() {\n\t\treturn b1.cost() + 1;\r\n\t}", "public abstract int getCost();", "public abstract int getCost();", "public abstract int getCost();", "public Integer getCost() {\n return cost;\n }", "public int costToTravel(Node nodeToCheck)\n\t{\n\t\t// check the vector of links for a connection\n\t\tfor (int i = 0; i < m_vConnectedNodes.size(); i++)\n\t\t{\n\t\t\t// if this is the connection to the node we are checking\n\t\t\tif (((NodeConnection)m_vConnectedNodes.elementAt(i)).getLinkedNode().getID() \n\t\t\t\t\t== nodeToCheck.getID())\n\t\t\t{\n\t\t\t\treturn ((NodeConnection)m_vConnectedNodes.elementAt(i)).getCost();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// not found so no connection is a zero cost\n\t\treturn 0;\n\t}", "@Override\n public Double getCost() {\n return new Double(0);\n }", "public int cost(Edge e) {\n\t\tif(mcg!=null)\n\t\t{\n\t\t\treturn mcg.cost(e);\n\t\t}\n\t\treturn 0;\n\t}", "public float getTotalCost() {\n return this.totalCost;\n }", "public int getCost(){\n return this.cost;\n }", "private double heuristicCost(Point p) {\n\t\treturn distance(p, goal);\n\t}", "public int get_cost() {\n return (int)getUIntElement(offsetBits_cost(), 16);\n }", "double setEstimatedCost(double cost);", "double setCost(double cost);", "@Override\n public double cost(){\n return 1 + super.sandwich.cost();\n }", "public int cost() {\n\t\treturn value;\n\t}", "@Override\n public int getCost() {\n\treturn 0;\n }", "public double getCost() \n { \n return super.getCost() +22;\n }", "public double calculateCost(GridState newPoint){\n\t // Does the agent have access to weather information?\n\t return agent.danger(newPoint.getPosition());\n\t \n\t \n\t /* if(agent.hasWeatherInfo()) {\n\t\t // Check fire speed, check wind speed, calculate new fire speed, see if it is likely to spread to the state its gridpoint\n\t\t // Check if it is raining, because then it is slowing down the rain again\n\t\t return danger(newPoint);\n\t }\n\t else return 1.0;*/\n }", "public int getCost() {\n/* 69 */ return this.cost;\n/* */ }", "public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }", "public double getTotalCost(){\r\n\t\t//return the totalCost to the App\r\n\t\treturn totalCost;\r\n\t}", "public double getTotalCost() {\n cost = spr.calculateCost();\n return cost;\n }", "@Override\n public int getCost() {\n return iceCreamPrice + topPrice;\n }", "public void setCost(double cost){\n this.cost = cost;\n }", "@Override\n public int getCost() {\n\n\n //return cost converted to int\n return (int) cost;\n }", "public int getCost (Action action) { \n\t\treturn action.distributedAmount()+1;\n\t}", "public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}", "@Override\n public double getCost() {\n /**\n * @return the cost of Ice Cream\n */\n // TODO Auto-generated method stub\n return this.cost;\n }", "@NotNull\n public BigDecimal getCost() {\n return cost;\n }", "@Override\n public double getCost() {\n if (lunch != null && dinner != null) {\n return lunch.getCost() + dinner.getCost();\n }\n return 0;\n }", "@Override\n public double cost(){\n return 2 + super.cake.cost();\n }", "public java.math.BigDecimal getTotalCost () {\n\t\treturn totalCost;\n\t}" ]
[ "0.7127189", "0.71236813", "0.71236813", "0.7094468", "0.7067141", "0.7066288", "0.7042824", "0.7032258", "0.70039076", "0.69557446", "0.69129896", "0.68983704", "0.68680257", "0.68535143", "0.6842556", "0.6841718", "0.68167365", "0.6812523", "0.6781796", "0.6778118", "0.6773266", "0.67683196", "0.67665213", "0.67665213", "0.67665213", "0.67614335", "0.6751489", "0.6740894", "0.6740894", "0.67404366", "0.67299676", "0.6721858", "0.67178935", "0.67178935", "0.6692524", "0.66886383", "0.66807884", "0.66765887", "0.66652", "0.66632855", "0.6656206", "0.6652154", "0.6637657", "0.6604699", "0.6554973", "0.65534806", "0.6545454", "0.65062714", "0.6504365", "0.649502", "0.6490158", "0.6476468", "0.64708036", "0.64708036", "0.6469865", "0.6446368", "0.6445454", "0.6430431", "0.64278644", "0.6419474", "0.64100885", "0.64063734", "0.64043635", "0.6391535", "0.6390158", "0.6373752", "0.6362379", "0.6356962", "0.6329927", "0.6329927", "0.6329927", "0.6304915", "0.62943476", "0.62478983", "0.62457854", "0.6230086", "0.622896", "0.62115765", "0.6207966", "0.62065595", "0.62054646", "0.62051713", "0.62030447", "0.6201411", "0.620015", "0.61922383", "0.6183948", "0.6177654", "0.61732846", "0.6163603", "0.6134341", "0.6111945", "0.61097664", "0.6090998", "0.60895795", "0.60880345", "0.60766995", "0.607312", "0.6066877", "0.6066134" ]
0.70763505
4
Set the cost to reach the node.
double setCost(double cost);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setCost(double cost);", "protected void setCost(double cost) \r\n\t{\tthis.cost = cost;\t}", "public void setCost(double cost){\n this.cost = cost;\n }", "public void setCost(double cost) {\r\n this.cost = cost;\r\n }", "public void setCost(double cost) {\n this.cost = cost;\n }", "double setEstimatedCost(double cost);", "public void setCost(double value) {\n this.cost = value;\n }", "public void setCost(double cost) {\n\t\tthis.cost = cost;\n\t}", "public void setCost(int cost) {\n \t\tthis.cost = cost;\n \t}", "public void setCost(double cost) {\n\n\t\tthis.cost = cost;\n\t}", "public void setCost(int c) {\r\n this.cost = c;\r\n }", "public void setCost(Number cost)\r\n {\r\n m_cost = cost;\r\n }", "@Override\r\n\tpublic void setCost(double newCost) {\n\r\n\t}", "public void setCost(int cost) {\n\t\tthis.cost = cost;\n\t}", "public void setCost(double cost) {\n /**\n * @return sets the cost of the Ice Cream with the double argument\n */\n this.cost = cost;\n }", "public void set_cost(int value) {\n setUIntElement(offsetBits_cost(), 16, value);\n }", "public void setCost(Integer cost) {\n this.cost = cost;\n }", "public void setCost(Integer cost) {\r\n\t\tthis.cost = cost;\r\n\t}", "public final void setCost(java.math.BigDecimal cost)\n\t{\n\t\tsetCost(getContext(), cost);\n\t}", "public void setEdgeCost(int from, int to, double newCost) {\n //make sure the nodes given are valid\n assert (from < nodeVector.size()) && (to < nodeVector.size()) :\n \"<SparseGraph::SetEdgeCost>: invalid index\";\n\n //visit each neighbour and erase any edges leading to this node\n ListIterator<edge_type> it = edgeListVector.get(from).listIterator();\n while (it.hasNext()) {\n edge_type curEdge = it.next();\n if (curEdge.getTo() == to) {\n curEdge.setCost(newCost);\n break;\n }\n }\n }", "public void setCost(final float newCost) {\r\n\t\tthis.cost = new Float(newCost);\r\n\t}", "public void setCost(BigDecimal cost) {\r\n this.cost = cost;\r\n }", "@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}", "public void setCost(Money obj){\r\n \t//check if the object is null or not an instance of Money\r\n if(obj == null || !(obj instanceof Money)){\r\n \t//throw an exception\r\n throw new PizzaException(\"Exception in the setCost method: the object is null or not an instance of money\");\r\n }\r\n //casting\r\n Money m = (Money) obj;\r\n //set the cost to the clone of m\r\n this.cost = m.clone();\r\n }", "@Override\n public void setCost( double cost ) {\n throw new UnsupportedOperationException( \"Not supported yet.\" );\n }", "public void setCosts(int cost) {\n\t\tthis.damageCharge = cost;\n\t}", "public void setCostOverride(double costOverride) {\n\t\tthis.costOverride = costOverride;\n\t}", "public void setPrice(int newPrice){\n productRelation.setCost(newPrice);\n }", "private void setCost(int u, double d) {\n\t\tgetVertex(u).setCost(d);\n\t}", "public void setCost(int[] cost){\n\t\tthis.cost = cost;\n\t}", "@Autowired\n\tpublic void setCost(@Value(\"${repair.cost}\") int cost) {\n\t\tthis.cost = oneOrMore(cost);\n\t}", "public void changeCost(Node n1, Node n2, int cost) {\r\n\t\tn1.getDistanceVector().put(n2, cost);\r\n\t\tn2.getDistanceVector().put(n1, cost);\r\n\t}", "public void setMoveCost(TerrainType t, int c)\n {\n put(t, c);\n }", "public final void setCost(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal cost)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Cost.toString(), cost);\n\t}", "public void setNodeALLEdages(int from, double newCost){\n for(NavNode n1 :getNodeList(from)){\n setEdgeCost(from,n1.getIndex(),newCost);\n setEdgeCost(n1.getIndex(),from,newCost);\n }\n }", "public void addCost(int amount) {\n\t\tcost = amount;\n\t}", "public void setLinkCost(long linkCost) {\n if ((LinkCost - linkCost) > 100) {\n LinkCost = linkCost;\n } else {\n LinkCost = (linkCost*2 + getLinkCost()*8)/10;\n }\n }", "public void setMoveCost(Weathers weather, TerrainType terrain, int cost)\n {\n if( cost > IMPASSABLE )\n cost = IMPASSABLE;\n moveCosts.get(weather).put(terrain, cost);\n }", "@Override\n\tpublic void setVehicleCost(double van, double railway, double airplane) {\n\t\tconstantPO.setVanCost(van);\n\t\tconstantPO.setRailwayCost(railway);\n\t\tconstantPO.setAirplaneCost(airplane);\n\t}", "public void setshippingcost() {\r\n\t\tshippingcost = getweight() * 3;\r\n\t}", "public boolean setCost(int newCost)\n {\n boolean valid = false;\n if (newCost > 0)\n {\n cost = newCost;\n valid = true;\n }\n return valid;\n }", "public Cost(float c) {\r\n defaultCost = c;\r\n }", "@IcalProperties({\n @IcalProperty(pindex = PropertyInfoIndex.COST,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true),\n @IcalProperty(pindex = PropertyInfoIndex.XBEDEWORK_COST,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)}\n )\n public void setCost(final String val) {\n cost = val;\n }", "public void setCost(int maxTemp) {\n\t\tthis.cost = 900 + (200 * (Math.pow( 0.7, ((double)maxTemp/5.0) )));\n\t}", "public void setPostCost(int newPostCost){\n post.setCost(newPostCost);\n }", "@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}", "public void setPathCost(int pathCost) {\r\n\t\tthis.pathCost = pathCost;\r\n\t}", "@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}", "public void pay(int cost) {\r\n\t\tmoney -= cost;\r\n\t}", "public void setMoveCost(TerrainType terrain, int cost)\n {\n for( Weathers w : Weathers.values() )\n {\n moveCosts.get(w).setMoveCost(terrain, cost);\n }\n }", "@Override\n\tpublic double cost() {\n\t\treturn water.cost()+10;\n\t}", "public void add_cost(float cost){\n costs[next_index] = cost;\n next_index++;\n }", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "public void calculateCost() {\n\t\tthis.cost = 0.0;\n\t\t\n\t\tint i, count = this.cities.size()-1;\n\t\tfor (i = 0; i < count; i++)\n\t\t\tthis.cost += this.cities.get(i).distances[this.cities.get(i+1).index];\n\n\t\tthis.cost += this.cities.get(count).distances[this.cities.get(0).index];\n\t}", "public void setG(Node parent, int moveCost){\n\t\tg=calculateG(parent, moveCost);\n\t}", "public void setActualCost(Number actualCost)\r\n {\r\n m_actualCost = actualCost;\r\n }", "public void forceLinkCost(long linkCost) {\n LinkCost = linkCost;\n }", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}", "private void setupSettlementCost(){\n\t\tsettlementCost.put(ResourceKind.WOOL, 1);\n\t\tsettlementCost.put(ResourceKind.WOOD, 1);\n\t\tsettlementCost.put(ResourceKind.BRICK, 1);\n\t\tsettlementCost.put(ResourceKind.GRAIN, 1);\n\t}", "@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}", "public void setMaxTotalCost(int amount);", "public void setCostPrice(BigDecimal costPrice) {\n this.costPrice = costPrice;\n }", "private void setTargetCosts(){\n\t\t//Check which targets that are inside of this building\n\t\tfor(LinkedList<Node> list : targets){\n\t\t\tfor(Node node : list){\n\t\t\t\t//Make a walkable square at the position so that the target is reachable\n\t\t\t\tfor(int k = node.getXPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; k < node.getXPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; k++) {\n\t\t\t\t\tif(Math.round(scaleCollision * k) >= 0 && Math.round(scaleCollision * k) < COLLISION_ROWS){\n\t\t\t\t\t\tfor(int l = node.getYPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; l < node.getYPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; l++) {\n\t\t\t\t\t\t\tif(Math.round(scaleCollision * l) >= 0 && Math.round(scaleCollision * l) < COLLISION_ROWS){\n\t\t\t\t\t\t\t\tcollisionMatrix[Math.round(scaleCollision * k)][Math.round(scaleCollision * l)] = FOOTWAY_COST;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void calculateCost(AStarNode parentNode, AStarNode endNode)\n \t{\n \t\tthis.costFromStart = parentNode.getCostFromStart() + node.getCost();\n \t\tthis.heuristic = ModelUtils.INSTANCE.getDistance(this.getPosition(), endNode.getPosition());\n \t\tthis.totalCost = this.costFromStart + this.heuristic;\n \t\tthis.parent = parentNode;\n \t}", "public void setCost(int cost) {\n/* 79 */ Validate.isTrue((cost > 0), \"The cost must be greater than 0!\");\n/* */ \n/* 81 */ this.cost = cost;\n/* */ }", "public void setCosto(long pCosto) {\n this.costo = pCosto;\n }", "@Override\r\n public int getCost() {\r\n return cost;\r\n }", "@Override\n public double getCost() {\n return cost;\n }", "public double getCost() {\n\t\treturn costOverride > 0 ? costOverride : getDefaultCost();\n\t}", "public abstract float getEstimatedCost(AStarNode paramAStarNode);", "public void setCosts( List<Double> costs)\r\n\t{\r\n\t\tif( costs.size() != _items.size() ) throw new RuntimeException(\"The size of the list of costs should match to the size of the list of sellers (items)\");\r\n\t\t_costs = costs;\r\n\t}", "public double getCost() {\r\n\t \treturn(cost);\r\n\t}", "public double getCost() {\r\n\t\treturn cost;\r\n\t}", "public void editLink(int id, int cost) {\n\t\tfor (Link l : links) {\n\t\t\tif(l.getDestination() == id) {\n\t\t\t\tl.setCost(cost);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void setCosteEjecucion(BigDecimal costeEjecucion) {\n\t\tmodel.setCosteEjecucion(costeEjecucion);\n\t}", "@Override\n public double cost(){\n return 2 + super.cake.cost();\n }", "public double getCost()\r\n\t{\treturn this.cost;\t}", "@Override\n public long cost() {\n return 100;\n }", "@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}", "@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}", "public double getCost() {\r\n return cost;\r\n }", "public double getCost() {\n\t\treturn cost;\n\t}", "@Override\n public double getCost() {\n\t return 13;\n }", "public void setCurrentCostPrice (BigDecimal CurrentCostPrice)\n\t{\n\t\tset_Value (COLUMNNAME_CurrentCostPrice, CurrentCostPrice);\n\t}", "public void setAllMovementCosts(int moveCost)\n {\n for( TerrainType terrain : TerrainType.TerrainTypeList )\n {\n setMoveCost(terrain, moveCost);\n }\n }", "public abstract float getCost(AStarNode paramAStarNode);", "public float getCost()\r\n/* 13: */ {\r\n/* 14:10 */ return this.costFromStart + this.estimatedCostToGoal;\r\n/* 15: */ }", "public int getCost()\n\t{\n\t\treturn m_nTravelCost;\n\t}", "public double getCost() {\n return cost;\n }", "public double getCost() {\n return cost;\n }", "private void heuristicSetter(Node node){\n int goalNodeFirstDigit = Integer.parseInt(goalNode.getDigit().getFirst_digit());\n int goalNodeSecondDigit = Integer.parseInt(goalNode.getDigit().getSecond_digit());\n int goalNodeThirdDigit = Integer.parseInt(goalNode.getDigit().getThird_digit());\n\n int nodeFirstDigit = Integer.parseInt(node.getDigit().getFirst_digit());\n int nodeSecondDigit = Integer.parseInt(node.getDigit().getSecond_digit());\n int nodeThirdDigit = Integer.parseInt(node.getDigit().getThird_digit());\n\n int heuristic = Math.abs(goalNodeFirstDigit - nodeFirstDigit)+\n Math.abs(goalNodeSecondDigit - nodeSecondDigit)+\n Math.abs(goalNodeThirdDigit - nodeThirdDigit);\n\n node.setHeuristic(heuristic);\n }", "public double getCost() {\n\n\t\treturn cost;\n\t}", "public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}", "public final void changeCost(final ArrayList<CostsChanges> changes) {\n for (CostsChanges change : changes) {\n if (change.getId() == this.getId()) {\n setInitialInfrastructureCost(change.getInfrastructureCost());\n }\n }\n }", "public int getCost(){\r\n\t\treturn this.cost;\r\n\t}", "@Pure\n\tdouble getCost();", "@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}", "public Road(Village start, Village end, int cost) {\n\t\tleave = start;\n\t\tarrive = end;\n\t\ttoll = cost;\n\t}", "public BigDecimal getCost() {\r\n return cost;\r\n }", "public int getCost() {\n return cost;\n }" ]
[ "0.7763155", "0.75600344", "0.753646", "0.7481493", "0.7474781", "0.7386685", "0.7370623", "0.7339849", "0.7309661", "0.7270059", "0.72603625", "0.7258231", "0.71445394", "0.71287334", "0.7123917", "0.7027867", "0.7022421", "0.69844306", "0.6944692", "0.68815684", "0.68375146", "0.6762609", "0.6750677", "0.669431", "0.6536883", "0.6485624", "0.64683974", "0.6465364", "0.6439164", "0.6435915", "0.64185435", "0.6411751", "0.6314597", "0.6251643", "0.6187451", "0.6182018", "0.6150176", "0.6148041", "0.6139391", "0.61153805", "0.60875773", "0.60777193", "0.6074146", "0.60630256", "0.60624367", "0.60345566", "0.5972155", "0.5962745", "0.58792967", "0.5865019", "0.58630264", "0.584754", "0.58399713", "0.5788081", "0.5779084", "0.577287", "0.57704526", "0.5755767", "0.5740757", "0.5726796", "0.57241124", "0.5698979", "0.5698255", "0.56874263", "0.5658331", "0.5648772", "0.5623919", "0.5619717", "0.5609429", "0.5600432", "0.5598017", "0.55814147", "0.5573468", "0.55693215", "0.556124", "0.5527105", "0.551784", "0.5517155", "0.5516924", "0.55120236", "0.55068046", "0.55024344", "0.5498257", "0.54963934", "0.5494593", "0.54868734", "0.54855514", "0.54752475", "0.5470769", "0.5470769", "0.54669034", "0.5452225", "0.54463875", "0.5443671", "0.5437216", "0.54280925", "0.5427219", "0.54228073", "0.54227006", "0.54180735" ]
0.7622133
1
Replies the cost from the node to the target point.
@Pure double getEstimatedCost();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double actionCost(StarNode node) {\n StarNode previous = node.getPreviousNode();\n double xDist = previous.getXCoord() - node.getXCoord();\n double yDist = previous.getYCoord() - node.getYCoord();\n double totalDist = Math.sqrt(xDist*xDist + yDist*yDist);\n node.setG(previous.getG() + totalDist);\n return node.getG();\n }", "public float getCost()\r\n/* 13: */ {\r\n/* 14:10 */ return this.costFromStart + this.estimatedCostToGoal;\r\n/* 15: */ }", "@Pure\n\tdouble getCost();", "public abstract float getEstimatedCost(AStarNode paramAStarNode);", "public abstract float getCost(AStarNode paramAStarNode);", "double getCost();", "double getCost();", "Integer cost(PathFindingNode node, PathFindingNode neighbour);", "@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}", "@Override\n public double getCost() {\n return cost;\n }", "double treeNodeTargetFunctionValue(){\n\t\t\t//loop counter variable\n\t\t\tint i;\n\t\t\t\n\t\t\t//stores the cost\n\t\t\tdouble sum = 0.0;\n\n\t\t\tfor(i=0; i<this.n; i++){\n\t\t\t\t//stores the distance\n\t\t\t\tdouble distance = 0.0;\n\n\t\t\t\t//loop counter variable\n\t\t\t\tint l;\n\n\t\t\t\tfor(l=0;l<this.points[i].dimension;l++){\n\t\t\t\t\t//centroid coordinate of the point\n\t\t\t\t\tdouble centroidCoordinatePoint;\n\t\t\t\t\tif(this.points[i].weight != 0.0){\n\t\t\t\t\t\tcentroidCoordinatePoint = this.points[i].coordinates[l] / this.points[i].weight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcentroidCoordinatePoint = this.points[i].coordinates[l];\n\t\t\t\t\t}\n\t\t\t\t\t//centroid coordinate of the centre\n\t\t\t\t\tdouble centroidCoordinateCentre;\n\t\t\t\t\tif(this.centre.weight != 0.0){\n\t\t\t\t\t\tcentroidCoordinateCentre = this.centre.coordinates[l] / this.centre.weight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcentroidCoordinateCentre = this.centre.coordinates[l];\n\t\t\t\t\t}\n\t\t\t\t\tdistance += (centroidCoordinatePoint-centroidCoordinateCentre) * \n\t\t\t\t\t\t\t(centroidCoordinatePoint-centroidCoordinateCentre) ;\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tsum += distance*this.points[i].weight;\t\n\t\t\t}\n\t\t\treturn sum;\n\t\t}", "public double getCost() {\r\n\t \treturn(cost);\r\n\t}", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "double setCost(double cost);", "double setEstimatedCost(double cost);", "public void setCost(double cost){\n this.cost = cost;\n }", "public void setCost(double value) {\n this.cost = value;\n }", "@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}", "public double getCost() {\r\n\t\treturn cost;\r\n\t}", "public double getCost()\r\n\t{\treturn this.cost;\t}", "public void calculateCost(AStarNode parentNode, AStarNode endNode)\n \t{\n \t\tthis.costFromStart = parentNode.getCostFromStart() + node.getCost();\n \t\tthis.heuristic = ModelUtils.INSTANCE.getDistance(this.getPosition(), endNode.getPosition());\n \t\tthis.totalCost = this.costFromStart + this.heuristic;\n \t\tthis.parent = parentNode;\n \t}", "public double getCost() {\n\t\treturn cost;\n\t}", "public double getCost() {\n\n\t\treturn cost;\n\t}", "public void setCost(double cost) {\n this.cost = cost;\n }", "public abstract double getCost();", "public double getCost() {\r\n return cost;\r\n }", "@Override\r\n public int getCost() {\r\n return cost;\r\n }", "public void setCost(double cost) {\r\n this.cost = cost;\r\n }", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "public double getCost() {\n return cost;\n }", "public double getCost() {\n return cost;\n }", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public void calculateCost() {\n\t\tthis.cost = 0.0;\n\t\t\n\t\tint i, count = this.cities.size()-1;\n\t\tfor (i = 0; i < count; i++)\n\t\t\tthis.cost += this.cities.get(i).distances[this.cities.get(i+1).index];\n\n\t\tthis.cost += this.cities.get(count).distances[this.cities.get(0).index];\n\t}", "public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}", "public double cost()\n\t{\n\t\treturn _dblCost;\n\t}", "public void setCost(double cost) {\n\t\tthis.cost = cost;\n\t}", "@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}", "void setCost(double cost);", "public double getTotalCost() {\r\n\t\treturn cost;\r\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}", "public double getCost() {\n\t\treturn costOverride > 0 ? costOverride : getDefaultCost();\n\t}", "public void setCost(double cost) {\n\n\t\tthis.cost = cost;\n\t}", "public double cost()\n\t{\n\t\treturn (price * weight);\n\t}", "public BigDecimal getCost() {\r\n return cost;\r\n }", "public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}", "public int getCost(){\r\n\t\treturn this.cost;\r\n\t}", "public double getCost(){\n return cost;\n }", "public double getCost()\n\t{\n\t\treturn 0.9;\n\t}", "@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}", "public int getCost()\n\t{\n\t\treturn m_nTravelCost;\n\t}", "public String getCostsTarget() {\n return costsTarget;\n }", "public BigDecimal getCost() {\n return this.cost;\n }", "private double heuristicCost(Point p) {\n\t\treturn distance(p, goal);\n\t}", "double getSolutionCost();", "double getTotalCost();", "@Override\r\n\tpublic void setCost(double newCost) {\n\r\n\t}", "private void setTargetCosts(){\n\t\t//Check which targets that are inside of this building\n\t\tfor(LinkedList<Node> list : targets){\n\t\t\tfor(Node node : list){\n\t\t\t\t//Make a walkable square at the position so that the target is reachable\n\t\t\t\tfor(int k = node.getXPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; k < node.getXPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; k++) {\n\t\t\t\t\tif(Math.round(scaleCollision * k) >= 0 && Math.round(scaleCollision * k) < COLLISION_ROWS){\n\t\t\t\t\t\tfor(int l = node.getYPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; l < node.getYPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; l++) {\n\t\t\t\t\t\t\tif(Math.round(scaleCollision * l) >= 0 && Math.round(scaleCollision * l) < COLLISION_ROWS){\n\t\t\t\t\t\t\t\tcollisionMatrix[Math.round(scaleCollision * k)][Math.round(scaleCollision * l)] = FOOTWAY_COST;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void setCost(double cost) \r\n\t{\tthis.cost = cost;\t}", "public Number getCost()\r\n {\r\n return (m_cost);\r\n }", "int getCost();", "int getCost();", "int getCost();", "public int getCost() {\n \t\treturn cost;\n \t}", "@Override\r\n\tpublic int cost() {\n\t\treturn b1.cost() + 1;\r\n\t}", "public double getCost() {\n\t\treturn 1.25;\n\t}", "@Override\r\n\tpublic double getCost() {\n\t\treturn 0;\r\n\t}", "public double getCost(ReadOnlyProperty<Double> linkCost){\r\n\t\tdouble travelCost = 0;\r\n\t\tfor(int l: getLinks()){\r\n\t\t\ttravelCost += getLinkProbability(l) * linkCost.get(l);\r\n\t\t}\r\n\t\treturn travelCost;\r\n\t}", "public double getTotalCost() {\r\n return totalCost;\r\n }", "@Override\n public int getCost() {\n\n\n //return cost converted to int\n return (int) cost;\n }", "@Override\n\tpublic double cost() {\n\t\treturn water.cost()+10;\n\t}", "public void setEdgeCost(int from, int to, double newCost) {\n //make sure the nodes given are valid\n assert (from < nodeVector.size()) && (to < nodeVector.size()) :\n \"<SparseGraph::SetEdgeCost>: invalid index\";\n\n //visit each neighbour and erase any edges leading to this node\n ListIterator<edge_type> it = edgeListVector.get(from).listIterator();\n while (it.hasNext()) {\n edge_type curEdge = it.next();\n if (curEdge.getTo() == to) {\n curEdge.setCost(newCost);\n break;\n }\n }\n }", "@Override\n public double getCost() {\n\t return 13;\n }", "public int getCost() {\n return cost;\n }", "public int getCost() {\n\t\treturn cost;\n\t}", "public int getCost() {\n return cost;\n }", "public int getCost() {\n return cost;\n }", "@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}", "public void setCost(final float newCost) {\r\n\t\tthis.cost = new Float(newCost);\r\n\t}", "public void setCost(int c) {\r\n this.cost = c;\r\n }", "public int getCost(int x, int y) {\r\n\t\treturn cost.getValue(x, y);\r\n\t}", "public Integer getCost() {\r\n\t\treturn cost;\r\n\t}", "@Override\r\n\tprotected void processCost() {\n\r\n\t}", "public void setCost(Number cost)\r\n {\r\n m_cost = cost;\r\n }", "public double getcost() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn room.getcost() + cost;\r\n\t}", "public Number getActualCost()\r\n {\r\n return (m_actualCost);\r\n }", "public int getCost(int from, int to) {\n\t\treturn matrix[from][to];\n\t}", "@Override\n public Double getCost() {\n return new Double(0);\n }", "public int get_cost() {\n return (int)getUIntElement(offsetBits_cost(), 16);\n }", "public float getTotalCost() {\n return this.totalCost;\n }", "@NotNull\n public BigDecimal getCost() {\n return cost;\n }", "public int getCost (Action action) { \n\t\treturn action.distributedAmount()+1;\n\t}", "public int getCost()\n {\n return cost;\n }", "public abstract int getCost();", "public abstract int getCost();", "public abstract int getCost();", "public int getCost(){\n return this.cost;\n }", "public double getCost() {\n return quantity*ppu;\n\n }", "public Integer getCost() {\n return cost;\n }" ]
[ "0.6851765", "0.6830395", "0.67912245", "0.6772368", "0.6729522", "0.66865593", "0.66865593", "0.6678638", "0.6668221", "0.66552866", "0.6647064", "0.6558084", "0.6549859", "0.6540139", "0.6535239", "0.6528469", "0.6518893", "0.65153706", "0.65076053", "0.650718", "0.64836854", "0.6446555", "0.64397436", "0.64302254", "0.64249444", "0.6423421", "0.64224476", "0.6405902", "0.64052415", "0.63945186", "0.63945186", "0.6378963", "0.6378963", "0.63650024", "0.6314917", "0.6307388", "0.62948495", "0.62947357", "0.6294308", "0.6289767", "0.62850165", "0.62708455", "0.62375945", "0.6217135", "0.621233", "0.62031794", "0.6201679", "0.619902", "0.6198892", "0.6198504", "0.6195936", "0.6190001", "0.6183296", "0.6180569", "0.6179616", "0.6178607", "0.6163814", "0.6162245", "0.61561626", "0.61475015", "0.6127311", "0.6123564", "0.6123564", "0.6123564", "0.6115022", "0.6101385", "0.6098799", "0.6098401", "0.6084093", "0.6081682", "0.60660285", "0.60659647", "0.6061698", "0.60552895", "0.60547024", "0.60323983", "0.6029311", "0.6029311", "0.60281724", "0.6027009", "0.6026704", "0.6015336", "0.59966093", "0.59888166", "0.59874827", "0.5972878", "0.5967234", "0.5964635", "0.5955876", "0.59435743", "0.59379935", "0.59370196", "0.5925818", "0.59210134", "0.5918368", "0.5918368", "0.5918368", "0.5917553", "0.5900281", "0.5883286" ]
0.65228224
16
Set the cost from the node to the target point.
double setEstimatedCost(double cost);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setCost(double cost);", "double setCost(double cost);", "protected void setCost(double cost) \r\n\t{\tthis.cost = cost;\t}", "public void setCost(double value) {\n this.cost = value;\n }", "public void setCost(double cost){\n this.cost = cost;\n }", "public void setCost(double cost) {\r\n this.cost = cost;\r\n }", "public void setCost(double cost) {\n this.cost = cost;\n }", "public void setCost(double cost) {\n\t\tthis.cost = cost;\n\t}", "public void setCost(Number cost)\r\n {\r\n m_cost = cost;\r\n }", "public void setEdgeCost(int from, int to, double newCost) {\n //make sure the nodes given are valid\n assert (from < nodeVector.size()) && (to < nodeVector.size()) :\n \"<SparseGraph::SetEdgeCost>: invalid index\";\n\n //visit each neighbour and erase any edges leading to this node\n ListIterator<edge_type> it = edgeListVector.get(from).listIterator();\n while (it.hasNext()) {\n edge_type curEdge = it.next();\n if (curEdge.getTo() == to) {\n curEdge.setCost(newCost);\n break;\n }\n }\n }", "@Override\r\n\tpublic void setCost(double newCost) {\n\r\n\t}", "public void setCost(double cost) {\n\n\t\tthis.cost = cost;\n\t}", "public void setCost(int cost) {\n \t\tthis.cost = cost;\n \t}", "public void setCost(final float newCost) {\r\n\t\tthis.cost = new Float(newCost);\r\n\t}", "public final void setCost(java.math.BigDecimal cost)\n\t{\n\t\tsetCost(getContext(), cost);\n\t}", "public void set_cost(int value) {\n setUIntElement(offsetBits_cost(), 16, value);\n }", "public void setCost(int c) {\r\n this.cost = c;\r\n }", "public void setCost(int cost) {\n\t\tthis.cost = cost;\n\t}", "private void setCost(int u, double d) {\n\t\tgetVertex(u).setCost(d);\n\t}", "@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}", "public void setCost(BigDecimal cost) {\r\n this.cost = cost;\r\n }", "public void setCost(double cost) {\n /**\n * @return sets the cost of the Ice Cream with the double argument\n */\n this.cost = cost;\n }", "@Override\n public void setCost( double cost ) {\n throw new UnsupportedOperationException( \"Not supported yet.\" );\n }", "public void setCost(Integer cost) {\r\n\t\tthis.cost = cost;\r\n\t}", "public void setCost(Integer cost) {\n this.cost = cost;\n }", "private void setTargetCosts(){\n\t\t//Check which targets that are inside of this building\n\t\tfor(LinkedList<Node> list : targets){\n\t\t\tfor(Node node : list){\n\t\t\t\t//Make a walkable square at the position so that the target is reachable\n\t\t\t\tfor(int k = node.getXPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; k < node.getXPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; k++) {\n\t\t\t\t\tif(Math.round(scaleCollision * k) >= 0 && Math.round(scaleCollision * k) < COLLISION_ROWS){\n\t\t\t\t\t\tfor(int l = node.getYPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; l < node.getYPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; l++) {\n\t\t\t\t\t\t\tif(Math.round(scaleCollision * l) >= 0 && Math.round(scaleCollision * l) < COLLISION_ROWS){\n\t\t\t\t\t\t\t\tcollisionMatrix[Math.round(scaleCollision * k)][Math.round(scaleCollision * l)] = FOOTWAY_COST;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setCost(int[] cost){\n\t\tthis.cost = cost;\n\t}", "public void setCost(Money obj){\r\n \t//check if the object is null or not an instance of Money\r\n if(obj == null || !(obj instanceof Money)){\r\n \t//throw an exception\r\n throw new PizzaException(\"Exception in the setCost method: the object is null or not an instance of money\");\r\n }\r\n //casting\r\n Money m = (Money) obj;\r\n //set the cost to the clone of m\r\n this.cost = m.clone();\r\n }", "public void setCostOverride(double costOverride) {\n\t\tthis.costOverride = costOverride;\n\t}", "public final void setCost(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal cost)\n\t{\n\t\tgetMendixObject().setValue(context, MemberNames.Cost.toString(), cost);\n\t}", "public void changeCost(Node n1, Node n2, int cost) {\r\n\t\tn1.getDistanceVector().put(n2, cost);\r\n\t\tn2.getDistanceVector().put(n1, cost);\r\n\t}", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "void setTarget(Node target) {\n\t\tthis.target = target;\n\t}", "public void setPoint(Point operand, Point target) {\n\tfor (Shape s : this.shapes)\n\t s.setPoint(operand, target);\n }", "public void setActualCost(Number actualCost)\r\n {\r\n m_actualCost = actualCost;\r\n }", "public void setshippingcost() {\r\n\t\tshippingcost = getweight() * 3;\r\n\t}", "public void setPrice(int newPrice){\n productRelation.setCost(newPrice);\n }", "public Cost(float c) {\r\n defaultCost = c;\r\n }", "public void setPostCost(int newPostCost){\n post.setCost(newPostCost);\n }", "public void setMoveCost(TerrainType t, int c)\n {\n put(t, c);\n }", "public void setTarget(double target)\n {\n setTarget(target, null);\n }", "public void setCost(int maxTemp) {\n\t\tthis.cost = 900 + (200 * (Math.pow( 0.7, ((double)maxTemp/5.0) )));\n\t}", "public void setEdge(int start, int target){\n\t\tthis.graph.elementAt(start).insert(target);\n\t}", "@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}", "public void setTarget(double target, TrcWarpSpace warpSpace)\n {\n final String funcName = \"setTarget\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"target=%f,warpSpace=%s\", target, warpSpace);\n }\n //\n // Read from input device without holding a lock on this object, since this could\n // be a long-running call.\n //\n final double input = pidInput.get();\n\n synchronized (this)\n {\n if (!absSetPoint)\n {\n //\n // Set point is relative, add target to current input to get absolute set point.\n //\n setPoint = input + target;\n currError = target;\n }\n else\n {\n //\n // Set point is absolute, use as is but optimize it if it is in warp space.\n //\n setPoint = target;\n if (warpSpace != null)\n {\n setPoint = warpSpace.getOptimizedTarget(setPoint, input);\n }\n currError = setPoint - input;\n }\n\n if (inverted)\n {\n currError = -currError;\n }\n\n setPointSign = Math.signum(currError);\n //\n // If there is a valid target range, limit the set point to this range.\n //\n if (maxTarget > minTarget)\n {\n if (setPoint > maxTarget)\n {\n setPoint = maxTarget;\n }\n else if (setPoint < minTarget)\n {\n setPoint = minTarget;\n }\n }\n\n totalError = 0.0;\n prevTime = settlingStartTime = TrcUtil.getCurrentTime();\n // Only init the prevOutputTime if this setTarget is called after a reset()\n // If it's called mid-operation, we don't want to reset the prevOutputTime clock\n if (prevOutputTime == 0.0)\n {\n prevOutputTime = prevTime;\n }\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n }", "public void setNodeALLEdages(int from, double newCost){\n for(NavNode n1 :getNodeList(from)){\n setEdgeCost(from,n1.getIndex(),newCost);\n setEdgeCost(n1.getIndex(),from,newCost);\n }\n }", "public void setTarget(Vector3f target) \n {\n float distance = FastMath.abs(target.y - this.getPosition().y);\n this.motionTarget = target;\n this.motionPath = new MotionPath();\n \n this.motionPath.addWayPoint(this.getPosition());\n\n this.motionPath.addWayPoint(new Vector3f(this.getPosition().x, target.y, this.getPosition().z));\n \n grabberMotion = new MotionEvent(this.node, this.motionPath);\n grabberMotion.setInitialDuration(distance / this.speed);\n }", "public void setTarget(double x, double y) {\n\t\tkin.target = new Vector2d(x, y);\n\t}", "public Node(int x, int y) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tcost = Float.MAX_VALUE;\r\n//\t\t\r\n\t}", "@Autowired\n\tpublic void setCost(@Value(\"${repair.cost}\") int cost) {\n\t\tthis.cost = oneOrMore(cost);\n\t}", "public void setPathCost(int pathCost) {\r\n\t\tthis.pathCost = pathCost;\r\n\t}", "public void setCosts(int cost) {\n\t\tthis.damageCharge = cost;\n\t}", "public void setLinkCost(long linkCost) {\n if ((LinkCost - linkCost) > 100) {\n LinkCost = linkCost;\n } else {\n LinkCost = (linkCost*2 + getLinkCost()*8)/10;\n }\n }", "public void addCost(int amount) {\n\t\tcost = amount;\n\t}", "protected PrecedenceConstraint(CriticalSet cs, Decision reference, Decision target, double cost) {\n\t\tsuper(cs, cost);\n\t\tthis.reference = reference;\n\t\tthis.target = target;\n\t}", "public boolean setCost(int newCost)\n {\n boolean valid = false;\n if (newCost > 0)\n {\n cost = newCost;\n valid = true;\n }\n return valid;\n }", "@IcalProperties({\n @IcalProperty(pindex = PropertyInfoIndex.COST,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true),\n @IcalProperty(pindex = PropertyInfoIndex.XBEDEWORK_COST,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)}\n )\n public void setCost(final String val) {\n cost = val;\n }", "public void add_cost(float cost){\n costs[next_index] = cost;\n next_index++;\n }", "public void calculateCost(AStarNode parentNode, AStarNode endNode)\n \t{\n \t\tthis.costFromStart = parentNode.getCostFromStart() + node.getCost();\n \t\tthis.heuristic = ModelUtils.INSTANCE.getDistance(this.getPosition(), endNode.getPosition());\n \t\tthis.totalCost = this.costFromStart + this.heuristic;\n \t\tthis.parent = parentNode;\n \t}", "@Override\n\tpublic void setVehicleCost(double van, double railway, double airplane) {\n\t\tconstantPO.setVanCost(van);\n\t\tconstantPO.setRailwayCost(railway);\n\t\tconstantPO.setAirplaneCost(airplane);\n\t}", "public void setMoveCost(Weathers weather, TerrainType terrain, int cost)\n {\n if( cost > IMPASSABLE )\n cost = IMPASSABLE;\n moveCosts.get(weather).put(terrain, cost);\n }", "public void setG(Node parent, int moveCost){\n\t\tg=calculateG(parent, moveCost);\n\t}", "public void setTargetPosition(double position){\n targetPosition = position;\n }", "public void editLink(int id, int cost) {\n\t\tfor (Link l : links) {\n\t\t\tif(l.getDestination() == id) {\n\t\t\t\tl.setCost(cost);\n\t\t\t}\n\t\t}\n\t}", "public void setDest(Point dest){\n System.out.println(\"hit\");\n this.dest = dest;\n }", "public void assign(Point3D target){\n\t\tthis.x = target.x;\n\t\tthis.y = target.y;\n\t\tthis.z = target.z;\n\t\tthis.w = target.w;\n\t}", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "public void setCurrentCostPrice (BigDecimal CurrentCostPrice)\n\t{\n\t\tset_Value (COLUMNNAME_CurrentCostPrice, CurrentCostPrice);\n\t}", "@Override\n\tpublic void setCosteEjecucion(BigDecimal costeEjecucion) {\n\t\tmodel.setCosteEjecucion(costeEjecucion);\n\t}", "private void setupSettlementCost(){\n\t\tsettlementCost.put(ResourceKind.WOOL, 1);\n\t\tsettlementCost.put(ResourceKind.WOOD, 1);\n\t\tsettlementCost.put(ResourceKind.BRICK, 1);\n\t\tsettlementCost.put(ResourceKind.GRAIN, 1);\n\t}", "public void setCostPrice(BigDecimal costPrice) {\n this.costPrice = costPrice;\n }", "public void setEstimatedDistanceToTarget(double estimatedDistanceToTarget) {\n this.estimatedDistanceToTarget = estimatedDistanceToTarget;\n }", "public abstract float getEstimatedCost(AStarNode paramAStarNode);", "public void forceLinkCost(long linkCost) {\n LinkCost = linkCost;\n }", "public GraphEdge(int from, int to, double costVar)\r\n {\r\n indexFrom = from;\r\n indexTo = to;\r\n cost = costVar;\r\n }", "public PaymentRequest setShippingCost(BigDecimal cost) {\r\n if (shipping == null) {\r\n shipping = new Shipping();\r\n }\r\n shipping.setCost(cost);\r\n return this;\r\n }", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "public void setTotalCost(float totalCost)\r\n\t{\r\n\t\tthis.totalCost = totalCost;\r\n\t}", "public void setCostsTarget(String costsTarget) {\n this.costsTarget = costsTarget == null ? null : costsTarget.trim();\n }", "public void setTargetCoordinate( Coordinate c ) {\n this.target = c;\n if (moveTimer == null) {\n moveTimer = new Timer();\n }\n if (isCancelled) {\n int movedelay = 100;\n \n final Collection<Seagull> sflock = this.flock;\n final Seagull current = this;\n final double closedistance = resolution * 10;\n \n moveTimer.scheduleAtFixedRate(new TimerTask(){\n\n @Override\n public void run() {\n Coordinate next = new Coordinate(location);\n \n // move 5% closer to the point \n double distance = target.x - location.x;\n next.x = location.x + distance * 0.05;\n \n distance = target.y - location.y;\n next.y = location.y + distance * 0.05;\n \n //see if the next x is 'too close' to one of the other seagulls\n //in the flock\n boolean move = true;\n if (sflock != null) {\n\n for( Iterator iterator = sflock.iterator(); iterator.hasNext(); ) {\n Seagull seagull = (Seagull) iterator.next();\n if (seagull != current) {\n // if i am too close then set move to false\n if (seagull.location.distance(next) < closedistance) {\n move = false;\n }\n }\n }\n }\n\n if (move) {\n location = next;\n\n if (location.distance(target) < 0.1) {\n // close enough;\n this.cancel();\n isCancelled = true;\n }\n }\n }\n }, new Date(), movedelay);\n \n isCancelled = false;\n }\n }", "public void setCost(int cost) {\n/* 79 */ Validate.isTrue((cost > 0), \"The cost must be greater than 0!\");\n/* */ \n/* 81 */ this.cost = cost;\n/* */ }", "public void calculateCost() {\n\t\tthis.cost = 0.0;\n\t\t\n\t\tint i, count = this.cities.size()-1;\n\t\tfor (i = 0; i < count; i++)\n\t\t\tthis.cost += this.cities.get(i).distances[this.cities.get(i+1).index];\n\n\t\tthis.cost += this.cities.get(count).distances[this.cities.get(0).index];\n\t}", "public void setTotalCost(float totalCost) {\n this.totalCost = totalCost;\n }", "public void editNode(Id target, Coordinate newCoord, int i){\n\t\tNode n = returnNodeById(target);\n\t\tif(n != null){\n\t\t\tn.setCoordinate(newCoord);\n\t\t\tlistOfNodes.set(target.indice, n);\n\t\t\tn.removeTagAtIndex(i);\n\t\t}\n\t}", "@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}", "@Override\n public double getCost() {\n return cost;\n }", "private double actionCost(StarNode node) {\n StarNode previous = node.getPreviousNode();\n double xDist = previous.getXCoord() - node.getXCoord();\n double yDist = previous.getYCoord() - node.getYCoord();\n double totalDist = Math.sqrt(xDist*xDist + yDist*yDist);\n node.setG(previous.getG() + totalDist);\n return node.getG();\n }", "public float getCost()\r\n/* 13: */ {\r\n/* 14:10 */ return this.costFromStart + this.estimatedCostToGoal;\r\n/* 15: */ }", "public void set( final float current, final float target, final float acceleration ) {\n this.mCurrent = current;\n this.mTarget = target;\n this.mAcceleration = acceleration;\n }", "public void editNode(Id target, Coordinate newCoord, String newTag){\n\t\tNode n = returnNodeById(target);\n\t\tif(n != null){\n\t\t\tn.setCoordinate(newCoord);\n\t\t\tlistOfNodes.set(target.indice, n);\n\t\t\tn.addTag(newTag);\n\t\t}\n\t}", "public void setMaxTotalCost(int amount);", "public void set(Coord dest) {\n x = dest.x;\n y = dest.y;\n }", "private void heuristicSetter(Node node){\n int goalNodeFirstDigit = Integer.parseInt(goalNode.getDigit().getFirst_digit());\n int goalNodeSecondDigit = Integer.parseInt(goalNode.getDigit().getSecond_digit());\n int goalNodeThirdDigit = Integer.parseInt(goalNode.getDigit().getThird_digit());\n\n int nodeFirstDigit = Integer.parseInt(node.getDigit().getFirst_digit());\n int nodeSecondDigit = Integer.parseInt(node.getDigit().getSecond_digit());\n int nodeThirdDigit = Integer.parseInt(node.getDigit().getThird_digit());\n\n int heuristic = Math.abs(goalNodeFirstDigit - nodeFirstDigit)+\n Math.abs(goalNodeSecondDigit - nodeSecondDigit)+\n Math.abs(goalNodeThirdDigit - nodeThirdDigit);\n\n node.setHeuristic(heuristic);\n }", "public void setBaselineCost(Number baselineCost)\r\n {\r\n m_baselineCost = baselineCost;\r\n }", "public void setCosto(long pCosto) {\n this.costo = pCosto;\n }", "protected abstract double getDefaultCost();", "public String getCostsTarget() {\n return costsTarget;\n }", "public void setLink(FileNode target){\n\t\t/*link = target;\n\t\tsuper.setOffset(0);\n\t\tsuper.setLength(link.getLength());\n\t\tsuper.setSourcePath(link.getSourcePath());*/\n\t\tsuper.setVirtualSourceNode(target);\n\t\tsuper.setOffset(0);\n\t\tif(target != null){\n\t\t\tsuper.setLength(target.getLength());\n\t\t\tsuper.setSourcePath(target.getSourcePath());\n\t\t}\n\t}", "@Override\r\n public void execute() {\r\n if (newSource != null) {\r\n edge.setSource(newSource);\r\n } else if (newTarget != null) {\r\n edge.setTarget(newTarget);\r\n }\r\n }", "public abstract float getCost(AStarNode paramAStarNode);" ]
[ "0.73896515", "0.72778845", "0.7239527", "0.7225138", "0.7200475", "0.71656376", "0.7159625", "0.70485985", "0.7033021", "0.70022166", "0.69867307", "0.6978982", "0.67984253", "0.6757522", "0.6734602", "0.67340887", "0.6727655", "0.6633183", "0.66010416", "0.6555662", "0.6533374", "0.65066", "0.64532214", "0.6451391", "0.6449966", "0.6414412", "0.6356696", "0.635305", "0.6191897", "0.61834955", "0.61480486", "0.60370237", "0.6011539", "0.6005322", "0.59982926", "0.5963409", "0.5931841", "0.59206635", "0.59054023", "0.5893983", "0.58734816", "0.58633107", "0.582895", "0.5823525", "0.57789576", "0.5762571", "0.5648774", "0.56279963", "0.56277466", "0.5627538", "0.56216186", "0.5614587", "0.5604754", "0.56020284", "0.55727667", "0.5556197", "0.5545271", "0.55420685", "0.5532451", "0.5514997", "0.54597104", "0.54414415", "0.5440312", "0.5435359", "0.54346514", "0.5422327", "0.5372519", "0.53542215", "0.5336151", "0.5323871", "0.5318148", "0.5313511", "0.53133154", "0.5309991", "0.5302947", "0.5299141", "0.5287953", "0.5274454", "0.52716774", "0.52695656", "0.5263141", "0.5260721", "0.5259455", "0.52589965", "0.5255869", "0.5248421", "0.5245602", "0.52297", "0.522894", "0.5209908", "0.52078813", "0.51985747", "0.5194677", "0.51868135", "0.517167", "0.51647633", "0.5164755", "0.5162399", "0.51551366", "0.51494974" ]
0.71335864
7
Act do whatever the Card wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.
public void Cardimi(String ID,int num) { switch(num) { case 1 : type=new Noun(ID); break; case 2 : type=new Verb(ID); break; case 3 : type=new Conjuntion(ID); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void act() \r\n {\r\n key();\r\n win();\r\n fall();\r\n lunch();\r\n }", "public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mouse events\n if (startGameButton.wasClicked())\n {\n handleStartGame();\n }\n }", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "public void act() \n {\n if (canGiveTestimony()) {\n giveTestimony();\n }\n }", "public void ActonCard() {\n\t}", "public void act() {\n\t}", "public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }", "public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }", "public void act()\n {\n // Make sure fish is alive and well in the environment -- fish\n // that have been removed from the environment shouldn't act.\n if ( isInEnv() ) \n move();\n }", "public void act() \n {\n checkCollision();\n KeyMovements(); \n attackWeapon();\n //stopGame();\n \n }", "public void act() \n {\n frameCount++;\n animateFlying();\n if (getWorld() instanceof DreamWorld)\n {\n dream();\n }\n else if (getWorld() instanceof FinishScreen)\n {\n runEnd();\n }\n }", "public void act() {\r\n\t\tturn(steps[number % steps.length]);\r\n\t\tnumber++;\r\n\t\tsuper.act();\r\n\t}", "@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "@Override\n public void act() {\n }", "public void act();", "@Override\n public void run() {\n chosenActionUnit.run(getGame(), inputCommands);\n }", "public void act() \n {\n fall();\n }", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\r\n move();\r\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() {\n\t\tif (canMove2()) {\n\t\t\tsteps += 2;\n\t\t\tmove();\n\t\t} else {\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "void act();", "public void act() \n {\n gravity();\n animate();\n }", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "public void act() \r\n {\r\n if ( Greenfoot.isKeyDown( \"left\" ) )\r\n {\r\n turn( -5 );\r\n }\r\n\r\n else if ( Greenfoot.isKeyDown( \"right\" ) )\r\n {\r\n turn( 5 );\r\n }\r\n if ( Greenfoot.isKeyDown(\"up\") )\r\n {\r\n move(10);\r\n }\r\n else if ( Greenfoot.isKeyDown( \"down\") )\r\n {\r\n move(-10);\r\n }\r\n if ( IsCollidingWithGoal() )\r\n {\r\n getWorld().showText( \"You win!\", 300, 200 );\r\n Greenfoot.stop();\r\n }\r\n }", "public void act()\n {\n trackTime();\n showScore();\n \n }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "public void act() \r\n {\r\n if (startTime > 0) {\r\n startTime--;\r\n }\r\n else {\r\n if (isScared()) {\r\n doScareMode();\r\n }\r\n else {\r\n if (counter == 0 || !canMove(currDirectionStr)) {\r\n counter = CELL_SIZE * 4;\r\n prevDirection = currDirection;\r\n do {\r\n currDirection = (int)(Math.random() * 10);\r\n if (currDirection == 0) {\r\n currDirectionStr = \"up\";\r\n }\r\n else if (currDirection == 1) {\r\n currDirectionStr = \"left\";\r\n }\r\n else if (currDirection == 2) {\r\n currDirectionStr = \"down\";\r\n }\r\n else if (currDirection == 3) {\r\n currDirectionStr = \"right\";\r\n }\r\n } while (!canMove(currDirectionStr));\r\n }\r\n \r\n if (canMove(currDirectionStr)) {\r\n move(currDirectionStr);\r\n }\r\n counter--;\r\n } \r\n }\r\n }", "public void act() \n {\n // Add your action code here.\n MyWorld world = (MyWorld) getWorld();\n jefe = world.comprobarJefe();\n \n \n explotar();\n \n if(jefe)\n {\n girarHaciaEnemigo();\n movimientoPegadoAJefe();\n }\n }", "public void act() \n {\n // Add your action code here.\n // get the Player's location\n if(!alive) return;\n \n int x = getX();\n int y = getY();\n \n // Move the Player. The setLocation() method will move the Player to the new\n // x and y coordinates.\n \n if( Greenfoot.isKeyDown(\"right\") ){\n setLocation(x+1, y);\n } else if( Greenfoot.isKeyDown(\"left\") ){\n setLocation(x-1, y);\n } else if( Greenfoot.isKeyDown(\"down\") ){\n setLocation(x, y+1);\n } else if( Greenfoot.isKeyDown(\"up\") ){\n setLocation(x, y-1);\n } \n \n removeTouching(Fruit.class);\n if(isTouching(Bomb.class)){\n alive = false;\n }\n \n }", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "public void act() \n {\n move(5);\n turn(4);\n }", "@Override\n protected void doAct() {\n }", "public void act() {\n\t\tif (canMove()) {\n\t\t\tif (isOnBase()) {\n\t\t\t\tif (steps < baseSteps) {\n\t\t\t\t\tmove();\n\t\t\t\t\tsteps++;\n\t\t\t\t} else {\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tsteps = 0;\n\t\t\t\t}\n\t\t\t} else if (steps == baseSteps / 2) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps++;\n\t\t\t} else if (steps == baseSteps + 1) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps = 0;\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tsteps++;\n\t\t\t}\n\t\t} else {\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "public void act() \n {\n playerMovement();\n }", "public void act() \n {\n if(isAlive)\n {\n move(2);\n if(isAtEdge())\n {\n turnTowards(300, 300);\n GreenfootImage img = getImage();\n img.mirrorVertically();\n setImage(img);\n }\n if (getY() <= 150 || getY() >= 395)\n {\n turn(50);\n }\n if(isTouching(Trash.class))\n {\n turnTowards(getX(), 390);\n move(1);\n setLocation(getX(), 390);\n die();\n }\n }\n }", "public void act ()\n {\n checkScroll();\n checkPlatform();\n checkXAxis();\n checkDeath();\n // get the current state of the mouse\n MouseInfo m = Greenfoot.getMouseInfo();\n // if the mouse is on the screen...\n if (m != null)\n {\n // if the mouse button was pressed\n if (Greenfoot.mousePressed(null))\n {\n // shoot\n player.shoot(m.getX(), m.getY());\n }\n }\n }", "public void act() \r\n {\r\n super.mueve();\r\n super.tocaBala();\r\n super.creaItem();\r\n \r\n if(getMoveE()==0)\r\n {\r\n \r\n if(shut%3==0)\r\n {\r\n dispara();\r\n shut=shut%3;\r\n shut+=1;\r\n \r\n }\r\n else \r\n shut+=1;\r\n }\r\n super.vidaCero();\r\n }", "public void interact() {\r\n\t\t\r\n\t}", "public void act() \r\n {\r\n move(speed); //move at set speed\r\n \r\n if(actCounter < 2) //increases act counter if only 1 act has passed\r\n actCounter++;\r\n\r\n if(actCounter == 1) //if on the first act\r\n {\r\n targetClosestPlanet(); //will target closest planet depending on if it wants to find an unconquered planet, or just the closest one\r\n if(planet == null && findNearestPlanet)\r\n findNearestPlanet = false;\r\n }\r\n \r\n if(health > 0) //if alive\r\n {\r\n if(findNearestPlanet)\r\n targetClosestPlanet();\r\n if(planet != null && planet.getWorld() != null) //if planet exists\r\n moveTowards(); //move toward it\r\n else\r\n moveRandomly(); //move randomly\r\n }\r\n \r\n if(removeMe || atWorldEdge())\r\n getWorld().removeObject(this);\r\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "public void act() \n {\n\n if(isTouching(Car.class))\n {\n Lap = Lap + 1;\n if ((Lap % 11) == 0)\n {\n String lap = Integer.toString(Lap / 11);\n\n getWorld().showText(lap, 450, 30);\n getWorld().showText(\"Lap:\", 400, 30);\n }\n } \n if (Lap == 47)\n {\n Greenfoot.stop();\n getWorld().showText(\"GameOver\",250,250);\n }\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "public void interact() {\r\n\t\tif(alive) {\r\n\t\t\tCaveExplorer.print(attackDescription);\r\n\t\t\tbattle();\r\n\t\t}else {\r\n\t\t\tCaveExplorer.print(deadDescription);\r\n\t\t}\r\n\t}", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public void doInteract()\r\n\t{\n\t}", "public void act() \n {\n moveAround();\n die();\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "public void executeEffect() {\n\t\texecuteEffect(myCard);\n\t}", "public void act() \n {\n movement();\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void act()\n {\n \n if (wait < 75)\n {\n wait = wait + 1;\n }\n \n \n \n \n \n \n if (wait == 75)\n {\n change();\n checkForBounce();\n checkForEdge();\n checkWin(); \n }\n \n \n }", "public void act()\n\t{\n\t\tif(getFirstDriver().isAtPump())\n\t\t{\n\t\t\tif(!getFirstDriver().isDoneRefilling())\n\t\t\t{\n\t\t\t\tgetFirstDriver().act(priceOfFuel);\n\t\t\t}\n\t\t}\n\t\telse if(getFirstDriver().isDone())\n\t\t{\n\t\t\tremoveDriver();\n\t\t}\n\t}", "public void tryAct() {\n\n List<Player> onCardPlayers = new ArrayList<Player>();\n List<Player> offCardPlayers = new ArrayList<Player>();\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n onCardPlayers = findPlayers(currentPlayer.getLocation().getOnCardRoles());\n offCardPlayers = findPlayers(currentPlayer.getLocation().getOffCardRoles());\n currentPlayer.act(onCardPlayers, offCardPlayers);\n refreshPlayerPanel();\n }\n else{\n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can act.\");\n }\n view.updateSidePanel(playerArray);\n }", "public void act() \n {\n // Add your action code here.\n tempoUp();\n }", "public void act() \n {\n move(3);\n turnAtEdge(); \n StrikeSeaHorse();\n }", "public void act()\n {\n // if (claimer ==null){\n // this.setClaim(false);\n //}\n if(claimer == null){\n setClaim(false);\n }\n if (energy>0){\n \n removeEnergy(decayRate);\n\n }\n else {\n // getWorld().removeObject(this);\n\n }\n \n //check the energy decay\n //change size and weight\n //\n }", "@Override\n\tpublic void act(float dt){\n\t\t\n\t}", "public void act()\n {\n \n //move();\n //if(canSee(Worm.class))\n //{\n // eat(Worm.class);\n //}\n //else if( atWorldEdge() )\n //{\n // turn(15);\n //}\n\n }", "public void act()\n { \n if(returnTime.millisElapsed() > 1000) { //time count down every second\n time --;\n }\n \n if (time == 0) { \n bgm.stop();\n Greenfoot.stop();\n }\n \n showCredit();\n }", "public void act(){\n super.act();\n }", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "@Override\n public void doAction() {\n this.game.setComputerStartsFirst(false);\n }", "public void performAction();", "public void doTurn() {\n\t\tGFrame.getInstance().aiHold();\n\t}", "public void act()\r\n\t{\r\n\t\tyVel += gravity;\r\n\t\t//Resets the jump delay to when greater than 0\r\n\t\tif (jDelay > 0)\r\n\t\t{\r\n\t\t\tjDelay--;\r\n\t\t}\r\n\t\t//Sets the vertical velocity and jump delay of the bird after a jump\r\n\t\tif (alive == true && (Menu.keyPress == KeyEvent.VK_SPACE) && jDelay <= 0) \r\n\t\t{\r\n\t\t\tMenu.keyPress = 0;\r\n\t\t\tyVel = -10;\r\n\t\t\tjDelay = 10;\r\n\t\t}\r\n\t\ty += (int)yVel;\r\n\t}", "@Override\r\n\tpublic void act() {\r\n\t\tdouble tankx, tanky;\r\n\t\ttankx = tank.getX();\r\n\t\ttanky = tank.getY();\r\n\t\t\r\n\t\t// If we're not in the center, rotate toward the center and move.\r\n\t\tif (tankx < 300 || tankx > 500 || tanky < 250 || tanky > 350) {\r\n\t\t\treceiver.receiveCommand(new RotateTowardsCommand(player, 400, 300));\r\n\t\t\treceiver.receiveCommand(new MoveCommand(player, false));\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// We are in the center. Just move the gun around and shoot.\r\n\t\t\treceiver.receiveCommand(new RotateGunCommand2(player, 0.05));\r\n\t\t\treceiver.receiveCommand(new FireCommand(player));\r\n\t\t}\r\n\t}", "public void act() \n {\n fall();\n if(Greenfoot.isKeyDown(\"space\") && isOnSolidGround())\n {\n jump();\n }\n move();\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tcard.next(bootpanel);\n\t\t\tSystem.out.println(\"next\");\n\t\t}", "public void act() \r\n {\r\n if (Greenfoot.mouseClicked(this)) {\r\n Greenfoot.setWorld(new howToPlayGuide());\r\n }\r\n }", "@Override\n\tpublic void doAction(String action) {\n\t\tthis.action = action;\n\t\t\n\t\tthis.gameController.pause();\n\t}", "public void act() \n {\n canSeeAlex();\n }", "public void act()\n {\n if (getGrid() == null)\n return;\n if (caughtPokemon.size() <= 0)\n {\n removeSelfFromGrid();\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n return;\n }\n ArrayList<Location> moveLocs = getMoveLocations();\n Location loc = selectMoveLocation(moveLocs);\n makeMove(loc);\n }", "public void act() \n {\n move(4); \n collision();\n \n \n }", "public void act() \n {\n if (scoreCounter > 0){\n scoreCounter--;\n }\n \n if (scoreCounter == 0){\n addScore(1);\n scoreCounter = scoreCooldown;\n }\n }", "public void act() \n {\n moveTowardsPlayer(); \n }", "public void act()\n {\n addBox();\n }", "public void act() \n {\n\n World wrld = getWorld();\n if(frameCounter >= frameWait)\n {\n super.act();\n frameCounter = 0;\n }\n else\n {\n frameCounter++;\n }\n if (dying)\n deathcounter++;\n GreenfootImage trans = getImage();\n trans.scale(500,500);\n setImage(trans);\n setLocation(getX(), (getY()));\n\n if (deathcounter > 10)\n {\n wrld.removeObject(this);\n ((Universe)wrld).score += 50;\n }\n else if (getX() < 10)\n wrld.removeObject(this);\n }" ]
[ "0.7369058", "0.7035512", "0.6947044", "0.6893382", "0.6867992", "0.68661004", "0.68500525", "0.6796423", "0.67564946", "0.67448074", "0.6695602", "0.6695071", "0.6674455", "0.6652784", "0.6652784", "0.658452", "0.6583855", "0.653071", "0.65243965", "0.65141773", "0.65137476", "0.65137476", "0.65137476", "0.6501055", "0.64977634", "0.64977634", "0.64977634", "0.64977634", "0.64977634", "0.64977634", "0.64977634", "0.64977634", "0.6490258", "0.64897305", "0.6475905", "0.6467009", "0.64502823", "0.64359426", "0.6433492", "0.6400286", "0.63950455", "0.63859373", "0.6375887", "0.6369939", "0.63494277", "0.634456", "0.6339371", "0.63106924", "0.6310578", "0.63081974", "0.6306215", "0.62977064", "0.62796056", "0.6273034", "0.62637097", "0.62637097", "0.62637097", "0.62637097", "0.62637097", "0.62637097", "0.62637097", "0.62579787", "0.62579787", "0.62377447", "0.62245554", "0.62225425", "0.62201035", "0.621567", "0.6214689", "0.6213829", "0.6212587", "0.6209692", "0.61942506", "0.6184107", "0.61772794", "0.6177051", "0.6172544", "0.61715335", "0.6159564", "0.6157224", "0.614816", "0.61235464", "0.6112264", "0.6109525", "0.6106519", "0.6094606", "0.60941136", "0.60849994", "0.6077571", "0.6076754", "0.60696715", "0.6065601", "0.60651207", "0.60644907", "0.6053253", "0.60404426", "0.6034559", "0.6018837", "0.60177207", "0.5965155", "0.59486485" ]
0.0
-1
The done() method is called by the FutureTask class when the task that is being controlled finishes its execution.
@Override protected void done() { if (isCancelled()) { System.out.printf("%s: Has been canceled\n", name); } else { System.out.printf("%s: Has finished\n", name); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void done() {\n isDone = true;\n }", "@Override\n\tprotected void done()\n\t{\n\t\tgetController().done();\n\t}", "public void done() {\n\t\t}", "public void done() {\n if (!isCancelled()) {\n try {\n C0637h.this.mo7991a(get());\n } catch (InterruptedException | ExecutionException e) {\n C0637h.this.mo7992a(e.getCause());\n }\n } else {\n C0637h.this.mo7992a((Throwable) new CancellationException());\n }\n }", "public void done() {\n done = true;\n }", "@Override\n\t\tpublic void done() {\n\n\t\t}", "@Override\r\n\tpublic void done() {\n\t\t\r\n\t}", "public void done() {\n \t\t\t\t\t\t}", "@Override\r\n\tpublic void done() {\n\t\tSystem.out.println(\"done\");\r\n\t}", "void TaskFinished(Task task) {\n\n repository.finishTask(task);\n }", "public void done() {\n try {\n C1000c.this.mo5101e(get());\n } catch (InterruptedException e) {\n Log.w(\"AsyncTask\", e);\n } catch (ExecutionException e2) {\n throw new RuntimeException(\"An error occurred while executing doInBackground()\", e2.getCause());\n } catch (CancellationException unused) {\n C1000c.this.mo5101e(null);\n } catch (Throwable th) {\n throw new RuntimeException(\"An error occurred while executing doInBackground()\", th);\n }\n }", "@Override\n public void done() {\n }", "@Override\n public void done() {\n }", "public void done() {\n try {\n AsyncTask.this.a(get());\n } catch (InterruptedException e) {\n Log.w(\"AsyncTask\", e);\n } catch (ExecutionException e2) {\n throw new RuntimeException(\"An error occured while executing doInBackground()\", e2.getCause());\n } catch (CancellationException unused) {\n AsyncTask.this.a(null);\n }\n }", "@Override\n\tpublic void handleDone(Player player, Task task, Game game) {\n\t\t\n\t}", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void finishTask() {\n\t\t\n\t}", "public abstract Task markAsDone();", "public void completeTask() {\n completed = true;\n }", "public void done() {\n AppMethodBeat.i(98166);\n try {\n AsyncTask.this.a(get());\n AppMethodBeat.o(98166);\n } catch (InterruptedException e) {\n AppMethodBeat.o(98166);\n } catch (ExecutionException e2) {\n RuntimeException runtimeException = new RuntimeException(\"An error occured while executing doInBackground()\", e2.getCause());\n AppMethodBeat.o(98166);\n throw runtimeException;\n } catch (CancellationException e3) {\n AsyncTask.this.a(null);\n AppMethodBeat.o(98166);\n }\n }", "public void SetDone(){\n this.isDone = true;\n }", "public abstract void done();", "public void setDone() {\n isDone = true;\n }", "public void done();", "public void done();", "public void done();", "public void finish() {\n\t\ttask.run();\n\t\ttask.cancel();\n\t}", "@Override\n\tpublic boolean done() {\n\t\treturn true;\n\t}", "@Override\r\n public void tasksFinished()\r\n {\n }", "public boolean done() {\n return false;\n }", "@Override\n\tpublic boolean done() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean done() {\n\t\treturn false;\n\t}", "public void afterDone() {\n super.afterDone();\n if (wasInterrupted()) {\n InterruptibleTask interruptibleTask = this.task;\n if (interruptibleTask != null) {\n interruptibleTask.interruptTask();\n }\n }\n this.task = null;\n }", "public void markAsDone() {\n this.done = true;\n }", "public void afterDone() {\n }", "public void afterDone() {\n }", "public void markAsDone() {\r\n this.isDone = true;\r\n }", "public void markAsDone() {\n this.isDone = true;\n\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "@Override\r\n\tpublic boolean finishCurrentTask() {\r\n\t\treturn finished;\r\n\t}", "@Override\n public boolean isDone() {\n return done;\n }", "@Override\n\tprotected void done() {\n\t\t//close the monitor \n\t\tprogressMonitorReporter.closeMonitor();\n\t\t\n\t\t//Inform application that operation isn't being in progress. \n\t\tapplicationInteractor.setOperationInProgress(false);\n\t}", "@Override\n public boolean isDone()\n {\n return false;\n }", "@Override\n public boolean isDone() {\n return false;\n }", "public void setDone(boolean value) {\n this.done = value;\n }", "void done();", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "void finish(Task task);", "public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }", "protected void markAsDone() {\n isDone = true;\n }", "protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionException ex) {\n\t\t\tresultJLabel.setText(\"Error encountered while performing calculation.\");\n\t\t} // end catch\n\t}", "protected void synchronizationDone() {\n }", "public void markAsDone(){\n isDone = true;\n }", "@Override\n public void onTaskDone(Object... values) {\n }", "public boolean isDone() { return true; }", "public void setDone(boolean done) {\n this.done = done;\n }", "public void markAsDone() {\n // TODO consider adding assertion here\n isDone = true;\n }", "void endTask();", "public void setDone(boolean done) {\n this.done = done;\n }", "public void setDone(boolean done) {\n this.done = done;\n }", "public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }", "@Override\n\tpublic void onTaskDone(String result) {\n\t\t\n\t}", "public void checkOffTask() {\n isDone = true;\n }", "@Override\n public boolean isFinished() {\n return isDone;\n }", "@Override\n public boolean isFinished() {\n return isDone;\n }", "public boolean getDone(){\r\n\t\treturn done;\r\n\t}", "@Override\n public boolean isDone() {\n return future.isDone();\n }", "protected void execute() {\n finished = true;\n }", "@Override\n public boolean isDone() {\n return this.isDone;\n }", "public boolean isDone() { return false; }", "@Override\n protected void succeeded() {\n eventService.publish(new TaskEndedEvent(this));\n\n }", "void Finished(Task task, Action<TResult> lastFinishedAction);", "public void markDone() {\n isDone = true;\n }", "public void setDone(boolean done) {\n \tthis.done = done;\n }", "synchronized public void markDone() {\n this.done = true;\n }", "public boolean isDone(){\n return done;\n }", "@Override\n\tprotected boolean isFinished() {\n\t\treturn done; \n\t}", "@Override\n\tpublic boolean done() {\n\t\tfor(Task t : details.getPendingTasks()){\n\t\t\tif(!t.isComplete())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void setDone(boolean done) {\n\t\tthis.done = done;\n\t\t\n\t}", "public void notifyAsyncTaskDone();", "public void toggleDone() {\n this.done = !this.done;\n }", "public void complete() {\n\t}", "@Override\n\tpublic boolean done() {\n\t\treturn p;\n\t}", "private void awaitDone() throws IgniteInterruptedCheckedException {\n U.await(doneLatch);\n }", "public boolean isDone() {\n return done;\n }", "void synchronizationDone();", "public void handleFinish()\n {\n }", "public boolean isDone() {\n\t\treturn true;\n\t}", "public boolean getDone() {\n return isDone;\n }", "protected void handleCompletedTask(Future<Task> task)\n {\n m_RunningTasks.remove(task);\n\n }", "public boolean isDone();", "public boolean isDone();", "@Override\n public boolean completed() {\n return false;\n }", "@Override\n public void done() {\n // Ignore if more done calls than beginTask calls or if we are still\n // in some nested beginTasks\n if (nestedBeginTasks == 0 || --nestedBeginTasks > 0) {\n return;\n }\n // Send any remaining ticks and clear out the subtask text\n double remaining = parentTicks - sentToParent;\n if (remaining > 0) {\n super.internalWorked(remaining);\n }\n //clear the sub task if there was one\n if (hasSubTask) {\n setSubTaskName(\"\"); //$NON-NLS-1$\n }\n sentToParent = 0;\n\n if (traceTimeStat) {\n long dt = System.currentTimeMillis() - t0;\n System.out.println(\"Task '\" + taskName + \"':\");\n System.out.println(\" ParentTicks: \" + parentTicks);\n System.out.println(\" Total work: \" + totalWork);\n System.out.println(\" Total time: \" + dt + \" ms\");\n System.out.println(\" Time / work unit: \" + ((double)dt / (double)totalWork) + \" ms\");\n }\n }" ]
[ "0.76373744", "0.7598818", "0.75560105", "0.747634", "0.74117166", "0.73924345", "0.7373887", "0.73738724", "0.73666066", "0.7357631", "0.7325321", "0.73250514", "0.73250514", "0.73211277", "0.7250851", "0.725012", "0.725012", "0.725012", "0.72357327", "0.72009754", "0.71955377", "0.7187732", "0.7181508", "0.7174907", "0.7124582", "0.7108663", "0.7108663", "0.7108663", "0.70035094", "0.6994528", "0.6980591", "0.6979072", "0.69458926", "0.69458926", "0.6920213", "0.69183135", "0.68888956", "0.68888956", "0.68805975", "0.68671757", "0.6859765", "0.6859765", "0.6859765", "0.68447083", "0.6814911", "0.68144333", "0.6759732", "0.67456365", "0.672858", "0.67238003", "0.66786593", "0.66786593", "0.66786593", "0.66774035", "0.6656952", "0.66487634", "0.6646541", "0.66377354", "0.66135967", "0.66126007", "0.66110486", "0.65954226", "0.6590699", "0.6575239", "0.6567343", "0.6567343", "0.65658206", "0.6564199", "0.65527314", "0.65484995", "0.65484995", "0.6543064", "0.6525656", "0.6515697", "0.6504744", "0.64556104", "0.6435381", "0.64278436", "0.64276236", "0.6426383", "0.641936", "0.64186", "0.63999945", "0.6396593", "0.63875675", "0.63804567", "0.63547766", "0.6324754", "0.63175005", "0.6315733", "0.6306927", "0.6294153", "0.6290126", "0.62820303", "0.628104", "0.62791234", "0.62673986", "0.62673986", "0.62521493", "0.62491494" ]
0.71935904
21
mengecek apakah ada view yang bisa digunakan kembali,jika tidak maka view akan di inflate
@NonNull @Override public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { View listItemView = convertView; if(listItemView == null) { listItemView = LayoutInflater.from(getContext()).inflate( R.layout.list_item_berita, parent, false); } // mencari dan ambil posisi pada class Berita Berita beritaSekarang = getItem(position); //mencari TextView menggunakan id untuk menempatkan sumber TextView sumberView = (TextView) listItemView.findViewById(R.id.sumber); // Mengambil sumber pada objek beritaSekarang // set text tersebut pada textView sumberView.setText(beritaSekarang.getSumber()); // Cari TextView dengan view ID judul TextView judulView = (TextView) listItemView.findViewById(R.id.judul); // Tampilkan judul berita di TextView judulView.setText(beritaSekarang.getJudul()); String waktuOriginal = beritaSekarang.getWaktu(); //Jika sudah ada 2 String terpisah, bisa kita tampilkan dalam 2 TextViews di tata letak list item. TextView tanggalView = (TextView) listItemView.findViewById(R.id.tanggal); String formatTanggal = formatDate(waktuOriginal); tanggalView.setText(formatTanggal); TextView jamView = (TextView) listItemView.findViewById(R.id.jam); String formatJam = formatTime(waktuOriginal); jamView.setText(formatJam); //String gambar = beritaSekarang.getUrlImage(); //Picasso.get().load(gambar).into(imageView); ImageView ImageView = (ImageView) listItemView.findViewById(R.id.gambar); //Picasso.get().load(beritaSekarang.getUrlImage()).into(ImageView); if(TextUtils.isEmpty(beritaSekarang.getUrlImage())) { // Load default image ImageView.setImageResource(R.drawable.placeholder); } else { Picasso.get().load(beritaSekarang.getUrlImage()).into(ImageView); } return listItemView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "@Override\n\tprotected void initView() {\n\t\tsuper.initView();\n mLnSelectLanguage = (LinearLayout) findViewById(R.id.lnSelectLanguage);\n mBtnContinue = (Button) findViewById(R.id.btnContinue);\n mEdtPhoneNumber = (EditText) findViewById(R.id.edtPhoneNumber);\n mTvNationNameView = (TextView) findViewById(R.id.tvNationNameView);\n mChkAccept = (CheckBox) findViewById(R.id.chkAccept);\n mTvDieuKhoan = (TextView) findViewById(R.id.tvDieuKhoan);\n mTvNotifi1 = (TextView) findViewById(R.id.tvNotifi1);\n Utils.setTextViewHtml(mTvDieuKhoan,getString(R.string.dieukhoan));\n mLnSelectLanguage.setOnClickListener(this);\n mBtnContinue.setOnClickListener(this);\n mTvDieuKhoan.setOnClickListener(this);\n\n\t}", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "@Override\n public void prepareView() {\n }", "@Override\n protected void initView()\n {\n ed_name = findView(R.id.ed_name);\n ed_bank = findView(R.id.ed_bank);\n ed_bank_card = findView(R.id.ed_bank_card);\n ed_bank_name = findView(R.id.ed_bank_name);\n btn_submit = findView(R.id.btn_submit);\n findView(R.id.ib_back).setOnClickListener(this);\n Toolbar toolbar = findView(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n }", "@Override\n public void initView() {\n r3 = (LinearLayout) findViewById(R.id.r3);\n sign_time = (TextView) findViewById(R.id.sign_time);\n visitor_address_change = (TextView) findViewById(R.id.visitor_address_change);\n // 上传图片使用\n mGrideviewUpload = (GridView) findViewById(R.id.grideview_upload);\n mAdapter = new UploadAdapter(this);\n mGrideviewUpload.setAdapter(mAdapter);\n mParentView = (LinearLayout) getLayoutInflater().inflate(R.layout.creative_idea_new, null);\n mPicturePathList = new ArrayList<String>();\n mDialog = new BSProgressDialog(this);\n sign_time.setText(DateUtils.getCurrentTimess());\n mTitleTv.setText(\"位置签到\");\n activate();\n\n // MyThread m = new MyThread();\n // new Thread(m).start();\n }", "@Override\n public View initView() {\n\n View picture_menu_page = View.inflate(mActivity, R.layout.picture_menu_page, null);\n\n lv_pitruemenupage_content = (ListView) picture_menu_page.findViewById(R.id.lv_pitruemenupage_content);\n\n gv_pitruemenupage_content = (GridView) picture_menu_page.findViewById(R.id.gv_pitruemenupage_content);\n return picture_menu_page;\n\n }", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "@Override\n public void initView() {\n\n }", "private void initView() {\n\n }", "public void initView(){}", "@Override\n public void initView() {\n }", "@Override\r\n\tprotected void initView(View view) {\n\t\trly_personal_info = (RelativeLayout) view.findViewById(R.id.rly_personal_info);\r\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_detail_jadwal_dokter, container, false);\n initView();\n tampilDataDetail();\n return view;\n }", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "@Override\n public void onViewCreate() {\n }", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_detail_awan, container, false);\n\n DatabaseHandler dbHandler = new DatabaseHandler(getContext());\n try {\n dbHandler.createDB();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n dbHandler.openDB();\n Awan awan = dbHandler.getInformasiAwan(namaAwan);\n ((TextView) v.findViewById(R.id.detail_awan_nama)).setText(awan.getNama());\n ((TextView) v.findViewById(R.id.detail_awan_deskripsi_singkat)).setText(awan.getDeskripsiSingkat());\n ((TextView) v.findViewById(R.id.detail_awan_ketinggian)).setText(\": \" + awan.getKetinggian());\n ((TextView) v.findViewById(R.id.detail_awan_bentuk)).setText(\": \" + awan.getBentuk());\n ((TextView) v.findViewById(R.id.detail_awan_nama_latin)).setText(\": \" + awan.getNamaLatin());\n ((TextView) v.findViewById(R.id.detail_awan_prespitasi)).setText(\": \" + awan.getPrespitasi());\n int id = getContext().getResources().getIdentifier(namaAwan.toLowerCase(),\n \"drawable\", getContext().getPackageName());\n ((ImageView) v.findViewById(R.id.detail_awan_gambar)).setImageResource(id);\n ((TextView) v.findViewById(R.id.detail_awan_sumber_gambar)).setText(awan.getSumberGambar());\n ((TextView) v.findViewById(R.id.detail_awan_deskripsi_lengkap)).setText(awan.getDeskripsiLengkap());\n return v;\n }", "private void initView() {\n\t\tself_info.setOnClickListener(this);\r\n\t\twhich_org.setOnClickListener(this);\r\n\t\tmember_information.setOnClickListener(this);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ViewGroup rootView = (ViewGroup) inflater.inflate(\n R.layout.fragment_chu_de_page, container, false);\n\n imgHinh = (ImageView) rootView.findViewById(R.id.imgHinh);\n txt_nameWord = (TextView) rootView.findViewById(R.id.txt_nameWord);\n txt_phatamWord = (TextView) rootView.findViewById(R.id.txt_phatamWord);\n txt_nghiaWord = (TextView) rootView.findViewById(R.id.txt_nghiaWord);\n btnLoa = (ImageView) rootView.findViewById(R.id.btnLoa);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View ret = inflater.inflate(R.layout.fragment_mei_tu, container, false);\n initView(ret);\n\n loadData();\n\n initMeituRecyclerView();\n\n initBackTop(ret);\n\n meitu_tianjia.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Toast.makeText(getContext(), \"美图添加按钮\", Toast.LENGTH_SHORT).show();\n }\n });\n meitu_uploadhistory.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Toast.makeText(getContext(), \"美图上传历史按钮\", Toast.LENGTH_SHORT).show();\n }\n });\n //四个按钮的点击变化颜色监听\n meituRadioGroup.setOnCheckedChangeListener(this);\n //下拉更多,展示第二个视图(更多标签视图)\n xialaImage.setOnClickListener(this);\n\n //搜索框\n initSearchInput();\n\n return ret;\n }", "@SuppressLint(\"ResourceAsColor\")\r\n\tprivate void initView() {\n\t\tfriendOneBtn = (Button)getActivity().findViewById(R.id.friend_one_btn);\r\n\t\tfriendTwoBtn = (Button) getActivity().findViewById(R.id.friend_two_btn);\r\n\t\tcursorImage = (ImageView)getActivity().findViewById(R.id.cursor);\r\n\t\t// 进入添加好友页\r\n\t\tfriendOneBtn.setOnClickListener(listener);\r\n\t\tfriendTwoBtn.setOnClickListener(listener);\r\n\t\t\r\n\t\tunreadLabel = (TextView) getActivity().findViewById(R.id.unread_msg_number);\r\n unreadAddressLable = (TextView) getActivity().findViewById(R.id.unread_address_number);\r\n ImageView addContactView = (ImageView) getView().findViewById(R.id.iv_new_contact);\r\n\t\t// 进入添加好友页\r\n\t\taddContactView.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tstartActivity(new Intent(getActivity(), AddContactActivity.class));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initViews() {\n View view = getView();\n if (view != null) {\n edtConfirmPassword = view.findViewById(R.id.edt_reg_confim_password);\n edtConfirmPassword.setTag(\"Confirm Password\");\n edtEmail = view.findViewById(R.id.edt_reg_email);\n edtEmail.setTag(\"Email\");\n edtPhone = view.findViewById(R.id.edt_reg_phone);\n edtPhone.setTag(\"Phone\");\n edtPassword = view.findViewById(R.id.edt_reg_password);\n edtPassword.setTag(\"Password\");\n tv_RegisterSignIn = view.findViewById(R.id.tv_register_sign_in);\n btn_reg_signup = view.findViewById(R.id.btn_reg_signup);\n edtUserName = view.findViewById(R.id.edt_reg_name);\n edtUserName.setTag(\"Name\");\n }\n }", "@Override\r\n\tprotected void initView() {\n\t\tsuper.initView();\r\n\t\tsetTitle(\"还款\");\r\n\t\tshowBack();\r\n\r\n\t\tjuhua = new ProcessDialogUtil(HuanKuan.this);\r\n\r\n\t\t//账户总览\r\n\t\tbenjin = (TextView) findViewById(R.id.hk_benjin);\r\n\t\tlixi = (TextView) findViewById(R.id.hk_lixi);\r\n\t\tguanlifei = (TextView) findViewById(R.id.hk_guanlifei);\r\n\t\t\r\n\t\tyuqifeiyong = (TextView) findViewById(R.id.hk_yuqi);\r\n\t\thuankuanzonge = (TextView) findViewById(R.id.hk_zonge);\r\n\t\tzhanghuyue = (TextView) findViewById(R.id.hk_yue);\r\n\t\tchongzhi = (TextView) findViewById(R.id.hk_chongzhi);\r\n\r\n\t\thuankuan = (Button) findViewById(R.id.hk_huankuan);\r\n\t\t\r\n\t\t// 调用接口 获取充值信息,然后加载页面\r\n\t\tloadHttp();\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n v = inflater.inflate(R.layout.fragment_about_job_hire, container, false);\n arrsalary = getResources().getStringArray(R.array.mucluong);\n arrhv = getResources().getStringArray(R.array.spHocVan);\n arrsex= getResources().getStringArray(R.array.sex);\n init();\n actionGetIntent();\n if(kn.equals(\"\")&&ngoaingu.equals(\"\")&&dotuoi.equals(\"\"))\n {\n// LinearLayout lin = (LinearLayout) v.findViewById(R.id.lininfor);\n// lin.setVisibility(View.GONE);\n// TextView txt = (TextView) v.findViewById(R.id.txtmt);\n// txt.setText(khac);\n }\n txtdiachi.setText(diadiem);\n txtluong.setText(arrsalary[luong] + \" VND\");\n txtdate.setText(ngayup + \"\");\n txtmotacv.setText(motacv + \"\");\n txttencv.setText(tencv + \"\");\n txtbangcap.setText(arrhv[hv] + \"\");\n txtkn.setText(kn + \"\");\n txtdotuoi.setText(dotuoi + \"\");\n txtgt.setText(arrsex[gt] + \"\");\n txtnn.setText(ngoaingu + \"\");\n txtkhac.setText(khac + \"\");\n id = MainActivity.uid;\n\n\n\n\n\n\n\n\n return v;\n\n\n }", "@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}", "private void initViews() {\n\n }", "private void initView() {\n frag4 = new Fragment4();\n //Fragment2 frag2 = new Fragment2();\n Fragment3 frag3 = new Fragment3();\n\n fragments = new Fragment[]{frag4, frag3}; // 要把Fragment*.java中import android.support.v4.app.Fragment;才行。否则不能添加进来。\n\n\n imageViews = new ImageView[2];\n imageViews[0] = (ImageView) findViewById(R.id.iv_zhuye);\n imageViews[1] = (ImageView) findViewById(R.id.iv_wode);\n imageViews[0].setSelected(true);\n\n textViews = new TextView[2];\n textViews[0] = (TextView) findViewById(R.id.tv_zhuye);\n textViews[1] = (TextView) findViewById(R.id.tv_wode);\n textViews[0].setTextColor(ContextCompat.getColor(getApplicationContext(),R.color.selected));\n\n getSupportFragmentManager().beginTransaction()\n .add(R.id.LL_content_main, frag4)\n .add(R.id.LL_content_main, frag3)\n .hide(frag3)\n .show(frag4)\n .commit();\n\n LinearLayout ll_zhuye = (LinearLayout) findViewById(R.id.LL_zhuye);\n LinearLayout ll_wode = (LinearLayout) findViewById(R.id.LL_wode);\n\n ll_zhuye.setOnClickListener(this);\n ll_wode.setOnClickListener(this);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n activity = (PocetnaMajka) getActivity();\n majka=activity.getMajka();\n View view=inflater.inflate(R.layout.fragment_nalog_majka, container, false);\n promeniSifru = (Button) view.findViewById(R.id.buttonPromeniSifruMajke);\n stariPass=(EditText) view.findViewById(R.id.etStariPassMajka);\n noviPass=(EditText) view.findViewById(R.id.etNovipassMajka);\n ponovljeniNovi=(EditText) view.findViewById(R.id.etPonovljeniPassMajka);\n txtImeLekara=(TextView) view.findViewById(R.id.txtImeMajka);\n txtPrezime=(TextView)view.findViewById(R.id.TxtPrezimeMajke);\n txtUsername=(TextView)view.findViewById(R.id.txtUsernameMajka);\n popuniPoljaMajke();\n promeniSifru = (Button) view.findViewById(R.id.buttonPromeniSifruMajke);\n promeniSifru.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(final View v) {\n onPromeniSifru(v);\n }\n });\n potvrdiPromenu = (Button) view.findViewById(R.id.buttonPotvrdiMajka);\n potvrdiPromenu.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(final View v) {\n onPotvrdi(v);\n }\n });\n\n\n cl=view.findViewById(R.id.cntPromenaSifreMajke);\n return view;\n }", "public void initViews(){\n }", "private void initViews() {\n\n\t}", "@Override\n protected void iniView()\n {\n txtHead = (TextView) findViewById(R.id.txtHead);\n imgBack = (ImageView) findViewById(R.id.img_left);\n\n txtHead.setText(\"回复列表\");\n\n TopicID = this.getIntent().getExtras().getString(\"TopicID\").toString();\n LeftID = this.getIntent().getExtras().getString(\"LeftID\").toString();\n listview = (ListView) findViewById(R.id.listview_postlist);\n TopicType = this.getIntent().getExtras().getString(\"TopicType\").toString();\n }", "private void initview() {\n\t\tMyOnClickLinstener clickLinstener = new MyOnClickLinstener();\n\t\tdeliverynote_query_back.setOnClickListener(clickLinstener);\n\t\tdate_layout.setOnClickListener(clickLinstener);\n\t\t\n\t\t//listview条目点击事件\n\t\tDeliveryQueryListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> adapterView, View view, int position,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent(DeliveryNoteQueryActivity.this, DeliveryNoteDetailActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDeliveryNote deliveryNote = (DeliveryNote) adapterView.getItemAtPosition(position);\n\t\t\t\tbundle.putString(\"currenttime\",currenttime);\n\t\t\t\tbundle.putSerializable(\"deliveryNote\", deliveryNote);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_home, container, false);\n unbinder = ButterKnife.bind(this, view);\n\n\n generarLineaLayoutVertical();\n inicializarAdaptadorRV(crearAdaptador(HomeItemRepo.getModulos()));\n\n if(CredentialValues.getLoginData().getPerfilactual().getIdPerfil() == 1){\n //administrador\n textAdmin.setVisibility(View.VISIBLE);\n cardFecha.setVisibility(View.GONE);\n }\n\n if(!Utilities.getUltDownload(getContext()).equals(\"\"))\n download.setText(Utilities.getUltDownload(getContext()));\n\n if(!Utilities.getUltUpload(getContext()).equals(\"\"))\n upload.setText(Utilities.getUltUpload(getContext()));\n\n return view;\n }", "private void initViews() {\n\t\t\r\n\t\tTypeface face = Typeface.createFromAsset(getAssets(), \"Teko_Light.ttf\");\r\n\r\n\t\tet_pin = (EditText) findViewById(R.id.et_pin);\r\n\t\tet_pin.setTypeface(face);\r\n\t\tbtn_admin_login = (Button) findViewById(R.id.btn_admin_login);\r\n\t\tbtn_admin_login.setTypeface(face);\r\n\r\n\t\td = new DialogView();\r\n\t}", "@Override\n protected void loadViewLayout() {\n setContentView(R.layout.ui_imgs_graffit);\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\r\n View rootviView = inflater.inflate(R.layout.category_layout, container, false);\r\n mContext = getActivity();\r\n initView(rootviView);\r\n Bundle bundle = this.getArguments();\r\n String kategori = bundle.getString(\"kategori\");\r\n\r\n loadData(kategori);\r\n return rootviView;\r\n }", "private void initView() {\n\t\trl_edit = (RelativeLayout) findViewById(R.id.rl_edit);\n\t\ttv_all=(TextView) findViewById(R.id.tv_all);\n\t\ttv_dle=(TextView) findViewById(R.id.tv_dle);\n\t\ttv_all.setOnClickListener(this);\n\t\ttv_dle.setOnClickListener(this);\n\t\trl_wd = (RelativeLayout) findViewById(R.id.main_rl_my);\n\t\trl_wd.setOnClickListener(this);\n\t\tmain_rl_gwc = (RelativeLayout) findViewById(R.id.main_rl_gwc);\n\t\tmain_rl_gwc.setOnClickListener(this);\n\t\trl_sy = (RelativeLayout) findViewById(R.id.main_rl_sy);\n\t\trl_sy.setOnClickListener(this);\n\n\t\tnext_sure = (TextView) findViewById(R.id.next_sure);\n\t\tnext_sure.setVisibility(View.VISIBLE);\n\t\tnext_sure.setText(\"确认\");\n\t\tnew TitleMenuUtil(MyMessage.this, \"我的消息\").show();\n\t\tmyAdapter = new MessageAdapter(MyMessage.this, myList);\n\t\teva_nodata = (LinearLayout) findViewById(R.id.eva_nodata);\n\t\tXlistview = (XListView) findViewById(R.id.x_listview);\n\t\t// refund_listview.getmFooterView().getmHintView().setText(\"�Ѿ�û�������\");\n\t\tXlistview.setPullLoadEnable(true);\n\t\tXlistview.setXListViewListener(this);\n\t\tXlistview.setDivider(null);\n\n\t\tXlistview.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t Intent i = new Intent(MyMessage.this, MymsgDetail.class);\n\t\t\t\t i.putExtra(\"id\", myList.get(position-1).getId()+\"\");\n\t\t\t\t startActivity(i);\n\t\t\t}\n\t\t});\n\t\tXlistview.setAdapter(myAdapter);\n\n\t\tnext_sure.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (MyApplication.getIsSelect()) {\n\t\t\t\t\t// ��������ɾ�����\n\t\t\t\t\tnext_sure.setText(\"取消\");\n\t\t\t\t\tMyApplication.setIsSelect(false);\n\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\trl_editno.setVisibility(View.VISIBLE);\n\t\t\t\t\trl_edit.setVisibility(View.GONE);\n\t\t \n\t\t\t\t} else {\n\t\t\t\t\tnext_sure.setText(\"删除\");\n\t\t\t\t\tMyApplication.setIsSelect(true);\n\t\t\t\t\trl_edit.setVisibility(View.VISIBLE);\n\t\t\t\t\trl_editno.setVisibility(View.GONE);\n\t\t\t\t\tmyAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.onbusway, container, false);\r\n\t\ttv_bus=(TextView) v.findViewById(R.id.et_myendPosition_bus);\r\n\t\t//setOnClick();\r\n\t\treturn v;\r\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_keranjang, container, false);\n\n lv_item_keranjang = view.findViewById(R.id.lv_keranjang);\n\n tv_harga_total = view.findViewById(R.id.tv_harga_total);\n\n setItem();\n\n return view;\n }", "@Override\n\tprotected void initViews(View view) {\n\t\tsuper.initViews(view);\n//\t\tsendRequestData();\n\t}", "@Override\n\tpublic void initView() {\n\t\tmylis_show.setTitleText(\"我的物流\");\n\t\tlistView = mylis_listview.getRefreshableView();\n\t\t\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "private void initView() {\n\n main_ll_rl = (LinearLayout) findViewById(R.id.main_ll_rili);\n main_ll_xw = (LinearLayout) findViewById(R.id.main_ll_xw);\n main_ll_wode = (LinearLayout) findViewById(R.id.main_ll_wd);\n main_ll_self = (LinearLayout) findViewById(R.id.main_ll_self);\n main_ll_hq = (LinearLayout) findViewById(R.id.main_ll_hq);\n main_zt_color = (LinearLayout) findViewById(R.id.main_zt_color);\n\n main_zt_color.setBackgroundColor(Color.parseColor(\"#e9e9ea\"));\n\n imgrl = (ImageView) findViewById(R.id.imgrili);\n imgxw = (ImageView) findViewById(R.id.imgxw);\n imgwd = (ImageView) findViewById(R.id.imgwd);\n imggr = (ImageView) findViewById(R.id.imgself);\n imghq = (ImageView) findViewById(R.id.imghq);\n\n main_rl_tv = (TextView) findViewById(R.id.main_rl_tv);\n main_xw_tv = (TextView) findViewById(R.id.main_xw_tv);\n main_wd_tv = (TextView) findViewById(R.id.main_wd_tv);\n main_gr_tv = (TextView) findViewById(R.id.main_self_tv);\n main_hq_tv = (TextView) findViewById(R.id.main_hq_tv);\n\n main_ll_rl.setOnClickListener(this);\n main_ll_xw.setOnClickListener(this);\n main_ll_wode.setOnClickListener(this);\n main_ll_hq.setOnClickListener(this);\n main_ll_self.setOnClickListener(this);\n }", "@Override\n\tprotected View initView(LayoutInflater arg0, ViewGroup arg1, Bundle arg2) {\n\t\treturn arg0.inflate(R.layout.fragment_find, arg1, false);\n\t}", "private void initView() {\n userAction = UserAction.getInstance();\n// person_list.setPullLoadEnable(false);// 初始化时候 loadmore 不可见\n// person_list.setPullRefreshEnable(false);\n//\n// adaper = new person_orderAdapter(publishedData, mContext);\n// person_list.setAdapter(adaper);\n person_phone = (TextView) findViewById(R.id.person_phone);\n person_phone.setText(UserData.getSettingString(mContext,\n UserData.user_phone));\n person_gerenxinxi = (LinearLayout) findViewById(R.id.person_gerenxinxi);\n person_gerenxinxi.setOnClickListener(this);\n person_wodedingdan = (LinearLayout) findViewById(R.id.person_wodedingdan);\n person_wodedingdan.setOnClickListener(this);\n person_youhuiquan = (LinearLayout) findViewById(R.id.person_youhuiquan);\n person_youhuiquan.setOnClickListener(this);\n person_xiaoxi = (LinearLayout) findViewById(R.id.person_xiaoxi);\n person_xiaoxi.setOnClickListener(this);\n person_jiamubiao = (LinearLayout) findViewById(R.id.person_jiamubiao);\n person_jiamubiao.setOnClickListener(this);\n person_guanyuwomen = (LinearLayout) findViewById(R.id.person_guanyuwomen);\n person_guanyuwomen.setOnClickListener(this);\n person_fenxiang = (LinearLayout) findViewById(R.id.person_fenxiang);\n person_fenxiang.setOnClickListener(this);\n person_shezhi = (LinearLayout) findViewById(R.id.person_shezhi);\n person_shezhi.setOnClickListener(this);\n person_signout = (TextView) findViewById(R.id.person_signout);\n person_signout.setOnClickListener(this);\n\n }", "private void initView(View view) {\n\t\tmbtnReg = (Button) view.findViewById(R.id.btonline);\n\t\t//if()\n\t\tmbtnUnReg = (Button) view.findViewById(R.id.btoffline);\n\t\tloadUserInfo(view);\n\t\tmbtnReg.setOnClickListener(this);\n\t\tmbtnUnReg.setOnClickListener(this);\n\t\t//undateStatus();\n\t}", "@Override\n\tpublic void initView() {\n\t\tIntent intent=getIntent();\n\t\tString title=intent.getStringExtra(\"title\");\n\t\tcontext=intent.getStringExtra(\"context\");\n\t\tsetTitle(title);\n\t\tsetGone();\n\t\tsetBack();\n\t\tlist=new ArrayList<GameFighterBean>();\n\t\ttopNewsMoreLV = (LoadListViewnews) findViewById(R.id.lv_more_topnew);\n\t\txuanshou_quanbu_wu = (Button) findViewById(R.id.xuanshou_quanbu_wu);\n\t\txuanshou_quanbu_wu.setVisibility(View.VISIBLE);\n\t\tinitNetwork(context);\n\n\t}", "@Override\n\tpublic View getView(int arg0, View view, ViewGroup arg2) {\n\t\tViewHolder holder;\n\t\tif(view==null){\n\t\t\tview=LayoutInflater.from(cn).inflate(R.layout.chengshi_fragment_showlayout, null);\n\t\t\tholder=new ViewHolder();\n\t\t\tholder.name=(TextView) view.findViewById(R.id.tv_chengshi_name);\n\t\t\tview.setTag(holder);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n activity = (InitializeDineOrderActivity) getActivity();\n View view = inflater.inflate(R.layout.fragment_items_added_success, container, false);\n unbinder = ButterKnife.bind(this, view);\n //animate(imageView);\n return view;\n\n }", "@Override\n protected void initView(Bundle savedInstanceState) {\n setContentView(R.layout.activity_opinion);\n if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {\n findViewById(R.id.View).setVisibility(View.GONE);\n }\n\n ll_back = findView(R.id.ll_back);\n et_opinion_feedback = findView(R.id.et_opinion_feedback);\n et_opinion_phone = findView(R.id.et_opinion_phone);\n btn_opinion_feedback = findView(R.id.btn_opinion_feedback);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "private void initViews(View v) {\n\t\tuser_head_img = (ImageView) v.findViewById(R.id.user_head_img);\r\n\t\tuser_head_img.setImageResource(R.drawable.icon_user_img);\r\n\t\tString id = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUseId();\r\n\t\tList<ImageBean> bean = dao.select(id);\r\n\t\tif (bean != null && bean.size() > 0) {\r\n\t\t\tImageLoader.getInstance().displayImage(bean.get(0).getUrl(),\r\n\t\t\t\t\tuser_head_img, ImageLoadOptions.getOptions());\r\n\t\t} else {\r\n\t\t\tuser_head_img.setImageResource(R.drawable.icon_user_img);\r\n\t\t}\r\n\t\ttv_account = (TextView) v.findViewById(R.id.tv_account);\r\n\t\tString account = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUserName();\r\n\t\ttv_account.setText(account);\r\n\t\ttv_tel = (TextView) v.findViewById(R.id.tv_tel);\r\n\t\tString tel = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUserTel();\r\n\t\ttv_tel.setText(StringUtils.getTelNum(tel));\r\n\t\ttxt_zcgl = (TextView) v.findViewById(R.id.txt_zcgl);\r\n\t\ttxt_tzgl = (TextView) v.findViewById(R.id.txt_tzgl);\r\n\t\ttxt_jlcx = (TextView) v.findViewById(R.id.txt_jlcx);\r\n\t\ttxt_wdyhk = (TextView) v.findViewById(R.id.txt_wdyhk);\r\n\t\ttxt_wdxx = (TextView) v.findViewById(R.id.txt_wdxx);\r\n\t\ttxt_myredpager = (TextView) v.findViewById(R.id.txt_myredpager);\r\n\t\tlayout_zhaq = (RelativeLayout) v.findViewById(R.id.layout_zhaq);\r\n\t\tlayout_ssmm = (RelativeLayout) v.findViewById(R.id.layout_ssmm);\r\n\t\ttv_safelevel = (TextView) v.findViewById(R.id.tv_safelevel);\r\n\t\tString safelevel = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getSafelevel();\r\n\t\ttv_safelevel.setText(safelevel);\r\n\t\ttv_zhye = (TextView) v.findViewById(R.id.tv_zhye);\r\n\t\tlinearlayout = (LinearLayout) v.findViewById(R.id.linearlayout);\r\n\t\ttv_ssmm = (TextView) v.findViewById(R.id.tv_ssmm);\r\n\t\tboolean isHasGesturePsd = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).isHasGesturePsd();\r\n\t\tif (isHasGesturePsd) {\r\n\t\t\ttv_ssmm.setText(R.string.ssmm_msg);\r\n\t\t} else {\r\n\t\t\ttv_ssmm.setText(R.string.no_setting);\r\n\t\t}\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.activity_lap_zis, container, false);\n unbinder = ButterKnife.bind(this, view);\n rvList.setLayoutManager(new LinearLayoutManager(getActivity()));\n sharedLogin = new SharedLogin(getActivity());\n \n getZIS();\n\n spTahun.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n year = adapterSP.getItem(position).toString();\n if (!year.isEmpty()) {\n //getYear(year, sharedLogin.getNip());\n txtTahun.setText(year);\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n spZis.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n zis = adapterSPZIS.getItem(position).toString();\n if (!zis.isEmpty()) {\n //getYear(year, sharedLogin.getNip());\n //Toast.makeText(KinerjaProd.this, \"\" + cariNomerBulan(bulan), Toast.LENGTH_SHORT).show();\n txtZis.setText(zis);\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_find, container, false);\n initView(view);\n initSend();\n getXgimi();\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_basketbol_maclar, container, false);\r\n //final Teams team = (Teams) getArguments().getSerializable(\"team\");\r\n final BTeams team= (BTeams) getActivity().getIntent().getSerializableExtra(\"takim\");\r\n listView = view.findViewById(R.id.mac_listview);\r\n show(team);\r\n\r\n return view;\r\n\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_technical, container, false);\n apk=view.findViewById(R.id.apk);\n apk.setContentDescription(\"aparoksha\");\n apk.setOnClickListener(this);\n\n apk_btn=view.findViewById(R.id.apk_btn);\n apk_btn.setOnClickListener(this);\n apk_btn.setContentDescription(\"aparoksha\");\n\n gh=view.findViewById(R.id.geekhaven);\n gh.setContentDescription(\"geekhaven\");\n gh.setOnClickListener(this);\n\n gh_btn=view.findViewById(R.id.gh_btn);\n gh_btn.setContentDescription(\"geekhaven\");\n gh_btn.setOnClickListener(this);\n\n tesla=view.findViewById(R.id.tesla);\n tesla.setOnClickListener(this);\n tesla.setContentDescription(\"tesla\");\n\n tesla_btn=view.findViewById(R.id.t_btn);\n tesla_btn.setOnClickListener(this);\n tesla_btn.setContentDescription(\"tesla\");\n\n gravity=view.findViewById(R.id.gravity);\n gravity.setOnClickListener(this);\n gravity.setContentDescription(\"gravity\");\n\n gravity_btn=view.findViewById(R.id.g_btn);\n gravity_btn.setOnClickListener(this);\n gravity_btn.setContentDescription(\"gravity\");\n\n checkSub();\n return view;\n }", "@Override\n\tprotected void initView() {\n\t\tsetContentView(R.layout.activity_money_manage);\n\t\t\n\t\tfindViewById(R.id.bt_title_left).setOnClickListener(this);\n\t\tfindViewById(R.id.bt_ok).setOnClickListener(this);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n SharedPreferences pref = getContext().getSharedPreferences(\"AuthLogin\", 0); // 0 - for private mode\n String statusLogin=pref.getString(\"status\",null);\n if(statusLogin==null){\n Toast.makeText(getContext(),\"Harap Login Terlebih Dahulu\",Toast.LENGTH_LONG).show();\n Intent i=new Intent(getContext(),LoginActivity.class);\n startActivity(i);\n }\n String id_user=pref.getString(\"id\",null);\n View view=inflater.inflate(R.layout.fragment_my_caption, container, false);\n ButterKnife.bind(this,view);\n loadCaptionSave(id_user);\n return view;\n }", "private void initView() {\n\t\tfindViewById(R.id.rl_titlebar).setBackgroundColor(getResources().getColor(R.color.deep_blue));\n\t\tImageView mLeftImgv=(ImageView) findViewById(R.id.imgv_leftbtn);\n\t\t((TextView)findViewById(R.id.tv_title)).setText(\"病毒查杀进度\");\n\t\tmLeftImgv.setOnClickListener(this);\n\t\tmLeftImgv.setImageResource(R.drawable.title_back);\n\t\tmProcessTV = (TextView) findViewById(R.id.tv_scanprocess);\n\t\tmScanAppTV = (TextView) findViewById(R.id.tv_scansapp);\n\t\tmCancleBtn = (Button) findViewById(R.id.btn_canclescan);\n\t\tmCancleBtn.setOnClickListener(this);\n\t\tmScanListView = (ListView) findViewById(R.id.lv_scanapps);\n\t\tadapter=new ScanVirusAdapter(mScanAppInfos, this);\n\t\tmScanListView.setAdapter(adapter);\n\t\tmScanningIcon = (ImageView) findViewById(R.id.imgv_scanningicon);\n\t\tstartAnim();\n\t}", "private View setupView(View v)\n {\n\n TextView item_name = (TextView)v.findViewById(R.id.item_name);\n TextView item_price = (TextView)v.findViewById(R.id.item_price);\n TextView item_description = (TextView)v.findViewById(R.id.item_description);\n\n add = (Button) v.findViewById(R.id.fabCart);\n add.setOnClickListener(this);\n mlike = (ImageView) v.findViewById(R.id.btnLike);\n mlike.setOnClickListener(this);\n\n if(mDescription != null) {\n item_name.setText(mDescription[Data.UzaData.NAME.ordinal()] + \" | \" + mDescription[Data.UzaData.SELLER.ordinal()]);\n item_price.setText(mDescription[Data.UzaData.PRICE.ordinal()]);\n item_description.setText(mDescription[Data.UzaData.DESCRIPTION.ordinal()]);\n }\n\n initPager(v);\n\n //TODO \"Show more pictures\" button\n //TODO \"Message\" button\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_danh_sach_tim_kiem, container, false);\n new ReadJSonObject().execute();\n return view;\n }", "protected abstract void initContentView(View view);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_che_yuan_list, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }", "@Override\n\tprotected void iniView() {\n\t\ttxtHead = (TextView) findViewById(R.id.txtHead);\n\t\timgBack = (ImageView) findViewById(R.id.img_left);\n\n\t\ttxtHead.setText(\"回复列表\");\n\t\tlistview = (ListView) findViewById(R.id.listview_postlist);\n\t}", "@Override\n public View initView() {\n View view = View.inflate(mContext, R.layout.tab_detail_pager, null);\n listview = (RefreshListView ) view.findViewById(R.id.listview);\n View topnewsView = View.inflate(mContext, R.layout.topnews, null);\n// 使用ButterKnife绑定XML文件\n //ButterKnife.bind(this, view);\n ButterKnife.bind(this, topnewsView);\n// 监听ViewPage页面的变化动态改变红点和标题\n viewpage.addOnPageChangeListener(new MyOnPageChangeListener());\n// 把顶部新闻模块以头的方式加载到ListView中\n// listview.addHeaderView(topnewsView);\n// ListView自定义方法\n listview.addTopNews(topnewsView);\n// 监听控件刷新\n listview.setOnRefreshListener(new MysetOnRefreshListener());\n// 设置单击监听\n listview.setOnItemClickListener(new MyOnItemClickListener());\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tv = inflater.inflate(R.layout.wisata, container, false);\r\n \r\n\t\t\r\n\t\t\r\n\t\treturn v;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "private void viewInit() {\n }", "protected abstract void initView();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = getView(inflater,R.layout.activity_registro,container);\n\n //Email no se puede cambiar\n mEmailView.setEnabled(false);\n\n //Cambiar título\n getActionBar().setTitle(R.string.titulo_perfil);\n\n //Obtener información\n cargarDatos();\n\n return v;\n }", "public void initView() {\n ((TextView) _$_findCachedViewById(R.id.tvCancelResv)).setOnClickListener(new MyResvDetailActivity$initView$1(this));\n getResvDetail();\n }", "private void initView() {\n\t\ttopbar = findViewById(R.id.topbar);\n\t\t// 顶部导航栏控件id\n\t\tll_returnbtn = (LinearLayout) topbar.findViewById(R.id.ll_returnbtn);\n\t\ttv_title = (TextView) topbar.findViewById(R.id.tv_title);\n\t\t// 顶部导航栏控件相关设置\n\t\ttv_title.setText(\"省份\");\n\t\t// 隐藏不要的内容\n\t\ttopbar.findViewById(R.id.tv_name_function)\n\t\t\t\t.setVisibility(View.INVISIBLE);\n\n\t\tlist_province = (ListView) findViewById(R.id.list_province);\n\t}", "private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}", "@Override\n protected void findView() {\n title = (TextView) findViewById(R.id.title_text);\n title.setText(\"消息\");\n alert = (TextView) findViewById(R.id.alert);\n next_button = (Button) findViewById(R.id.next_button);\n next_button.setVisibility(View.GONE);\n layout = (XtomRefreshLoadmoreLayout) findViewById(R.id.refreshLoadmoreLayout);\n left = (ImageButton) findViewById(R.id.back_button);\n mListView = (SwipeMenuListView) findViewById(R.id.listView);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "private void initView() {\n un = findViewById(R.id.un);\n deux = findViewById(R.id.deux);\n trois = findViewById(R.id.trois);\n quatre = findViewById(R.id.quatre);\n cinq = findViewById(R.id.cinq);\n six = findViewById(R.id.six);\n sept = findViewById(R.id.sept);\n huit = findViewById(R.id.huit);\n neuf = findViewById(R.id.neuf);\n zero = findViewById(R.id.zero);\n etoile = findViewById(R.id.etoile);\n diaize = findViewById(R.id.diaize);\n call_btn = findViewById(R.id.appeler);\n tableView = findViewById(R.id.ecran);\n edit_search = findViewById(R.id.edit_search);\n efface = findViewById(R.id.effacer);\n setComposer = findViewById(R.id.set_composer);\n paletteComposition = findViewById(R.id.palette_de_composition);\n\n if (is_search) {\n setComposer.setVisibility(View.GONE);\n paletteComposition.setVisibility(View.GONE);\n edit_search.setFocusable(true);\n }\n }", "protected abstract void initViews();", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n View view = inflater.inflate(R.layout.fragment_guan_lxswei_shen, container, false);\n ButterKnife.bind(this, view);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main, container, false);\n activity = getActivity();\n llmoni = view.findViewById(R.id.llmoni);\n imgsuiji=view.findViewById(R.id.imgsuiji);\n llshunxu = view.findViewById(R.id.llshunxu);\n llshunxu.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(activity, ShunxuActivity.class);\n startActivity(intent);\n }\n });\n imgsuiji.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(activity, SuijiAcitivity.class);\n startActivity(intent);\n }\n });\n llmoni.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(activity, MoniActivity.class);\n startActivity(intent);\n }\n });\n\n\n return view;\n }", "public abstract void initViews();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_reamur, container, false);\n ce = v.findViewById(R.id.setCelciusfReamur);\n fa = v.findViewById(R.id.setFahrenheit);\n ke = v.findViewById(R.id.setKelvin);\n input = v.findViewById(R.id.editText);\n konversi = v.findViewById(R.id.btnKonversiReamur);\n iv = v.findViewById(R.id.imAboutReamur);\n\n ce.setVisibility(View.INVISIBLE);\n fa.setVisibility(View.INVISIBLE);\n ke.setVisibility(View.INVISIBLE);\n\n konversi.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Konversi();\n }\n });\n\n iv.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n tampilDialog();\n }\n });\n return v;\n }", "@Override\n\tprotected void initContentView() {\n\t\t\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_privacy_politic, container, false);\n unbinder = ButterKnife.bind(this, view);\n setTexto();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_quran, container, false);\n\n rvQuran = v.findViewById(R.id.rvQuran);\n manager = new GridLayoutManager(context,2);\n rvQuran.setLayoutManager(manager);\n juzStartingNum.toString();\n\n //TODO\n // sir i don't what is the problem in this code\n // quranAdapter = new QuranAdapter(surah,juzStartingNum,surahFirstAyat);\n // rvQuran.setAdapter(quranAdapter);\n\n\n return v;\n\n }", "private void intviews() {\n\t\tyanzhengmall=(LinearLayout) findViewById(R.id.yanzhengma);\r\n\t\tphonell=(LinearLayout) findViewById(R.id.phone);\r\n\t\tzhucell=(LinearLayout) findViewById(R.id.zhuce);\r\n\t\tbtn=(Button) findViewById(R.id.button1);\r\n\t\tbtn1=(Button) findViewById(R.id.yanzhengmabutton);\r\n\t\tgetcodebtn=(Button) findViewById(R.id.getcodebtn);\r\n\t\tphoneet=(EditText) findViewById(R.id.phoneet);\r\n\t\tphonetv=(TextView) findViewById(R.id.phonetv);\r\n\t\tyanzhengmatv=(TextView) findViewById(R.id.yanzhengmatv);\r\n\t\tpasswordtv=(TextView) findViewById(R.id.passwordtv);\r\n\t\tbackimageview=(ImageView) findViewById(R.id.backimageview);\r\n\t\tcodeedittext=(EditText) findViewById(R.id.yanzhengmaEditText);\r\n\t\tpasswordet=(EditText) findViewById(R.id.passwordEditText);\r\n\t\tquerenpasswordet=(EditText) findViewById(R.id.passwordquerenEditText);\r\n\t\tregisterbtn=(Button) findViewById(R.id.zhucebutton);\r\n\t}", "private void init(View view) {\n\t\t\r\n\t\tFunSub = (CustemGallery)view.findViewById(R.id.FragMain_Pack);\r\n\t\t\r\n\t\tfragMain_Pack_CustemCalleryAdapter = new FragMain_Pack_CustemCalleryAdapter(getActivity());\r\n\t\t\r\n\t\tFunSub.setAdapter(fragMain_Pack_CustemCalleryAdapter);\r\n\t\t\r\n\t\t\r\n\t}", "public void initView(Bundle bundle) {\n this.mIbLeft.setOnClickListener(new a(this));\n this.mTvTitle.setText(R.string.qr_code);\n this.mZxingview.setDelegate(this);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }" ]
[ "0.75816643", "0.7115681", "0.7115681", "0.70700634", "0.70700634", "0.7069514", "0.7021892", "0.7021892", "0.69994324", "0.69994324", "0.6989874", "0.6977712", "0.69755435", "0.69726664", "0.69641954", "0.6962715", "0.6946675", "0.6942331", "0.69311905", "0.6919844", "0.69188946", "0.69085443", "0.69058853", "0.6869211", "0.6858246", "0.68577737", "0.68577737", "0.6845036", "0.6840652", "0.6812978", "0.6812678", "0.6802325", "0.6778825", "0.67667973", "0.6715549", "0.6714478", "0.6710991", "0.6704587", "0.6693043", "0.6691427", "0.66890967", "0.6682043", "0.66799617", "0.6673261", "0.665794", "0.6657722", "0.66510916", "0.66323406", "0.66248125", "0.66159284", "0.66126287", "0.66024274", "0.6602298", "0.6602107", "0.65887594", "0.6585693", "0.6575677", "0.6574622", "0.6574047", "0.6567564", "0.65593463", "0.6553712", "0.65528554", "0.65495175", "0.6536151", "0.65298593", "0.6529121", "0.6528976", "0.6527585", "0.65235054", "0.65212613", "0.65181583", "0.6516248", "0.65151876", "0.6511404", "0.65095747", "0.6509452", "0.65083474", "0.6507434", "0.65069664", "0.6506205", "0.65042", "0.65009594", "0.6500782", "0.649829", "0.64947206", "0.6492143", "0.64907664", "0.64904785", "0.6487988", "0.648596", "0.64849603", "0.6477412", "0.6476341", "0.6475043", "0.64729935", "0.64678556", "0.6466792", "0.64661473", "0.64623195", "0.6462266" ]
0.0
-1
Kembalikan string tanggal terformat ("Mar 3, 1984") dari objek Date.
private String formatDate(String dateObject) { SimpleDateFormat input = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); // format kita "HARUS SAMA TIDAK BOLEH FORMATNYA BEDA BAHKAN 1 CHAR PUN SimpleDateFormat output= new SimpleDateFormat("dd-MM-yyyy"); Date tanggal = null; try { tanggal = input.parse(dateObject); } catch (ParseException e) { e.printStackTrace(); } return output.format(tanggal); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String formatDate(Date dateObject) {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\r\n return dateFormat.format(dateObject);\r\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\n return dateFormat.format(dateObject);\n }", "public void getTanggalKelahiran() {\r\n Date tanggalKelahiran = new Date(getTahunLahir() - 1900, getBulanLahir() - 1, getTanggalLahir());\r\n SimpleDateFormat ft = new SimpleDateFormat(\"dd - MM - yyyy\");\r\n System.out.println(ft.format(tanggalKelahiran));\r\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\", Locale.getDefault());\n return dateFormat.format(dateObject);\n }", "public String getEntryDateString() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy MMM dd\");\n return sdf.format(entryDate.getTime());\n }", "java.lang.String getToDate();", "java.lang.String getDate();", "private String getDate(String str) {\n String[] arr = str.split(\"T\");\n DateFormat formatter = new SimpleDateFormat(\"yyyy-mm-d\", Locale.US);\n Date date = null;\n try {\n date = formatter.parse(arr[0]);\n } catch (java.text.ParseException e) {\n Log.e(LOG_TAG, \"Could not parse date\", e);\n }\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MMM d, yyyy\", Locale.US);\n\n return dateFormatter.format(date);\n }", "private String formatDate(String dateString) {\n DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(\"LLL dd, yyyy\");\n LocalDate localDate = LocalDate.parse(dateString.substring(0, 10));\n return dateTimeFormatter.format(localDate);\n }", "private String createDate(){\n SimpleDateFormat date = new SimpleDateFormat(\"EEE, MMM d, yyyy\");\n String stringDate = date.format(new Date()); \n return stringDate;\n }", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public String getStringDate(){\n String finalDate = \"\";\n Locale usersLocale = Locale.getDefault();\n DateFormatSymbols dfs = new DateFormatSymbols(usersLocale);\n String weekdays[] = dfs.getWeekdays();\n int day = date.get(Calendar.DAY_OF_WEEK);\n String nameOfDay = weekdays[day];\n\n finalDate += nameOfDay + \" \" + date.get(Calendar.DAY_OF_MONTH) + \", \";\n\n String months[] = dfs.getMonths();\n int month = date.get(Calendar.MONTH);\n String nameOfMonth = months[month];\n\n finalDate += nameOfMonth + \", \" + date.get(Calendar.YEAR);\n\n return finalDate;\n }", "String getDate();", "String getDate();", "private String formatDate (Date date) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss\", Locale.ENGLISH);\n return sdf.format(date);\n }", "public String formatDate(Object valor) {\r\n\t\tString aux = valor.toString();\r\n\t\tif (!aux.equalsIgnoreCase(\"&nbsp;\") && !aux.equalsIgnoreCase(\"\")) {\r\n\t\t\tString anio = aux.substring(0, 4);\r\n\t\t\tString mes = aux.substring(4, 6);\r\n\t\t\tString dia = aux.substring(6);\r\n\t\t\treturn dia + \"/\" + mes + \"/\" + anio;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn aux;\r\n\t}", "private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }", "public String toString() { //toString method\n String startDateString2= \"\"; //Initialize\n try{\n Date date1 = new SimpleDateFormat(\"yyyyMMdd\").parse(full_Date);\n DateFormat df2 = new SimpleDateFormat(\"MMM dd, yyyy\");\n startDateString2 = df2.format(date1);\n \n return startDateString2;\n }catch(ParseException e){\n e.printStackTrace();\n }\n return startDateString2;\n \n}", "@Override\n public String toString() {\n SimpleDateFormat format = new SimpleDateFormat (\"MMM d yyyy\");\n String dateString = format.format(by);\n return \"[D]\" + super.toString() + \" (by: \" + dateString + \")\";\n }", "public String formatForAmericanModel(Date data){\n //definido modelo americano\n DateFormat formatBR = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formatBR.format(data);\n \n }", "public String getArticleDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMM dd, yyyy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public String getDate()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"EE d MMM yyyy\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "public String formatDate (Date date){\r\n\t\tDateFormat df = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm:ss z\", Locale.ENGLISH);\r\n\t\treturn df.format(date);\r\n\t}", "public String getDataNascimentoString() {\r\n\r\n\t\tSimpleDateFormat data = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\treturn data.format(this.dataNascimento.getTime());\r\n\r\n\t}", "public static String dateToString(Date date)\r\n/* 19: */ {\r\n/* 20: 23 */ return sdfDate.format(date);\r\n/* 21: */ }", "public String toStringDateOfBirth() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\treturn dateofbirth.format(format);\n\t}", "private String dateToString(Date datum)\r\n\t{\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\r\n\t\tString dat = df.format(datum);\r\n\t\treturn dat;\r\n\t}", "public String Get_date() \n {\n \n return date;\n }", "@Override\r\n\t\t\t\tpublic String valueToString(Object value) throws ParseException {\n\t\t\t\t\tif(value != null) {\r\n\t\t\t\t\tCalendar cal=(Calendar) value;\r\n\t\t\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\t\tString strDate=format.format(cal.getTime());\r\n\t\t\t\t\treturn strDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "public static String formartDateMpesa(String mDate) {\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tSimpleDateFormat outSDF = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n\t\t\t String outDate = \"\";\n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}", "public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }", "public static String formatterDate(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = dfr.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "public void Add_date(String d)\n {\n\n date = new String(d);\t\n }", "public String getPrintFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "public String getDDMMMYYYYDate(String date) throws Exception {\n HashMap<Integer, String> month = new HashMap<Integer, String>();\n month.put(1, \"Jan\");\n month.put(2, \"Feb\");\n month.put(3, \"Mar\");\n month.put(4, \"Apr\");\n month.put(5, \"May\");\n month.put(6, \"Jun\");\n month.put(7, \"Jul\");\n month.put(8, \"Aug\");\n month.put(9, \"Sep\");\n month.put(10, \"Oct\");\n month.put(11, \"Nov\");\n month.put(12, \"Dec\");\n\n try {\n String[] dtArray = date.split(\"-\");\n return dtArray[1] + \"-\" + month.get(Integer.parseInt(dtArray[1])) + \"-\" + dtArray[0];\n } catch (Exception e) {\n throw new Exception(\"getDDMMMYYYYDate : \" + date + \" : \" + e.toString());\n }\n\n }", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "public abstract java.lang.String getFecha_termino();", "private String dateToString(Date d){\r\n\t\tSimpleDateFormat fmt = new SimpleDateFormat(DATE_FORMAT);\r\n\t\treturn fmt.format(d);\r\n\t}", "public String getFechatxt(Date d){\n \n try {\n String formato = selectorfecha.getDateFormatString();\n //Formato\n \n SimpleDateFormat sdf = new SimpleDateFormat(formato);\n String txtfechap = sdf.format(d);\n return txtfechap;\n } catch (NullPointerException ex) {\n JOptionPane.showMessageDialog(this, \"Al menos selecciona una fecha válida!\", \"Error!\", JOptionPane.INFORMATION_MESSAGE);\n return null;\n\n }\n\n\n \n }", "public static String fromDate(String s){\n \t\t\n \t\tString[] date = s.split(\"T\");\n \t\tString time = date[1].substring(0,5);\n \t\tString[] dates = date[0].split(\"-\"); \n \t\tString month = dates[1];\n \t\tString day = dates[2];\n \t\t\n \t\treturn day + \"/\" + month + \", kl: \" + time;\n \t}", "private String formatReleaseDate(String releaseDate) {\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date dateObject;\n try {\n dateObject = format.parse(releaseDate);\n }\n catch (ParseException pe) {\n Log.e(LOG_TAG, \"Error while retrieving movie information\");\n return releaseDate;\n }\n format = new SimpleDateFormat(\"LLL dd, yyyy\");\n\n return format.format(dateObject);\n }", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }", "@Override\n public String toString() {\n return \"[D]\" + super.toString() + \"(by: \" + date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\")) + \")\";\n }", "public String getBirthDate()\r\n\t{\r\n\t\treturn (bDate.MONTH + 1) + \"/\" + bDate.DATE + \"/\" + bDate.YEAR;\r\n\t}", "public String format (Date date , String dateFormat) ;", "private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }", "public String getFormatedDate() {\n DateFormat displayFormat = new SimpleDateFormat(\"EEEE', ' dd. MMMM yyyy\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "private String makeDateString(int day, int month, int year) {\n String str_month = \"\" + month;\n String str_day = \"\" + day;\n if (month < 10) {\n str_month = \"0\" + month;\n }\n if (day < 10) {\n str_day = \"0\" + day;\n }\n return year + \"-\" + str_month + \"-\" + str_day;\n }", "public static String formatterDateUS(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = df.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "public Date formatForDate(String data) throws ParseException{\n //definindo a forma da Data Recebida\n DateFormat formatUS = new SimpleDateFormat(\"dd-MM-yyyy\");\n return formatUS.parse(data);\n }", "public static String getFormattedMonthDay(String dateStr){\n\n Pattern fixDate = Pattern.compile(\"(\\\\d{4})(\\\\d{1,2})(\\\\d{1,2})\");\n Matcher correctDate = fixDate.matcher(dateStr);\n correctDate.find();\n\n String Nowiscorrect = String.format(\"%s/%s/%s\",\n correctDate.group(1),\n correctDate.group(2),\n correctDate.group(3));\n\n String MonthAndDay = currentDate.getdateWithMonthLetters(Nowiscorrect);\n\n\n Pattern rtl_CHARACTERS = Pattern.compile(\"^[۱-۹]+\");\n Matcher findTheYear = rtl_CHARACTERS.matcher(MonthAndDay);\n boolean isDone = findTheYear.find();\n\n return isDone ? findTheYear.replaceAll(\"\") : \"\";\n\n }", "public String toString()\n\t{\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"MMM-yyyy\");\n\t\t\n\t\treturn getBank() + \" \" + getAccount() + \" \" + format.format(getDate());\n\t}", "public void m3() {\n\t\t\r\n\t\tLocalDate dob = LocalDate.parse(\"1991::09::17\",DateTimeFormatter.BASIC_ISO_DATE);\r\n\tSystem.out.println(dob);\r\n\t}", "private String formatDueDate(Date date) {\n\t\t//TODO locale formatting via ResourceLoader\n\t\t\n\t\tif(date == null) {\n\t\t\treturn getString(\"label.studentsummary.noduedate\");\n\t\t}\n\t\t\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yy\");\n \treturn df.format(date);\n\t}", "private static void formatDate (XmlDoc.Element date) throws Throwable {\n\t\tString in = date.value();\n\t\tString out = DateUtil.convertDateString(in, \"dd-MMM-yyyy\", \"yyyy-MM-dd\");\n\t\tdate.setValue(out);\n\t}", "public static String formatDate(Date d) {\n\t\tint month = d.getMonth() + 1;\n\t\tint dayOfMonth = d.getDate();\n\t\tint year = d.getYear() + 1900;\n\t\tString y = \"\" + year;\n\t\tString m = \"\" + month;\n\t\tString dom = \"\" + dayOfMonth;\n\t\tif (month < 10) {\n\t\t\tm = \"0\" + m;\n\t\t}\n\t\tif (dayOfMonth < 10) {\n\t\t\tdom = \"0\" + dom;\n\t\t}\n\t\treturn m + \"/\" + dom + \"/\" + y.substring(2);\n\t}", "public String getDate(JSONArray j, int index) throws JSONException{\n long time = j.getJSONObject(index).getLong(\"dt\");\n String date = new SimpleDateFormat(\"EE MMM dd\").format(new Date(time*1000));\n \n return date;\n }", "public String getDateString() {\n DateFormat format = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return format.format(mDate);\n }", "private String formatarData(Date data)\n {\n String sDate;\n String sDia = \"\";\n String sMes = \"\";\n\n GregorianCalendar calendar = new GregorianCalendar();\n calendar.setTime(data);\n int dia = calendar.get(GregorianCalendar.DAY_OF_MONTH);\n if (dia > 0) {\n if (dia < 10) {\n sDia = \"0\";\n }\n }\n sDia += dia;\n\n int mes = calendar.get(GregorianCalendar.MONTH);\n mes = mes + 1;\n if (mes > 0) {\n if (mes < 10) {\n sMes = \"0\";\n }\n }\n sMes += mes;\n\n int ano = calendar.get(GregorianCalendar.YEAR);\n\n int hora = calendar.get(GregorianCalendar.HOUR);\n // 0 = dia\n // 1 = noite\n int amPm = calendar.get(GregorianCalendar.AM_PM);\n\n if(amPm == 1)\n {\n if(hora>0 && hora < 13)\n {\n if(hora > 11)\n hora = 0;\n else\n hora += 12;\n }\n }\n\n String sHora = \" \";\n if(hora<=9)\n {\n sHora += \"0\";\n }\n String sMin=\":\";\n int min = calendar.get(GregorianCalendar.MINUTE);\n if(min <10)\n sMin += \"0\";\n sMin += String.valueOf(min);\n sHora += String.valueOf(hora) + sMin + \":00\";\n sDate = String.valueOf(ano) + \"-\" + sMes + \"-\" + sDia + sHora;\n return sDate;\n\n }", "public void mostrarHora(String formato){\n Date objDate = new Date();\n SimpleDateFormat objSDF = new SimpleDateFormat(formato);\n //este sera el resultado de la fechas\n fecha=objSDF.format(objDate);\n }", "private String formatDate(final Date date) {\r\n\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(date);\r\n\r\n\t\tfinal String dayOfMonth = formatDayOfMonth(calendar);\r\n\t\tfinal String month = formatMonth(calendar);\r\n\t\tfinal String year = String.valueOf(calendar.get(Calendar.YEAR));\r\n\r\n\t\treturn String.format(\"%s/%s/%s\", year, month, dayOfMonth);\r\n\t}", "public String extraInfo(){\n return by.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "protected String obterData(String format) {\n\t\tDateFormat formato = new SimpleDateFormat(format);\n\t\tDate data = new Date();\n\t\treturn formato.format(data).toString();\n\t}", "public String getDateOfBirth() {\r\n\t\tString year = Integer.toString(datePicker.getModel().getYear());\r\n\t\tString month = Integer.toString(datePicker.getModel().getMonth()+1);\r\n\t\tString day = Integer.toString(datePicker.getModel().getDay());\r\n\t\tString date = year+\"-\"+month+\"-\"+day;\r\n\t\treturn date;\r\n\t}", "public static String formatDate(Date date){\n\t\tCalendar now = Calendar.getInstance(); // Gets the current date and time\n\t\tint currentYear = now.get(Calendar.YEAR);\n\t\tint dateYear = Integer.parseInt(new SimpleDateFormat(\"yyyy\").format(date));\n\n\t\tif (dateYear <= currentYear){\n\t\t\treturn new SimpleDateFormat(\"E MMM dd HH:mm\").format(date);\n\t\t} else {\n\t\t\treturn new SimpleDateFormat(\"E yyyy MMM dd HH:mm\").format(date);\n\t\t}\n\t}", "public String getJP_AcctDate();", "public static String getStrDate(Date date) {\n //TODO get date\n SimpleDateFormat formatter;\n if (DateUtils.isToday(date.getTime())) {\n formatter = new SimpleDateFormat(\"HH:mm\");\n return formatter.format(date);\n }\n formatter = new SimpleDateFormat(\"MMM dd\");\n return formatter.format(date);\n }", "java.lang.String getDatesEmployedText();", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}", "public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}", "public static Object changeDateFormat(String date)\r\n\t{\n\t\tString temp=\"\";\r\n\t\tint len = date.length();\r\n\t\tfor(int i=0;i<len;i++)\r\n\t\t{\r\n\t\t\tchar ch = date.charAt(i);\r\n\t\t\tif(ch == ',')\r\n\t\t\t{\r\n\t\t\t\ttemp = temp+'/';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttemp = temp+ch;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString n=\"\"+temp.charAt(3)+temp.charAt(4);\r\n\t\tint month=Integer.parseInt(n);\r\n\t\tString m=\"\";\r\n\t\tswitch(month)\r\n\t\t{\r\n\t\t\tcase 1:\r\n\t\t\t\tm=\"jan\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tm=\"feb\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tm=\"mar\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tm=\"apr\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\tm=\"may\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tm=\"jun\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tm=\"jul\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\tm=\"aug\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9:\r\n\t\t\t\tm=\"sep\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10:\r\n\t\t\t\tm=\"oct\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\tm=\"nov\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 12:\r\n\t\t\t\tm=\"dec\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Enter a valid month\");\r\n\t\t\t}\r\n\t\t\tString s=(temp.substring(0, 3)+ m +temp.substring(5));\r\n\t\t\treturn s;\r\n\t\t}", "public Date stringToDate(String d)\n\t{\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"MMM-yyyy\");\n\t\t\n\t\tDate date = new Date();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tdate = format.parse(d);\n\t\t} \n\t\tcatch (ParseException e) \n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn date;\n\t}", "public String dateToString() {\n\t\treturn new String(year + \"/\"\n\t\t\t\t+ month + \"/\"\n\t\t\t\t+ day);\n }", "public static String dateStr(String input ){\n String mm = input.substring(0,2);\n String dd = input.substring(3,5);\n String yyyy = input.substring(6,10);\n return dd + \" - \" + mm + \" - \" + yyyy;\n }", "@Test public void Month_name_1__day__year()\t\t\t\t\t{tst_date_(\"2 Mar 2001\"\t\t\t\t, \"2001-03-02\");}", "public String getDefaultDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMMM d, yyyy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "private String formatDate(String dateStr) {\n try {\n SimpleDateFormat fmt = new SimpleDateFormat(Properties.DATE_FORMAT_ALL);\n Date date = fmt.parse(dateStr);\n SimpleDateFormat fmtOut = new SimpleDateFormat(Properties.DATE_FORMAT);\n return fmtOut.format(date);\n } catch (ParseException e) {\n System.out.println( Properties.K_WARNING + \" \" + e.getMessage());\n }\n return \"\";\n }", "@Override\n public String toString() {\n String byFormatted = by.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n return \"[D]\" + super.toString() + \" (by: \" + byFormatted + \")\";\n }", "public static String getFormattedDate(long time) {\n SimpleDateFormat format = new SimpleDateFormat(\"MMMM dd, yyyy\");\n return format.format(new Date(time));\n }", "public abstract java.lang.String getFecha_inicio();", "public static String dateToString(Date date){\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MMddyy\");\n\t\treturn formatter.format(date);\n\t}", "public String getDate() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn sdf.format(txtDate.getDate());\n\t}", "private void updateLabel() {\n String myFormat = \"dd-MM-YYYY\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n dateInput.setText(sdf.format(myCalendar.getTime()));\n }", "public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "@Test public void Month_name_1__year__day()\t\t\t\t\t{tst_date_(\"2001 Mar 02\"\t\t\t, \"2001-03-02\");}", "public static String FormatDate(int day, int month, int year) {\r\n String jour = Integer.toString(day);\r\n String mois = Integer.toString(month + 1);\r\n if (jour.length() == 1) {\r\n jour = \"0\" + jour;\r\n }\r\n\r\n if (mois.length() == 1) {\r\n mois = \"0\" + mois;\r\n }\r\n return jour + \"/\" + mois + \"/\" + Integer.toString(year);\r\n }", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "public static String formatDate(Date date) {\n\t\tString newstring = new SimpleDateFormat(\"MM-dd-yyyy\").format(date);\n\t\treturn newstring;\n\t}", "public String changeDateFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy\";\n String outputPattern = \"MMMM dd, yyyy\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }", "public static String formartDateYOB(String mDate) {\n\t\t\t\t\n\t\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"dd/mm/yyyy\");\n\t\t\t\t SimpleDateFormat outSDF = new SimpleDateFormat(\"yyyy-mm-dd\");\n\n\t\t\t\t \n\t\t\t\t String outDate = \"\";\n\t\t\t\t \n\t\t\t\t if (mDate != null) {\n\t\t\t\t try {\n\t\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t\t outDate = outSDF.format(date);\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t } catch (Exception ex){ \n\t\t\t\t \tex.printStackTrace();\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t return outDate;\n\t\t\t}", "private String formatDate(String date)\n\t{\n\t\tif(date == null || date.isEmpty())\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString[] dateSplit = date.split(\"/\");\n\t\t\tif(dateSplit.length != 3)\n\t\t\t{\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn getMonthName(dateSplit[0]) + \" \"+ dateSplit[1]+\", \"+ dateSplit[2];\n\t\t\t}\n\t\t}\n\t}", "private String stringifyDate(Date date){\n\t\tDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\treturn dateFormatter.format(date);\n\t}", "public IssueBuilderAbstract dueDateString(int year, int month, int day){\n calendarString = new StringBuilder()\n .append(year)\n .append(\"-\")\n .append(month)\n .append(\"-\")\n .append(day)\n .toString();\n return this;\n }", "public final String obtenerFechaFormateada() {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\");\n return fechaDeLaVisita.get().format(formatter);\n }", "public static String getDate(String year, String month) {\n\t\treturn \"t.posted = \\\"\" + year + \"-\" + month + \"-01 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-02 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-03 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-04 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-05 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-06 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-07 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-08 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-09 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-10 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-11 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-12 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-13 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-14 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-15 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-16 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-17 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-18 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-19 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-20 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-21 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-22 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-23 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-24 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-25 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-26 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-27 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-28 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-29 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-30 00:00:00\\\" or\\r\\n\" + \n\t\t\t\t\"t.posted = \\\"\" + year + \"-\" + month + \"-31 00:00:00\\\" \\r\\n\";\n\t}", "public String getDataNastereString(){\n\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tString sd = df.format(new Date(data_nastere.getTime()));\n\t\treturn sd;\n\t\t\n\t}" ]
[ "0.6754134", "0.67368877", "0.67281234", "0.66939", "0.64831626", "0.6483158", "0.64696425", "0.6423801", "0.63983625", "0.6389483", "0.62795484", "0.6277244", "0.62319946", "0.62319946", "0.62316227", "0.61833805", "0.6175267", "0.6171403", "0.6156943", "0.61323065", "0.6122079", "0.6113171", "0.6112969", "0.610689", "0.6103954", "0.6023726", "0.60216105", "0.60197103", "0.60064274", "0.6003355", "0.59789187", "0.5972518", "0.5970858", "0.59469044", "0.59280443", "0.5916771", "0.59093565", "0.5905465", "0.5884161", "0.5876792", "0.58766955", "0.58735555", "0.5869705", "0.5868995", "0.58633333", "0.5858324", "0.58459175", "0.58423704", "0.58389395", "0.5834129", "0.5818213", "0.5817167", "0.5807593", "0.58047915", "0.58032686", "0.5797867", "0.5793541", "0.5792404", "0.5790412", "0.57888746", "0.5782672", "0.577777", "0.5777322", "0.57728064", "0.5772564", "0.5772395", "0.5772046", "0.577131", "0.57665926", "0.57598054", "0.575483", "0.5754544", "0.57499427", "0.5744692", "0.57443565", "0.57300043", "0.5726672", "0.57215726", "0.5690695", "0.568196", "0.56819296", "0.5681432", "0.5675401", "0.5674322", "0.56714296", "0.5668011", "0.5657596", "0.56479126", "0.5640682", "0.56376284", "0.5637233", "0.563614", "0.563485", "0.5633949", "0.5631791", "0.5613357", "0.55991316", "0.5595", "0.5591698", "0.5591191" ]
0.6664379
4
Kembalikan string tanggal terformat ( "4:30 PM") dari objek Date.
private String formatTime(String dateObject){ SimpleDateFormat input = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); // format kita "HARUS SAMA TIDAK BOLEH FORMATNYA BEDA BAHKAN 1 CHAR PUN SimpleDateFormat output= new SimpleDateFormat("h:mm a"); Date jam = null; try { jam = input.parse(dateObject); } catch (ParseException e) { e.printStackTrace(); } return output.format(jam); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String formatTime(Date dateObject) {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n return timeFormat.format(dateObject);\n }", "public String getTimeString() {\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n\n String AM_PM = \"PM\";\n if (date.get(Calendar.AM_PM) == Calendar.AM) AM_PM = \"AM\";\n\n String hour_fixed = String.valueOf(hour);\n if (hour == 0) hour_fixed = \"12\";\n\n String minute_fixed = String.valueOf(minute);\n while (minute_fixed.length() < 2) {\n minute_fixed = \"0\" + minute_fixed;\n }\n\n return hour_fixed + \":\" + minute_fixed + ' ' + AM_PM;\n }", "private String formatTime(Date dateObject) {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\", Locale.getDefault());\n return timeFormat.format(dateObject);\n }", "public static String TimeFormate() {\n\t\tString time;\n\t\tSimpleDateFormat dateFormat1 = new SimpleDateFormat();\n\t dateFormat1.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t Calendar cal = Calendar.getInstance();\n\t cal.add(Calendar.MINUTE, 3);\n String n=dateFormat1.format(cal.getTime());\n //n=\"03/09/20 8:30 AM\";\n System.out.println(\"Full Date = \" +n);\n int colonindex=n.indexOf(\":\");\n //System.out.println(\": placed= \" +colonindex);\n //String tt =n.substring(colonindex, n.length());\n //System.out.println(\"tt= \" +tt);\n String tt1 =n.substring(colonindex-2,colonindex-1);\n System.out.println(\"tt1= \" +tt1);\n if(tt1.equals(\"1\")) {\n \t time=n.substring(colonindex-2, n.length());\n \t System.out.println(\"Time with two digits in hours= \" +time);\n }\n else {\n \t time=n.substring(colonindex-1, n.length());\n \t System.out.println(\"Time with one digit in hours= \" +time);\n }\n return time;\n\t}", "private String formatTime(Date dateObject)\n {\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\n timeFormat.setTimeZone(Calendar.getInstance().getTimeZone());\n return timeFormat.format(dateObject);\n }", "public static String ShowDate(){\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss.SS a\");\n String HH_MM = sdf.format(date);\n return HH_MM;\n }", "private String getDate() {\n\t\tSimpleDateFormat parseFormat = new SimpleDateFormat(\"hh:mm a\");\n\t\tDate date = new Date();\n\t\tString s = parseFormat.format(date);\n\t\treturn s;\n\t}", "private String formatDate(Date date){\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", Locale.getDefault());\n\n return format.format(date);\n }", "private String formatTime(Date dateObject) {\r\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\r\n return timeFormat.format(dateObject);\r\n }", "public String formatDateAndTime(String date){\n\n return dateTimeFormatter.parse(date).toString();\n\n }", "private String formatDate(String dateObject) {\n SimpleDateFormat input = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\"); // format kita \"HARUS SAMA TIDAK BOLEH FORMATNYA BEDA BAHKAN 1 CHAR PUN\n SimpleDateFormat output= new SimpleDateFormat(\"dd-MM-yyyy\");\n Date tanggal = null;\n try {\n tanggal = input.parse(dateObject);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return output.format(tanggal);\n\n }", "public String toString () {\n String dayTime;\n\n if (isPM == true)\n dayTime = \"PM\";\n\n else\n dayTime = \"AM\";\n\n String hourString = String.format(\"%02d\", hour);\n String minString = String.format(\"%02d\", minute);\n return (hourString + \":\" + minString + \" \" + dayTime);\n }", "public static String getStrDate(Date date) {\n //TODO get date\n SimpleDateFormat formatter;\n if (DateUtils.isToday(date.getTime())) {\n formatter = new SimpleDateFormat(\"HH:mm\");\n return formatter.format(date);\n }\n formatter = new SimpleDateFormat(\"MMM dd\");\n return formatter.format(date);\n }", "private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }", "public static String timeToString(Date date)\r\n/* 24: */ {\r\n/* 25: 31 */ return sdfTime.format(date);\r\n/* 26: */ }", "public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }", "private String formatDateForVSS(Date d) {\n SimpleDateFormat sdf = new SimpleDateFormat(this.dateFormat + \";hh:mma\");\n \t\tString vssFormattedDate = sdf.format(d);\n \t\treturn vssFormattedDate.substring(0, vssFormattedDate.length() - 1);\n \t}", "public String getDateTimeFormated(Context context){\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\"\n , context.getResources().getConfiguration().locale);\n sdf.setTimeZone(TimeZone.getDefault());\n return sdf.format(new Date(mDateTime));\n //setting the dateformat to dd/MM/yyyy HH:mm:ss which is how the date is displayed when a dream is saved\n }", "public static String formatDateForDetails(Timestamp date) {\n SimpleDateFormat format = new SimpleDateFormat(\"dd MMM yyyy | hh:mm aaa\", Locale.getDefault());\n return format.format(new Date(date.getTime()));\n }", "private String prettyTime() {\n String[] dt = time.split(\"T\");\n String[] ymd = dt[0].split(\"-\");\n String[] hms = dt[1].split(\":\");\n\n int hour = Integer.parseInt(hms[0]);\n\n String date = getMonth(Integer.parseInt(ymd[1])) + \" \" + ymd[2] + \", \" + ymd[0];\n String time = (hour > 12 ? hour - 12 : hour) + \":\" + hms[1] + \":\" + hms[2].substring(0, hms[2].indexOf(\".\"));\n return date + \" at \" + time;\n }", "public void testFormatDateStringFromTimestamp_todayDoubleMinutePm() {\n calendar.set(Calendar.HOUR_OF_DAY, 22);\n calendar.set(Calendar.MINUTE, 18);\n assertEquals(\"10:18 PM\",\n ContactInteractionUtil.formatDateStringFromTimestamp(calendar.getTimeInMillis(),\n getContext()));\n }", "public String dar_hora(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return dateFormat.format(date).toString();\n }", "public String convertDateToTime(String date){\n Date test = null;\n if(date !=null) {\n try {\n test = sdf.parse(date);\n } catch (ParseException e) {\n System.out.println(\"Parse not working: \" + e);\n }\n calendar.setTime(test);\n return String.format(\"%02d:%02d\",\n calendar.get(Calendar.HOUR_OF_DAY),\n calendar.get(Calendar.MINUTE)\n );\n }\n return \"n\";\n }", "public String formatoCortoDeFecha(Date fecha){\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n return format.format(fecha);\n }", "private void formatTime() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat ft = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tm_timeSent = ft.format(date).toString();\r\n\t}", "private static String getTime() {\n\t\tDate getDate = new Date();\n\t\tString timeFormat = \"M/d/yy hh:mma\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(timeFormat);\n\t\treturn \"[\" + sdf.format(getDate) + \"]\\t\";\n\t}", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "public void mostrarHora(String formato){\n Date objDate = new Date();\n SimpleDateFormat objSDF = new SimpleDateFormat(formato);\n //este sera el resultado de la fechas\n fecha=objSDF.format(objDate);\n }", "public static String formatDateTime(String date) {\n\t\tif(date == null) return \"\";\n\t\tdate = date.trim();\n\t\tif(date.equals(\"&nbsp;\")) return \"\";\n\t\tif (date.length() == 0 || date.length() != 14) return date;\n\t\tdate = date.substring(0,4) + \"/\" + date.substring(4,6) \n\t\t\t\t+ \"/\" + date.substring(6,8)\n\t\t\t\t+\" \"+date.substring(8,10)\n\t\t\t\t+\":\"+date.substring(10,12)\n\t\t\t\t+\":\"+date.substring(12,14);\n\t\treturn date;\n\t}", "public void date_zone() {\n\n JLabel lbl_date = new JLabel(\"Date du Rapport :\");\n lbl_date.setBounds(40, 90, 119, 16);\n add(lbl_date);\n String date = rapport_visite.elementAt(DAO_Rapport.indice)[2];\n Date date_n = null;\n\n\n // *** note that it's \"yyyy-MM-dd hh:mm:ss\" not \"yyyy-mm-dd hh:mm:ss\"\n SimpleDateFormat dt = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n try {\n date_n = dt.parse(date);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // *** same for the format String below\n SimpleDateFormat dt1 = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n JTextField date_rapport = new JTextField();\n date_rapport.setBounds(200, 90, 125, 22);\n date_rapport.setText(dt1.format(date_n));\n date_rapport.setEditable(false);\n add(date_rapport);\n\n\n\n\n }", "private static String timeFor(Date date)\n\t{\n\t\tDateFormat df = new InternetDateFormat();\n\t\tString theTime = df.format(date);\n\t\treturn theTime;\n\t}", "public static String formatDate(Date time) {\n\t\tSimpleDateFormat df = new SimpleDateFormat(PreferenceProperties.JMS_DATE_FORMAT);\n\t\treturn df.format(time);\n\t}", "private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }", "public static String formatTime(String userTime, String date) {\r\n\r\n\t\t\tint n = Integer.parseInt(userTime.substring(0, 2)) + 5;\r\n\r\n\t\t\tswitch (n) {\r\n\r\n\t\t\tcase 24:\r\n\t\t\t\tn = 0;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 25:\r\n\t\t\t\tn = 1;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 26:\r\n\t\t\t\tn = 2;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tn = 3;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// extracting hour\r\n\t\t\tString hourChange = String.valueOf(n);\r\n\r\n\t\t\tStringBuilder time = new StringBuilder(userTime);\r\n\r\n\t\t\tif (hourChange.length() == 1) {\r\n\r\n\t\t\t\ttime.replace(0, 2, \"0\" + hourChange);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\ttime.replace(0, 2, hourChange);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tString formattedString = date + \" \" + time + \":00\";\r\n\r\n\t\t\treturn formattedString;\r\n\r\n\t\t}", "private String formatDate (Date date) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss\", Locale.ENGLISH);\n return sdf.format(date);\n }", "public String getFormattedTimeOnly(DateTime date) {\n String datePattern = context.getString(R.string.general_date_pattern_time_only);\n DateTimeFormatter dtfOut = DateTimeFormat.forPattern(datePattern);\n return dtfOut.print(date);\n }", "public String amOrpm() {\n\t\tif (this.total % 24 < 12) {\n\t\t\treturn \"AM\";\n\t\t} else {\n\t\t\treturn \"PM\";\n\t\t}\n\t}", "public static String getDateAndTime() {\n Calendar JCalendar = Calendar.getInstance();\n String JMonth = JCalendar.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.UK);\n String JDate = JCalendar.getDisplayName(Calendar.DATE, Calendar.LONG, Locale.UK);\n String JHour = JCalendar.getDisplayName(Calendar.HOUR, Calendar.LONG, Locale.UK);\n String JSec = JCalendar.getDisplayName(Calendar.SECOND, Calendar.LONG, Locale.UK);\n\n return JDate + \"th \" + JMonth + \"/\" + JHour + \".\" + JSec + \"/24hours\";\n }", "public String getTime() {\n boolean pastNoon = hour >= 12;\n if(pastNoon && hour == 12) {\n return hour + \"pm\";\n }\n else if(pastNoon) {\n return (hour - 12) + \"pm\";\n }\n else if(hour == 0) {\n return \"12am\";\n }\n else {\n return hour + \"am\";\n }\n }", "private static String timeHandler(String date) {\n SimpleDateFormat dbFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n SimpleDateFormat dayFormat = new SimpleDateFormat(\"MM-dd\");\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n dbFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String today = dayFormat.format(new Date());\n String day = \"\";\n String time = \"\";\n try {\n time = timeFormat.format(dbFormat.parse(date));\n day = dayFormat.format(dbFormat.parse(date));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (day.equals(today)) {\n return \"Today \" + time;\n } else if (day.equals(dayFormat.format(yesterday()))) {\n return \"Yesterday \" + time;\n } else {\n return day + \" \" + time;\n }\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public String getFechatxt(Date d){\n \n try {\n String formato = selectorfecha.getDateFormatString();\n //Formato\n \n SimpleDateFormat sdf = new SimpleDateFormat(formato);\n String txtfechap = sdf.format(d);\n return txtfechap;\n } catch (NullPointerException ex) {\n JOptionPane.showMessageDialog(this, \"Al menos selecciona una fecha válida!\", \"Error!\", JOptionPane.INFORMATION_MESSAGE);\n return null;\n\n }\n\n\n \n }", "public String changeDateTimeFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy hh:mm a\";\n String outputPattern = \"MMMM dd, yyyy hh:mm a\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }", "public static String getDateTime() {\n\t\tString sDateTime=\"\";\n\t\ttry {\n\t\t\tSimpleDateFormat sdfDate = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\tSimpleDateFormat sdfTime = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tDate now = new Date();\n\t\t\tString strDate = sdfDate.format(now);\n\t\t\tString strTime = sdfTime.format(now);\n\t\t\tstrTime = strTime.replace(\":\", \"-\");\n\t\t\tsDateTime = \"D\" + strDate + \"_T\" + strTime;\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e);\n\t\t}\n\t\treturn sDateTime;\n\t}", "private String covertTo12hrFormat(String hoursString, String minutesString, boolean showMeridiem) {\n\t\tint hours = Integer.parseInt(hoursString);\n\t\t//If hours valued > 12 will return hours differed by 12 and preceded by string PM\n\t\tif(hours>12)\n\t\t{\n\t\t\thours=hours-12;\n\t\t\t\n\t\t\treturn hours+ \":\" + minutesString +( showMeridiem ? \" \"+getAM_PM_Locale(\"PM\")+\"\" : \"\");\n\t\t\t//return ( hours<10 ? ( \"0\" + hours) : hours ) + \":\" + minutesString +( showMeridiem ? \" PM\" : \"\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\t * If hours value = 0 will return hours as 12 and preceded by string PM\n\t\t\t * If hours value = 12 will return hours and preceded by string AM\n\t\t\t * If hours value < 12 will return hours and preceded by string AM\n\t\t\t */\n\t\t\tif(hours==0)\n\t\t\t\treturn \"12:\" + minutesString +( showMeridiem ? \" \"+getAM_PM_Locale(\"AM\")+\"\" : \"\");\n\t\t\telse if( hours == 12)\n\t\t\t\treturn hours + \":\" + minutesString +( showMeridiem ? \" \"+getAM_PM_Locale(\"PM\")+\"\" : \"\");\n\t\t\telse\n\t\t\t\treturn hours + \":\" + minutesString +( showMeridiem ? \" \"+getAM_PM_Locale(\"AM\")+\"\" : \"\");\n\t\t\t\t//return ( hours<10 ? ( \"0\" + hours) : hours ) + \":\" + minutesString +( showMeridiem ? \" AM\" : \"\");\n\t\t}\n\n\t}", "public String getTimeString(){\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(hourPicker.getValue())\n .append(':')\n .append(minutePicker.getValue())\n .append(':')\n .append(secondsPicker.getValue())\n .append('.')\n .append(decimalPicker.getValue());\n return sBuilder.toString();\n }", "public String getAtString() {\r\n return new SimpleDateFormat(\"dd MMM yyyy hh:mm aa\").format(this.at);\r\n }", "public static void showMeswithTime(String str){\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tString date = df.format(new Date());\r\n\t\tSystem.out.println(date+\" : \"+str);\r\n\t}", "private String getDateTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y K:mm:ss a\");\n //12 hour time\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelTwo.setText(otherDateTime);\n //setting clock text to formatted String\n }", "private String convertToAMPM(Date time) {\r\n\r\n String modifier = \"\";\r\n String dateTime = Util.formateDate(time, \"yyyy-MM-dd HH:mm\");\r\n\r\n\r\n // Get the raw time\r\n String rawTime = dateTime.split(\" \")[1];\r\n // Get the hour as 24 time and minutes\r\n String hour24 = rawTime.split(\":\")[0];\r\n String minutes = rawTime.split(\":\")[1];\r\n // Convert the hour\r\n Integer hour = Integer.parseInt(hour24);\r\n\r\n if (hour != 12 && hour != 0) {\r\n modifier = hour < 12 ? \"am\" : \"pm\";\r\n hour %= 12;\r\n } else {\r\n modifier = (hour == 12 ? \"pm\" : \"am\");\r\n hour = 12;\r\n }\r\n // Concat and return\r\n return hour.toString() + \":\" + minutes + \" \" + modifier;\r\n }", "public static String m24132a(Context context, Date date, String str) {\n return context != null ? new SimpleDateFormat(str, Locale.US).format(date) : \"\";\n }", "private String formatarData(Date data)\n {\n String sDate;\n String sDia = \"\";\n String sMes = \"\";\n\n GregorianCalendar calendar = new GregorianCalendar();\n calendar.setTime(data);\n int dia = calendar.get(GregorianCalendar.DAY_OF_MONTH);\n if (dia > 0) {\n if (dia < 10) {\n sDia = \"0\";\n }\n }\n sDia += dia;\n\n int mes = calendar.get(GregorianCalendar.MONTH);\n mes = mes + 1;\n if (mes > 0) {\n if (mes < 10) {\n sMes = \"0\";\n }\n }\n sMes += mes;\n\n int ano = calendar.get(GregorianCalendar.YEAR);\n\n int hora = calendar.get(GregorianCalendar.HOUR);\n // 0 = dia\n // 1 = noite\n int amPm = calendar.get(GregorianCalendar.AM_PM);\n\n if(amPm == 1)\n {\n if(hora>0 && hora < 13)\n {\n if(hora > 11)\n hora = 0;\n else\n hora += 12;\n }\n }\n\n String sHora = \" \";\n if(hora<=9)\n {\n sHora += \"0\";\n }\n String sMin=\":\";\n int min = calendar.get(GregorianCalendar.MINUTE);\n if(min <10)\n sMin += \"0\";\n sMin += String.valueOf(min);\n sHora += String.valueOf(hora) + sMin + \":00\";\n sDate = String.valueOf(ano) + \"-\" + sMes + \"-\" + sDia + sHora;\n return sDate;\n\n }", "public static String fromDate(String s){\n \t\t\n \t\tString[] date = s.split(\"T\");\n \t\tString time = date[1].substring(0,5);\n \t\tString[] dates = date[0].split(\"-\"); \n \t\tString month = dates[1];\n \t\tString day = dates[2];\n \t\t\n \t\treturn day + \"/\" + month + \", kl: \" + time;\n \t}", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public static String formatDateToDefault(Date date)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", Locale.getDefault());\n\t\tformat.setTimeZone(TimeZone.getDefault());\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public static String formatDateToDateTimePickerView(Date date) {\r\n if (date != null) {\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy hh:mm:ss\");\r\n return formatter.format(date);\r\n }\r\n return \"\";\r\n }", "public String getTime(DateTime date) {\n DateTimeFormatter time = DateTimeFormat.forPattern(\"hh:mm a\");\n return date.toString(time);\n }", "String getSpokenDateString(Context context) {\n int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE;\n return DateUtils.formatDateTime(context, mDeliveryTime, flags);\n }", "public static String dateToString(Date date)\r\n/* 19: */ {\r\n/* 20: 23 */ return sdfDate.format(date);\r\n/* 21: */ }", "private String getTimeFormat() {\r\n return mData.getConfiguration(\"x-labels-time-format\", \"yyyy-MM-dd\");\r\n }", "public String getFormatedTime() {\n DateFormat displayFormat = new SimpleDateFormat(\"HH:mm\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public String getTimeAndDate() {\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd MMM hh:mm\");\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tString dateAndTime = dateFormat.format(cal.getTime());\n\t\t\treturn dateAndTime;\n\t\t}", "public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat format = new SimpleDateFormat(\"E, MMM d y HH:mm:ss\");\n //set format of clock\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y KK:mm:ss a\");\n //12 hour time\n\n String dateTime = format.format(date);\n //formatting date object using format template\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelOne.setText(dateTime);\n //setting clock text to formatted String\n }", "public String getRegDepTime(){\n\t\tString[] regularTime = this.depTime.split(\":\");\n\t\t\n\t\tint hours = Integer.parseInt(regularTime[0]);\n\t\tint depTimeHours;\n\t\tif(hours<12){\n\t\t\tdepTimeHours = hours;\n\t\t\treturn regularTime[0] + \":\" + regularTime[1] + \"AM\";\n\t\t\t\n\t\t}\n\t\telse if(hours == 12){\n\t\t\tdepTimeHours = hours;\t\t\n\t\t\treturn regularTime[0] + \":\" + regularTime[1] + \"PM\";\n\t\t}\n\t\telse{\n\t\t depTimeHours = hours-12;\n\t\t\tregularTime[0] = String.valueOf(depTimeHours);\n\t\t\treturn regularTime[0] + \":\" + regularTime[1] + \"PM\";\n\t\t}\n\t}", "public static String formartDateMpesa(String mDate) {\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tSimpleDateFormat outSDF = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n\t\t\t String outDate = \"\";\n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}", "public String getTime()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"HH:mm\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "@Override\n public String toString() {\n // Jahr, immer 4-stellig (führenden Nullen)\n String j = String.format(\"%04d\", jahr());\n\n // Monat, immer 2-stellig (führende Null)\n String m = String.format(\"%02d\", monat());\n\n // Tag, immer 2-stellig (führende Null)\n String t = String.format(\"%02d\", tag());\n\n // Trennzeichen (char -> String für String.join())\n String tz = String.valueOf(separator);\n\n // Setzt Datum entsprechend dem festgelegten format zusammen\n String datum = switch (format) {\n case \"jmt\" -> String.join(tz, j, m, t);\n case \"tmj\" -> String.join(tz, t, m, j);\n case \"mtj\" -> String.join(tz, m, t, j);\n default -> \"Usage: jmt/tmj/mtj\";\n };\n return datum;\n }", "public void getTanggalKelahiran() {\r\n Date tanggalKelahiran = new Date(getTahunLahir() - 1900, getBulanLahir() - 1, getTanggalLahir());\r\n SimpleDateFormat ft = new SimpleDateFormat(\"dd - MM - yyyy\");\r\n System.out.println(ft.format(tanggalKelahiran));\r\n }", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "public String retornaHora(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat hora = new SimpleDateFormat(\"HH\");\n\t\tSimpleDateFormat minuto = new SimpleDateFormat(\"mm\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn hora.format(calendar.getTime()) + \"h\" + minuto.format(calendar.getTime());\n\t}", "private static String time() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH-mm-ss \");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public static Date formatDateFromDateTimePickerView(String date) {\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy hh:mm:ss\");\r\n try {\r\n return formatter.parse(date);\r\n } catch (ParseException e) {\r\n play.Logger.debug(\"At FormatUtils.formatDateFromDateTimePickerView -> Tidak dapat melakukan parsing tanggal!\");\r\n }\r\n return null;\r\n }", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "private static String dateChange(int time) {\n int hour = time / 3600;\n time %= 3600;\n int minute = time / 60;\n int second = time % 60;\n\n String strHour = hour > 9 ? String.valueOf(hour) : \"0\" + hour;\n String strMinute = minute > 9 ? String.valueOf(minute) : \"0\" + minute;\n String strSecond = second > 9 ? String.valueOf(second) : \"0\" + second;\n\n return String.join(\":\", strHour, strMinute, strSecond);\n }", "public String date(int lmao) {\r\n switch (lmao) {\r\n case 1:\r\n return time.showDay();\r\n\r\n case 2:\r\n return time.showMonth();\r\n\r\n case 3:\r\n return time.showYear();\r\n\r\n case 4:\r\n return time.showDay() + \"/\" + time.showMonth() + \"/\" + time.showYear();\r\n\r\n default:\r\n return \"error\";\r\n }\r\n }", "public static String formatDate(String strDate, boolean TimeOnly) {\n Date date = new Date();\n String finalDate = \"\";\n try {\n date = SDF_ISO_8601.parse(strDate);\n Calendar c = new GregorianCalendar(Locale.getDefault());\n TimeZone tzGMT = TimeZone.getTimeZone(\"GMT\");\n // c.setTimeZone(tzGMT);\n c.setTimeInMillis(date.getTime());\n\n if (IsDateToday(strDate)) {\n finalDate = String.format(\n \"Today at %02d:%02d %s\",\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else if (IsDateYesterday(strDate)) {\n finalDate = String.format(\n \"Yesterday at %02d:%02d%s\",\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else if (IsDateWithinThisWeek(strDate)) {\n finalDate = String.format(\n \"%s %02d:%02d %s\",\n DaysOfWeek[c.get(Calendar.DAY_OF_WEEK) - 1],\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else {\n finalDate = String.format(\n \"%s %s %s at %02d:%02d %s\",\n Months[c.get(Calendar.MONTH)],\n c.get(Calendar.DATE),\n c.get(Calendar.YEAR),\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n }\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return finalDate;\n\n }", "public static Date formatDateFromDatePickerView(String date) {\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy hh:mm:ss\");\r\n try {\r\n return formatter.parse(date);\r\n } catch (ParseException e) {\r\n play.Logger.debug(\"At FormatUtils.formatDateFromDatePickerView -> Tidak dapat melakukan parsing tanggal!\");\r\n }\r\n return null;\r\n }", "private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.parse(d);\n System.out.println(df.format(parse));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public static String displayTimeDate(Calendar cal)\n\t{\n\t\tString out = \"\";\n\t\tint year = cal.get(Calendar.YEAR);\n\t\tint month = cal.get(Calendar.MONTH) + 1;\n\t\tint day = cal.get(Calendar.DAY_OF_MONTH);\n\t\tint hour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tint minute = cal.get(Calendar.MINUTE);\n\t\tint second = cal.get(Calendar.SECOND);\n\t\tint zone = cal.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000) * 4;\n\t\t\n\t\tString year_str = String.valueOf(year);\n\t\tString month_str = String.valueOf(month);\n\t\tString day_str = String.valueOf(day);\n\t\tString hour_str = String.valueOf(hour);\n\t\tString minute_str = String.valueOf(minute);\n\t\tString second_str = String.valueOf(second);\n\t\tString zone_str = String.valueOf(zone);\n\t\t\n\t\tif (year_str.length() < 2) year_str = \"0\" + year_str;\n\t\tif (month_str.length() < 2) month_str = \"0\" + month_str;\n\t\tif (day_str.length() < 2) day_str = \"0\" + day_str;\n\t\tif (hour_str.length() < 2) hour_str = \"0\" + hour_str;\n\t\tif (minute_str.length() < 2) minute_str = \"0\" + minute_str;\n\t\tif (second_str.length() < 2) second_str = \"0\" + second_str;\n\t\t\n\t\tout = hour_str + \":\" + minute_str + \":\" + second_str + \" \";\n\t\tout = out + day_str + \"-\" + month_str + \"-\" + year_str; //+\" GMT\"+zone_str ;\n\t\treturn out;\n\t}", "public String formatDate (Date date){\r\n\t\tDateFormat df = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm:ss z\", Locale.ENGLISH);\r\n\t\treturn df.format(date);\r\n\t}", "private String calculaTempo(Date dtTileLine) {\n\t\treturn \"2 minutos atrás (\"+dtTileLine.toString()+\")\";\n\t}", "String getDateString(Context context) {\n int flags = DateUtils.FORMAT_NO_NOON_MIDNIGHT | DateUtils.FORMAT_SHOW_TIME |\n DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE |\n DateUtils.FORMAT_CAP_AMPM;\n return DateUtils.formatDateTime(context, mDeliveryTime, flags);\n }", "java.lang.String getDate();", "public String getTimeString() {\n DateFormat format = new SimpleDateFormat(\"HH:mm\");\n return format.format(mDate);\n }", "public static String formatDate(Date date, String userId)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", getPreferredLocale(userId));\n\t\tformat.setTimeZone(getPreferredTimeZone(userId));\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "static String timeConversion(String s) {\n /*\n * Write your code here.\n */\n String conversion = \"\";\n String time = s.substring(s.length()-2,s.length());\n String hour = s.substring(0,2);\n if(time.equals(\"AM\")){\n if(Integer.parseInt(hour)==12){\n conversion = \"00\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = s.substring(0,s.length()-2);\n }\n }else{\n if(Integer.parseInt(hour)==12){\n conversion = \"12\"+s.substring(2,s.length()-2);\n }\n else{\n conversion = (Integer.parseInt(hour)+12) + s.substring(2,s.length()-2);\n }\n }\n\n return conversion;\n }", "public String getSystemDateTime() {\n\t\tjava.text.SimpleDateFormat sdfDate = new java.text.SimpleDateFormat(\"yyyy/MM/dd\");\n java.text.SimpleDateFormat sdfTime = new java.text.SimpleDateFormat(\"HH:mm\");\n Date now = new Date();\n String strDate = sdfDate.format(now);\n String strTime = sdfTime.format(now);\n System.out.println(\"Date: \" + strDate);\n System.out.println(\"Time: \" + strTime); \n return \"date\"+strDate+\" \"+strTime;\n\t}", "private String formatDateTime(String inputDateTime) throws ParseException {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n simpleDateFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n Date myDate = simpleDateFormat.parse(inputDateTime);\n DateFormat outputFormat = new SimpleDateFormat(\"M/d/yy, h:mm aa\");\n DateFormat todayFormat = new SimpleDateFormat(\"h:mm aa\");\n String outputDateStr = \"\";\n if (isToday(inputDateTime.split(\" \")[0])){\n outputDateStr = \"Today, \" + todayFormat.format(myDate);\n } else {\n outputDateStr = outputFormat.format(myDate);\n }\n return outputDateStr;\n }", "public String formatDate(Object valor) {\r\n\t\tString aux = valor.toString();\r\n\t\tif (!aux.equalsIgnoreCase(\"&nbsp;\") && !aux.equalsIgnoreCase(\"\")) {\r\n\t\t\tString anio = aux.substring(0, 4);\r\n\t\t\tString mes = aux.substring(4, 6);\r\n\t\t\tString dia = aux.substring(6);\r\n\t\t\treturn dia + \"/\" + mes + \"/\" + anio;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn aux;\r\n\t}", "private void updateTimeTxtV()\n {\n String timeFormat =\"hh:mm aaa\";//12:08 PM\n SimpleDateFormat stf = new SimpleDateFormat(timeFormat, Locale.CANADA);\n timeStr = stf.format(cal.getTime());\n timeTxtV.setText(timeStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }", "java.lang.String getToDate();", "public static String getDateAndTimeString(String format, Date date)\r\n\t{\r\n\r\n\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);\r\n\t\tString dateandtime = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tdateandtime = simpleDateFormat.format(date);\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\tlogger.cterror(\"CTBAS00119\", e, format);\r\n\t\t}\r\n\t\treturn dateandtime;\r\n\t}", "private String formatTime(LocalDateTime time){\n return time.getYear() + \"-\" + time.getMonthValue() + \"-\" + time.getDayOfMonth()\n + \" \" + time.getMinute() + \":\" + time.getSecond();\n }", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "public String getDateHourRepresentation()\n\t{\n\t\tchar[] charArr = new char[13];\n\t\tcharArr[2] = charArr[5] = charArr[10] = '/';\n\t\tint day = m_day;\n\t\tint month = m_month;\n\t\tint year = m_year;\n\t\tint hour = m_hour;\n\t\tfor(int i = 0; i < 2; i++)\n\t\t{\n\t\t\tcharArr[1 - i] = Character.forDigit(day % 10, 10);\n\t\t\tcharArr[4 - i] = Character.forDigit(month % 10, 10);\n\t\t\tcharArr[12 - i] = Character.forDigit(hour % 10, 10);\n\t\t\tday /= 10;\n\t\t\tmonth /= 10;\n\t\t\thour /=10;\n \t\t}\n\t\tfor(int i = 0; i < 4; i++)\n\t\t{\n\t\t\tcharArr[9 - i] = Character.forDigit(year % 10, 10);\n\t\t\tyear /= 10;\n\t\t}\n\t\treturn new String(charArr);\n\t}", "public static String getTimeString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss yyyy\");\n return formatter.format(new java.util.Date());\n }" ]
[ "0.669324", "0.6671369", "0.660384", "0.6569092", "0.65563357", "0.6548065", "0.65292406", "0.6513306", "0.6472938", "0.6447109", "0.63412243", "0.63174415", "0.6311471", "0.62622106", "0.6250737", "0.6196612", "0.61543816", "0.61437523", "0.61241895", "0.6083335", "0.6078358", "0.6075829", "0.6073299", "0.6070032", "0.6039813", "0.6019336", "0.60101014", "0.5998031", "0.5993337", "0.5990135", "0.59887487", "0.5975523", "0.5972691", "0.59707165", "0.5970241", "0.5969532", "0.5968216", "0.5967079", "0.59650785", "0.59593844", "0.5931195", "0.5931195", "0.59303224", "0.5930234", "0.591691", "0.5907171", "0.5900548", "0.5895374", "0.5891101", "0.5888026", "0.5885311", "0.58809435", "0.58654404", "0.5863177", "0.58578795", "0.5849312", "0.5834409", "0.58274883", "0.58267456", "0.58223015", "0.5821067", "0.58176106", "0.58121765", "0.58054674", "0.579781", "0.5793507", "0.57925284", "0.57842904", "0.5779399", "0.57743675", "0.5772521", "0.5767567", "0.57595336", "0.5741435", "0.5739498", "0.5738813", "0.573376", "0.5728854", "0.57259065", "0.57237405", "0.57194495", "0.5719308", "0.57155585", "0.57115865", "0.57095736", "0.5701566", "0.5698072", "0.56946874", "0.5694555", "0.5692332", "0.56894433", "0.5678442", "0.56779444", "0.56669486", "0.56646043", "0.56542945", "0.5653713", "0.5647929", "0.564599", "0.564452" ]
0.6881758
0
Test of addListener method, of class WorkspaceImpl.
@Test public void testAddListener() { // workspace listener MockWorkspaceListener listener = new MockWorkspaceListener(); workspace.addListener(listener); workspace.addSubModule(eBuffer); content.addDefaultNode(node1); workspace.receiveLocalAssociation(content); assertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer); assertTrue(listener.content.containsNode(node1)); // cue listener MockCueListener cueListener = new MockCueListener(); workspace.addListener(cueListener); content.addDefaultNode(node2); workspace.cueEpisodicMemories(content); NodeStructure ns = cueListener.ns; assertNotNull(ns); assertTrue(ns.containsNode(node1)); assertTrue(ns.containsNode(node2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testAddWorkspaceListener() {\r\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\t}", "public abstract void addListener(RegistryChangeListener listener);", "@Override\n\tpublic void addListener() {\n\t\t\n\t}", "abstract public void addListener(Listener listener);", "public interface WorkspaceListener {\n\n /**\n * Called by the workspace handler if its state is updated.\n * \n * @param type The type of state update\n */\n void update(Type type);\n\n /**\n * Enumeration of types of workspace state update.\n */\n enum Type {\n WORKSPACE, CURRENT_GRAPH, CAMPAIGNS, GRAPHS, STATISTICS\n }\n\n }", "public abstract void registerListeners();", "public void addListener(\n IListener listener\n )\n {listeners.add(listener);}", "@Override\r\n public void addNotify() {\r\n super.addNotify();\r\n \r\n // add listener\r\n component.getResults().addLabTestListener(this);\r\n }", "static //@Override\n\tpublic void addListener(final Listener listener) {\n\t\tif (null == stListeners) {\n\t\t\tstListeners = new LinkedList<>();\n\t\t}\n\t\tstListeners.add(listener);\n\t}", "void addChangeListener( RegistryListener listener );", "public void addListener(EventListener listener);", "private static void registerEventListener() {\r\n\r\n log.info(\"Registering event listener for Listeners\"); //$NON-NLS-1$\r\n\r\n try {\r\n ObservationManager observationManager = ContentRepository\r\n .getHierarchyManager(ContentRepository.CONFIG)\r\n .getWorkspace()\r\n .getObservationManager();\r\n\r\n observationManager.addEventListener(new EventListener() {\r\n\r\n public void onEvent(EventIterator iterator) {\r\n // reload everything\r\n reload();\r\n }\r\n }, Event.NODE_ADDED\r\n | Event.NODE_REMOVED\r\n | Event.PROPERTY_ADDED\r\n | Event.PROPERTY_CHANGED\r\n | Event.PROPERTY_REMOVED, \"/\" + CONFIG_PAGE + \"/\" + \"IPConfig\", true, null, null, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n }\r\n catch (RepositoryException e) {\r\n log.error(\"Unable to add event listeners for Listeners\", e); //$NON-NLS-1$\r\n }\r\n }", "void registerListeners();", "@Override\n public <T extends EventListener> void addListener(T t) {\n\n }", "void addListener(BotListener l);", "public abstract void addListener(EventListener eventListener, String componentName);", "public void addListener(GridListener listener) {\n listeners.add(listener);\n }", "void addBoardListener(BoardListener boardListener);", "public synchronized void addJsimListener (JsimListener t)\n {\n jsimListeners.add (t);\n \n }", "protected void registerListener() {\r\n\t\t// do nothing\r\n\t}", "@Test\n public void testAddEventListener() {\n List<SimulatorEventListener> eventListeners = eventDispatcher.getSimulatorEventListeners();\n assertTrue(eventListeners.size() == 0);\n SimulatorEventListener listener = new SimulatorEventListener() {\n\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n\n }\n };\n eventDispatcher.addSimulatorEventListener(listener);\n assertTrue(eventListeners.size() == 1);\n }", "private void registerListener(){\n game.addPropertyChangeListener(PROPERTY_GAME, evt -> {\r\n refresh();\r\n });\r\n }", "public void addProjectChangedListener(final ProjectChangedListener listener) {\r\n if (listener != null) {\r\n final Vector listeners = getProjectChangedListeners();\r\n if (!listeners.contains(listener)) {\r\n listeners.add(listener);\r\n }\r\n }\r\n }", "protected final void addListener(DialogModuleChangeListener listener) {\n listeners.add(listener);\n }", "void addListener(GameEventListener listener);", "default void addListener(Runnable listener) {\n\t\tthis.getItemListeners().add(listener);\n\t}", "public void addListener(Listener listener) {\n m_listeners.add(listener);\n }", "@Test\n public void testIAEForAddListener() {\n try {\n final Registrar<Object> testSubject = onCreateTestSubject();\n testSubject.addListener(null);\n fail(\"IAE was not thrown\");\n } catch (IllegalArgumentException e) {\n // okay\n }\n }", "void addListener(PromiseListener promiseListener);", "@Override\n public void addListener(String className) {\n\n }", "void addListener( ConfigurationListener listener );", "protected void installListeners() {\n }", "protected void installListeners() {\n }", "public void addChangeListener(ChangeListener l) {\n }", "public void addChangeListener(ChangeListener l) {\n }", "public void register() {\n\t\tworkbenchWindow.getPartService().addPartListener(this);\n\t}", "protected void addWorkspace( String workspaceName ) {\n }", "void addChangeListener(ChangeListener cl);", "void addListener(ChangeListener<? super T> listener);", "void addChangeListener(ChangeListener listener);", "public void addListener(MoocListener listener) {\n\n\t\ttry {\n\t\t\t logger.info(\"add listener in MoocChannel is called and its \"+handler);\n\t\t\thandler.addListener(listener);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"failed to add listener\", e);\n\t\t}\n\t}", "public void addListener(GrillEventListener listener);", "@Override\n\t\t\t\tpublic void onAddFail() {\n\t\t\t\t\tif (addListener != null) {\n\t\t\t\t\t\taddListener.onAddFail();\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public void registerConnectorListener(RemoteConnectorListener listener) {\n connectorListeners.add(listener);\n }", "protected void installListeners() {\n\n\t}", "public void testAddModelElementChangeListener() {\n ModelElementChangeListenerMock listener = new ModelElementChangeListenerMock();\n instance.addModelElementChangeListener(listener);\n instance.firePropertyChangeEvent(new GuardImpl(), PropertyKind.ACTIVE, PropertyOperation.MODIFY, \"accuracy\");\n assertTrue(\"Failed to add the listener.\", listener.IsCalled());\n }", "private void addListeners() {\n \t\tfHistoryListener= new HistoryListener();\n \t\tfHistory.addOperationHistoryListener(fHistoryListener);\n \t\tlistenToTextChanges(true);\n \t}", "void addListener(IEventChannelListener<K, V> listener);", "@Override\n protected void addListener() {\n button.addActionListener(new DeleteWorkoutButton.ClickHandler());\n }", "public void addChangeListener(ChangeListener stackEngineListener);", "private void addListener(org.eclipse.swt.widgets.Tree tree) {\n\t\t// Listener fuer \"Folder auf machen\"\n\t\ttree.addListener(SWT.Expand, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\thandleFolderOpen(event);\n\t\t\t}\n\t\t});\n\t\t// Listener fuer \"Folder auf machen\"\n\t\ttree.addListener(SWT.Collapse, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\thandleFolderClose(event);\n\t\t\t}\n\t\t});\n\t\t// Listener fuer die Aktionen\n\t\ttree.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\thandleSelect(e);\n\t\t\t}\n\t\t});\n\t}", "public void addListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;", "@Override\n public void addListener(DisplayEventListener listener) {\n listenerList.add(DisplayEventListener.class, listener);\n }", "public void addListener( DatabaseUpdaterListener listener ) {\n\t\tsynchronized( listeners_ ) {\n\t\t\tif( ! listeners_.contains(listener) ) { \n\t\t\t\tlisteners_.add(listener);\n\t\t\t}\n\t\t}\n\t}", "public interface WorldSwitchListener {\n\n /**\n * Called when player switched world\n *\n * @param changed\n * Player who changed world\n * @param from\n * Name of previous world\n * @param to\n * Name of new world\n */\n void onWorldChange(@NotNull TabPlayer changed, @NotNull String from, @NotNull String to);\n}", "protected void installListeners() {\n\t}", "void addRefreshListener(RefreshListener listener) throws RemoteException;", "public void addChangeListener(ChangeListener listener) { _changeListeners.add(listener); }", "public void addListener(SchedulerListener toAdd) {\n\t\tlisteners.add(toAdd);\n\t}", "void addListener( AvailabilityListener listener );", "void setAddListener(AddNeededCollaborationListener addNeededCollaborationListener);", "public void addChangeListener(ChangeListener l) {\n repositoryStep.addChangeListener(l);\n }", "@Override\n public void addChangeListener(ChangeListener l) {\n }", "@Override\n public void addChangeListener(ChangeListener l) {\n }", "Move listen(IListener ll);", "@Override\n\tpublic void addToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "protected void listener(Listener listener) {\n Bukkit.getServer().getPluginManager().registerEvents(listener, RedPractice.getInstance());\n }", "@Override\n public void addListener(Class<? extends EventListener> listenerClass) {\n\n }", "void registerUpdateListener(IUpdateListener listener);", "@Test\r\n\tpublic void testAddCueListener() {\r\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addCueListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "public void addNPTListener(NPTListener l){}", "public void addListener(ClickListener listener);", "public void registerListener(RMContainerRegistryListener listener)throws IllegalArgumentException{\n \tif(theListener != null && theListener != listener){\n \t\tthrow new IllegalArgumentException(\"Another is already registered. Registration of more listeners is not supported\");\n \t}\n \ttheListener = listener;\n }", "@Test\n\tpublic void testAddThenRemoveListener() throws SailException {\n\t\twrapper.addConnectionListener(listener);\n\t\tverify(delegate).addConnectionListener(listener);\n\t\twrapper.removeConnectionListener(listener);\n\t\tverify(delegate).removeConnectionListener(listener);\n\t}", "public int addListener(Value listener) {\n\n IApplication adapter = new IApplication() {\n private boolean execute(Value jsObject, String memberName, Object... args) {\n if (jsObject == null)\n return true;\n Value member = jsObject.getMember(memberName);\n if (member == null) {\n return true;\n }\n Value result = plugin.executeInContext(member, app);\n return result != null && result.isBoolean() ? result.asBoolean() : true;\n }\n\n @Override\n public boolean appStart(IScope app) {\n return execute(listener, \"appStart\", app);\n }\n\n @Override\n public boolean appConnect(IConnection conn, Object[] params) {\n return execute(listener, \"appConnect\", conn, params);\n }\n\n @Override\n public boolean appJoin(IClient client, IScope app) {\n return execute(listener, \"appJoin\", client, app);\n }\n\n @Override\n public void appDisconnect(IConnection conn) {\n execute(listener, \"appDisconnect\", conn);\n }\n\n @Override\n public void appLeave(IClient client, IScope app) {\n execute(listener, \"appLeave\", client, app);\n }\n\n @Override\n public void appStop(IScope app) {\n execute(listener, \"appStop\", app);\n }\n\n @Override\n public boolean roomStart(IScope room) {\n return execute(listener, \"roomStart\", room);\n }\n\n @Override\n public boolean roomConnect(IConnection conn, Object[] params) {\n return execute(listener, \"roomConnect\", conn, params);\n }\n\n @Override\n public boolean roomJoin(IClient client, IScope room) {\n return execute(listener, \"roomJoin\", client, room);\n }\n\n @Override\n public void roomDisconnect(IConnection conn) {\n execute(listener, \"roomDisconnect\", conn);\n }\n\n @Override\n public void roomLeave(IClient client, IScope room) {\n execute(listener, \"roomLeave\", client, room);\n }\n\n @Override\n public void roomStop(IScope room) {\n execute(listener, \"roomStop\", room);\n }\n };\n this.app.addListener(adapter);\n this.listeners.add(adapter);\n return this.listeners.indexOf(adapter);\n }", "@Override\n public void addListener(ResourceListener listener) {\n }", "public void addListener(ATabbedPaneListener listener) {\n\t\tlisteners.add(listener);\n\t}", "void addListener(RosZeroconfListener listener);", "public void setFindTestListener(FindTestListener listener) {\n\tthis.findTestListener = listener;\r\n}", "@Override\n\tpublic void getListener(){\n\t}", "public void addScopeRegistrationListener(ScopeEventListener listener);", "public void addListener(Listener l) {\n\t\tmListenerSet.add(l);\n\t}", "public abstract void addServiceListener(PhiDiscoverListener listener);", "public synchronized void addBuildListener(BuildListener listener) {\n // create a new Vector to avoid ConcurrentModificationExc when\n // the listeners get added/removed while we are in fire\n Vector newListeners = getBuildListeners();\n newListeners.addElement(listener);\n listeners = newListeners;\n }", "void add(SpaceInstanceAddedEventListener eventListener, boolean includeExisting);", "public void addListener(ModifiedEventListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public synchronized void addListener(IIpcEventListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public void addFactListener(GenericFactListener<Fact> listener);", "public void addChangeListener(ChangeListener listener) {\n if (listener == null) {\n return;\n }\n if (LOG.isLoggable(Level.FINE) && listeners.contains(listener)) {\n LOG.log(Level.FINE, \"diagnostics for #167491\", new IllegalStateException(\"Added \" + listener + \" multiply\"));\n }\n listeners.add(listener);\n }", "public void testWindowListener() throws Exception\n {\n WindowImpl window = (WindowImpl) fetchWindow(SCRIPT, WINDOW_BUILDER);\n assertEquals(\"Window listener was not registered\", 1, window\n .getWindowListeners().size());\n }", "public interface Listener {}", "public synchronized void addChangeListener(ChangeListener l) {\n Vector v = changeListeners == null ? new Vector(2) : (Vector) changeListeners.clone();\n if (!v.contains(l)) {\n v.addElement(l);\n changeListeners = v;\n }\n }", "public void addListener(final IMemoryViewerSynchronizerListener listener) {\n m_listeners.addListener(listener);\n }", "public void addListener(final IModuleListener listener) {\n m_listeners.addListener(listener);\n }", "private void setListener() {\n\t}", "@Test\n public void testAddPropertyChangeListener() {\n // trivial\n }", "@Override\n public void addChangeListener(ChangeListener l) {}", "@Override\n\t\t\t\tpublic void onAddSuccess() {\n\t\t\t\t\tif (addListener != null) {\n\t\t\t\t\t\taddListener.onAddSuccess();\n\t\t\t\t\t}\n\t\t\t\t}", "public void addListener(CommListener listener) {\n\t\tcomm.addListener(listener);\n\t}", "public String addListener(ServiceListener listener) {\n return (orgConfigImpl.addListener(listener));\n }" ]
[ "0.78196", "0.6814251", "0.6750006", "0.6714079", "0.66465366", "0.63510406", "0.62870574", "0.62833387", "0.628244", "0.62596804", "0.62190694", "0.6210816", "0.61818", "0.61305135", "0.6113438", "0.6099067", "0.6007636", "0.5965436", "0.5944508", "0.5868568", "0.58586", "0.5837866", "0.5812295", "0.5811919", "0.5807954", "0.5786638", "0.57863253", "0.57707024", "0.5742283", "0.5740936", "0.57316995", "0.57281554", "0.57281554", "0.57280594", "0.57280594", "0.5703547", "0.57012683", "0.5667322", "0.56627667", "0.565902", "0.5655822", "0.56541604", "0.5643627", "0.56336707", "0.5626182", "0.5623645", "0.5618411", "0.5617797", "0.56132543", "0.5603767", "0.5603244", "0.5602641", "0.5597692", "0.5588244", "0.55842066", "0.55840975", "0.55803216", "0.5579433", "0.5578592", "0.55760145", "0.5571268", "0.5570572", "0.55705005", "0.55705005", "0.5562104", "0.5560422", "0.5559722", "0.5559536", "0.5556098", "0.55508125", "0.5539485", "0.5538215", "0.55296993", "0.55278796", "0.5525806", "0.5525245", "0.551171", "0.5510779", "0.55046606", "0.5502091", "0.5497455", "0.54928315", "0.54916537", "0.5487951", "0.5483061", "0.5470858", "0.5470816", "0.54691523", "0.5467497", "0.5464012", "0.5460964", "0.5460677", "0.5459667", "0.5447581", "0.544729", "0.54430777", "0.5439878", "0.54209137", "0.5419833", "0.54143095" ]
0.71733415
1
Test of addCueListener method, of class WorkspaceImpl.
@Test public void testAddCueListener() { MockCueListener cueListener = new MockCueListener(); workspace.addCueListener(cueListener); content.addDefaultNode(node2); workspace.cueEpisodicMemories(content); NodeStructure ns = cueListener.ns; assertNotNull(ns); assertTrue(ns.containsNode(node2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testAddListener() {\r\n\t\t// workspace listener\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\r\n\t\t// cue listener\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node1));\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "@Test\r\n\tpublic void testAddWorkspaceListener() {\r\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\t}", "@Test\r\n\tpublic void testCueEpisodicMemories() {\r\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addCueListener(cueListener);\r\n\t\tcontent.addDefaultNode(node1);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node1));\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "@Override\r\n public void addNotify() {\r\n super.addNotify();\r\n \r\n // add listener\r\n component.getResults().addLabTestListener(this);\r\n }", "public boolean hasCue() {\r\n\t\treturn hasCue;\r\n\t}", "@Test\n public void testAddEventListener() {\n List<SimulatorEventListener> eventListeners = eventDispatcher.getSimulatorEventListeners();\n assertTrue(eventListeners.size() == 0);\n SimulatorEventListener listener = new SimulatorEventListener() {\n\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n\n }\n };\n eventDispatcher.addSimulatorEventListener(listener);\n assertTrue(eventListeners.size() == 1);\n }", "@Test\n public void testAddConference() throws Exception {\n ConferenceBuilder builder = ConferenceBuilder.newBuilder() //@formatter:off\n .setDefaultFeatures()\n .setLable(\"Random lable\")\n .setVideoChatUri(); //@formatter:on\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setConferences(createdEvent.getConferences());\n deltaEvent.addConferencesItem(builder.build());\n updateEventAsOrganizer(deltaEvent);\n\n EventData updatedEvent = eventManager.getEvent(defaultFolderId, createdEvent.getId());\n assertThat(\"Should be three conferences!\", I(updatedEvent.getConferences().size()), is(I(3)));\n\n /*\n * Check that the conference item has been added\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL, 1);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"access information was changed\");\n }", "@Test\n public void testIAEForAddListener() {\n try {\n final Registrar<Object> testSubject = onCreateTestSubject();\n testSubject.addListener(null);\n fail(\"IAE was not thrown\");\n } catch (IllegalArgumentException e) {\n // okay\n }\n }", "@Test\n\tpublic void addTrack_Test() throws Exception {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.playlist \n\t\t\t\t) {\n\t\t\tstart();\n\t\t\tFile file = new File(\"media/note.mp3\");\n\t\t\tgui.addTrack(\"note\",file);\t\n\t\t}\n\t}", "void add(SpaceInstanceAddedEventListener eventListener, boolean includeExisting);", "void setAddListener(AddNeededCollaborationListener addNeededCollaborationListener);", "@Test\n public void testAddPropertyChangeListener() {\n // trivial\n }", "public void testCustomEventListener() throws Exception\n {\n checkEventTypeRegistration(CUSTOM_EVENT_BUILDER, \"\");\n }", "public void addFactListener(GenericFactListener<Fact> listener);", "public void testAddModelElementChangeListener() {\n ModelElementChangeListenerMock listener = new ModelElementChangeListenerMock();\n instance.addModelElementChangeListener(listener);\n instance.firePropertyChangeEvent(new GuardImpl(), PropertyKind.ACTIVE, PropertyOperation.MODIFY, \"accuracy\");\n assertTrue(\"Failed to add the listener.\", listener.IsCalled());\n }", "public interface VisualComponentResolveListener\n extends EventListener\n{\n /**\n * Notifies that a visual <tt>Component</tt> representing video has been\n * resolved to be corresponding to a given <tt>ConferenceMember</tt>.\n *\n * @param event a <tt>VisualComponentResolveEvent</tt> describing the\n * resolved component and the corresponding <tt>ConferenceMember</tt>\n */\n public void visualComponentResolved(VisualComponentResolveEvent event);\n}", "public abstract void addListener(EventListener eventListener, String componentName);", "void addChangeListener(ChangeListener cl);", "@Override\n\tpublic void addListener() {\n\t\t\n\t}", "abstract public void addListener(Listener listener);", "public interface ClipStateListener {\n void clipEnded(Clip clip);\n}", "public void addSelectionListener(SelectionListener listener) {\r\n\tcheckWidget();\r\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\r\n\tTypedListener typedListener = new TypedListener (listener);\r\n\taddListener (SWT.Selection,typedListener);\r\n\taddListener (SWT.DefaultSelection,typedListener);\r\n}", "public void addPainter(CanvasType.PaintListener listener)\r\n\t{\n\t}", "public void addSelectionListener(SelectionListener listener) {\r\n\tcheckWidget();\r\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\r\n\tTypedListener typedListener = new TypedListener(listener);\r\n\taddListener(SWT.Selection,typedListener);\r\n\taddListener(SWT.DefaultSelection,typedListener);\r\n}", "public abstract void addPropertyChangeListener(PropertyChangeListener listener, String kenaiHostUrl);", "public void addHitListener(HitListener hl) {\nthis.hitListeners.add(hl);\n}", "private void addListener(MainFrame mainFrame) {\n this.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n mainFrame.displayCreateWorkoutWindow();\n mainFrame.soundEffect.setFile(mainFrame.SOUND_EFFECT_PATH);\n mainFrame.soundEffect.playSound();\n }\n });\n }", "public Map addToEditor (Composite composite, Object listener);", "@Test\n\tpublic void addButtons__wrappee__PlaylistTest() throws Exception {\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.ogg &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.volumecontrol &&\n\t\t\t\tConfiguration.shufflerepeat &&\n\t\t\t\tConfiguration.playlist\n\t\t) {\n\t\t\tstart();\n\t\t\t\n\t\t\t\n\t\t\tWhitebox.invokeMethod(gui, \"addButtons__wrappee__Playlist\");\n\t\t\tJScrollPane scroll = (JScrollPane) MemberModifier.field(Application.class, \"scrollPane\").get(gui);\n\t\t\tassertTrue(scroll.getBounds().getX() == 361);\n\t\t\tassertTrue(scroll.getBounds().getY() == 49);\n\t\t\tassertTrue(scroll.getBounds().getWidth() == 409);\n\t\t\tassertTrue(scroll.getBounds().getHeight() == 264);\n\t\t}\n\t}", "@Test\n public void testComAdobeCqWcmLaunchesImplLaunchesEventHandlerProperties() {\n // TODO: test ComAdobeCqWcmLaunchesImplLaunchesEventHandlerProperties\n }", "@Override\n\tpublic void registerListenerForCategory(String categoryId) throws Exception {\n\n\t}", "@Override\n public void addListener(DisplayEventListener listener) {\n listenerList.add(DisplayEventListener.class, listener);\n }", "void addChangeListener(ChangeListener listener);", "public void addEvPEC(Event ev);", "protected void addEventListeners()\n {\n // Add them to the contents.\n InteractionFigure interactionLayer =\n view.getEditor().getInteractionFigure();\n\n // let mouseState handle delete key events\n interactionLayer.addKeyListener(mouseState);\n getShell().addShellListener(new ShellAdapter() {\n @Override\n public void shellDeactivated(ShellEvent e)\n {\n mouseState.cancelDynamicOperation();\n }\n });\n }", "static void testMusicOnCompletionListener()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t}\n\t\t\n\t\tmusicOnCompletionListener.onCompletion(null);\n\t}", "public void testWindowListener() throws Exception\n {\n WindowImpl window = (WindowImpl) fetchWindow(SCRIPT, WINDOW_BUILDER);\n assertEquals(\"Window listener was not registered\", 1, window\n .getWindowListeners().size());\n }", "@Override\n\tpublic void addGameEventListener(GameEventListener listener) throws RemoteException {\n\t\t\n\t}", "public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}", "public void addNPTListener(NPTListener l){}", "public void setFindTestListener(FindTestListener listener) {\n\tthis.findTestListener = listener;\r\n}", "void addListener(GameEventListener listener);", "<C> void addContinuousQueryListener(String queryString, ContinuousQueryListener<K, C> listener);", "public interface DesignerListener extends EventListener {\r\n\t\r\n\t/**\r\n\t * Method to notify that a designer has joined the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void designerAdded(DesignerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a designer input vector has been modified.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void designerInputModified(DesignerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a designer has left the application.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void designerRemoved(DesignerEvent e);\r\n\t\r\n\t/**\r\n\t * Method to notify that a designer state (e.g. ready status) \r\n\t * has been modified.\r\n\t *\r\n\t * @param e the event\r\n\t */\r\n\tpublic void designerStateModified(DesignerEvent e);\r\n}", "public void addGameEventListener(GameEventListener gameEventListener);", "public void addListener(MoocListener listener) {\n\n\t\ttry {\n\t\t\t logger.info(\"add listener in MoocChannel is called and its \"+handler);\n\t\t\thandler.addListener(listener);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"failed to add listener\", e);\n\t\t}\n\t}", "public interface SoundTrackListener {\r\n\r\n\t/**\r\n\t * Called when a soundtrack has completed the whole track.\r\n\t */\r\n\tpublic void finished();\r\n}", "void addTextListener(TextListener l);", "@Test(timeout=300000)\n public void test03() throws Throwable {\n ControllerTransferListener controllerTransferListener0 = new ControllerTransferListener((CjdbcGui) null);\n controllerTransferListener0.mouseExited((MouseEvent) null);\n }", "void addListener(IEventChannelListener<K, V> listener);", "@Test\n public void testAddEventConvinienceMethod() {\n // Start and end dates to query for\n java.util.Calendar cal = getInstance();\n Date start = cal.getTime();\n cal.add(MONTH, 1);\n Date end = cal.getTime();\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n // Add an event\n BasicEvent event = new BasicEvent(\"Test\", \"Test\", start);\n calendar.addEvent(event);\n // Ensure event exists\n List<CalendarEvent> events = calendar.getEvents(start, end);\n Assert.assertEquals(1, events.size());\n Assert.assertEquals(events.get(0).getCaption(), event.getCaption());\n Assert.assertEquals(events.get(0).getDescription(), event.getDescription());\n Assert.assertEquals(getStart(), event.getStart());\n }", "@Test\n public void EffectSelectedEventTest() {\n EffectSelectedEvent event = null;\n boolean result = true;\n try {\n event = new EffectSelectedEvent(0, \"tony\", null, null);\n turnController.handleEvent(event);\n } catch(Exception e) {\n result = false;\n }\n assertTrue(result);\n\n }", "public void add(InputChangedListener listener)\r\n {\r\n\r\n }", "void addHitListener(HitListener hl);", "void addHitListener(HitListener hl);", "void addHitListener(HitListener hl);", "void addHitListener(HitListener hl);", "@Test\n public void testAddEventConvinienceMethodWithCustomEventProvider() {\n calendar.setEventProvider(new ContainerEventProvider(new com.vaadin.v7.data.util.BeanItemContainer<BasicEvent>(BasicEvent.class)));\n // Start and end dates to query for\n java.util.Calendar cal = getInstance();\n Date start = cal.getTime();\n cal.add(MONTH, 1);\n Date end = cal.getTime();\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n // Add an event\n BasicEvent event = new BasicEvent(\"Test\", \"Test\", start);\n calendar.addEvent(event);\n // Ensure event exists\n List<CalendarEvent> events = calendar.getEvents(start, end);\n Assert.assertEquals(1, events.size());\n Assert.assertEquals(events.get(0).getCaption(), event.getCaption());\n Assert.assertEquals(events.get(0).getDescription(), event.getDescription());\n Assert.assertEquals(getStart(), event.getStart());\n }", "@Test\n\tpublic void addEngine_Test() throws Exception {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime \n\t\t\t\t) {\n\t\t\tstart();\n\t\t\t\n\t\t\tgui.addEngine();\t\n\t\t}\n\t}", "void addVideoListener(CallPeer peer, VideoListener listener);", "<C> void addContinuousQueryListener(Query<?> query, ContinuousQueryListener<K, C> listener);", "@Test\n public void testTransparencyChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n deltaEvent.setTransp(TranspEnum.TRANSPARENT.equals(createdEvent.getTransp()) ? TranspEnum.OPAQUE : TranspEnum.TRANSPARENT);\n\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that the event is marked as \"free\"\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ALL);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"The appointment will now be shown as\");\n }", "public interface ClipListener {\n void setClipPath(Path path, RectF rectF);\n}", "@Test\n\tpublic void addEngineTest() throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.ogg &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\t\t\tstart();\n\t\t\t\n\t\t\tJButton play = (JButton) MemberModifier.field(Application.class, \"btnPlay\").get(gui);\n\t\t\tassertTrue(play.getBounds().getX() == 26);\n\t\t\tassertTrue(play.getBounds().getY() == 279);\n\t\t\tassertTrue(play.getBounds().getWidth() == 64);\n\t\t\tassertTrue(play.getBounds().getHeight() == 23);\n\n\t\t\tJButton stop = (JButton) MemberModifier.field(Application.class, \"btnStop\").get(gui);\n\t\t\tassertTrue(stop.getBounds().getX() == 174);\n\t\t\tassertTrue(stop.getBounds().getY() == 279);\n\t\t\tassertTrue(stop.getBounds().getWidth() == 72);\n\t\t\tassertTrue(stop.getBounds().getHeight() == 23);\n\t\t\t\n\t\t\tJButton pause = (JButton) MemberModifier.field(Application.class, \"btnPause\").get(gui);\n\t\t\tassertTrue(pause.getBounds().getX() == 256);\n\t\t\tassertTrue(pause.getBounds().getY() == 279);\n\t\t\tassertTrue(pause.getBounds().getWidth() == 71);\n\t\t\tassertTrue(pause.getBounds().getHeight() == 23);\n\t\t}\n\t}", "protected void initListeners() {\n\t\tfinal StyledText textWidget = fSourceViewer.getTextWidget();\n\t\ttextWidget.addVerifyListener(new VerifyListener() {\n\t\t\t@Override\n\t\t\tpublic void verifyText(VerifyEvent e) {\n\t\t\t\tint start = getExt5().widgetOffset2ModelOffset(e.start);\n\t\t\t\tint end = getExt5().widgetOffset2ModelOffset(e.end);\n\t\t\t\tContainer atStart = fContainerManager\n\t\t\t\t\t\t.getContainerHavingOffset(start);\n\t\t\t\tContainer atEnd = fContainerManager\n\t\t\t\t\t\t.getContainerHavingOffset(end);\n\n\t\t\t\t/* Text replaced */\n\t\t\t\tif ((atStart != null && start != atStart.getPosition()\n\t\t\t\t\t\t.getOffset())\n\t\t\t\t\t\t|| (atEnd != null && e.end != atEnd.getPosition()\n\t\t\t\t\t\t\t\t.getOffset())) {\n\t\t\t\t\te.doit = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t/* XXX Visibility */\n\t\t\t\t// fContainerManager.updateContainerVisibility(false);\n\t\t\t}\n\t\t});\n\n\t\ttextWidget.addVerifyKeyListener(new VerifyKeyListener () {\n\n\t\t\t@Override\n\t\t\tpublic void verifyKey(VerifyEvent e) {\n\t\t\t\tOptional<IEditorLocation> position = fContainerManager.getCursonPosition();\n\t\t\t\tint action = getAction(e);\n\t\t\t\tif (position.isPresent()) {\n\t\t\t\t\tif (!position.get().getEditor().handleKey(e)) {\n\t\t\t\t\t\tif (action == SWT.NULL && e.character != 0) {\n\t\t\t\t\t\t\tIEditorLocation replace = fContainerManager.getSelectionModel().replace(String.valueOf(e.character));\n\t\t\t\t\t\t\tfContainerManager.setCursorPosition(replace);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdoAction(action);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\te.doit = false;\n\t\t\t\t} else {\n\t\t\t\t\tif (action == SWT.NULL) {\n\t\t\t\t\t\tif (e.character == SWT.DEL) {\n\t\t\t\t\t\t\taction = ST.DELETE_NEXT;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (action != SWT.NULL) {\n\t\t\t\t\t\tint caretOffset = getExt5().widgetOffset2ModelOffset(textWidget.getCaretOffset());\n\t\t\t\t\t\tswitch (action) {\n\t\t\t\t\t\tcase ST.COLUMN_PREVIOUS:\n\t\t\t\t\t\tcase ST.SELECT_COLUMN_PREVIOUS:\n\t\t\t\t\t\t\te.doit = caretPositionChange(caretOffset, false);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ST.COLUMN_NEXT:\n\t\t\t\t\t\tcase ST.SELECT_COLUMN_NEXT:\t\n\t\t\t\t\t\t\te.doit = caretPositionChange(caretOffset, true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ST.DELETE_NEXT:\n\t\t\t\t\t\t\tContainer container = fContainerManager\n\t\t\t\t\t\t\t\t\t.getContainerHavingOffset(caretOffset);\n\t\t\t\t\t\t\tif (container != null) {\n\t\t\t\t\t\t\t\tcontainer.destroy();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tcase ST.DELETE_PREVIOUS:\n\t\t\t\t\t\t\tContainer prevContainer = fContainerManager\n\t\t\t\t\t\t\t\t\t.getContainerHavingOffset(caretOffset - 1);\n\t\t\t\t\t\t\tif (prevContainer != null) {\n\t\t\t\t\t\t\t\tprevContainer.destroy();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t * If caret is inside Container's text region, moving it to the end of\n\t\t * line\n\t\t */\n\t\ttextWidget.addCaretListener(new CaretListener() {\n\t\t\t@Override\n\t\t\tpublic void caretMoved(CaretEvent e) {\n\t\t\t\tPoint selection = fSourceViewer.getSelectedRange();\n\t\t\t\tif (selection.y == 0) {\n\t\t\t\t\tint caretOffset = getExt5().widgetOffset2ModelOffset(e.caretOffset);\n\t\t\t\t\tContainer container = fContainerManager\n\t\t\t\t\t\t\t.getContainerHavingOffset(caretOffset);\n\t\t\t\t\tif (container != null) {\n\t\t\t\t\t\tPosition position = container.getPosition();\n\t\t\t\t\t\tif (caretOffset != position.getOffset()) {\n\t\t\t\t\t\t\t/* Move caret to the Pad's border */\n\t\t\t\t\t\t\ttextWidget.setCaretOffset(getExt5().modelOffset2WidgetOffset(position.getOffset()\n\t\t\t\t\t\t\t\t\t+ position.getLength()));\n\t\t\t\t\t\t\tfContainerManager.selectEditor(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\ttextWidget.addMenuDetectListener(new MenuDetectListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void menuDetected(MenuDetectEvent e) {\n\t\t\t\tPoint control = textWidget.toControl(e.x, e.y);\n\t\t\t\tOptional<ITextEditor<?>> editor = fContainerManager.getEditorAt(control.x, control.y);\n\t\t\t\twhile (editor.isPresent() && !(editor.get() instanceof IMenuContributor)) {\n\t\t\t\t\teditor = editor.get().getParent();\n\t\t\t\t}\n\t\t\t\tif (editor.isPresent()) {\n\t\t\t\t\tMenuManager menuManager = new MenuManager();\n\t\t\t\t\tMenu menu = menuManager.createContextMenu(textWidget);\n\t\t\t\t\t((IMenuContributor) editor.get()).contribute(menuManager);\n\t\t\t\t\tmenuManager.update(false);\n\t\t\t\t\tmenu.setLocation(e.x, e.y);\n\t\t\t\t\tmenu.setVisible(true);\n\t\t\t\t\te.doit = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\ttextWidget.addFocusListener(new FocusListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\tfContainerManager.activateEditor(null);\n\t\t\t}\n\t\t});\n\n\t}", "public void addConnectedCallback(OctaveReference listener) {\n\t\tlistenerConnected.add(listener);\n\t}", "@FutureRelease(version = \"3.0.0\")//$NON-NLS-1$\r\npublic interface ATEListener extends EventListener {\r\n\r\n\t/**\r\n\t * Indicates that the list of Java classes has changed.\r\n\t */\r\n\tpublic void classListChanged();\r\n\r\n\t/**\r\n\t * Indicates that a maze has changed.\r\n\t * \r\n\t * @param maze\r\n\t * \t\t\tThe changed maze.\r\n\t */\r\n\tpublic void mazeChanged(Maze maze);\r\n\r\n\t/**\r\n\t * Indicates that a scenario has changed.\r\n\t * \r\n\t */\r\n\tpublic void scenarioChanged();\r\n\r\n}", "void addBoardListener(BoardListener boardListener);", "void onTestSuiteRemoved() {\n // not interested in\n }", "public void testExternalListeners() {\n\n\t\tLogAndTraceBroker broker = LogAndTraceBroker.getBroker();\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"WARNING\");\n\n\t\tbroker.addLogListener(new LogListener() {\n\n\t\t\tpublic void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) {\n\t\t\t\tString s = \"log(\" + pLevel.intValue() + \",\" + pMessageKey + \",\" + pMessage + \",\"\n\t\t\t\t\t\t+ pParameters.length + \")\";\n\t\t\t\tverify(\"log(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t});\n\n\t\tbroker.addTraceListener(new TraceListener() {\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage,\n\t\t\t\t\tThrowable pThrown) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \",\" + pThrown.getMessage() + \")\";\n\t\t\t\tverify(\"trace(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \")\";\n\t\t\t\tverify(\"trace(3)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t});\n\n\t\tList<?> listeners = broker.getLogListeners();\n\t\tverify(\"Count of external log listeners\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of external trace listeners\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\n\t\tverify(\"testExternalListeners: isLoggableMessage(OFF) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.OFF) == false);\n\t\tverify(\"testExternalListeners: isLoggableTrace(OFF) != false\", broker\n\t\t\t\t.isLoggableTrace(Level.OFF) == false);\n\t\tverify(\"testExternalListeners: isLoggableMessage(+1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(+1) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.SEVERE) == true);\n\t\tverify(\"testExternalListeners: isLoggableMessage(==) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(==) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.WARNING) == true);\n\t\tverify(\"testExternalListeners: isLoggableMessage(-1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(-1) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.INFO) == true);\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"OFF\");\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\t}", "@Override\n public TestCaseResult test(Project project, boolean autoGrade) throws NotAutomatableException, NotGradableException {\n if (project.getClassesManager().isEmpty())\n throw new NotGradableException();\n Set<ClassDescription> classDescriptions = project.getClassesManager().get().findByTag(\"Paint Listener\");\n if (classDescriptions.isEmpty())\n return fail(\"No class tagged \\\"Paint Listener\\\"\");\n ClassDescription classDescription = new ArrayList<ClassDescription>(classDescriptions).get(0);\n\n // Get the views\n Class<?> paintListener = classDescription.getJavaClass();\n List<ClassDescription> views = new ArrayList<ClassDescription>();\n for (ClassDescription description : project.getClassesManager().get().getClassDescriptions()) {\n if (!description.getJavaClass().isInterface() && paintListener.isAssignableFrom(description.getJavaClass())) {\n views.add(description);\n }\n }\n\n // Count how many views register themselves as listeners in the constructor\n double listenerCount = 0;\n String notes = \"\";\n for (ClassDescription view : views) {\n // Get the constructors\n try {\n ClassOrInterfaceDeclaration classDef = CompilationNavigation.getClassDef(view.parse());\n List<ConstructorDeclaration> constructors = CompilationNavigation.getConstructors(classDef);\n\n // Look for one assignment in any constructor\n boolean found = false;\n for (ConstructorDeclaration constructor : constructors) {\n String code = constructor.toString();\n if (code.contains(\".addPropertyChangeListener(this)\")) {\n found = true;\n break;\n }\n }\n if (found)\n listenerCount++;\n else\n notes += \"Paint listener view \" + view.getJavaClass().getSimpleName() + \" doesn't register itself as a listener in its constructor.\\n\";\n } catch (IOException e) {\n // Don't do anything here.\n }\n }\n\n double count = views.size();\n return partialPass(listenerCount / count, notes);\n }", "@Test\n\tpublic void testAddThenRemoveListener() throws SailException {\n\t\twrapper.addConnectionListener(listener);\n\t\tverify(delegate).addConnectionListener(listener);\n\t\twrapper.removeConnectionListener(listener);\n\t\tverify(delegate).removeConnectionListener(listener);\n\t}", "protected boolean shouldAddDisplayListener() {\n return true;\n }", "void addDataCollectionListener(DataCollectionListener l);", "void addPlayerObserver(PlayerObserver observer);", "<T extends EventDetector> void addEventDetector(T detector);", "@Override\r\n\t\t\tpublic void componentAdded(ContainerEvent arg0){}", "@Test\n\tpublic void addButtons__wrappee__QueueTrackTest() throws Exception {\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.ogg &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.volumecontrol &&\n\t\t\t\tConfiguration.shufflerepeat &&\n\t\t\t\tConfiguration.playlist &&\n\t\t\t\tConfiguration.queuetrack &&\n\t\t\t\tConfiguration.showcover\n\t\t) {\tstart();\n\t\t\t\n\t\t\t\n\t\t\tWhitebox.invokeMethod(gui, \"addButtons__wrappee__QueueTrack\");\n\t\t\tJScrollPane scroll = (JScrollPane) MemberModifier.field(Application.class, \"queueScrollPane\").get(gui);\n\t\t\tassertTrue(scroll.getBounds().getX() == 850);\n\t\t\tassertTrue(scroll.getBounds().getY() == 49);\n\t\t\tassertTrue(scroll.getBounds().getWidth() == 259);\n\t\t\tassertTrue(scroll.getBounds().getHeight() == 300);\n\t\t\t\n\t\t\tJButton btnqueueleft = (JButton) MemberModifier.field(Application.class, \"btnqueueleft\").get(gui);\n\t\t\tassertTrue(btnqueueleft.getBounds().getX() ==790);\n\t\t\tassertTrue(btnqueueleft.getBounds().getY() == 200);\n\t\t\tassertTrue(btnqueueleft.getBounds().getWidth() == 50);\n\t\t\tassertTrue(btnqueueleft.getBounds().getHeight() == 23);\n\t\t\t\n\t\t\tJLabel coverlbl = (JLabel) MemberModifier.field(Application.class, \"coverlbl\").get(gui);\n\t\t\tassertTrue(coverlbl.getBounds().getX() ==13);\n\t\t\tassertTrue(coverlbl.getBounds().getY() == 59);\n\t\t\tassertTrue(coverlbl.getBounds().getWidth() == 164);\n\t\t\tassertTrue(coverlbl.getBounds().getHeight() == 147);\n\t\t\tassertTrue(coverlbl.getIcon().toString().contains(\"img.jpg\"));\n\n\t\t}\n\t}", "public void addCurrentHeroChangeListener(CurrentHeroChangeListener listener){\n \tif(!this.heroChangeListeners.contains(listener)){\n \t\tthis.heroChangeListeners.add(listener);\n \t}\n }", "public void setControlListener(ControlListener c) { cListener = c; }", "protected AudioCue createAudioCue(SharedPreferences prefs, Resources res) {\n Intent intent = getIntent();\n if (intent != null && intent.hasExtra(Extras.EXTRA_AUDIO_CUES)) {\n if (intent.getBooleanExtra(Extras.EXTRA_AUDIO_CUES, false)) {\n return new AudioCue(this);\n }\n return null;\n }\n\n if (PreferenceUtils.getPrefBoolean(prefs, res, R.string.keyAudioCues, R.bool.defaultAudioCues)) {\n return new AudioCue(this);\n }\n return null;\n }", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n protected void createListeners(\r\n ) {\r\n \tsuper.createListeners();\r\n \t\r\n inputManager.addMapping( \"nextScene\"\r\n , new KeyTrigger( KeyInput.KEY_RETURN ) );\r\n inputManager.addMapping( \"priorScene\"\r\n , new KeyTrigger( KeyInput.KEY_BACKSLASH ) );\r\n inputManager.addMapping( \"abortLoad\"\r\n , new KeyTrigger( KeyInput.KEY_DELETE ) );\r\n \r\n ActionListener aListener = new CSGTestActionListener(); \r\n inputManager.addListener( aListener, \"nextScene\" );\r\n inputManager.addListener( aListener, \"priorScene\" );\r\n inputManager.addListener( aListener, \"abortLoad\" );\r\n }", "public void testChangeListener() throws Exception\n {\n checkFormEventListener(CHANGE_BUILDER, \"CHANGE\");\n }", "public void addChangeListener(ChangeListener stackEngineListener);", "public void addChangeListener(ChangeListener l) {\n }", "public void addChangeListener(ChangeListener l) {\n }", "@Override\n\tpublic void addObserver(ObserverListener ob) {\n\t\tvector.add(ob);\n\t}", "public void addListener(EventListener listener);", "public abstract void addServiceListener(PhiDiscoverListener listener);", "public void addObserver(jObserver observer);", "public void\t\taddUCallbackListener(UCallbackListener listener,\n\t\t\t\t\t\t\t\t\t\t String tag);", "public void addSelectionListener( SelectionListener listener ) {\n checkWidget();\n if ( listener == null )\n error( SWT.ERROR_NULL_ARGUMENT );\n // TypedListener typedListener = new TypedListener (listener);\n // addListener (SWT.Selection,typedListener);\n // addListener (SWT.DefaultSelection,typedListener);\n if ( selectionListeners == null ) {\n selectionListeners = new ArrayList();\n }\n selectionListeners.add( listener );\n \n }", "public void add(GameEvent e);", "void addChangeListener( RegistryListener listener );", "@Override\n\tpublic void addListenerPlugin(ForumEventListener listener) throws Exception {\n\n\t}", "@Override\n public void addListener(ResourceListener listener) {\n }", "public interface OnCategoryListener {\n}", "default void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }", "public void addSelectionListener (SelectionListener listener) {\n\tcheckWidget ();\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\n\tTypedListener typedListener = new TypedListener (listener);\n\taddListener (SWT.Selection,typedListener);\n\taddListener (SWT.DefaultSelection,typedListener);\n}" ]
[ "0.70075715", "0.66036075", "0.6195388", "0.54934007", "0.5378664", "0.5343013", "0.52767664", "0.5137393", "0.5134273", "0.5117622", "0.5070565", "0.50615245", "0.50610024", "0.5043062", "0.5032366", "0.49621102", "0.49327195", "0.49142832", "0.4854854", "0.4853147", "0.48497093", "0.4821709", "0.48129228", "0.4802405", "0.47833163", "0.47833017", "0.47593686", "0.47466695", "0.47443986", "0.47318774", "0.47309196", "0.47209483", "0.47164726", "0.4707771", "0.4707078", "0.47015455", "0.4700808", "0.46992147", "0.46921256", "0.46913964", "0.46850544", "0.46825337", "0.46677804", "0.46601027", "0.46594647", "0.46591884", "0.4658157", "0.46441254", "0.4641975", "0.46344024", "0.46319953", "0.46294218", "0.46267802", "0.46263334", "0.46263334", "0.46263334", "0.46263334", "0.46219787", "0.46218482", "0.4618807", "0.46179473", "0.46138272", "0.46130934", "0.4592233", "0.45867035", "0.45802268", "0.457844", "0.4576999", "0.45724583", "0.45721683", "0.4566765", "0.4557849", "0.4557392", "0.45557106", "0.45505542", "0.45492256", "0.45471752", "0.45461258", "0.4544398", "0.45423424", "0.45384598", "0.4535046", "0.45348635", "0.45332196", "0.45185888", "0.45140383", "0.45140383", "0.45050102", "0.45049772", "0.45041943", "0.45023623", "0.45011482", "0.44984424", "0.4494351", "0.44905025", "0.44889194", "0.44883093", "0.44840452", "0.4481133", "0.44801885" ]
0.79425
0
Test of addWorkspaceListener method, of class WorkspaceImpl.
@Test public void testAddWorkspaceListener() { MockWorkspaceListener listener = new MockWorkspaceListener(); workspace.addListener(listener); workspace.addSubModule(eBuffer); content.addDefaultNode(node1); workspace.receiveLocalAssociation(content); assertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer); assertTrue(listener.content.containsNode(node1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testAddListener() {\r\n\t\t// workspace listener\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\r\n\t\t// cue listener\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node1));\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "public interface WorkspaceListener {\n\n /**\n * Called by the workspace handler if its state is updated.\n * \n * @param type The type of state update\n */\n void update(Type type);\n\n /**\n * Enumeration of types of workspace state update.\n */\n enum Type {\n WORKSPACE, CURRENT_GRAPH, CAMPAIGNS, GRAPHS, STATISTICS\n }\n\n }", "protected void addWorkspace( String workspaceName ) {\n }", "public void testWindowListener() throws Exception\n {\n WindowImpl window = (WindowImpl) fetchWindow(SCRIPT, WINDOW_BUILDER);\n assertEquals(\"Window listener was not registered\", 1, window\n .getWindowListeners().size());\n }", "void addBoardListener(BoardListener boardListener);", "@Test\r\n\tpublic void testAddCueListener() {\r\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addCueListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "@Override\n\tpublic void addToolListener(ToolListener listener) {\n\t\t//do nothing\n\t}", "public synchronized void addJsimListener (JsimListener t)\n {\n jsimListeners.add (t);\n \n }", "public void addProjectChangedListener(final ProjectChangedListener listener) {\r\n if (listener != null) {\r\n final Vector listeners = getProjectChangedListeners();\r\n if (!listeners.contains(listener)) {\r\n listeners.add(listener);\r\n }\r\n }\r\n }", "public void addFactListener(GenericFactListener<Fact> listener);", "@Test\n public void workspaceTest() throws ApiException {\n String workspaceId = null;\n Workspace response = api.workspace(workspaceId);\n\n // TODO: test validations\n }", "@Test\n public void testAddEventListener() {\n List<SimulatorEventListener> eventListeners = eventDispatcher.getSimulatorEventListeners();\n assertTrue(eventListeners.size() == 0);\n SimulatorEventListener listener = new SimulatorEventListener() {\n\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n\n }\n };\n eventDispatcher.addSimulatorEventListener(listener);\n assertTrue(eventListeners.size() == 1);\n }", "public abstract void addListener(RegistryChangeListener listener);", "void addChangeListener( RegistryListener listener );", "public void addAnalysisServerListener(AnalysisServerListener listener);", "abstract public void addListener(Listener listener);", "@Override\n public void registerConnectorListener(RemoteConnectorListener listener) {\n connectorListeners.add(listener);\n }", "public void setWorkspace(Workspace workspace) {\n this.workspace = workspace;\n }", "@Override\r\n public void addNotify() {\r\n super.addNotify();\r\n \r\n // add listener\r\n component.getResults().addLabTestListener(this);\r\n }", "private void initWorkspacePanel() {\n workspacePanel = new JPanel();\n workspacePanel.setLayout(new BorderLayout());\n workspacePanel.add(workspace, BorderLayout.CENTER);\n isWorkspacePanelInitialized = true;\n }", "private static void registerEventListener() {\r\n\r\n log.info(\"Registering event listener for Listeners\"); //$NON-NLS-1$\r\n\r\n try {\r\n ObservationManager observationManager = ContentRepository\r\n .getHierarchyManager(ContentRepository.CONFIG)\r\n .getWorkspace()\r\n .getObservationManager();\r\n\r\n observationManager.addEventListener(new EventListener() {\r\n\r\n public void onEvent(EventIterator iterator) {\r\n // reload everything\r\n reload();\r\n }\r\n }, Event.NODE_ADDED\r\n | Event.NODE_REMOVED\r\n | Event.PROPERTY_ADDED\r\n | Event.PROPERTY_CHANGED\r\n | Event.PROPERTY_REMOVED, \"/\" + CONFIG_PAGE + \"/\" + \"IPConfig\", true, null, null, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n }\r\n catch (RepositoryException e) {\r\n log.error(\"Unable to add event listeners for Listeners\", e); //$NON-NLS-1$\r\n }\r\n }", "public void addListener(\n IListener listener\n )\n {listeners.add(listener);}", "@Test\n public void testIAEForAddListener() {\n try {\n final Registrar<Object> testSubject = onCreateTestSubject();\n testSubject.addListener(null);\n fail(\"IAE was not thrown\");\n } catch (IllegalArgumentException e) {\n // okay\n }\n }", "public void setFindTestListener(FindTestListener listener) {\n\tthis.findTestListener = listener;\r\n}", "protected void setWorkspace(Workspace workspace) {\n this.workspace = workspace;\n }", "public interface WorldSwitchListener {\n\n /**\n * Called when player switched world\n *\n * @param changed\n * Player who changed world\n * @param from\n * Name of previous world\n * @param to\n * Name of new world\n */\n void onWorldChange(@NotNull TabPlayer changed, @NotNull String from, @NotNull String to);\n}", "public void addNewTab() {\n int count = workspaceTabs.getComponentCount() + 1;\n String title = \"Workspace \" + count;\n WorkspacePanel panel = new WorkspacePanel(title);\n DropHandler dropHandler = searchMenu.createDropHandler(panel.getBaseLayout());\n panel.setDropHandler(dropHandler);\n workspaceTabs.addTab(panel).setCaption(title);\n }", "@Test\n public void testAddPropertyChangeListener() {\n // trivial\n }", "@Test\n\tpublic void testAddThenRemoveListener() throws SailException {\n\t\twrapper.addConnectionListener(listener);\n\t\tverify(delegate).addConnectionListener(listener);\n\t\twrapper.removeConnectionListener(listener);\n\t\tverify(delegate).removeConnectionListener(listener);\n\t}", "public void addToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "public void test_61843() {\n \t\t// create the project and manually give it a settings file\n \t\tfinal String qualifier = getUniqueString();\n \t\tfinal IProject project = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\tIFile settingsFile = getFileInWorkspace(project, qualifier);\n \n \t\t// write some property values in the settings file\n \t\tProperties properties = new Properties();\n \t\tproperties.put(\"key\", \"value\");\n \t\tOutputStream output = null;\n \t\ttry {\n \t\t\tFile file = settingsFile.getLocation().toFile();\n \t\t\tfile.getParentFile().mkdirs();\n \t\t\toutput = new BufferedOutputStream(new FileOutputStream(file));\n \t\t\tproperties.store(output, null);\n \t\t} catch (FileNotFoundException e) {\n \t\t\tfail(\"1.0\", e);\n \t\t} catch (IOException e) {\n \t\t\tfail(\"1.1\", e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (output != null)\n \t\t\t\t\toutput.close();\n \t\t\t} catch (IOException e) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \n \t\t// add a log listener to ensure that no errors are reported silently\n \t\tILogListener logListener = new ILogListener() {\n \t\t\tpublic void logging(IStatus status, String plugin) {\n \t\t\t\tThrowable exception = status.getException();\n \t\t\t\tif (exception == null || !(exception instanceof CoreException))\n \t\t\t\t\treturn;\n \t\t\t\tif (IResourceStatus.WORKSPACE_LOCKED == ((CoreException) exception).getStatus().getCode())\n \t\t\t\t\tfail(\"3.0\");\n \t\t\t}\n \t\t};\n \n \t\t// listener to react to changes in the workspace\n \t\tIResourceChangeListener rclistener = new IResourceChangeListener() {\n \t\t\tpublic void resourceChanged(IResourceChangeEvent event) {\n \t\t\t\tnew ProjectScope(project).getNode(qualifier);\n \t\t\t}\n \t\t};\n \n \t\t// add the listeners\n \t\tPlatform.addLogListener(logListener);\n \t\tgetWorkspace().addResourceChangeListener(rclistener, IResourceChangeEvent.POST_CHANGE);\n \n \t\ttry {\n \t\t\tproject.refreshLocal(IResource.DEPTH_INFINITE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"4.0\", e);\n \t\t} finally {\n \t\t\tPlatform.removeLogListener(logListener);\n \t\t\tgetWorkspace().removeResourceChangeListener(rclistener);\n \t\t}\n \t}", "public abstract void addServiceListener(PhiDiscoverListener listener);", "public synchronized void addBuildListener(BuildListener listener) {\n // create a new Vector to avoid ConcurrentModificationExc when\n // the listeners get added/removed while we are in fire\n Vector newListeners = getBuildListeners();\n newListeners.addElement(listener);\n listeners = newListeners;\n }", "public void addScopeRegistrationListener(ScopeEventListener listener);", "static //@Override\n\tpublic void addListener(final Listener listener) {\n\t\tif (null == stListeners) {\n\t\t\tstListeners = new LinkedList<>();\n\t\t}\n\t\tstListeners.add(listener);\n\t}", "@Override\n\tpublic void addGameEventListener(GameEventListener listener) throws RemoteException {\n\t\t\n\t}", "@Reference\n public void setWorkspace(Workspace workspace) {\n this.workspace = workspace;\n }", "void setAddListener(AddNeededCollaborationListener addNeededCollaborationListener);", "public void testAddModelElementChangeListener() {\n ModelElementChangeListenerMock listener = new ModelElementChangeListenerMock();\n instance.addModelElementChangeListener(listener);\n instance.firePropertyChangeEvent(new GuardImpl(), PropertyKind.ACTIVE, PropertyOperation.MODIFY, \"accuracy\");\n assertTrue(\"Failed to add the listener.\", listener.IsCalled());\n }", "void addRefreshListener(RefreshListener listener) throws RemoteException;", "public void setWorkspace(String workspace) {\n this.workspace = workspace;\n }", "public void addChangeListener(ChangeListener stackEngineListener);", "protected void registerListener() {\r\n\t\t// do nothing\r\n\t}", "@Test\n public void testLogErrorListener()\n {\n assertEquals(\"No default error listener registered\", 1,\n new DefaultConfigurationBuilder().getErrorListeners().size());\n }", "void registerUpdateListener(IUpdateListener listener);", "boolean addConnectionListener(LWSConnectionListener lis);", "public abstract void registerListeners();", "@Override\n\tpublic boolean addInstanceListener(final NodeStore.Listener<I> listener) {\n\t\treturn true;\n\t}", "synchronized void registerListener(String connectorId,\n WatchdogGovernanceListener listener,\n List<WatchdogEventType> interestingEventTypes,\n List<String> interestingMetadataTypes,\n String specificInstance) throws InvalidParameterException\n {\n WatchdogListener watchdogListener = listenerMap.get(connectorId);\n\n if (watchdogListener == null)\n {\n watchdogListener = new WatchdogListener();\n }\n\n watchdogListener.setListenerSpec(listener, interestingEventTypes, interestingMetadataTypes, specificInstance);\n\n listenerMap.put(connectorId, watchdogListener);\n }", "protected void addWorkspacePropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t\t\t getString(\"_UI_Folder_workspace_feature\"),\r\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Folder_workspace_feature\", \"_UI_Folder_type\"),\r\n\t\t\t\t RememberPackage.Literals.FOLDER__WORKSPACE,\r\n\t\t\t\t true,\r\n\t\t\t\t false,\r\n\t\t\t\t true,\r\n\t\t\t\t null,\r\n\t\t\t\t null,\r\n\t\t\t\t null));\r\n\t}", "public void addPluginManagerListener( PluginManagerListener listener )\n {\n pluginManagerListeners.add( listener );\n if ( isExecuted() )\n {\n firePluginsMonitored(listener);\n }\n }", "public void testExternalListeners() {\n\n\t\tLogAndTraceBroker broker = LogAndTraceBroker.getBroker();\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"WARNING\");\n\n\t\tbroker.addLogListener(new LogListener() {\n\n\t\t\tpublic void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) {\n\t\t\t\tString s = \"log(\" + pLevel.intValue() + \",\" + pMessageKey + \",\" + pMessage + \",\"\n\t\t\t\t\t\t+ pParameters.length + \")\";\n\t\t\t\tverify(\"log(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t});\n\n\t\tbroker.addTraceListener(new TraceListener() {\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage,\n\t\t\t\t\tThrowable pThrown) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \",\" + pThrown.getMessage() + \")\";\n\t\t\t\tverify(\"trace(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \")\";\n\t\t\t\tverify(\"trace(3)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t});\n\n\t\tList<?> listeners = broker.getLogListeners();\n\t\tverify(\"Count of external log listeners\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of external trace listeners\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\n\t\tverify(\"testExternalListeners: isLoggableMessage(OFF) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.OFF) == false);\n\t\tverify(\"testExternalListeners: isLoggableTrace(OFF) != false\", broker\n\t\t\t\t.isLoggableTrace(Level.OFF) == false);\n\t\tverify(\"testExternalListeners: isLoggableMessage(+1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(+1) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.SEVERE) == true);\n\t\tverify(\"testExternalListeners: isLoggableMessage(==) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(==) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.WARNING) == true);\n\t\tverify(\"testExternalListeners: isLoggableMessage(-1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(-1) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.INFO) == true);\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"OFF\");\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\t}", "void add(SpaceInstanceAddedEventListener eventListener, boolean includeExisting);", "public void setWorkspace( Integer workspace ) {\n this.workspace = workspace;\n }", "public void addNPTListener(NPTListener l){}", "void addListener(BotListener l);", "public void addChangeListener(ChangeListener l) {\n repositoryStep.addChangeListener(l);\n }", "public int addListener(Value listener) {\n\n IApplication adapter = new IApplication() {\n private boolean execute(Value jsObject, String memberName, Object... args) {\n if (jsObject == null)\n return true;\n Value member = jsObject.getMember(memberName);\n if (member == null) {\n return true;\n }\n Value result = plugin.executeInContext(member, app);\n return result != null && result.isBoolean() ? result.asBoolean() : true;\n }\n\n @Override\n public boolean appStart(IScope app) {\n return execute(listener, \"appStart\", app);\n }\n\n @Override\n public boolean appConnect(IConnection conn, Object[] params) {\n return execute(listener, \"appConnect\", conn, params);\n }\n\n @Override\n public boolean appJoin(IClient client, IScope app) {\n return execute(listener, \"appJoin\", client, app);\n }\n\n @Override\n public void appDisconnect(IConnection conn) {\n execute(listener, \"appDisconnect\", conn);\n }\n\n @Override\n public void appLeave(IClient client, IScope app) {\n execute(listener, \"appLeave\", client, app);\n }\n\n @Override\n public void appStop(IScope app) {\n execute(listener, \"appStop\", app);\n }\n\n @Override\n public boolean roomStart(IScope room) {\n return execute(listener, \"roomStart\", room);\n }\n\n @Override\n public boolean roomConnect(IConnection conn, Object[] params) {\n return execute(listener, \"roomConnect\", conn, params);\n }\n\n @Override\n public boolean roomJoin(IClient client, IScope room) {\n return execute(listener, \"roomJoin\", client, room);\n }\n\n @Override\n public void roomDisconnect(IConnection conn) {\n execute(listener, \"roomDisconnect\", conn);\n }\n\n @Override\n public void roomLeave(IClient client, IScope room) {\n execute(listener, \"roomLeave\", client, room);\n }\n\n @Override\n public void roomStop(IScope room) {\n execute(listener, \"roomStop\", room);\n }\n };\n this.app.addListener(adapter);\n this.listeners.add(adapter);\n return this.listeners.indexOf(adapter);\n }", "public interface WorldListener {\n\t\tpublic void pickUpMineral();\n\t\t\n\t\tpublic void hit();\n\t}", "void addChangeListener(ChangeListener listener);", "void resourceChanged(IPath workspacePath);", "private void addActionCellListener(ActionCellListener listener) {\n\t\tactionCellListeners.add(listener);\n\t}", "void registerListeners();", "private void registerListener(){\n game.addPropertyChangeListener(PROPERTY_GAME, evt -> {\r\n refresh();\r\n });\r\n }", "public void addChangeListener(ChangeListener listener) { _changeListeners.add(listener); }", "public void registerListener(RMContainerRegistryListener listener)throws IllegalArgumentException{\n \tif(theListener != null && theListener != listener){\n \t\tthrow new IllegalArgumentException(\"Another is already registered. Registration of more listeners is not supported\");\n \t}\n \ttheListener = listener;\n }", "public interface RunActionRunningListener\n{\n public static RunActionRunningListener[] EMPTY_ARRAY = {};\n public static Class THIS_CLASS = RunActionRunningListener.class;\n\n /**\n * called when test runner availability changes\n * @param isRunning\n */\n public void onRunActionRunnerAvailabilityChange(boolean isRunning);\n}", "public void addChangeListener(ChangeListener listener) {\n if (listener == null) {\n return;\n }\n if (LOG.isLoggable(Level.FINE) && listeners.contains(listener)) {\n LOG.log(Level.FINE, \"diagnostics for #167491\", new IllegalStateException(\"Added \" + listener + \" multiply\"));\n }\n listeners.add(listener);\n }", "public void addListener(GridListener listener) {\n listeners.add(listener);\n }", "public void addListener( DatabaseUpdaterListener listener ) {\n\t\tsynchronized( listeners_ ) {\n\t\t\tif( ! listeners_.contains(listener) ) { \n\t\t\t\tlisteners_.add(listener);\n\t\t\t}\n\t\t}\n\t}", "public void addJaakEnvironmentListener(JaakEnvironmentListener listener) {\n\t\tsynchronized (this.listeners) {\n\t\t\tthis.listeners.add(listener);\n\t\t}\n\t}", "@Override\n\tpublic void addListener() {\n\t\t\n\t}", "public static void addStoreListener(ProtocolStoreListener listener) {\n\t\tstoreListener.add(listener);\n\t}", "public interface WorkflowExecutionListener {}", "public void addUpdateListener(StoreUpdateListener listener);", "public void addListener(MoocListener listener) {\n\n\t\ttry {\n\t\t\t logger.info(\"add listener in MoocChannel is called and its \"+handler);\n\t\t\thandler.addListener(listener);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"failed to add listener\", e);\n\t\t}\n\t}", "public void addSelectionListener(SelectionListener listener) {\r\n\tcheckWidget();\r\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\r\n\tTypedListener typedListener = new TypedListener(listener);\r\n\taddListener(SWT.Selection,typedListener);\r\n\taddListener(SWT.DefaultSelection,typedListener);\r\n}", "public void addSelectionListener(SelectionListener listener) {\r\n\tcheckWidget();\r\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\r\n\tTypedListener typedListener = new TypedListener (listener);\r\n\taddListener (SWT.Selection,typedListener);\r\n\taddListener (SWT.DefaultSelection,typedListener);\r\n}", "@Override\n protected void addListener() {\n button.addActionListener(new DeleteWorkoutButton.ClickHandler());\n }", "public void addChangeListener(ChangeListener l) {\n }", "public void addChangeListener(ChangeListener l) {\n }", "public WorkspaceHandler(DashboardMVC mvc) {\n this.mvc = mvc;\n\n addListener(type -> unstoredChanges = type != Type.WORKSPACE);\n }", "public IUndo addListener(IListener listener) {\n return listeners.add(listener);\n }", "public void addListener(ATabbedPaneListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public Workspace() {\n\t\tdesktops.add(new WSDesktop());\n\t}", "void addChangeListener(ChangeListener cl);", "protected final void addListener(DialogModuleChangeListener listener) {\n listeners.add(listener);\n }", "public void addListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;", "private void attachListeners(){\n\t\t//Add window listener\n\t\tthis.removeWindowListener(this);\n\t\tthis.addWindowListener(this); \n\n\t\tbuttonCopyToClipboard.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tOS.copyStringToClipboard( getMessagePlainText() );\n\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\tshowErrorMessage(e.getMessage());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsetMessage( translations.getMessageHasBeenCopied() );\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonChooseDestinationDirectory.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchooseDirectoryAction();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonChangeFileNames.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchangeFileNamesAction(false);//false => real file change\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonSimulateChangeFileNames.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchangeFileNamesAction(true);//true => only simulation of change with log\n\t\t\t\tif(DebuggingConfig.debuggingOn){\n\t\t\t\t\tshowTextAreaHTMLInConsole();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuttonExample.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetupInitialValues();\n\t\t\t\t//if it's not debugging mode\n\t\t\t\tif(!DebuggingConfig.debuggingOn){\n\t\t\t\t\tshowPlainMessage(translations.getExampleSettingsPopup());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuttonClear.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttextArea.setText(textAreaInitialHTML);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonResetToDefaults.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif( deleteSavedObject() ) {\n\t\t\t\t\tsetMessage( translations.getPreviousSettingsRemovedFromFile().replace(replace, getObjectSavePath()) );\n\t\t\t\t\tsetMessage( translations.getPreviousSettingsRemoved() );\n\t\t\t\t\t//we have to delete listener, because it's gonna save settings after windowClosing, we don't want that\n\t\t\t\t\tFileOperationsFrame fileOperationsFrame = (FileOperationsFrame) getInstance();\n\t\t\t\t\tfileOperationsFrame.removeWindowListener(fileOperationsFrame);\n\t\t\t\t\tresetFields();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tshowWarningMessage( translations.getFileHasNotBeenRemoved().replace(replace, getObjectSavePath()) + BR + translations.getPreviousSettingsHasNotBeenRemoved() );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcomboBox.addActionListener(new ActionListener() {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJComboBox<String> obj = (JComboBox<String>) arg0.getSource();\n\t\t\t\tselectedLanguage = AvailableLanguages.getByName( (String)obj.getSelectedItem() ) ;\n\t\t\t\tselectLanguage(selectedLanguage);\n\t\t\t\tsetComponentTexts();\n\t\t\t};\n\t\t});\t\n\t\t\n\t\t//for debug \n\t\tif(DebuggingConfig.debuggingOn){\n\t\t\tbuttonExample.doClick();\n\t\t}\n\t\t\n\t\t\n\t}", "public void addListener(EventListener listener);", "private void addListeners() {\n \t\tfHistoryListener= new HistoryListener();\n \t\tfHistory.addOperationHistoryListener(fHistoryListener);\n \t\tlistenToTextChanges(true);\n \t}", "public void addInternalListener(InternalListener listener) {\r\n getManager().addInternalListener(listener);\r\n }", "protected void installListeners() {\n }", "protected void installListeners() {\n }", "private void addListener(org.eclipse.swt.widgets.Tree tree) {\n\t\t// Listener fuer \"Folder auf machen\"\n\t\ttree.addListener(SWT.Expand, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\thandleFolderOpen(event);\n\t\t\t}\n\t\t});\n\t\t// Listener fuer \"Folder auf machen\"\n\t\ttree.addListener(SWT.Collapse, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\thandleFolderClose(event);\n\t\t\t}\n\t\t});\n\t\t// Listener fuer die Aktionen\n\t\ttree.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\thandleSelect(e);\n\t\t\t}\n\t\t});\n\t}", "public void addSiteListener(Site.Listener listener) {\r\n getManager().addSiteListener(listener);\r\n }", "void addListener(IEventChannelListener<K, V> listener);", "public void addAnotherGame(ChangeListener listener){\n m_addAnotherGame.add(listener);\n }", "public void listenChkBoxAddListner(ActionListener listener)\r\n\t{\r\n\t\tlistenChkBox.addActionListener(listener);\r\n\t}", "public void testListeners() {\n\n\t\tLogAndTraceBroker broker = LogAndTraceBroker.getBroker();\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"WARNING\");\n\t\tbroker.registerInternalListeners();\n\n\t\tLogListener logL = new LogListener() {\n\n\t\t\tpublic void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) {\n\t\t\t\tString s = \"log(\" + pLevel.intValue() + \",\" + pMessageKey + \",\" + pMessage + \",\"\n\t\t\t\t\t\t+ pParameters.length + \")\";\n\t\t\t\tverify(\"log(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t};\n\t\tbroker.addLogListener(logL);\n\n\t\tTraceListener traceL = new TraceListener() {\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage,\n\t\t\t\t\tThrowable pThrown) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \",\" + pThrown.getMessage() + \")\";\n\t\t\t\tverify(\"trace(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \")\";\n\t\t\t\tverify(\"trace(3)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t};\n\t\tbroker.addTraceListener(traceL);\n\n\t\t// At this point, should have the three internal and two external\n\t\t// listeners\n\t\tList<?> listeners = broker.getLogListeners();\n\t\tverify(\"Count of log listeners\", EQUAL, new Integer(listeners.size()), new Integer(3));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of trace listeners\", EQUAL, new Integer(listeners.size()), new Integer(2));\n\n\t\tLogListener logDummy = new LogListener() {\n\n\t\t\tpublic void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) {\n\t\t\t\tString s = \"dummy log(\" + pLevel.intValue() + \",\" + pMessageKey + \",\" + pMessage\n\t\t\t\t\t\t+ \",\" + pParameters.length + \")\";\n\t\t\t\tverify(\"log(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t};\n\n\t\tbroker.removeLogListener(logDummy);\n\n\t\t// At this point, should still have the three internal and two external\n\t\t// listeners (previous removeLogListener did nothing)\n\t\tlisteners = broker.getLogListeners();\n\t\tverify(\"Count of log listeners\", EQUAL, new Integer(listeners.size()), new Integer(3));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of trace listeners\", EQUAL, new Integer(listeners.size()), new Integer(2));\n\n\t\tverify(\"testListeners1: isLoggableMessage(OFF) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.OFF) == false);\n\t\tverify(\"testListeners1: isLoggableTrace(OFF) != false\",\n\t\t\t\tbroker.isLoggableTrace(Level.OFF) == false);\n\t\tverify(\"testListeners1: isLoggableMessage(+1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == true);\n\t\tverify(\"testListeners1: isLoggableTrace(+1) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.SEVERE) == true);\n\t\tverify(\"testListeners1: isLoggableMessage(==) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == true);\n\t\tverify(\"testListeners1: isLoggableTrace(==) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.WARNING) == true);\n\t\tverify(\"testListeners1: isLoggableMessage(-1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == true);\n\t\tverify(\"testListeners1: isLoggableTrace(-1) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.INFO) == true);\n\n\t\tbroker.removeLogListener(logL);\n\t\tbroker.removeTraceListener(traceL);\n\n\t\t// At this point, should have the three internal listeners\n\t\tlisteners = broker.getLogListeners();\n\t\tverify(\"Count of log listeners - external\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(2));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of trace listeners - external\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\n\t\tverify(\"testListeners2: isLoggableMessage(+1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == true);\n\t\tverify(\"testListeners2: isLoggableTrace(+1) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.SEVERE) == true);\n\t\tverify(\"testListeners2: isLoggableMessage(==) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == true);\n\t\tverify(\"testListeners2: isLoggableTrace(==) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.WARNING) == true);\n\t\tverify(\"testListeners2: isLoggableMessage(-1) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == false);\n\t\tverify(\"testListeners2: isLoggableTrace(-1) != false\",\n\t\t\t\tbroker.isLoggableTrace(Level.INFO) == false);\n\n\t\tList<LogListener> logListeners = broker.getLogListeners();\n\t\tIterator<LogListener> iterL = logListeners.iterator();\n\t\twhile (iterL.hasNext()) {\n\t\t\tbroker.removeLogListener(iterL.next());\n\t\t}\n\n\t\tList<TraceListener> traceListeners = broker.getTraceListeners();\n\t\tIterator<TraceListener> iterT = traceListeners.iterator();\n\t\twhile (iterT.hasNext()) {\n\t\t\tbroker.removeTraceListener(iterT.next());\n\t\t}\n\n\t\t// At this point, should have no listeners\n\t\tlisteners = broker.getLogListeners();\n\t\tverify(\"Count of log listeners - all\", EQUAL, new Integer(listeners.size()), new Integer(0));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of trace listeners - all\", EQUAL, new Integer(listeners.size()), new Integer(\n\t\t\t\t0));\n\n\t\tverify(\"testListeners3: isLoggableMessage(+1) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == false);\n\t\tverify(\"testListeners3: isLoggableTrace(+1) != false\",\n\t\t\t\tbroker.isLoggableTrace(Level.SEVERE) == false);\n\t\tverify(\"testListeners3: isLoggableMessage(==) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == false);\n\t\tverify(\"testListeners3: isLoggableTrace(==) != false\", broker\n\t\t\t\t.isLoggableTrace(Level.WARNING) == false);\n\t\tverify(\"testListeners3: isLoggableMessage(-1) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == false);\n\t\tverify(\"testListeners3: isLoggableTrace(-1) != false\",\n\t\t\t\tbroker.isLoggableTrace(Level.INFO) == false);\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"OFF\");\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\t}" ]
[ "0.7023346", "0.68610626", "0.6484676", "0.56040156", "0.55731845", "0.55469847", "0.5497783", "0.5483446", "0.54568857", "0.54412276", "0.54399383", "0.5438055", "0.53484493", "0.5329375", "0.5316865", "0.53111386", "0.5298056", "0.52894616", "0.5281644", "0.5263718", "0.5191051", "0.51559246", "0.515274", "0.5150684", "0.51488227", "0.51476413", "0.5139098", "0.5129792", "0.5127047", "0.512071", "0.5113192", "0.5109019", "0.5107951", "0.5096063", "0.50957125", "0.50785387", "0.5073209", "0.504974", "0.5038508", "0.50379956", "0.5033705", "0.50246733", "0.5016929", "0.5001689", "0.5001173", "0.4997072", "0.4992333", "0.49876645", "0.49870858", "0.49844164", "0.49829444", "0.49779308", "0.4977535", "0.49766293", "0.49642956", "0.49482167", "0.49458578", "0.49412078", "0.49398458", "0.49345368", "0.4933166", "0.4914116", "0.49130318", "0.490809", "0.4906577", "0.49057662", "0.48885018", "0.4882504", "0.48819363", "0.4877888", "0.48756295", "0.48725948", "0.48611838", "0.48584163", "0.48573393", "0.48533565", "0.48510414", "0.48503298", "0.4842246", "0.48386797", "0.48386797", "0.48285696", "0.4825737", "0.48181546", "0.4817345", "0.48134556", "0.4811683", "0.48098344", "0.4809271", "0.48072827", "0.48047146", "0.48024604", "0.4801473", "0.4801473", "0.48006484", "0.47843313", "0.47805876", "0.47791582", "0.47751564", "0.4769284" ]
0.802055
0
Test of cueEpisodicMemories method, of class WorkspaceImpl.
@Test public void testCueEpisodicMemories() { MockCueListener cueListener = new MockCueListener(); workspace.addCueListener(cueListener); content.addDefaultNode(node1); content.addDefaultNode(node2); workspace.cueEpisodicMemories(content); NodeStructure ns = cueListener.ns; assertNotNull(ns); assertTrue(ns.containsNode(node1)); assertTrue(ns.containsNode(node2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testGetEnergyConsumption() {\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.setSkillLevel(0);\n\t\tcontrol.switchFromTitleToGenerating(0);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\tassertTrue(explorer.getEnergyConsumption() == 0);\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getEnergyConsumption() == 6);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getEnergyConsumption() == 10);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getEnergyConsumption() == 11);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getEnergyConsumption() == 15);\n\t\t}\n\t\tassertTrue(explorer.getEnergyConsumption() > 0);\n\t}", "@Test\r\n\tpublic void testAddCueListener() {\r\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addCueListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "@Test\n public void Board_creteHouseAndStoreArray_shouldCreateArrayList()\n {\n int actual = 0;\n Iterator<Integer> iterator = sut.getHousesAndStores();\n int expected = sut.getBoardRows()*sut.getBoardHousesPerSide() + sut.getStoreSize();\n while(iterator.hasNext())\n {\n iterator.next();\n actual++;\n }\n assertEquals(expected,actual);\n }", "@Test\n\tpublic void test() {\n\t\tCollection<Storage> storage = new ArrayList<Storage>();\n\t\tstorage.add(new Memory(2048));\n\n\t\t// create a list of disks to build a RAID array\n\t\tList<Disk> disks = new ArrayList<Disk>();\n\t\tdisks.add(new SSD(1, 1, 1));\n\t\tdisks.add(new SSD(1, 1, 1));\n\t\t\n\t\t// add the new RAID array to the storage collection\n\t\tstorage.add(new RAID(disks));\n\n\t\t// build the laptop using the storage\n\t\tLaptop laptop = new Laptop(\"Apple\", \"Intel\", storage);\n\t\tlaptop.setOpen(true);\n\n\t\t// install some applications!\n\t\tlaptop.installApplication(\"eclipse\");\n\t\tlaptop.installApplication(\"chrome\");\n\n\t\tLaptopBag bag = new LaptopBag(\"Mission Workshop\", 10.0, Color.getRandomColor());\n\t\tSystem.out.println(totalStorageCapacity(laptop));\n\t}", "@Test\n public void testGetDecksFromPlayer() {\n System.out.println(\"TestgetDecksFromPlayer\");\n int playerID = 1;\n int expResult = 1;\n ArrayList<Deck> result = cardDeckController.getDecksFromPlayer(playerID);\n assertEquals(expResult, result.size());\n fail(\"The expected result did not match the output expected number of decks : \" + expResult + \" Actual : \" + result.size());\n }", "@Test\r\n void testMem2Third() {\r\n Mem2 testStrat = new Mem2();\r\n PeriodicCCD testStrat2 = new PeriodicCCD();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n ArrayList<Character> expected = new ArrayList<>(Arrays.asList('c', 'c', \r\n 'c', 'd', 'c', 'c', 'd', 'd'));\r\n Game game = new Game(testStrat, testStrat2, 8, payoffs);\r\n game.playGame();\r\n assertEquals(game.historyStrategy1, expected, \"Mem2 strategy not functioning correctly\");\r\n }", "public void testSizeManagementWMS() {\n initCache();\n \n ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n long putSize = 0;\n long maxSize = 0;\n int cacheSizeDropCount = 0;\n for (int i = 0; i < 1000; i++) {\n WMSTile wco = getDefaultWMSCacheObject(\"q\" + i, 50, true);\n putSize += wco.getSize();\n\n wcos.add(wco);\n long size = wmsCache.getSize();\n\n if (size < maxSize) {\n maxSize = size;\n cacheSizeDropCount++;\n } else {\n maxSize = size;\n }\n\n boolean result = wmsCache.put(wco.getQuery(), wco.getColourmode(), PointType.POINT_1, wco);\n\n //test if cache is full the put was unsuccessful\n //allow for cachecleaner to have reduced the size between put and test\n boolean test = (wmsCache.getSize() + wco.getSize() > wmsCache.getMaxCacheSize()) == !result;\n if (test == false) {\n assertTrue((size + wco.getSize() > wmsCache.getMaxCacheSize()) == !result);\n }\n\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n }\n\n //test size calcuations are operating\n assertTrue(putSize > 10000);\n\n //test cache cleaner was run more than once\n assertTrue(cacheSizeDropCount > 1);\n\n //test cache size is under max\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test gets. Anything that is a placeholder will be null.\n int cachedCount = 0;\n for (int i = 0; i < wcos.size(); i++) {\n WMSTile getwco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (getwco.getCached()) {\n assertTrue(compareWMSObjects(wcos.get(i), getwco));\n cachedCount++;\n }\n }\n\n //test if at least 2 objects were cached at the end\n assertTrue(cachedCount > 1);\n }", "@Test\n public void getEspeciesTest() {\n List<EspecieEntity> list = especieLogic.getEspecies();\n Assert.assertEquals(especieData.size(), list.size());\n for (EspecieEntity entity : list) {\n boolean found = false;\n for (EspecieEntity storedEntity : especieData) {\n if (entity.getId().equals(storedEntity.getId())) {\n found = true;\n }\n }\n Assert.assertTrue(found);\n }\n }", "public void test_GetAllContestChannels_Failure1() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.close();\r\n\r\n beanUnderTest.getAllContestChannels();\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Test\n public void testGetCasesVoisinesOccupees() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test getCasesVoisinesOccupees ==============>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n instance.ajoutInsecte(reine, orig);\n\n System.out.println(\"test avec l'origine, haut et bas occupé :\");\n ArrayList<Case> expected = new ArrayList<>();\n expected.add(new Case(orig.voisinBas()));\n expected.add(new Case(orig.voisinHaut()));\n\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n\n ArrayList<Case> res = (ArrayList<Case>) instance.getCasesVoisinesOccupees(new Case(orig));\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec l'origine, tout est occupé :\");\n expected = new ArrayList<>();\n expected.add(new Case(orig.voisinBas()));\n expected.add(new Case(orig.voisinDroiteBas()));\n expected.add(new Case(orig.voisinDroiteHaut()));\n expected.add(new Case(orig.voisinGaucheBas()));\n expected.add(new Case(orig.voisinGaucheHaut()));\n expected.add(new Case(orig.voisinHaut()));\n\n instance.ajoutInsecte(reine, orig.voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut());\n\n res = (ArrayList<Case>) instance.getCasesVoisinesOccupees(new Case(orig));\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec l'origine, tout est libre :\");\n expected = new ArrayList<>();\n\n instance.deleteInsecte(reine, orig.voisinHaut());\n instance.deleteInsecte(reine, orig.voisinGaucheHaut());\n instance.deleteInsecte(reine, orig.voisinGaucheBas());\n instance.deleteInsecte(reine, orig.voisinDroiteHaut());\n instance.deleteInsecte(reine, orig.voisinDroiteBas());\n instance.deleteInsecte(reine, orig.voisinBas());\n\n res = (ArrayList<Case>) instance.getCasesVoisinesOccupees(new Case(orig));\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"\");\n }", "@Test\n public void getAllComputerBuilds() {\n Iterable<ComputerBuild> computerBuilds = computerBuildService.getAllComputerBuilds();\n assertNotNull(computerBuilds);\n assertNotEquals(0, computerBuilds.spliterator().getExactSizeIfKnown());\n }", "@Ignore\n @Test\n public void ECM() throws IOException {\n Files.readAllLines(Path.of(\"src/test/resources/ECM.EPD\")).stream().forEach(this::testPos);\n\n System.out.println(\"TESTS PASSED: \" + counter);\n System.out.println();\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 4294967244L, 9223372036854775806L);\n range0.getBegin();\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n range0.toString(range_CoordinateSystem1);\n Object object0 = new Object();\n range0.equals(range_CoordinateSystem1);\n Range.CoordinateSystem.values();\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n range0.equals((Object) null);\n Range.CoordinateSystem[] range_CoordinateSystemArray1 = Range.CoordinateSystem.values();\n assertNotSame(range_CoordinateSystemArray1, range_CoordinateSystemArray0);\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setObserverCameraElevationAdjusted(true);\n homeEnvironment0.setPhotoQuality(5);\n HomeEnvironment.DrawingMode homeEnvironment_DrawingMode0 = HomeEnvironment.DrawingMode.FILL;\n homeEnvironment0.setDrawingMode(homeEnvironment_DrawingMode0);\n homeEnvironment0.setSubpartSizeUnderLight((-1.0F));\n homeEnvironment0.setGroundColor(5);\n homeEnvironment0.setGroundColor(0);\n homeEnvironment0.setVideoWidth(3);\n HomeEnvironment.Property.values();\n homeEnvironment0.getVideoCameraPath();\n homeEnvironment0.clone();\n assertEquals((-1.0F), homeEnvironment0.getSubpartSizeUnderLight(), 0.01F);\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setCeillingLightColor(0);\n homeEnvironment0.setAllLevelsVisible(true);\n homeEnvironment0.setPhotoQuality(0);\n homeEnvironment0.getSkyColor();\n homeEnvironment0.getSubpartSizeUnderLight();\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n homeEnvironment1.setCeillingLightColor(0);\n homeEnvironment1.setSkyColor(618);\n HomeEnvironment.Property[] homeEnvironment_PropertyArray0 = HomeEnvironment.Property.values();\n assertEquals(20, homeEnvironment_PropertyArray0.length);\n }", "public void test_GetContestsForProject_Failure1_EMClosed()\r\n throws Exception {\r\n initContext();\r\n\r\n entityManager.close();\r\n\r\n try {\r\n beanUnderTest.getContestsForProject(1);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n homeEnvironment0.setVideoWidth(11053224);\n homeEnvironment0.setSkyColor(11053224);\n List<Camera> list0 = homeEnvironment0.getVideoCameraPath();\n homeEnvironment0.setVideoCameraPath(list0);\n HomeEnvironment.DrawingMode[] homeEnvironment_DrawingModeArray0 = HomeEnvironment.DrawingMode.values();\n homeEnvironment0.getPhotoQuality();\n List<Camera> list1 = homeEnvironment0.getVideoCameraPath();\n homeEnvironment0.setVideoCameraPath(list1);\n HomeEnvironment.Property.values();\n homeEnvironment0.setPhotoHeight(0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.PHOTO_HEIGHT;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"\", propertyChangeListener0);\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n homeEnvironment0.setVideoCameraPath(list1);\n homeEnvironment0.setWallsAlpha(0.0F);\n HomeEnvironment.DrawingMode[] homeEnvironment_DrawingModeArray1 = HomeEnvironment.DrawingMode.values();\n assertNotSame(homeEnvironment_DrawingModeArray1, homeEnvironment_DrawingModeArray0);\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244851), (HomeTexture) null, (-2146244851), (HomeTexture) null, (-2146244851), (-2146244851));\n AspectRatio aspectRatio0 = AspectRatio.RATIO_4_3;\n homeEnvironment0.setVideoAspectRatio(aspectRatio0);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals((-2146244851), homeEnvironment0.getSkyColor());\n assertEquals((-2.14624486E9F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals((-2146244851), homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-2146244851), homeEnvironment0.getGroundColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n }", "public void test_060() {\n\t\ttry {\n\t\t\tUpdatableChronicle e = db.getChronicle(FULLNAME, true).edit();\n\t\t\te.createSeries(\"foo\");\n\t\t\texpectException();\n\t\t} catch (Exception e) {\n\t\t\tassertException(e, D.D40114);\n\t\t}\n\t}", "@Test\n\tvoid test() {\n\t\tTable[] myTables = new Table[5];\n\t\tfor(int i = 0; i < myTables.length; i++) {\n\t\t\tmyTables[i] = new Table(i);\n\t\t}\n\t\tBusBoy busBoy = new BusBoy(myTables);\n\t\tSystem.out.println(myTables[0]);\n\t\tassert(myTables[0].toString().equals(\"ReadyTable\"));\n\t\tmyTables[0].nextState();\n\t\tassert(myTables[0].toString().equals(\"InUseTable\"));\n\t\tmyTables[0].nextState();\n\t\tSystem.out.println(busBoy.tablesToClean.peek());\n\t\tSystem.out.println(myTables[0]);\n\t\tassertEquals(busBoy.tablesToClean.peek(), myTables[0]);\n\t\tmyTables[0].nextState();\n\t\tassert(myTables[0].toString().equals(\"BeingCleanedTable\"));\n\t}", "@Test(timeout = 4000)\n public void test73() throws Throwable {\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, (String) null);\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.getXAConnectionFactory();\n connectionFactories0.getXAConnectionFactory();\n connectionFactories0.addConnectionFactory((ConnectionFactory) null);\n XATopicConnectionFactory[] xATopicConnectionFactoryArray0 = new XATopicConnectionFactory[0];\n connectionFactories0.setXATopicConnectionFactory(xATopicConnectionFactoryArray0);\n connectionFactories0.getConnectionFactory();\n connectionFactories0.getConnectionFactory();\n connectionFactories0.getConnectionFactory();\n connectionFactories0.getConnectionFactory();\n XAConnectionFactory[] xAConnectionFactoryArray0 = connectionFactories0.getXAConnectionFactory();\n XAConnectionFactory[] xAConnectionFactoryArray1 = connectionFactories0.getXAConnectionFactory();\n assertNotSame(xAConnectionFactoryArray1, xAConnectionFactoryArray0);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(false);\n homeEnvironment0.setPhotoQuality(2377);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"H3Z\", \"H3Z\", (Content) null, (-1063.9532F), (-1.0F), \"H3Z\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n homeEnvironment0.setGroundTexture(homeTexture0);\n Object object0 = new Object();\n Object object1 = new Object();\n PropertyChangeEvent propertyChangeEvent0 = new PropertyChangeEvent(object0, \"H3Z\", object1, homeEnvironment0);\n propertyChangeEvent0.setPropagationId(homeTexture0);\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"QXhr@xq\", propertyChangeListener0);\n propertyChangeListenerProxy0.propertyChange(propertyChangeEvent0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.GROUND_TEXTURE;\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n HomeEnvironment homeEnvironment1 = new HomeEnvironment();\n homeEnvironment1.setAllLevelsVisible(false);\n homeEnvironment1.setGroundColor(1614);\n homeEnvironment1.setCeillingLightColor(12);\n homeEnvironment0.setPhotoQuality(2292);\n homeEnvironment1.setPhotoHeight(3273);\n assertEquals(12, homeEnvironment1.getCeillingLightColor());\n \n HomeEnvironment homeEnvironment2 = new HomeEnvironment();\n int int0 = homeEnvironment2.getVideoQuality();\n assertEquals(0, int0);\n }", "void testCollector(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.worklist, this.mtACell);\r\n this.game2.collector(this.mtACell);\r\n t.checkExpect(this.game2.worklist, this.mtACell);\r\n\r\n t.checkExpect(this.game9.worklist, this.mtACell);\r\n this.game9.collector(new ArrayList<ACell>(Arrays.asList(\r\n this.game9.indexHelp(0, 0))));\r\n t.checkExpect(this.game9.worklist,\r\n new ArrayList<ACell>(Arrays.asList(this.game9.indexHelp(1, 0),\r\n this.game9.indexHelp(0, 1))));\r\n\r\n //testing for an ACell\r\n initData();\r\n t.checkExpect(this.game2.worklist, this.mtACell);\r\n this.e2.collector(this.game2);\r\n t.checkExpect(this.game2.worklist, this.mtACell);\r\n\r\n t.checkExpect(this.game9.worklist, this.mtACell);\r\n this.game9.indexHelp(0, 0).collector(this.game9);\r\n t.checkExpect(this.game9.worklist,\r\n new ArrayList<ACell>(Arrays.asList(this.game9.indexHelp(1, 0),\r\n this.game9.indexHelp(0, 1))));\r\n\r\n }", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n \n homeEnvironment0.setObserverCameraElevationAdjusted(false);\n homeEnvironment0.clone();\n assertFalse(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(false);\n homeEnvironment0.setPhotoQuality(2377);\n homeEnvironment0.getSkyColor();\n homeEnvironment0.getSubpartSizeUnderLight();\n homeEnvironment0.setSkyColor(2377);\n assertEquals(2377, homeEnvironment0.getPhotoQuality());\n }", "@Test\n public void testLargeSize(){\n assertEquals(25, largeMaze.size());\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoWidth(320);\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n }", "@Test\r\n public void testGetAtoms() {\r\n List<CMLAtom> atoms = spectator.getAtoms();\r\n Assert.assertEquals(\"atoms\", 2, atoms.size());\r\n\r\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-367), (HomeTexture) null, (-367), (HomeTexture) null, (-367), (-367));\n homeEnvironment0.setPhotoHeight(300);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals((-367), homeEnvironment0.getGroundColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-367), homeEnvironment0.getLightColor());\n assertEquals((-367), homeEnvironment0.getSkyColor());\n assertEquals((-367.0F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test\n public void testDajMeteoPrognoze() throws Exception {\n System.out.println(\"dajMeteoPrognoze\");\n int id = 0;\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n MeteoPrognoza[] expResult = null;\n MeteoPrognoza[] result = instance.dajMeteoPrognoze(id, adresa);\n assertArrayEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n public void testSize(){\n assertEquals(25, largeMaze.size());\n }", "@Test\n public void capacityTest() {\n // TODO: test capacity\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-564), (HomeTexture) null, (-564), (HomeTexture) null, (-346), (-346));\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.VIDEO_QUALITY;\n homeEnvironment0.removePropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-564), homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals((-346.0F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-346), homeEnvironment0.getLightColor());\n assertEquals((-564), homeEnvironment0.getSkyColor());\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"FILL\", \"FILL\", (Content) null, 30.0F, 30.0F, \"FILL\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(189, homeTexture0, 1, homeTexture0, 8, 1713.4752F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n \n homeEnvironment0.setObserverCameraElevationAdjusted(true);\n assertEquals(1, homeEnvironment0.getSkyColor());\n assertEquals(8, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(1713.4752F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(189, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "public static void getPiecesTest() {\n\t\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t\t \tBoard.setBoard();\n\t\t\tBoard.decPieceCount();\n\t\t \tSystem.out.println(Board.getPieceCount());\t\n\t\t\tSystem.out.println(Board.move(\n\t\t\t\t\tTEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t\t\tBoard.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tBoard.checkWin();\n\t\t\tSystem.out.println(\"Valid inputs\");\n\t\t\tSystem.out.println(\"OthelloBoard.clearPieces() - Begin\");\n\t\t\tSystem.out.println(\"Expected output: 0\");\n\t\t\tSystem.out.println(\"\");\n\t\t\tBoard.clearPieces();\n\t\t\tSystem.out.println(\"Actual output: \" + Board.getPieces());\n\t\t\tSystem.out.println(\"\");\n\t}", "@Test\r\n public void testGetAllChromInfo() throws Exception {\n assertEquals(7, queries.getAllChromInfo().size());\r\n }", "@Test\n public void testContinguosStorageOriginalSize() {\n list.addToFront(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.addToFront(\"Filler0\");\n list.addAtIndex(0, \"Filler#\");\n list.addAtIndex(2, \"Filler!\");\n list.addAtIndex(6, \"Filler$\");\n list.removeFromFront();\n list.removeFromBack();\n list.removeAtIndex(4);\n list.removeAtIndex(0);\n list.removeAtIndex(2);\n\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n for (int i = 0; i < list.size(); i++) {\n Assert.assertNotNull(((Object[]) (list.getBackingArray()))[i]);\n }\n for (int i = list.size(); i < actualCapacity; i++) {\n Assert.assertNull(((Object[]) (list.getBackingArray()))[i]);\n }\n }", "@Test\r\n public void Test026GetTotalAliveCells()\r\n {\r\n gol.makeLiveCell(2, 5);\r\n gol.makeLiveCell(2, 6);\r\n gol.makeLiveCell(2, 7);\r\n gol.makeLiveCell(3, 5);\r\n assertEquals(4, gol.getTotalAliveCells());\r\n }", "public void test_60925() {\n \t\t// setup\n \t\tIProject project = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\tString qualifier = getUniqueString();\n \t\tIFile file = getFileInWorkspace(project, qualifier);\n \n \t\t// should be nothing in the file system\n \t\tassertTrue(\"0.0\", !file.exists());\n \t\tassertTrue(\"0.1\", !file.getLocation().toFile().exists());\n \n \t\t// store a preference key/value pair\n \t\tIScopeContext context = new ProjectScope(project);\n \t\tString key = getUniqueString();\n \t\tString value = getUniqueString();\n \t\tPreferences node = context.getNode(qualifier);\n \t\tnode.put(key, value);\n \n \t\t// flush changes to disk\n \t\ttry {\n \t\t\tnode.flush();\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"1.0\", e);\n \t\t}\n \n \t\t// changes should appear in the workspace\n \t\tassertTrue(\"2.0\", file.exists());\n \t\tassertTrue(\"2.1\", file.isSynchronized(IResource.DEPTH_ZERO));\n \t}", "@Test\r\n\tpublic void testBlobCache() {\n\t\tRandomOrgCache<String[]> c = rocs[1].createBlobCache(5, 8);\r\n\t\tc.stop();\r\n\r\n\t\ttry {\r\n\t\t\tc.get();\r\n\t\t\tcollector.addError(new Error(\"should have thrown NoSuchElementException\"));\r\n\t\t} catch (NoSuchElementException e) {}\r\n\t\t\r\n\t\tc.resume();\r\n\t\t\r\n\t\tString[] got = null;\r\n\t\t\r\n\t\twhile (got == null) {\r\n\t\t\ttry {\r\n\t\t\t\tgot = c.get();\r\n\t\t\t} catch (NoSuchElementException e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(50);\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\tcollector.addError(new Error(\"shouldn't have been interrupted!\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcollector.checkThat(got, notNullValue());\r\n\t}", "@Test\n @Category(SlowTest.class)\n public void testAddData() throws Exception {\n geoService.setGeoDomainObjectGenerator( new GeoDomainObjectGeneratorLocal( this.getTestFileBasePath() ) );\n\n try {\n // RNA-seq data.\n Collection<?> results = geoService.fetchAndLoad( \"GSE37646\", false, true, false );\n ee = ( ExpressionExperiment ) results.iterator().next();\n } catch ( AlreadyExistsInSystemException e ) {\n ee = ( ( Collection<ExpressionExperiment> ) e.getData() ).iterator().next();\n assumeNoException( \"Test skipped because GSE37646 was not removed from the system prior to test\", e );\n }\n\n ee = experimentService.thawLite( ee );\n\n List<BioAssay> bioAssays = new ArrayList<>( ee.getBioAssays() );\n assertEquals( 31, bioAssays.size() );\n\n List<BioMaterial> bms = new ArrayList<>();\n for ( BioAssay ba : bioAssays ) {\n\n bms.add( ba.getSampleUsed() );\n }\n\n targetArrayDesign = this.getTestPersistentArrayDesign( 100, true );\n\n DoubleMatrix<CompositeSequence, BioMaterial> rawMatrix = new DenseDoubleMatrix<>(\n targetArrayDesign.getCompositeSequences().size(), bms.size() );\n /*\n * make up some fake data on another platform, and match it to those samples\n */\n for ( int i = 0; i < rawMatrix.rows(); i++ ) {\n for ( int j = 0; j < rawMatrix.columns(); j++ ) {\n rawMatrix.set( i, j, ( i + 1 ) * ( j + 1 ) * Math.random() / 100.0 );\n }\n }\n\n List<CompositeSequence> probes = new ArrayList<>( targetArrayDesign.getCompositeSequences() );\n\n rawMatrix.setRowNames( probes );\n rawMatrix.setColumnNames( bms );\n\n QuantitationType qt = this.makeQt( true );\n\n ExpressionDataDoubleMatrix data = new ExpressionDataDoubleMatrix( ee, qt, rawMatrix );\n\n assertNotNull( data.getBestBioAssayDimension() );\n assertEquals( rawMatrix.columns(), data.getBestBioAssayDimension().getBioAssays().size() );\n assertEquals( probes.size(), data.getMatrix().rows() );\n\n /*\n * Replace it.\n */\n ee = dataUpdater.replaceData( ee, targetArrayDesign, data );\n\n for ( BioAssay ba : ee.getBioAssays() ) {\n assertEquals( targetArrayDesign, ba.getArrayDesignUsed() );\n }\n\n ee = experimentService.thaw( ee );\n\n Set<QuantitationType> qts = ee.getRawExpressionDataVectors().stream()\n .map( RawExpressionDataVector::getQuantitationType )\n .collect( Collectors.toSet() );\n assertTrue( ee.getQuantitationTypes().containsAll( qts ) );\n assertEquals( 2, ee.getQuantitationTypes().size() );\n\n for ( BioAssay ba : ee.getBioAssays() ) {\n assertEquals( targetArrayDesign, ba.getArrayDesignUsed() );\n }\n\n assertEquals( 100, ee.getRawExpressionDataVectors().size() );\n\n for ( RawExpressionDataVector v : ee.getRawExpressionDataVectors() ) {\n assertTrue( v.getQuantitationType().getIsPreferred() );\n }\n\n assertEquals( 100, ee.getProcessedExpressionDataVectors().size() );\n\n Collection<DoubleVectorValueObject> processedDataArrays = dataVectorService.getProcessedDataArrays( ee );\n\n for ( DoubleVectorValueObject v : processedDataArrays ) {\n assertEquals( 31, v.getBioAssays().size() );\n }\n\n /*\n * Test adding data (non-preferred)\n */\n qt = this.makeQt( false );\n ExpressionDataDoubleMatrix moreData = new ExpressionDataDoubleMatrix( ee, qt, rawMatrix );\n ee = dataUpdater.addData( ee, targetArrayDesign, moreData );\n\n ee = experimentService.thaw( ee );\n try {\n // add preferred data twice.\n dataUpdater.addData( ee, targetArrayDesign, data );\n fail( \"Should have gotten an exception\" );\n } catch ( IllegalArgumentException e ) {\n // okay.\n }\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.LIGHT_COLOR;\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n byte[] byteArray0 = new byte[3];\n byteArray0[0] = (byte)108;\n byteArray0[1] = (byte)27;\n byteArray0[2] = (byte)14;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n discretize0.setBins((-830));\n discretize0.getOptions();\n assertEquals((-830), discretize0.getBins());\n }", "@Test\n\tpublic void testIfKingIsCaptureBySpecialSquareVert()\n\t{\n\t\tData d=new Data();\n\t\td.set(0,100);\n\t\td.set(29,89);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(89);\n\t\tassertEquals(test_arr.size(),0);\n\t}", "@Test\n\tpublic void testCalculateCalories() \n\t{\n\t\tParticipant participant = new Participant(\"Daniel\", 155, Participant.GENDER.MALE, 1);\n\t\tparticipant.setCurrentBeers(2);\n\t\tparticipant.setCurrentWine(2);\n\t\tparticipant.setCurrentCocktails(2);\n\t\tparticipant.setCurrentShots(3);\n\t\t\n\t\tassertEquals(1228, HealthCalculator.caluclateCalories(participant));\n\t}", "@Test\r\n public void testTransferMetalInfo() {\r\n System.out.println(\"transferMetalInfo - Table have records\");\r\n List<Vector> result = KnowledgeSystemBeanInterface.transferMetalInfo();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testTransferMetalInfo ---------------------------------------------------- Done\");\r\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.GROUND_COLOR;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"Super class isn't cloneable\", propertyChangeListener0);\n homeEnvironment0.removePropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoQuality(0);\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(0, homeEnvironment0.getVideoQuality());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n }", "@Test\n public void testOccupees() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test occupees ==============================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n\n System.out.println(\"test avec aucune case occupees :\");\n ArrayList<Case> expected = new ArrayList<>();\n\n ArrayList<Case> res = (ArrayList<Case>) instance.occupees();\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec une case occupees :\");\n\n expected = new ArrayList<>();\n expected.add(new Case(orig));\n\n instance.ajoutInsecte(reine, orig);\n\n res = (ArrayList<Case>) instance.occupees();\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec 6 cases occupees :\");\n\n expected = new ArrayList<>();\n expected.add(new Case(orig));\n expected.add(new Case(new HexaPoint(0, -1, 1)));\n expected.add(new Case(new HexaPoint(0, -2, 2)));\n expected.add(new Case(new HexaPoint(0, -3, 3)));\n expected.add(new Case(new HexaPoint(0, -4, 4)));\n expected.add(new Case(new HexaPoint(0, -5, 5)));\n\n instance.ajoutInsecte(reine, new HexaPoint(0, -1, 1));\n instance.ajoutInsecte(reine, new HexaPoint(0, -2, 2));\n instance.ajoutInsecte(reine, new HexaPoint(0, -3, 3));\n instance.ajoutInsecte(reine, new HexaPoint(0, -4, 4));\n instance.ajoutInsecte(reine, new HexaPoint(0, -5, 5));\n\n res = (ArrayList<Case>) instance.occupees();\n\n arrayCorresponds(res, expected);\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"\");\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/A_.XML\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"\");\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n FileInputStream fileInputStream0 = fileUtil0.fetchAccessories(\"\", arrayList0);\n assertEquals(0, fileInputStream0.available());\n }", "@Override\r\n protected void tearDown()\r\n {\r\n seed = null;\r\n island = null;\r\n position = null;\r\n }", "public Energy getCalories() throws ClassCastException;", "@Test\n\tpublic void testGetDevContainer() {\n\t\t\n\t\tHashMap<String, Object> deviceSpec = new HashMap<String, Object>();\n\t\tdeviceSpec.put(\"smgdevicetype\", SIDeviceType.Accelerometer);\n\t\timpl.addDevContainer(new DeviceContainer(new DeviceId(\"dev\", \"dummy\"), \"foo\",deviceSpec));\n\t\t\n\t\tDeviceContainer container = impl.getDeviceContainer(new DeviceId(\"dev\", \"dummy\"));\n\t\tassertEquals(container.getContainerId(), \"dummy.dev\");\n\t\tassertEquals(container.getContainerFunction(), ContainerFunction.NONE);\n\t\tassertEquals(container.isVirtualContainer(), false);\n\t\tassertEquals(container.getContainerType(), ContainerType.DEVICE);\n\t}", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, 1.0F, 2120);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2120, homeTexture0, 11053224, homeTexture0, 2120, 896.0079F);\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n HomeEnvironment homeEnvironment2 = new HomeEnvironment(2120, homeTexture0, 2120, 11053224, (-2542.22F));\n homeEnvironment2.setAllLevelsVisible(true);\n homeEnvironment2.setAllLevelsVisible(false);\n homeEnvironment1.setObserverCameraElevationAdjusted(false);\n HomeEnvironment.DrawingMode[] homeEnvironment_DrawingModeArray0 = HomeEnvironment.DrawingMode.values();\n assertEquals(3, homeEnvironment_DrawingModeArray0.length);\n }", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"FILL\", (String) null, (Content) null, (-826), (-826), \"\\\"^qTJc:g?\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(484, homeTexture0, 1371, homeTexture0, (-826), 756.9911F);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.VIDEO_FRAME_RATE;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy((String) null, propertyChangeListener0);\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(1371, homeEnvironment0.getSkyColor());\n assertEquals(484, homeEnvironment0.getGroundColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(756.9911F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-826), homeEnvironment0.getLightColor());\n }", "private MemoryTest() {\r\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture((String) null, (Content) null, 2688.5F, 2688.5F, false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(300, homeTexture0, 1025, homeTexture0, 1025, 300);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(1025, homeEnvironment0.getLightColor());\n assertEquals(1025, int0);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(300.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(300, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test\n public void eventNoMemory() throws Exception {\n GCEvent event = new GCEvent();\n event.setType(G1_YOUNG_INITIAL_MARK);\n event.setTimestamp(0.5);\n event.setPause(0.2);\n // but no memory information -> all values zero there\n GCModel model = new GCModel();\n model.add(event);\n DoubleData initiatingOccupancyFraction = model.getCmsInitiatingOccupancyFraction();\n Assert.assertEquals(\"fraction\", 0, initiatingOccupancyFraction.getSum(), 0.1);\n }", "@Test(timeout = 4000)\n public void test081() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(11, (HomeTexture) null, 11, (HomeTexture) null, 11, 11);\n homeEnvironment0.setAllLevelsVisible(false);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(11.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(11, homeEnvironment0.getGroundColor());\n assertEquals(11, homeEnvironment0.getLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(11, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setVideoQuality(76);\n homeEnvironment0.clone();\n assertEquals(76, homeEnvironment0.getVideoQuality());\n }", "public TileEntityEnergyCube()\n\t{\n\t\tsuper(\"Energy Cube\", 0);\n\t\t\n\t\tinventory = new ItemStack[2];\n\t}", "public TileEntityEnergyCube()\n\t{\n\t\tsuper(\"Energy Cube\", 0);\n\t\t\n\t\tinventory = new ItemStack[2];\n\t}", "public void test_GetContest_Failure1_EntityManagerClosed()\r\n throws Exception {\r\n initContext();\r\n\r\n EntityManager em = (EntityManager) context.lookup(\"contestManager\");\r\n em.close();\r\n\r\n try {\r\n beanUnderTest.getContest(1000);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Test\n public void cantAddMoreThanCapacity(){\n for (int i = 0; i<12; i++){\n library.addBook(book);\n }\n assertEquals(10, library.bookCount());\n }", "@Test\n public void testMediaMovelSimples() {\n System.out.println(\"MediaMovelSimples\");\n int[] energia = null;\n int linhas = 0;\n double n = 0;\n Double[] expResult = null;\n Double[] resultArray = null;\n double[] result = ProjetoV1.MediaMovelSimples(energia, linhas, n);\n if (resultArray != null) {\n resultArray = ArrayUtils.converterParaArrayDouble(result);\n }\n assertArrayEquals(expResult, resultArray);\n\n }", "@Test\n public void cidade_valida_retornar_valores(){\n for(int cidade=0;cidade<cidadesdisponiveis.size();cidade++){\n assertThat(cache.getAirQualityByCity(cidadesdisponiveis.get(cidade))).isEqualTo(airquality);\n }\n }", "@Test\n public void testSmallSize(){\n assertEquals(9, smallMaze.size());\n }", "@Test\n @DisplayName(\"Action Marker Production Yellow And Buy Test\")\n public void ActionMarkerProductionYellowAndBuyTest() throws IOException, InterruptedException {\n ActionMarkerProductionYellow actionMarker = new ActionMarkerProductionYellow();\n Server server= new Server();\n ClientHandler clientHandler= new ClientHandler(server);\n ClientController clientController= new ClientController(server,clientHandler) ;\n VirtualView virtualView = new VirtualView(clientController);\n\n GameSolitaire game = new GameSolitaire(\"Ali\",true,clientController);\n\n assertEquals(4, game.productionDeckSize(9));\n assertEquals(4, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(2, game.productionDeckSize(9));\n assertEquals(4, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n try {\n game.deckFromDeckNumber(11).removeOneCard();\n } catch (EmptyException | EndOfSolitaireGame ignored) {\n }\n\n assertEquals(1, game.productionDeckSize(9));\n assertEquals(4, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(3, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n try {\n game.deckFromDeckNumber(3).removeOneCard();\n } catch (EmptyException | EndOfSolitaireGame ignored) {\n }\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(3, game.productionDeckSize(10));\n assertEquals(3, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(1, game.productionDeckSize(10));\n assertEquals(3, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(0, game.productionDeckSize(10));\n assertEquals(2, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(0, game.productionDeckSize(10));\n assertEquals(0, game.productionDeckSize(11));\n\n FileClass.FileDestroyer();\n\n }", "public void test_GetContestPrizes_Failure() throws Exception {\r\n // FIXME\r\n }", "@Test\n public void testContinguosStorageReSize() {\n for (int i = 9; i >= 0; i--) {\n String input = String.format(\"b0%d\", i);\n list.addToFront(input);\n }\n\n list.addToFront(\"Filler1\");\n list.addToBack(\"Filler2\");\n list.addToBack(\"Filler3\");\n list.addToFront(\"Filler0\");\n list.addAtIndex(0, \"Filler#\");\n list.addAtIndex(2, \"Filler!\");\n list.addAtIndex(6, \"Filler$\");\n list.removeFromFront();\n list.removeFromBack();\n list.removeAtIndex(4);\n list.removeAtIndex(0);\n list.removeAtIndex(2);\n\n int actualCapacity = ((Object[]) (list.getBackingArray())).length;\n for (int i = 0; i < list.size(); i++) {\n Assert.assertNotNull(((Object[]) (list.getBackingArray()))[i]);\n }\n for (int i = list.size(); i < actualCapacity; i++) {\n Assert.assertNull(((Object[]) (list.getBackingArray()))[i]);\n }\n }", "@Test\n public void testGetPillars(){\n largePillarMap = largeMaze.getPillars();\n assertEquals(25, largePillarMap.size());\n }", "@Test(timeout = 4000)\n public void test115() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.isAllLevelsVisible();\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test\n void makeCoffee() {\n Assertions.assertFalse(machine.makeCoffee());\n\n //try with cup\n Assertions.assertDoesNotThrow(() -> {\n machine.positionCup();\n });\n\n Assertions.assertThrows(Exception.class, () -> {\n machine.positionCup();\n });\n\n\n Assertions.assertTrue(machine.makeCoffee());\n\n //check if correct amount as been subtracted\n Assertions.assertEquals(machine.getCurrentWater(), 1000 - machine.waterPerCup);\n Assertions.assertEquals(machine.getCurrentBeans(), 800 - machine.beansPerCup);\n\n //reset\n machine.fillWater();\n machine.fillBeans();\n machine.setCupPositioned(true);\n\n //test over boundary\n Assertions.assertTrue(machine.makeCoffee());\n Assertions.assertTrue(machine.makeCoffee());\n\n //set only water to boundary values and below\n machine.setCurrentWater(0);\n Assertions.assertFalse(machine.makeCoffee());\n machine.setCurrentWater(machine.waterPerCup);\n Assertions.assertTrue(machine.makeCoffee());\n\n //reset water\n machine.fillWater();\n\n //set only beans to boundary value and below\n machine.setCurrentBeans(0);\n Assertions.assertFalse(machine.makeCoffee());\n machine.setCurrentBeans(machine.beansPerCup);\n Assertions.assertTrue(machine.makeCoffee());\n\n\n }", "@Test(timeout = 4000)\n public void test010() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getVideoWidth();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(320, int0);\n }", "private static void assertComposite(Composite composite, EOC eoc, ByteBuffer... elements)\n {\n assertEquals(\"the composite size is not the expected one:\", elements.length, composite.size());\n for (int i = 0, m = elements.length; i < m; i++)\n {\n ByteBuffer element = elements[i];\n assertTrue(String.format(\"the element %s of the composite is not the expected one: expected %s but was %s\",\n i,\n ByteBufferUtil.toInt(element),\n ByteBufferUtil.toInt(composite.get(i))),\n element.equals(composite.get(i)));\n }\n assertEquals(\"the EOC of the composite is not the expected one:\", eoc, composite.eoc());\n }", "@Test\n public void testConstructor() {\n try {\n new File(\"./data/testemostate4.txt\").delete();\n new File(\"./data/testemostate5.txt\").delete();\n } catch (Exception e) {\n ;\n }\n try {\n AveragedEmotionalState avgEmoState = new AveragedEmotionalState(\"./data/\", \"testemostate\");\n ArrayList<Emotion> moodVector = avgEmoState.getMoodVector();\n assertEquals(10, moodVector.get(0).getScaleValue());\n assertEquals(0, moodVector.get(1).getScaleValue());\n assertEquals(20, moodVector.get(2).getScaleValue());\n assertEquals(100, moodVector.get(3).getScaleValue());\n } catch (NoRecordedEmotionalStates e) {\n fail(\"Should be three emotional states for constructor to load so should not fail.\");\n }\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/A_X-0;;JLT_;1IJDVA.XML\");\n byte[] byteArray0 = new byte[5];\n FileSystemHandling.appendDataToFile(evoSuiteFile0, byteArray0);\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n File file0 = fileUtil0.getAccessories(\"X-0;;JLT_;1iJdvA\", arrayList0);\n assertEquals(5L, file0.length());\n assertNotNull(file0);\n }", "@Test\n public void testInvokeEffectorListWithEmptyUsingUnmanagedContext() throws Exception {\n TestEntity entity = app.addChild(EntitySpec.create(TestEntity.class));\n Entities.unmanage(entity);\n try {\n Entities.invokeEffectorList(entity, ImmutableList.<StartableApplication>of(), Startable.STOP).get(Duration.THIRTY_SECONDS);\n Asserts.shouldHaveFailedPreviously();\n } catch (Exception e) {\n IllegalStateException e2 = Exceptions.getFirstThrowableOfType(e, IllegalStateException.class);\n if (e2 == null) throw e;\n Asserts.expectedFailureContains(e2, \"no longer managed\");\n }\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n JSJshop jSJshop0 = new JSJshop();\n FileSystemHandling.shouldAllThrowIOExceptions();\n jSJshop0.dom();\n JSListLogicalAtoms jSListLogicalAtoms0 = jSJshop0.getDeleteList();\n assertNull(jSListLogicalAtoms0);\n }", "@Test\n\tpublic void testHeap() {\n\t\t// merely a suggestion \n\t}", "@Test\n public void testScaleUpEphemeral() throws Exception {\n Atomix atomix1 = startAtomix(1, Arrays.asList(2), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n Atomix atomix2 = startAtomix(2, Arrays.asList(1), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n Atomix atomix3 = startAtomix(3, Arrays.asList(1), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setPhotoQuality((-2107));\n homeEnvironment0.clone();\n assertEquals((-2107), homeEnvironment0.getPhotoQuality());\n }", "public void testGetColumnCount() {\n TaskSeriesCollection c = createCollection1();\n }", "@Test\n public void testMemoryMetric() {\n MetricValue mv = new MetricValue.Builder().load(40).add();\n\n MEMORY_METRICS.forEach(cmt -> testUpdateMetricWithoutId(cmt, mv));\n MEMORY_METRICS.forEach(cmt -> testLoadMetric(nodeId, cmt, mv));\n }", "@Test\n\tpublic void testInventoryNotEnoughCoffee() {\n\t\tcoffeeMaker.addRecipe(recipe6);\n\t\tassertEquals(1000, coffeeMaker.makeCoffee(0, 1000));\n\t}", "@Test\n @DisplayName(\"Action Marker Production Yellow Test\")\n public void ActionMarkerProductionYellowTest() throws IOException, InterruptedException {\n ActionMarkerProductionYellow actionMarker = new ActionMarkerProductionYellow();\n Server server= new Server();\n ClientHandler clientHandler= new ClientHandler(server);\n ClientController clientController= new ClientController(server,clientHandler) ;\n VirtualView virtualView = new VirtualView(clientController);\n\n GameSolitaire game = new GameSolitaire(\"Ali\",true,clientController);\n\n assertEquals(\"ActionMarkerProductionYellow\", actionMarker.getType());\n\n assertEquals(4, game.productionDeckSize(9));\n assertEquals(4, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(2, game.productionDeckSize(9));\n assertEquals(4, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(4, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(2, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(0, game.productionDeckSize(10));\n assertEquals(4, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(0, game.productionDeckSize(10));\n assertEquals(2, game.productionDeckSize(11));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(9));\n assertEquals(0, game.productionDeckSize(10));\n assertEquals(0, game.productionDeckSize(11));\n\n FileClass.FileDestroyer();\n\n }", "@Test\r\n\tpublic void TestDeckSuitCount() {\n\t\ttry {\r\n\t\t\tDeck AKDeck = new Deck();\r\n\t\t\tfor (int i = 13; i >= 0; i--) {\r\n\t\t\t\tassertEquals(i, AKDeck.Count(eSuit.HEARTS));\r\n\t\t\t\tAKDeck.Draw(eSuit.HEARTS);\r\n\t\t\t}\r\n\t\t} catch (DeckException ex) {\r\n\t\t\tSystem.out.println(\"The deck is empty. No more cards can be drawn.\");\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2127L, 2127L);\n Object object0 = new Object();\n range0.equals(object0);\n Object object1 = new Object();\n range0.equals((Object) null);\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n homeEnvironment0.setSkyColor(0);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getLightColor();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, int0);\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n }", "void checkConsumption()\n {\n assertEquals(\"Consumption doesn't match\", keyEventPair.getKey().isConsumed(), keyEventPair.getValue().isConsumed());\n }", "@Test\n public void removeAllExercisesTest() {\n actual.removeAllExercises();\n String[] expectedExercises = new String[]{};\n\n actual.removeAllExercises();\n\n Assert.assertEquals(Arrays.asList(expectedExercises), actual.getExercises());\n }", "@Test(timeout = 4000)\n public void test076() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2082), (HomeTexture) null, (-2082), (HomeTexture) null, (-2082), (-2082));\n AspectRatio aspectRatio0 = AspectRatio.VIEW_3D_RATIO;\n homeEnvironment0.setPhotoAspectRatio(aspectRatio0);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-2082), homeEnvironment0.getLightColor());\n assertEquals((-2082), homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals((-2082), homeEnvironment0.getSkyColor());\n assertEquals((-2082.0F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test\r\n public void test() throws QueryException, IOException\r\n {\r\n EasyMockSupport support = new EasyMockSupport();\r\n\r\n EventManager eventManager = createEventManager(support);\r\n TimeManager timeManager = createTimeManager(support);\r\n AnimationManager animationManager = createAnimationManager(support);\r\n List<PlatformMetadata> testData = New.list(createMetadata());\r\n OrderParticipantKey expectedUAVKey = support.createMock(OrderParticipantKey.class);\r\n OrderParticipantKey expectedVideoKey = support.createMock(OrderParticipantKey.class);\r\n OrderManagerRegistry orderRegistry = createOrderRegistry(support, expectedUAVKey, expectedVideoKey, 1);\r\n Toolbox toolbox = createToolbox(support, eventManager, timeManager, animationManager, testData, orderRegistry, 1);\r\n\r\n DataTypeInfo videoLayer = createVideoLayer(support, expectedVideoKey);\r\n OSHImageQuerier querier = createQuerier(support, videoLayer, 1);\r\n List<DataTypeInfo> linkedLayer = New.list(videoLayer);\r\n\r\n DataTypeInfo uavLayer = createUAVDataType(support, expectedUAVKey, 1);\r\n\r\n GenericSubscriber<Geometry> receiver = createReceiver(support);\r\n\r\n support.replayAll();\r\n\r\n AerialImageryTransformer transformer = new AerialImageryTransformer(toolbox, querier, uavLayer, linkedLayer);\r\n transformer.addSubscriber(receiver);\r\n transformer.open();\r\n\r\n myListener.activeTimeSpansChanged(null);\r\n\r\n support.verifyAll();\r\n }", "@Test\n public void testDetecterCompteSousMoyenne() {\n// System.out.println(\"detecterAnomalieParrapportAuSeuil\");\n Integer seuil = 30;\n POJOCompteItem instance = genererInstanceTest();\n\n try {\n instance.compte();\n instance.calculerMoyenne(new DateTime(2013, 1, 1, 0, 0).toDate(), new DateTime(2013, 1, 6, 0, 0).toDate());\n } catch (Exception ex) {\n Logger.getLogger(POJOCompteItemTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n// List expResult = null;\n Map<Date, Integer> result = instance.detecterAnomalieParrapportAuSeuil(seuil);\n\n if (result.size() != 3) {\n fail(\"on attend 3 résultats\");\n }\n\n\n try { // On tente de faire le calcul avec une valeur null doit lever une NullPointerException\n instance.detecterAnomalieParrapportAuSeuil(null);\n fail(\"devait lancer une exception\");\n } catch (Exception e) {\n if (!e.getClass().equals(NullPointerException.class)) {\n fail(\"devait lever une NullPointerException\");\n }\n }\n }", "@Test\n public void test_14() {\n Maze maze = new Maze(smallWalled, new Location(1, 1));\n maze.moveChip(Direction.EAST);\n assertTrue(maze.getChipLocation().equals(new Location(1, 1)));\n }", "public void test_AddContestChannel_Failure5() throws Exception {\r\n try {\r\n initContext();\r\n\r\n ContestChannel channel = createContestChannelForTest();\r\n\r\n entityManager.enablePersistenceException(true);\r\n beanUnderTest.addContestChannel(channel);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"\", (Content) null, (-826), 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2140976121, homeTexture0, 949, homeTexture0, (-3047), 949);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n \n homeEnvironment0.setObserverCameraElevationAdjusted(false);\n boolean boolean0 = homeEnvironment0.isObserverCameraElevationAdjusted();\n assertFalse(boolean0);\n }", "private static void teste02 () {\n\t\tEstoque e = Estoque.find(1);\n\t\tlog.debug(\"Estoque encontrado.\");\n\n\t\te.setPreco(new Float(10));\n\t\te.update();\n\n\t\tlog.debug(\"Estoque atualizado.\");\n\t}", "@Test\n public void testGetBagContentBlack() {\n System.out.println(\"getBagContent\");\n Player instance = new Player(PlayerColor.BLACK, \"\");\n int expResult = 30;\n int result = instance.getBagContent().size();\n assertEquals(expResult, result);\n }" ]
[ "0.5483111", "0.54401827", "0.5232855", "0.5133018", "0.51009846", "0.5096043", "0.50636715", "0.50345033", "0.50298584", "0.5022969", "0.50222963", "0.5015291", "0.5004721", "0.49852598", "0.49851668", "0.49724454", "0.49716976", "0.4968179", "0.49676484", "0.49605662", "0.49532327", "0.49522054", "0.493971", "0.49337253", "0.4917389", "0.49172005", "0.49166512", "0.49090448", "0.49027637", "0.489605", "0.48898822", "0.48767805", "0.487656", "0.48741794", "0.48681977", "0.4861674", "0.48414117", "0.48315862", "0.4830997", "0.48180625", "0.48163098", "0.481565", "0.48064202", "0.48020685", "0.47998485", "0.47962764", "0.47949165", "0.4789221", "0.47668573", "0.47539786", "0.4749", "0.47442502", "0.47388214", "0.4738597", "0.47374874", "0.47372693", "0.47323427", "0.4731654", "0.4731597", "0.4725899", "0.4723421", "0.4723421", "0.47189862", "0.47158372", "0.47136718", "0.4708606", "0.47080097", "0.47075284", "0.47028267", "0.47013268", "0.4695498", "0.46938515", "0.46923012", "0.46912083", "0.4688071", "0.468768", "0.4687285", "0.46871153", "0.46784183", "0.46778476", "0.46775815", "0.46754298", "0.46726632", "0.4666991", "0.4666731", "0.46658415", "0.46644792", "0.46642414", "0.46636623", "0.46636456", "0.46619135", "0.46607554", "0.46544424", "0.46498394", "0.46496642", "0.46492237", "0.46491575", "0.4648763", "0.4646747", "0.464432" ]
0.7823614
0
Test of receiveBroadcast method, of class WorkspaceImpl.
@Test public void testReceiveBroadcast() { MockBroadcastQueueImpl broadcastQueue = new MockBroadcastQueueImpl(); broadcastQueue.setModuleName(ModuleName.BroadcastQueue); workspace.addSubModule(broadcastQueue); content.addDefaultNode(node2); Coalition c = new CoalitionImpl(content, null); workspace.receiveBroadcast(c); NodeStructure actual = (NodeStructure) broadcastQueue.broadcastContent; assertNotNull(actual); assertTrue(actual.containsNode(node2)); assertTrue(NodeStructureImpl.compareNodeStructures(content, actual)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void verifyBroadcastSent(CbSendMessageCalculator mockCalculator) {\n verify(mMockedContext).sendOrderedBroadcast(any(), any(),\n (Bundle) any(), any(), any(), anyInt(), any(), any());\n clearInvocations(mMockedContext);\n verify(mockCalculator, times(1)).markAsSent();\n clearInvocations(mockCalculator);\n }", "@Test\n void runWithBroadcastMessageTest() throws Exception {\n\n Prattle.startUp();\n\n\n\n Field initialized = client1.getClass().getDeclaredField(\"initialized\");\n Field input = client1.getClass().getDeclaredField(\"input\");\n Field output = client1.getClass().getDeclaredField(\"output\");\n\n initialized.setAccessible(true);\n input.setAccessible(true);\n output.setAccessible(true);\n\n initialized.set(client1, false);\n when(scanNetNB.hasNextMessage()).thenReturn(true);\n Message msg = Message.makeBroadcastMessage(\"Mandy\", \"test\");\n when(scanNetNB.nextMessage()).thenReturn(msg);\n\n input.set(client1, scanNetNB);\n\n\n client1.run();\n assertEquals(true, client1.isInitialized());\n client1.run();\n Message msgLogOff = Message.makeBroadcastMessage(\"Mandy\", \"Prattle says everyone log off\");\n when(scanNetNB.nextMessage()).thenReturn(msgLogOff);\n client1.run();\n\n Message msgWithDiffName = Message.makeBroadcastMessage(\"Noodle\", \"Hello from Noodle\");\n client1.setName(\"Mandy\");\n System.out.print(client1.getName());\n System.out.print(msgWithDiffName.getName());\n client1.run();\n\n assertEquals(true, client1.isInitialized());\n when(scanNetNB.hasNextMessage()).thenReturn(true);\n when(scanNetNB.nextMessage()).thenReturn(msgWithDiffName);\n input.set(client1, scanNetNB);\n output.set(client1, printNetNB);\n\n ClientRunnable clientRunnable = spy(client1);\n Mockito.doNothing().when(clientRunnable).terminateClient();\n clientRunnable.run();\n\n\n\n\n\n }", "@Test\n void awaitMessage() {\n\n Message message = null;\n TempBroadcast b = new TempBroadcast(\"broadcastSender2\");\n\n broadcastReceiver.subscribeBroadcast(TempBroadcast.class, c -> {\n });\n broadcastSender.sendBroadcast(b);\n\n // here we will check the method\n try {\n message = messageBus.awaitMessage(broadcastReceiver);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n //due to the assumption above, an exception is not supposed to be thrown\n }\n assertEquals(b, message);\n }", "public interface MyBroadcastListener {\n void receivedBroadcast();\n }", "public void broadcast(Object msg);", "public interface BroadcastListener {\n void broadcastIdAdded(String groupId);\n\n void broadcastMemberAdded(String result, String resultType);\n\n void broadcastDeleteResponse(String response);\n\n void broadcastRemoveMemberResponse(String response);\n\n void broadcastInfoUpdatedResponse(String response);\n}", "private void UDPBroadcastTest() {\n\t\tWifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);\n\n\t\tif (wifi != null) {\n\t\t\tWifiManager.MulticastLock lock = wifi\n\t\t\t\t\t.createMulticastLock(\"Log_Tag\");\n\t\t\tlock.acquire();\n\n\t\t}\n\t\tint DISCOVERY_PORT = 1989;\n\t\tint TIMEOUT_MS = 5000;\n\n\t\ttry {\n\n\t\t\tDatagramSocket socket = new DatagramSocket(DISCOVERY_PORT);\n\t\t\tsocket.setBroadcast(true);\n\t\t\tsocket.setSoTimeout(TIMEOUT_MS);\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\twhile (true) {\n\t\t\t\tDatagramPacket packet = new DatagramPacket(buf, buf.length,\n\t\t\t\t\t\tInetAddress.getByName(\"192.168.1.255\"), DISCOVERY_PORT);\n\t\t\t\tsocket.receive(packet);\n\t\t\t\tLog.e(\"nbc\", packet.getAddress().getHostAddress());\n\t\t\t\tString s = new String(packet.getData(), 0, packet.getLength());\n\t\t\t\tLog.e(\"nbc\", \"Received response \" + s);\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"nbc\", \"Could not send discovery request\", e);\n\t\t}\n\n\t}", "void receive(String watcher) throws ProtocolExecutionException;", "@Test\n public void testRollbackBroadcastRestrictions() throws Exception {\n RollbackBroadcastReceiver broadcastReceiver = new RollbackBroadcastReceiver();\n Intent broadcast = new Intent(Intent.ACTION_ROLLBACK_COMMITTED);\n try {\n InstrumentationRegistry.getContext().sendBroadcast(broadcast);\n fail(\"Succeeded in sending restricted broadcast from app context.\");\n } catch (SecurityException se) {\n // Expected behavior.\n }\n\n // Confirm that we really haven't received the broadcast.\n // TODO: How long to wait for the expected timeout?\n assertNull(broadcastReceiver.poll(5, TimeUnit.SECONDS));\n\n // TODO: Do we need to do this? Do we need to ensure this is always\n // called, even when the test fails?\n broadcastReceiver.unregister();\n }", "public Broadcast getBroadcast() {\r\n \t\treturn broadcast;\r\n \t}", "public abstract boolean broadcast() throws IOException;", "public void testReceiver() throws Exception\n {\n }", "private void executePendingBroadcasts() {\n /*\n r9 = this;\n L_0x0000:\n r0 = r9.mReceivers;\n monitor-enter(r0);\n r1 = r9.mPendingBroadcasts;\t Catch:{ all -> 0x0045 }\n r1 = r1.size();\t Catch:{ all -> 0x0045 }\n if (r1 > 0) goto L_0x000d;\n L_0x000b:\n monitor-exit(r0);\t Catch:{ all -> 0x0045 }\n return;\n L_0x000d:\n r1 = new android.support.v4.content.LocalBroadcastManager.BroadcastRecord[r1];\t Catch:{ all -> 0x0045 }\n r2 = r9.mPendingBroadcasts;\t Catch:{ all -> 0x0045 }\n r2.toArray(r1);\t Catch:{ all -> 0x0045 }\n r2 = r9.mPendingBroadcasts;\t Catch:{ all -> 0x0045 }\n r2.clear();\t Catch:{ all -> 0x0045 }\n monitor-exit(r0);\t Catch:{ all -> 0x0045 }\n r0 = 0;\n r2 = r0;\n L_0x001c:\n r3 = r1.length;\n if (r2 >= r3) goto L_0x0000;\n L_0x001f:\n r3 = r1[r2];\n r4 = r3.receivers;\n r4 = r4.size();\n r5 = r0;\n L_0x0028:\n if (r5 >= r4) goto L_0x0042;\n L_0x002a:\n r6 = r3.receivers;\n r6 = r6.get(r5);\n r6 = (android.support.v4.content.LocalBroadcastManager.ReceiverRecord) r6;\n r7 = r6.dead;\n if (r7 != 0) goto L_0x003f;\n L_0x0036:\n r6 = r6.receiver;\n r7 = r9.mAppContext;\n r8 = r3.intent;\n r6.onReceive(r7, r8);\n L_0x003f:\n r5 = r5 + 1;\n goto L_0x0028;\n L_0x0042:\n r2 = r2 + 1;\n goto L_0x001c;\n L_0x0045:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x0045 }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts():void\");\n }", "@Test\n\tpublic void driverEnvioDeBroadcastAChorbi() {\n\t\tfinal Object testingData[][] = {\n\t\t\t{\n\t\t\t\t\"manager1\", \"broadcastTitle1\", \"text1\", this.eventService.findOne(297), null\n\t\t\t}, {\n\t\t\t\t\"\", \"broadcastTitle2\", \"text4\", this.eventService.findOne(297), IllegalArgumentException.class\n\t\t\t}, {\n\t\t\t\t\"manager1\", \"broadcastTitle3\", \"\", this.eventService.findOne(297), ConstraintViolationException.class\n\t\t\t}, {\n\t\t\t\t\"manager1\", \"broadcastTitle4\", \"text2\", this.eventService.findOne(300), IllegalArgumentException.class\n\t\t\t}\n\t\t};\n\n\t\tfor (int i = 0; i < testingData.length; i++)\n\t\t\tthis.envioDeBroadcastAChorbi((String) testingData[i][0], (String) testingData[i][1], (String) testingData[i][2], (Event) testingData[i][3], (Class<?>) testingData[i][4]);\n\t}", "public static void sendBroadcast(){\n Intent intent = new Intent(CUSTOM_BROADCAST_ACTION);\n context.sendBroadcast(intent);\n }", "public boolean isBroadcast() {\r\n \t\treturn (broadcast != null);\r\n \t}", "@Test(timeout = 60000)\n public void testVariableOnlyBoundedIterationWithBroadcast() throws Exception {\n JobGraph jobGraph = createVariableOnlyJobGraph(4, 1000, false, 0, false, 1, true, result);\n miniCluster.executeJobBlocking(jobGraph);\n\n assertEquals(8001, result.get().size());\n\n // Expected records is round * parallelism * numRecordsPerSource * parallelism of reduce\n // operators\n Map<Integer, Tuple2<Integer, Integer>> roundsStat =\n computeRoundStat(\n result.get(), OutputRecord.Event.PROCESS_ELEMENT, 2 * 4 * 1000 * 1);\n verifyResult(roundsStat, 2, 4000, 4 * (0 + 999) * 1000 / 2);\n assertEquals(OutputRecord.Event.TERMINATED, result.get().take().getEvent());\n }", "@Test\n public void testBroadcastedTransactionDeserializer(){\n try{\n mMessagesHub = new SubscriptionMessagesHub(\"\", \"\", mErrorListener);\n mMessagesHub.addSubscriptionListener(new SubscriptionListener() {\n private int MAX_MESSAGES = 15;\n private int messageCounter = 0;\n\n @Override\n public ObjectType getInterestObjectType() {\n return ObjectType.TRANSACTION_OBJECT;\n }\n\n @Override\n public void onSubscriptionUpdate(SubscriptionResponse response) {\n if(response.params.size() == 2){\n List<Serializable> payload = (List) response.params.get(1);\n if(payload.size() > 0){\n for(Serializable item : payload){\n if(item instanceof BroadcastedTransaction){\n BroadcastedTransaction broadcastedTransaction = (BroadcastedTransaction) item;\n Transaction tx = broadcastedTransaction.getTransaction();\n System.out.println(String.format(\"Got %d operations\", tx.getOperations().size()));\n }\n }\n }\n }\n\n // Waiting for MAX_MESSAGES messages before releasing the wait lock\n messageCounter++;\n if(messageCounter > MAX_MESSAGES){\n synchronized (SubscriptionMessagesHubTest.this){\n SubscriptionMessagesHubTest.this.notifyAll();\n }\n }\n }\n });\n\n mWebSocket.addListener(mMessagesHub);\n mWebSocket.connect();\n\n // Holding this thread while we get update notifications\n synchronized (this){\n wait();\n }\n } catch (WebSocketException e) {\n System.out.println(\"WebSocketException. Msg: \" + e.getMessage());\n } catch (InterruptedException e) {\n System.out.println(\"InterruptedException. Msg: \"+e.getMessage());\n }\n }", "@Test\n\tpublic void shouldCallReceiveMethod() {\n\t\t// Arrange\n\t\tUdpReceiver theStub = Mockito.mock(UdpReceiver.class);\n\t\twhen(theStub.receive()).thenReturn(\"TESTID:FAULT:EVENT_DATA\");\n\t\tUdpEventReceiver target = new UdpEventReceiver();\n\t\ttarget.setUdpReceiver(theStub);\n\n\t\t// Act\n\t\ttarget.receive();\n\n\t\t// Assert\n\t\tverify(theStub).receive();\n\t}", "@Test\r\n\tpublic void testReceiveLocalAssociation() {\r\n\t\tcontent.addDefaultNode(node1);\r\n\t\teBuffer.addBufferContent((WorkspaceContent) content);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\r\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addWorkspaceListener(listener);\r\n\r\n\t\tNodeStructure localAssociation = new NodeStructureImpl();\r\n\t\tNode node3 = factory.getNode();\r\n\t\tnode3.setId(9);\r\n\t\tlocalAssociation.addDefaultNode(node3);\r\n\r\n\t\tworkspace.receiveLocalAssociation(localAssociation);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\t\tassertTrue(listener.content.containsNode(node3));\r\n\r\n\t\tassertTrue(eBuffer.content.containsNode(node3));\r\n\t\t// System.out.println(eBuffer.content.toString());\n\t\t// System.out.println(listener.content.toString());\n\t}", "public void testGetReceiver() {\r\n int expected;\r\n \r\n for (int i = 0; i < NUMBER_OF_TESTS; i++) {\r\n expected = (rand.nextInt() & 0x0F);\r\n assertEquals(expected, NetworkDatagram.getReceiver(expected)); \r\n }\r\n }", "@Override\n public void broadcastBlock(final Block block) {}", "@Override\n\tpublic void run() \n\t{\n\t\tSystem.err.println(\"UDP broadcaster started\");\n\n\t\tInetAddress host = null;\t\t\n\t\tSettingsLoader settingsLoader = Simulator.getDrivingTask().getSettingsLoader();\n\t\t\n\t\tint port = settingsLoader.getSetting(Setting.UDPInterface_port, SimulationDefaults.UDPInterface_port);\n\t\tint broadcastsPerSecond = settingsLoader.getSetting(Setting.UDPInterface_updateRate, SimulationDefaults.UDPInterface_updateRate);\n\t\t\n\t\ttry {\n\t\t\tString hostname = settingsLoader.getSetting(Setting.UDPInterface_host, SimulationDefaults.UDPInterface_host);\n\t\t\thost = InetAddress.getByName(hostname);\n\t\t\tsocket = new DatagramSocket();\n\t\t\tsocket.setSoTimeout(10);\n\t\t\t\n\t\t\tSystem.out.println(\"UDP broadcasting to \" + host + \":\" + port);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"UDP connection failed at \" + host + \":\" + port);\n\t\t\terrorOccurred = true;\n\t\t}\n\t\t\n\t\t\n\t\twhile(!stoprequested && !errorOccurred)\n\t\t{\n\t\t\ttry {\n\t\t\t ByteBuffer buffer = ByteBuffer.allocate(1 + Long.BYTES);\n\t \t\t buffer.put((byte) 0x01);\n\t\t\t buffer.putLong(System.currentTimeMillis());\n\t\t\t \n\t\t\t byte[] data = buffer.array();\n\t\t\t \n\t\t\t DatagramPacket timestampPacket = new DatagramPacket(data, data.length, host, port);\n\t\t\t socket.send(timestampPacket);\n\t\t\t \t\n\t\t\t \tThread.sleep(1000 / broadcastsPerSecond);\n\t\t\t} catch (InterruptedException exc) {\n\t\t\t\t// NOP\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"UDP error: \" + e.toString());\n\t\t\t\terrorOccurred = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// close TCP connection to CAN-Interface if connected at all\n\t\ttry {\n\t\t\tif (socket != null)\n\t\t\t{\n\t\t\t\ttry {Thread.sleep(100);} \n\t\t\t\tcatch (InterruptedException e){}\n\n\t\t\t\tsocket.close();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Connection to UDP-Interface closed\");\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.err.println(\"Could not close connection to UDP-Interface\");\n\t\t}\n\t}", "public void testBackgroundCheckBroadcastService() throws Exception {\n final Intent broadcastIntent = new Intent();\n broadcastIntent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);\n broadcastIntent.setClassName(SIMPLE_PACKAGE_NAME,\n SIMPLE_PACKAGE_NAME + SIMPLE_RECEIVER_START_SERVICE);\n\n final ServiceProcessController controller = new ServiceProcessController(mContext,\n getInstrumentation(), STUB_PACKAGE_NAME, mAllProcesses, WAIT_TIME);\n final ServiceConnectionHandler conn = new ServiceConnectionHandler(mContext,\n mServiceIntent, WAIT_TIME);\n final WatchUidRunner uidWatcher = controller.getUidWatcher();\n\n try {\n // First kill the process to start out in a stable state.\n controller.ensureProcessGone();\n\n // Do initial setup.\n controller.denyBackgroundOp();\n controller.makeUidIdle();\n controller.removeFromWhitelist();\n\n // We will use this to monitor when the service is running.\n conn.startMonitoring();\n\n // Try sending broadcast to start the service. Should fail!\n SyncOrderedBroadcast br = new SyncOrderedBroadcast();\n broadcastIntent.putExtra(\"service\", mServiceIntent);\n br.sendAndWait(mContext, broadcastIntent, Activity.RESULT_OK, null, null, WAIT_TIME);\n int brCode = br.getReceivedCode();\n if (brCode != Activity.RESULT_CANCELED) {\n fail(\"Didn't fail starting service, result=\" + brCode);\n }\n\n // Track the uid proc state changes from the broadcast (but not service execution)\n uidWatcher.waitFor(WatchUidRunner.CMD_IDLE, null, WAIT_TIME);\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null, WAIT_TIME);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_RECEIVER, WAIT_TIME);\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null, WAIT_TIME);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY, WAIT_TIME);\n\n // Put app on temporary whitelist to see if this allows the service start.\n controller.tempWhitelist(TEMP_WHITELIST_DURATION_MS);\n\n // Being on the whitelist means the uid is now active.\n uidWatcher.expect(WatchUidRunner.CMD_ACTIVE, null, WAIT_TIME);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY, WAIT_TIME);\n\n // Try starting the service now that the app is whitelisted... should work!\n br.sendAndWait(mContext, broadcastIntent, Activity.RESULT_OK, null, null, WAIT_TIME);\n brCode = br.getReceivedCode();\n if (brCode != Activity.RESULT_FIRST_USER) {\n fail(\"Failed starting service, result=\" + brCode);\n }\n conn.waitForConnect();\n\n // Also make sure the uid state reports are as expected.\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n // We are going to wait until 'SVC', because we may see an intermediate 'RCVR'\n // proc state depending on timing.\n uidWatcher.waitFor(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n\n // Good, now stop the service and give enough time to get off the temp whitelist.\n mContext.stopService(mServiceIntent);\n conn.waitForDisconnect();\n\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n controller.removeFromTempWhitelist();\n\n // Going off the temp whitelist causes a spurious proc state report... that's\n // not ideal, but okay.\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n controller.makeUidIdle();\n\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n\n // Make sure the process is gone so we start over fresh.\n controller.ensureProcessGone();\n\n // Now that we should be off the temp whitelist, make sure we again can't start.\n br.sendAndWait(mContext, broadcastIntent, Activity.RESULT_OK, null, null, WAIT_TIME);\n brCode = br.getReceivedCode();\n if (brCode != Activity.RESULT_CANCELED) {\n fail(\"Didn't fail starting service, result=\" + brCode);\n }\n\n // Track the uid proc state changes from the broadcast (but not service execution)\n uidWatcher.waitFor(WatchUidRunner.CMD_IDLE, null);\n // There could be a transient 'cached' state here before 'uncached' if uid state\n // changes are dispatched before receiver is started.\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_RECEIVER);\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // Now put app on whitelist, should allow service to run.\n controller.addToWhitelist();\n\n // Try starting the service now that the app is whitelisted... should work!\n br.sendAndWait(mContext, broadcastIntent, Activity.RESULT_OK, null, null, WAIT_TIME);\n brCode = br.getReceivedCode();\n if (brCode != Activity.RESULT_FIRST_USER) {\n fail(\"Failed starting service, result=\" + brCode);\n }\n conn.waitForConnect();\n\n // Also make sure the uid state reports are as expected.\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.waitFor(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n\n // Okay, bring down the service.\n mContext.stopService(mServiceIntent);\n conn.waitForDisconnect();\n\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n } finally {\n mContext.stopService(mServiceIntent);\n conn.stopMonitoringIfNeeded();\n controller.cleanup();\n }\n }", "@Override\n public void onReceive(final Context context, Intent intent) {\n\n Log.d(TAG, \"Received broadcast for scanrunner\");\n //Only allow this code to be ran on debug builds, since it accepts and writes to arbitrary file\n //paths, which would allow another app to arbitrarily write anywhere in this app's context.\n // http://android-developers.blogspot.com/2010/09/securing-android-lvl-applications.html\n boolean isDebuggable = ( 0 != ( context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE ) );\n if(!isDebuggable){\n Log.d(TAG, \"Not running the tests because the app is not debuggable\");\n return;\n }\n\n Bundle intentExtras = intent.getExtras();\n if(intentExtras == null){\n Log.d(TAG, \"There were no extras with the broadcast. Include RESULT_PATH\");\n return;\n }\n\n final String writeResultPath = intentExtras.getString(\"RESULT_PATH\");\n if(writeResultPath == null || writeResultPath.equals(\"\")){\n Log.d(TAG, \"Result write path is null or empty\");\n }\n\n Log.d(TAG, \"Results will be written to: \" + writeResultPath);\n\n new AsyncTask<Void,Void,Void>(){\n @Override\n protected Void doInBackground(Void... params) {\n List<VulnerabilityTest> tests = VulnerabilityOrganizer.getTests(context);\n List<VulnerabilityTestResult> results = new ArrayList<>();\n for(VulnerabilityTest vt : tests){\n Log.d(TAG, \"Running: \" + vt.getCVEorID());\n boolean vulnerable = false;\n Exception x = null;\n try {\n vulnerable = vt.isVulnerable(context);\n }catch(Exception e){\n x = e;\n }\n results.add(new VulnerabilityTestResult(vt, vulnerable, x));\n }\n\n try {\n JSONObject jobj = VulnerabilityResultSerialzier.serializeResultsToJson(results, DeviceInfo.getDeviceInfo());\n FileOutputStream fos = new FileOutputStream(writeResultPath);\n fos.write(jobj.toString(2).getBytes());\n fos.close();\n }catch(Exception e){\n e.printStackTrace();\n }\n\n return null;\n }\n }.execute();\n\n }", "public boolean isBroadcast() {\r\n return broadcast;\r\n }", "public void run() {\n\t\t\t\tInetAddress bAddr = AndyNet.getBroadcastIP(activity);\n\t\t\t\tLog.i(TAG, \"Broadcast Address: \" + bAddr.getHostAddress());\n\t\t\t\tif (bAddr != null) {\n\t\t\t\t\tAndyNet.startBroadcast(AndyMaster.getName(), 0, bAddr);\n\t\t\t\t}\n\n\t\t\t}", "public void run()\n\t{\n\t\t// The instance of the received broadcast request. 11/29/2014, Bing Li\n\t\tSearchKeywordBroadcastRequest request;\n\t\t// The thread always runs until it is shutdown by the BoundNotificationDispatcher. 11/29/2014, Bing Li\n\t\twhile (!this.isShutdown())\n\t\t{\n\t\t\t// Check whether the notification queue is empty. 11/29/2014, Bing Li\n\t\t\twhile (!this.isEmpty())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// Dequeue the request. 11/29/2014, Bing Li\n\t\t\t\t\trequest = this.getNotification();\n\t\t\t\t\t// Disseminate the broadcast request to the local node's children. 11/29/2014, Bing Li\n\t\t\t\t\tMemoryMulticastor.STORE().disseminateSearchKeywordRequestAmongSubMemServers(request);\n\t\t\t\t\t// Notify the binder that the thread's task on the request has done. 11/29/2014, Bing Li\n\t\t\t\t\tthis.bind(super.getDispatcherKey(), request);\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Wait for a moment after all of the existing requests are processed. 11/29/2014, Bing Li\n\t\t\t\tthis.holdOn(ServerConfig.NOTIFICATION_THREAD_WAIT_TIME);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void broadcast(ID source, ID target, Boolean hit) {\n\t\t\t\t\r\n\t\t\t}", "@Test\n public void testReplicatedBm()\n {\n generateEvents(\"repl-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public final void broadcast()\n\t{\n\t\ttopic.broadcast(originalMessage);\n\t}", "public void setBroadcast(boolean broadcast) {\n this.broadcast = broadcast;\n }", "public void onReceive();", "public void setBroadcast(boolean broadcast) {\r\n this.broadcast = broadcast;\r\n }", "public void broadcast() {\n for (int i = 1; i <= nbMessagesToBroadcast; i++) {\n Message broadcastMsg = new Message(pid, pid, i,false, null);\n lcb.broadcast(broadcastMsg);\n logs.add(String.format(\"b %d\\n\",i));\n }\n }", "@Override\n public int getClientBroadcastPort() {\n return 10082;\n }", "@Override\n public void receivedBroadcast() {\n Log.d(TAG, \"Received broadcast notification. Querying inventory.\");\n try {\n mHelper.queryInventoryAsync(mGotInventoryListener);\n } catch (IabHelper.IabAsyncInProgressException e) {\n complain(\"Error querying inventory. Another async operation in progress.\");\n }\n }", "default public int getBroadcastPort() \t\t\t\t\t{ return 2222; }", "@Override\n\t\t\t\t\tpublic Method handleBroadcastMethod(Element parent,\n\t\t\t\t\t\t\tFBroadcast src) {\n\t\t\t\t\t\treturn super.handleBroadcastMethod(parent, src);\n\t\t\t\t\t}", "@Override\r\n\tpublic void onReceive(Object arg0) throws Exception {\n\t\t\r\n\t}", "public void broadcast(android.os.Message r11) {\n /*\n r10 = this;\n monitor-enter(r10);\n r9 = r10.mReg;\t Catch:{ all -> 0x0036 }\n if (r9 != 0) goto L_0x0007;\n L_0x0005:\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n L_0x0006:\n return;\n L_0x0007:\n r4 = r11.what;\t Catch:{ all -> 0x0036 }\n r5 = r10.mReg;\t Catch:{ all -> 0x0036 }\n r3 = r5;\n L_0x000c:\n r9 = r3.senderWhat;\t Catch:{ all -> 0x0036 }\n if (r9 < r4) goto L_0x002f;\n L_0x0010:\n r9 = r3.senderWhat;\t Catch:{ all -> 0x0036 }\n if (r9 != r4) goto L_0x0034;\n L_0x0014:\n r7 = r3.targets;\t Catch:{ all -> 0x0036 }\n r8 = r3.targetWhats;\t Catch:{ all -> 0x0036 }\n r2 = r7.length;\t Catch:{ all -> 0x0036 }\n r0 = 0;\n L_0x001a:\n if (r0 >= r2) goto L_0x0034;\n L_0x001c:\n r6 = r7[r0];\t Catch:{ all -> 0x0036 }\n r1 = android.os.Message.obtain();\t Catch:{ all -> 0x0036 }\n r1.copyFrom(r11);\t Catch:{ all -> 0x0036 }\n r9 = r8[r0];\t Catch:{ all -> 0x0036 }\n r1.what = r9;\t Catch:{ all -> 0x0036 }\n r6.sendMessage(r1);\t Catch:{ all -> 0x0036 }\n r0 = r0 + 1;\n goto L_0x001a;\n L_0x002f:\n r3 = r3.next;\t Catch:{ all -> 0x0036 }\n if (r3 != r5) goto L_0x000c;\n L_0x0033:\n goto L_0x0010;\n L_0x0034:\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n goto L_0x0006;\n L_0x0036:\n r9 = move-exception;\n monitor-exit(r10);\t Catch:{ all -> 0x0036 }\n throw r9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.os.Broadcaster.broadcast(android.os.Message):void\");\n }", "@Override\n public void onReceive(Object message) throws Exception {\n }", "private void sendBroadcast(String messageStr) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n byte[] sendData = messageStr.getBytes();\n try {\n DatagramSocket sendSocket = new DatagramSocket(null);\n sendSocket.setReuseAddress(true);\n sendSocket.bind(new InetSocketAddress(9876));\n sendSocket.setBroadcast(true);\n\n //Broadcast to all IP addresses on subnet\n try {\n DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, InetAddress.getByName(\"255.255.255.255\"), 9876);\n sendSocket.send(sendPacket);\n Log.i(getClass().getName(), \"Request packet sent to: 255.255.255.255 (DEFAULT)\");\n } catch (Exception e) {\n Log.e(\"sendBroadcast\", \"IOException: \" + e.getMessage());\n }\n } catch (IOException e) {\n Log.e(\"sendBroadcast\", \"IOException: \" + e.getMessage());\n }\n }", "@Override\n\tpublic void sendBroadcast(Broadcast b) {\n\t\tArrayList<MicroService> a = registrationHashMap.get(b);\n\t\t// adding the broadcast message to the queue of each microservice on the subscribed list\n\t\tfor (Object o : a) {\n\t\t\tint index = registeredMicroservice.indexOf(o);\n\t\t\tmicroserviceMessageQueue.get(index).add(b);\n\t\t}\n\t}", "public void testReceiveFeedback() {\n\n\t}", "@Override\n public void onReceive(Object msg) throws Exception {\n }", "boolean enableCellBroadcastForSubscriber(int subId, int messageIdentifier, int ranType);", "@SmallTest\n @Test\n public void testReceiveMessage() {\n ArraySet<RtpHeaderExtension> extension = new ArraySet<>();\n extension.add(mParams.extension);\n mRtpTransport.onRtpHeaderExtensionsReceived(extension);\n\n verify(mCallback).onMessagesReceived(mMessagesCaptor.capture());\n Set<Communicator.Message> messages = mMessagesCaptor.getValue();\n assertEquals(1, messages.size());\n assertTrue(messages.contains(mParams.commMessage));\n }", "boolean disableCellBroadcastForSubscriber(int subId, int messageIdentifier, int ranType);", "@Override\n\tpublic synchronized void sendBroadcast(Broadcast b) {\n\t\tif (typesQueue != null && !typesQueue.isEmpty())\n\t\t{\n\t\t\tif(typesQueue.containsKey(b.getClass()) && !typesQueue.get(b.getClass()).isEmpty())\n\t\t\t{\n\t\t\t\tif(subscribersMessages!=null)\n\t\t\t\t{\n\t\t\t\t\tfor (Subscriber s : typesQueue.get(b.getClass())) {\n\t\t\t\t\t\tsubscribersMessages.get(s).add(b);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tnotifyAll();\n\t}", "@Test\r\n\tpublic void testAddWorkspaceListener() {\r\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\t}", "public static void opBroadcast(String message){\n JawaChat.opsOnline.values().forEach((target) -> {\n target.sendMessage(message);\n });\n logMessage(message, \"op channel\");\n }", "public void broadcastIntent(View view) {\n\t\tLocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(this);\n\t\tTestBroadcastReceiver testBroadcastReceiver = new TestBroadcastReceiver();\n\t\tIntentFilter intentFilter = new IntentFilter();\n\t\tintentFilter.addAction(\"com.example.volleyball.score.CUSTOM_INTENT\");\n\t\tlocalBroadcastManager.registerReceiver(testBroadcastReceiver, intentFilter);\n\n\t\tSystem.out.println(\"Hit broadcastIntent!!!\");\n\t\tIntent intent = new Intent(); \n\t\tintent.setAction(\"com.example.volleyball.score.CUSTOM_INTENT\"); \n\t\tboolean result = localBroadcastManager.sendBroadcast(intent);//这种方法发出的广播只能被app自身广播接收器接收\n\t\tSystem.out.println(\"使用LocalBroadcastManager发送广播结果:\" + result);\n\t\tlocalBroadcastManager.unregisterReceiver(testBroadcastReceiver);\n//\t\tsendBroadcast(intent);\n\t\ttry {\n//\t\t\tstartActivity(intent);\n\t\t} catch (Exception e) {\n\t\t\t// \n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void testRwbm()\n {\n generateEvents(\"dist-rwbm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public interface BroadCastManagerCallerInterface {\n /**\n * **\n * This method is called when an intent Has Been ReceivedT hrough The BroadCast\n * @param intent This is the intent that was received\n */\n void intentHasBeenReceivedThroughTheBroadCast(Intent intent);\n}", "@Override\n public void run() {\n Intent intent = new Intent(ACTION);\n intent.putExtra(\"result\", \"baz\");\n mLocalBroadcastManager.sendBroadcast(intent);\n // If desired, stop the service\n// stopSelf();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Intent intent1 = new Intent(context, CoreService.class);\n context.startService(intent1);\n Log.d(TAG, \"broadcast receive\");\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "public boolean sendBroadcast(android.content.Intent r24) {\n /*\n r23 = this;\n r1 = r23;\n r2 = r24;\n r3 = r1.mReceivers;\n monitor-enter(r3);\n r11 = r24.getAction();\t Catch:{ all -> 0x0173 }\n r4 = r1.mAppContext;\t Catch:{ all -> 0x0173 }\n r4 = r4.getContentResolver();\t Catch:{ all -> 0x0173 }\n r12 = r2.resolveTypeIfNeeded(r4);\t Catch:{ all -> 0x0173 }\n r13 = r24.getData();\t Catch:{ all -> 0x0173 }\n r14 = r24.getScheme();\t Catch:{ all -> 0x0173 }\n r15 = r24.getCategories();\t Catch:{ all -> 0x0173 }\n r4 = r24.getFlags();\t Catch:{ all -> 0x0173 }\n r4 = r4 & 8;\n if (r4 == 0) goto L_0x002c;\n L_0x0029:\n r16 = 1;\n goto L_0x002e;\n L_0x002c:\n r16 = 0;\n L_0x002e:\n if (r16 == 0) goto L_0x0056;\n L_0x0030:\n r4 = \"LocalBroadcastManager\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0173 }\n r5.<init>();\t Catch:{ all -> 0x0173 }\n r6 = \"Resolving type \";\n r5.append(r6);\t Catch:{ all -> 0x0173 }\n r5.append(r12);\t Catch:{ all -> 0x0173 }\n r6 = \" scheme \";\n r5.append(r6);\t Catch:{ all -> 0x0173 }\n r5.append(r14);\t Catch:{ all -> 0x0173 }\n r6 = \" of intent \";\n r5.append(r6);\t Catch:{ all -> 0x0173 }\n r5.append(r2);\t Catch:{ all -> 0x0173 }\n r5 = r5.toString();\t Catch:{ all -> 0x0173 }\n android.util.Log.v(r4, r5);\t Catch:{ all -> 0x0173 }\n L_0x0056:\n r4 = r1.mActions;\t Catch:{ all -> 0x0173 }\n r5 = r24.getAction();\t Catch:{ all -> 0x0173 }\n r4 = r4.get(r5);\t Catch:{ all -> 0x0173 }\n r8 = r4;\n r8 = (java.util.ArrayList) r8;\t Catch:{ all -> 0x0173 }\n if (r8 == 0) goto L_0x0170;\n L_0x0065:\n if (r16 == 0) goto L_0x007d;\n L_0x0067:\n r4 = \"LocalBroadcastManager\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0173 }\n r5.<init>();\t Catch:{ all -> 0x0173 }\n r6 = \"Action list: \";\n r5.append(r6);\t Catch:{ all -> 0x0173 }\n r5.append(r8);\t Catch:{ all -> 0x0173 }\n r5 = r5.toString();\t Catch:{ all -> 0x0173 }\n android.util.Log.v(r4, r5);\t Catch:{ all -> 0x0173 }\n L_0x007d:\n r4 = 0;\n r6 = r4;\n r7 = 0;\n L_0x0080:\n r4 = r8.size();\t Catch:{ all -> 0x0173 }\n if (r7 >= r4) goto L_0x0140;\n L_0x0086:\n r4 = r8.get(r7);\t Catch:{ all -> 0x0173 }\n r5 = r4;\n r5 = (android.support.v4.content.LocalBroadcastManager.ReceiverRecord) r5;\t Catch:{ all -> 0x0173 }\n if (r16 == 0) goto L_0x00a7;\n L_0x008f:\n r4 = \"LocalBroadcastManager\";\n r9 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0173 }\n r9.<init>();\t Catch:{ all -> 0x0173 }\n r10 = \"Matching against filter \";\n r9.append(r10);\t Catch:{ all -> 0x0173 }\n r10 = r5.filter;\t Catch:{ all -> 0x0173 }\n r9.append(r10);\t Catch:{ all -> 0x0173 }\n r9 = r9.toString();\t Catch:{ all -> 0x0173 }\n android.util.Log.v(r4, r9);\t Catch:{ all -> 0x0173 }\n L_0x00a7:\n r4 = r5.broadcasting;\t Catch:{ all -> 0x0173 }\n if (r4 == 0) goto L_0x00c2;\n L_0x00ab:\n if (r16 == 0) goto L_0x00b4;\n L_0x00ad:\n r4 = \"LocalBroadcastManager\";\n r5 = \" Filter's target already added\";\n android.util.Log.v(r4, r5);\t Catch:{ all -> 0x0173 }\n L_0x00b4:\n r18 = r7;\n r19 = r8;\n r17 = r11;\n r20 = r12;\n r21 = r13;\n r13 = 1;\n r11 = r6;\n goto L_0x0133;\n L_0x00c2:\n r4 = r5.filter;\t Catch:{ all -> 0x0173 }\n r10 = \"LocalBroadcastManager\";\n r9 = r5;\n r5 = r11;\n r17 = r11;\n r11 = r6;\n r6 = r12;\n r18 = r7;\n r7 = r14;\n r19 = r8;\n r8 = r13;\n r20 = r12;\n r21 = r13;\n r13 = 1;\n r12 = r9;\n r9 = r15;\n r4 = r4.match(r5, r6, r7, r8, r9, r10);\t Catch:{ all -> 0x0173 }\n if (r4 < 0) goto L_0x010a;\n L_0x00df:\n if (r16 == 0) goto L_0x00fb;\n L_0x00e1:\n r5 = \"LocalBroadcastManager\";\n r6 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0173 }\n r6.<init>();\t Catch:{ all -> 0x0173 }\n r7 = \" Filter matched! match=0x\";\n r6.append(r7);\t Catch:{ all -> 0x0173 }\n r4 = java.lang.Integer.toHexString(r4);\t Catch:{ all -> 0x0173 }\n r6.append(r4);\t Catch:{ all -> 0x0173 }\n r4 = r6.toString();\t Catch:{ all -> 0x0173 }\n android.util.Log.v(r5, r4);\t Catch:{ all -> 0x0173 }\n L_0x00fb:\n if (r11 != 0) goto L_0x0103;\n L_0x00fd:\n r6 = new java.util.ArrayList;\t Catch:{ all -> 0x0173 }\n r6.<init>();\t Catch:{ all -> 0x0173 }\n goto L_0x0104;\n L_0x0103:\n r6 = r11;\n L_0x0104:\n r6.add(r12);\t Catch:{ all -> 0x0173 }\n r12.broadcasting = r13;\t Catch:{ all -> 0x0173 }\n goto L_0x0134;\n L_0x010a:\n if (r16 == 0) goto L_0x0133;\n L_0x010c:\n switch(r4) {\n case -4: goto L_0x011b;\n case -3: goto L_0x0118;\n case -2: goto L_0x0115;\n case -1: goto L_0x0112;\n default: goto L_0x010f;\n };\t Catch:{ all -> 0x0173 }\n L_0x010f:\n r4 = \"unknown reason\";\n goto L_0x011d;\n L_0x0112:\n r4 = \"type\";\n goto L_0x011d;\n L_0x0115:\n r4 = \"data\";\n goto L_0x011d;\n L_0x0118:\n r4 = \"action\";\n goto L_0x011d;\n L_0x011b:\n r4 = \"category\";\n L_0x011d:\n r5 = \"LocalBroadcastManager\";\n r6 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0173 }\n r6.<init>();\t Catch:{ all -> 0x0173 }\n r7 = \" Filter did not match: \";\n r6.append(r7);\t Catch:{ all -> 0x0173 }\n r6.append(r4);\t Catch:{ all -> 0x0173 }\n r4 = r6.toString();\t Catch:{ all -> 0x0173 }\n android.util.Log.v(r5, r4);\t Catch:{ all -> 0x0173 }\n L_0x0133:\n r6 = r11;\n L_0x0134:\n r7 = r18 + 1;\n r11 = r17;\n r8 = r19;\n r12 = r20;\n r13 = r21;\n goto L_0x0080;\n L_0x0140:\n r11 = r6;\n r13 = 1;\n if (r11 == 0) goto L_0x0170;\n L_0x0144:\n r4 = 0;\n L_0x0145:\n r5 = r11.size();\t Catch:{ all -> 0x0173 }\n if (r4 >= r5) goto L_0x0157;\n L_0x014b:\n r5 = r11.get(r4);\t Catch:{ all -> 0x0173 }\n r5 = (android.support.v4.content.LocalBroadcastManager.ReceiverRecord) r5;\t Catch:{ all -> 0x0173 }\n r6 = 0;\n r5.broadcasting = r6;\t Catch:{ all -> 0x0173 }\n r4 = r4 + 1;\n goto L_0x0145;\n L_0x0157:\n r4 = r1.mPendingBroadcasts;\t Catch:{ all -> 0x0173 }\n r5 = new android.support.v4.content.LocalBroadcastManager$BroadcastRecord;\t Catch:{ all -> 0x0173 }\n r5.<init>(r2, r11);\t Catch:{ all -> 0x0173 }\n r4.add(r5);\t Catch:{ all -> 0x0173 }\n r2 = r1.mHandler;\t Catch:{ all -> 0x0173 }\n r2 = r2.hasMessages(r13);\t Catch:{ all -> 0x0173 }\n if (r2 != 0) goto L_0x016e;\n L_0x0169:\n r2 = r1.mHandler;\t Catch:{ all -> 0x0173 }\n r2.sendEmptyMessage(r13);\t Catch:{ all -> 0x0173 }\n L_0x016e:\n monitor-exit(r3);\t Catch:{ all -> 0x0173 }\n return r13;\n L_0x0170:\n r6 = 0;\n monitor-exit(r3);\t Catch:{ all -> 0x0173 }\n return r6;\n L_0x0173:\n r0 = move-exception;\n r2 = r0;\n monitor-exit(r3);\t Catch:{ all -> 0x0173 }\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.v4.content.LocalBroadcastManager.sendBroadcast(android.content.Intent):boolean\");\n }", "@Test\n public void testLocalBm()\n {\n generateEvents(\"local-bm\");\n checkEvents(false, true);\n\n }", "public void Bcast(int[] data, int root) {\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\tEntered Bcast int[]\");\n }\n\n int size = group_.Size();\n int old_rank = Rank();\n int rank = relativeRank(root,old_rank,size);\n\n int dest;\n int src;\n\n boolean received = false;\n\n Message send;\n Message recv = null;\n\n /*\n * Error checking\n */\n\n /*\n * Binary-tree broadcast\n */\n for (int stage = 0; stage < (int)Math.ceil(Math.log(size)/Math.log(2)); stage++) {\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\tRank: \" + old_rank + \", Relative rank: \" + rank + \" Stage: \" + stage);\n }\n\n // Receive stage\n if (rank < Math.pow(2,stage+1) && rank >= Math.pow(2,stage)) {\n\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\t\" + rank + \" is receiving from \" + (rank - (Math.pow(2,stage))));\n }\n\n // Copy the received message into recv.\n recv = group_.Recv(originalRank(root, (int)(rank-Math.pow(2,stage)), size), BROADCAST_TAG);\n // Set received to true\n received = true;\n\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\t\" + rank + \" received OK\");\n System.err.println(\"Array has length: \" + recv.dataToPrimitiveInt().length);\n System.err.println(\"Data has length: \" + data.length);\n }\n\n if (recv.getType() != Message.TYPE_INT) {\n throw new MpiException(\"Message types do not match, please check your tag usage\");\n }\n else {\n System.arraycopy(recv.dataToPrimitiveInt(), 0, data, 0, recv.dataToPrimitiveInt().length);\n }\n }\n\n // Send stage\n else if (rank < Math.pow(2,stage) && (rank+Math.pow(2,stage)) < size) {\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\t\" + rank + \" is sending to \" + (int)(rank + Math.pow(2,stage)));\n }\n\n // If a message has been received then recycle this and update its source before sending it on.\n if (received) {\n send = recv;\n send.setSource(originalRank(root,rank,size));\n }\n // Otherwise read in the values from the given data (this should only happen at the \"root\")\n else {\n send = new Message(Message.dataToByteArray(data), originalRank(root,rank,size), BROADCAST_TAG, Message.TYPE_INT);\n recv = send;\n received = true;\n }\n\n // Send the message\n group_.Send(send, originalRank(root, (int)(rank+Math.pow(2,stage)), size));\n }\n }\n\n BROADCAST_TAG--;\n }", "private void broadcast(String message)\n \t{\n \t\tfor(int i = 0; i < players.length; i++)\n \t\t{\n // PROTOCOL\n \t\t\tplayers[i].sendMessage(message);\n // PROTOCOL\n \t\t}\n \t}", "private void registerBroadcastReceiver() {\n IntentFilter filter = new IntentFilter();\n filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);\n filter.addAction(Constants.GRAB_ORDER_FAIL_ACTION);\n filter.addAction(Constants.GRAB_ORDER_SUCCESS_ACTION);\n filter.addAction(Constants.DISPATCH_ORDER_SUCCESS_ACTION);\n filter.addAction(Constants.IS_OPERATING_STATE_ORDER_ACTION);\n filter.addAction(Constants.OPERATED_ORDER_ACTION);\n filter.addAction(Constants.CANCLE_ORDER_ACTION);\n filter.addAction(Constants.CANCLE_GRABBED_ORDER_ACTION);\n registerReceiver(receiver, filter);\n }", "public void broadcast(String message) throws BroadcastException {\n\t\t\n\t}", "@Test\n public void testRwbmInternal()\n {\n generateEvents(\"dist-rwbm-internal-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public void beforeReceive() {\n\t}", "@Override\n\tpublic void forceStateBroadcast() {\n\t\tpeerDiscoveryService.sendStateMulticast();\n\t}", "@Override\n\tpublic void receive() {\n\t}", "public final void testCall() throws Exception\n {\n \n Logger.getLogger(this.getClass()).info(\"waiting for Remote message...\");\n \n Logger.getLogger(this.getClass()).info(\"press enter to shutdown server\");\n \n //TODO raffaele.picardi: report this class out of this test and remain only Monitor.onWait for itnegration test\n // Monitor.waitOn(WAIT);\n //Init section to transfer in External system\n UMOMessage result=null;\n MuleClient client;\n while (true) {\n try {\n \n client = new MuleClient();\n RemoteDispatcher rd = client.getRemoteDispatcher(MessagesTest.getString(\"EHelloServiceObjectArrayTest.10\")); //$NON-NLS-1$\n \n/* SoapMethod method = new SoapMethod(new QName(\"\", Messages.getString(\"SOAP_METHOD_NAME\")));\n method.addNamedParameter(new QName( Messages.getString(\"NAMED_PARAMETER\")), new javax.xml.namespace.QName( Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QNAME\")), \"in\");\n method.setReturnType( new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n method.setReturnClass(Class.forName(Messages.getString(\"RETURN_CLASSNAME\")));\n */\n \n Map props = new HashMap();\n props.put(\"style\", \"wrapped\");\n props.put(\"use\", \"literal\"); \n //props.put(MuleProperties.MULE_SOAP_METHOD, method);\n \n props.put(\"resourceKey\", MessagesTest.getString(\"RESOURCE_KEY\"));\n props.put(WSRFParameter.SERVICE_NAMESPACE , MessagesTest.getString(\"SERVICE_NAMESPACE_URI\"));\n props.put(WSRFParameter.RESOURCE_KEY_NAME , MessagesTest.getString(\"RESOURCE_KEY_NAME\"));\n props.put(WSRFParameter.RETURN_QNAME, MessagesTest.getString(\"RETURN_QNAME\"));\n \n /* props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n \n props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n */\n \n props.put(WSRFParameter.RETURN_CLASS, Class.forName(MessagesTest.getString(\"RETURN_CLASSNAME\")));\n props.put(WSRFParameter.SOAP_ACTION_URI, MessagesTest.getString(\"SOAP_ACTION_URI\"));\n result = rd.sendRemote(\"vm://vmQueue\", new Integer(2), props);\n \n //result = rd.sendRemote(Messages.getString(\"EHelloServiceObjectArrayTest.11\"),\"\", null); //$NON-NLS-1$\n //logger.info(this, \"invoke done.\",\"\"); //$NON-NLS-1$\n System.out.println(\"invoke done.\");\n Thread.sleep(5000);\n } \n catch (UMOException e) \n {\n\n e.printStackTrace();\n } \n catch (InterruptedException e) \n {\n\n e.printStackTrace();\n }\n finally \n {\n if (result != null)\n {\n System.out.println(result.getPayload().toString()); //$NON-NLS-1$\n }\n else\n {\n System.out.println(\"result is null\");\n }\n \n }\n //end section to transfer in External system\n }\n \n }", "public interface Listener {\n\n public void onRecievedCustomBroadCast(String msg);\n}", "@Override\n\tvoid receiveCall() {\n\n\t}", "public void mo29430b() {\n Log.w(\"MessageCenter\", \"unregistering MessageCenter's Broadcast Receiver\");\n C1049a.m3996a(this.f9292a).mo4058a((BroadcastReceiver) this.f9298g);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n switch (action) {\n case RoosterConnectionService.NEW_MESSAGE:\n// k = RoosterConnectionService.NEW_MESSAGE;\n String from = intent.getStringExtra(RoosterConnectionService.BUNDLE_FROM_JID);\n String body = intent.getStringExtra(RoosterConnectionService.BUNDLE_MESSAGE_BODY);\n// if(body.toUpperCase().contains(\"V\".toUpperCase()) ) {\n message(body);\n// }\n return;\n\n case RoosterConnectionService.UI_AUTHENTICATED:\n Toast.makeText(getApplicationContext(), \"authenticated\", Toast.LENGTH_SHORT).show();\n// Log.d(TAG,\"Got a broadcast to show the main app window\");\n //Show the main app window\n// showProgress(false);\n// Intent i2 = new Intent(mContext,ContactListActivity.class);\n// startActivity(i2);\n// finish();\n\n break;\n }\n\n\n }", "@Test\n public void testDistBm()\n {\n generateEvents(\"dist-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Test\n public void testHandleMessages() throws Exception {\n Controller controller = getController();\n controller.removeOFMessageListeners(OFType.PACKET_IN);\n \n IOFSwitch sw = createMock(IOFSwitch.class);\n expect(sw.getStringId()).andReturn(\"00:00:00:00:00:00:00\").anyTimes();\n expect(sw.getFeaturesReply()).andReturn(new OFFeaturesReply()).anyTimes();\n \n // Build our test packet\n IPacket testPacket = new Ethernet()\n .setSourceMACAddress(\"00:44:33:22:11:00\")\n .setDestinationMACAddress(\"00:11:22:33:44:55\")\n .setEtherType(Ethernet.TYPE_ARP)\n .setPayload(\n new ARP()\n .setHardwareType(ARP.HW_TYPE_ETHERNET)\n .setProtocolType(ARP.PROTO_TYPE_IP)\n .setHardwareAddressLength((byte) 6)\n .setProtocolAddressLength((byte) 4)\n .setOpCode(ARP.OP_REPLY)\n .setSenderHardwareAddress(Ethernet.toMACAddress(\"00:44:33:22:11:00\"))\n .setSenderProtocolAddress(IPv4.toIPv4AddressBytes(\"192.168.1.1\"))\n .setTargetHardwareAddress(Ethernet.toMACAddress(\"00:11:22:33:44:55\"))\n .setTargetProtocolAddress(IPv4.toIPv4AddressBytes(\"192.168.1.2\")));\n byte[] testPacketSerialized = testPacket.serialize();\n \n // Build the PacketIn \n OFPacketIn pi = ((OFPacketIn) new BasicFactory().getMessage(OFType.PACKET_IN))\n .setBufferId(-1)\n .setInPort((short) 1)\n .setPacketData(testPacketSerialized)\n .setReason(OFPacketInReason.NO_MATCH)\n .setTotalLength((short) testPacketSerialized.length);\n \n IOFMessageListener test1 = createMock(IOFMessageListener.class);\n expect(test1.getName()).andReturn(\"test1\").anyTimes();\n expect(test1.isCallbackOrderingPrereq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test1.isCallbackOrderingPostreq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test1.receive(eq(sw), eq(pi), isA(FloodlightContext.class))).andThrow(new RuntimeException(\"This is NOT an error! We are testing exception catching.\"));\n IOFMessageListener test2 = createMock(IOFMessageListener.class);\n expect(test2.getName()).andReturn(\"test2\").anyTimes();\n expect(test2.isCallbackOrderingPrereq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test2.isCallbackOrderingPostreq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n // expect no calls to test2.receive() since test1.receive() threw an exception\n \n replay(test1, test2, sw);\n controller.addOFMessageListener(OFType.PACKET_IN, test1);\n controller.addOFMessageListener(OFType.PACKET_IN, test2);\n try {\n controller.handleMessage(sw, pi, null);\n } catch (RuntimeException e) {\n assertEquals(e.getMessage().startsWith(\"This is NOT an error!\"), true);\n }\n verify(test1, test2, sw);\n \n // verify STOP works\n reset(test1, test2, sw);\n expect(test1.receive(eq(sw), eq(pi), isA(FloodlightContext.class))).andReturn(Command.STOP); \n expect(test1.getId()).andReturn(0).anyTimes();\n expect(sw.getStringId()).andReturn(\"00:00:00:00:00:00:00\").anyTimes();\n expect(sw.getFeaturesReply()).andReturn(new OFFeaturesReply()).anyTimes();\n replay(test1, test2, sw);\n controller.handleMessage(sw, pi, null);\n verify(test1, test2, sw);\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate synchronized boolean broadcast(Connection con, JsonObject receivedMSG) throws NullPointerException {\n\t\tif (!loadConnections.contains(con) && !broadConnections.contains(con)) {\n\t\t\tInvalidMessage invalidMsg = new InvalidMessage();\n\t\t\tinvalidMsg.setInfo(\"Unanthenticated connection\");\n\t\t\tcon.writeMsg(invalidMsg.toJsonString());\n\t\t\treturn false;\n\t\t}\n\n\t\t// System.out.println(\"Broadcasting\");\n\n\t\tJSONObject response = new JSONObject();\n\t\tif (receivedMSG.get(\"command\").getAsString().equals(ACTIVITY_MESSAGE)) {\n\t\t\tString username = receivedMSG.get(\"username\").getAsString();\n\n\t\t\tString secret = null;\n\t\t\tif (!receivedMSG.get(\"secret\").isJsonNull())\n\t\t\t\tsecret = receivedMSG.get(\"secret\").getAsString();\n\t\t\tif (secret == null || (con.getUsername().equals(username) && con.getSecret().equals(secret))) {\n\t\t\t\tresponse.put(\"command\", ACTIVITY_BROADCAST);\n\n\t\t\t\t// Process the activity object\n\t\t\t\tJsonObject actObj = receivedMSG.get(\"activity\").getAsJsonObject();\n\t\t\t\tactObj.addProperty(\"authenticated_user\", username);\n\t\t\t\tresponse.put(\"activity\", actObj);\n\t\t\t\tfor (Connection connection : connections) {\n\t\t\t\t\tconnection.writeMsg(response.toJSONString());\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tresponse.put(\"command\", AUTHENTICATION_FAIL);\n\t\t\t\tresponse.put(\"info\", \"Unauthenticated connection\");\n\t\t\t\tcon.writeMsg(response.toJSONString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (receivedMSG.get(\"command\").getAsString().equals(ACTIVITY_BROADCAST)) {\n\t\t\tresponse.put(\"command\", ACTIVITY_BROADCAST);\n\t\t\tJsonObject actObj = receivedMSG.get(\"activity\").getAsJsonObject();\n\t\t\tactObj.addProperty(\"authenticated_user\", actObj.get(\"authenticated_user\").getAsString());\n\t\t\tresponse.put(\"activity\", actObj);\n\t\t\tfor (Connection connection : connections) {\n\t\t\t\tif (connection != con)\n\t\t\t\t\tconnection.writeMsg(response.toJSONString());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}", "@Override\n public int getServerBroadcastPort() {\n return 10081;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"Broadcast Listened\", \"Service tried to stop\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n context.startForegroundService(new Intent(context, LocationService.class));\n } else {\n context.startService(new Intent(context, LocationService.class));\n }\n\n }", "private InetAddress getBroadcastAddress() {\n InetAddress broadcastAddress = null;\n try {\n Enumeration<NetworkInterface> networkInterface = NetworkInterface\n .getNetworkInterfaces();\n\n while (broadcastAddress == null\n && networkInterface.hasMoreElements()) {\n NetworkInterface singleInterface = networkInterface.nextElement();\n String interfaceName = singleInterface.getName();\n if (interfaceName.contains(\"wlan0\") || interfaceName.contains(\"eth0\")) {\n for (InterfaceAddress interfaceAddress : singleInterface.getInterfaceAddresses()) {\n broadcastAddress = interfaceAddress.getBroadcast();\n if (broadcastAddress != null) {\n break;\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return broadcastAddress;\n }", "private void setupGeneralBroadcastReceiver() {\n generalBroadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.GENERAL_BROADCAST\".equals(intent.getAction())) {\n int status = intent.getIntExtra(\"com.example.loravisual.GENERAL\", 0);\n if (status == -2) {\n if (!connToastsDeactivated)\n Toast.makeText(context, \"LoRa configuration synchronized, experiment ready\", Toast.LENGTH_SHORT).show();\n getSupportActionBar().setSubtitle(getString(R.string.connected));\n ready = true;\n } else if (status == -3) {\n Toast.makeText(context, \"correct response received\", Toast.LENGTH_SHORT).show();\n } else if (status == -4) {\n Toast.makeText(context, \"response received but did not match\", Toast.LENGTH_SHORT).show();\n } else if (status == -7) {\n Toast.makeText(context, \"no response received\", Toast.LENGTH_SHORT).show();\n } else if (status == -5) {\n Toast.makeText(context, \"no ACK received, trying again\", Toast.LENGTH_SHORT).show();\n } else if (status == -6) {\n Toast.makeText(context, \"ACK received\", Toast.LENGTH_SHORT).show();\n startTimers(total, findViewById(R.id.htext), true);\n }\n if(status == -3 || status == -4 || status == -7)\n connToastsDeactivated = false;\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.GENERAL_BROADCAST\");\n registerReceiver(generalBroadcastReceiver, filter);\n }", "public void listen() {\n Thread listenThread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n\n DatagramSocket socket;\n try {\n\n socket = new DatagramSocket(BROADCAST_PORT);\n }\n catch (SocketException e) {\n\n return;\n }\n byte[] buffer = new byte[BROADCAST_BUF_SIZE];\n\n while(LISTEN) {\n\n listen(socket, buffer);\n }\n socket.disconnect();\n socket.close();\n return;\n }\n\n public void listen(DatagramSocket socket, byte[] buffer) {\n\n try {\n // Esperando o bebê\n DatagramPacket packet = new DatagramPacket(buffer, BROADCAST_BUF_SIZE);\n socket.setSoTimeout(15000);\n socket.receive(packet);\n String data = new String(buffer, 0, packet.getLength());\n String action = data.substring(0, 4);\n if(action.equals(\"ONL:\")) {\n addBaby(data.substring(4, data.length()), packet.getAddress());\n }\n else if(action.equals(\"BYE:\")) {\n removeBaby(data.substring(4, data.length()));\n }\n\n }\n catch(SocketTimeoutException e) {\n\n if(LISTEN) {\n\n listen(socket, buffer);\n }\n return;\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n });\n listenThread.start();\n }", "private void m10418a(AppEntityBroadcast appEntityBroadcast) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"onAppBroadcastChange: implements actions \");\n sb.append(appEntityBroadcast);\n Log.d(\"MessageCenter\", sb.toString());\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tLog.e(\"SERVICE\",\"sulod\");\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setAction(ResponseReceiver.ACTION_RESP);\n\t\t\t\tintent.addCategory(Intent.CATEGORY_DEFAULT);\n\t\t\t\tintent.putExtra(\"MESSAGE\", 100);\n\t\t\t\tsendBroadcast(intent);\n\t\t\t}", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "public void testNonDuplicateMessage() throws Exception {\n sendMessage(187286123);\n\n mServiceIntentToVerify = null;\n\n Intent intent = new Intent(mContext, CellBroadcastAlertService.class);\n intent.setAction(Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION);\n\n SmsCbMessage m = createMessage(129487394);\n intent.putExtra(\"message\", m);\n\n startService(intent);\n waitForMs(200);\n\n assertEquals(SHOW_NEW_ALERT_ACTION, mServiceIntentToVerify.getAction());\n assertEquals(CellBroadcastAlertService.class.getName(),\n intent.getComponent().getClassName());\n\n CellBroadcastMessage cbmTest =\n (CellBroadcastMessage) mServiceIntentToVerify.getExtras().get(\"message\");\n CellBroadcastMessage cbm = new CellBroadcastMessage(m);\n\n compareCellBroadCastMessage(cbm, cbmTest);\n }", "@Test\n public void testStopListening() {\n System.out.println(\"stopListening\");\n instance.stopListening();\n }", "@Test\n\tpublic void runSend(){\n\t\tstandard();\n\t}", "@Test\n public void stoppedSenderShouldNotAddEventsToTmpDroppedEventsButStillDrainQueuesWhenStarted() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(2));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(1, lnPort));\n\n createCacheInVMs(lnPort, vm2, vm4);\n createReceiverInVMs(vm2, vm4);\n createCacheInVMs(nyPort, vm3, vm5);\n createReceiverInVMs(vm3, vm5);\n\n vm2.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n\n stopSenderInVMsAsync(\"ny\", vm2, vm4);\n\n vm2.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 0, 100));\n\n // verify tmpDroppedEvents is 0 at site-ny\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 0));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 0));\n\n\n startSenderInVMsAsync(\"ny\", vm2, vm4);\n\n vm2.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 1000));\n\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 1000));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 1000));\n\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 900));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 900));\n\n // verify the secondary's queues are drained at site-ny\n vm2.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n }", "private void broadcastMessage(final PanicIncidentDTO message) {\n// if (message.getLocationRequest().equals(Boolean.TRUE)) {\n// //todo use broadcast service to ask for location from StaffmainActivity\n// Log.w(TAG, \"@@@@ CitGCMListenerService responding to loc request. Broadcasting Request! \");\n//\n// Intent m = new Intent(LocationTrackerReceiver.BROADCAST_ACTION);\n// m.putExtra(LOCATION_REQUESTED, true);\n// m.putExtra(\"simpleMessage\",message);\n// LocalBroadcastManager.getInstance(getApplicationContext())\n// .sendBroadcast(m);\n// return;\n// }\n// if (message.getLocationTracker() != null) {\n// sendNotification(message.getLocationTracker());\n// return;\n// }\n\n }", "public void broadcastClusterGaggle() {\r\n \tint[] temp = getCluster();\r\n \tExperiment e = getExperiment();\r\n \tif (temp == null)\r\n \t\tSystem.out.println(\"getCluster returns null\");\r\n \tif(e == null)\r\n \t\tSystem.out.println(\"getExperiment returns null\");\r\n \tif(framework == null)\r\n \t\tSystem.out.println(this.toString() + \": framework is null\");\r\n \tframework.broadcastGeneCluster(getExperiment(), getCluster(), null);\r\n\t}", "@Override\n public void run()\n {\n try\n {\n MulticastSocket multicastSocket = new MulticastSocket(55559);\n //My chosen multicast ip.\n String multicastIP = \"224.0.159.82\";\n multicastSocket.joinGroup(InetAddress.getByName(multicastIP));\n //Receiver on continuous loop.\n while (receiverOn)\n {\n //Check network flag.\n if (frame.getSelectPanel().network())\n {\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\n multicastSocket.receive(receivePacket);\n byte[] b = receivePacket.getData();\n System.out.println(\"Receive: \" + b.length);\n ByteArrayInputStream bis = new ByteArrayInputStream(b);\n ObjectInput in = new ObjectInputStream(bis);\n\n try\n {\n int[] data = (int[]) in.readObject();\n System.out.println(\"This: \" + frame.getId() + \"\\tFrom: \" + data[0]);\n //Exclude messages that originated at this peer.\n if (data[0] != frame.getId())\n {\n //Action based on int at data[1]\n switch (data[1])\n {\n case Draw.CLEAR:\n case Draw.DRAW:\n case Draw.TEXT:\n case Draw.CIRCLE:\n case Draw.IMAGE:\n frame.getDraw().put(data);\n break;\n case REQ_IP:\n int key = data[0];\n String ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().addPeer(new Triple<>(key, ip, data[6]));\n int size = frame.getPeerCache().getSize();\n frame.getPeerCount().setText(String.format(\"Peer count: %d\", size));\n int[] myIp = frame.getMyIp();\n size = frame.getActionCache().getSize();\n int[] ipAns = {frame.getId(), ANS_IP, myIp[0], myIp[1], myIp[2], myIp[3], size};\n frame.getBroadcaster().put(ipAns);\n break;\n case ANS_IP:\n /*\n * 0 = id\n * 1 = data type\n * 2,3,4,6 = IP\n */\n key = data[0];\n ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().addPeer(new Triple<>(key, ip, data[6]));\n frame.getPeerCount().setText(\n String.format(\"Peer count: %d\", frame.getPeerCache().getSize()));\n break;\n case LEAVE_NOTE:\n ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().removePeer(ip);\n frame.getPeerCount().setText(\n String.format(\"Peer count: %d\", frame.getPeerCache().getSize()));\n break;\n case REQ_HISTORY:\n /*\n * 0 = id\n * 1 = data type\n * 2 = tarID\n * 3,4,5,6 = IP\n */\n if (data[2] == frame.getId())\n {\n ip = String.format(\"%d.%d.%d.%d\", data[3], data[4], data[5], data[6]);\n System.out.println(\"History request from \" + ip);\n UdpClient historyClient = new UdpClient(ip, frame.getActionCache());\n Thread historyThread = new Thread(historyClient);\n historyThread.start();\n }\n break;\n case CLEAR_REQ:\n String reqTitle = String.format(\"Peer %d has requested a clear.\", data[1]);\n int dialogResult = JOptionPane.showConfirmDialog(frame, \"Would you like to clear?\",\n reqTitle,\n JOptionPane.YES_NO_OPTION);\n if (dialogResult == JOptionPane.YES_OPTION)\n {\n int[] clear = {frame.getId(), Draw.CLEAR};\n frame.getDraw().put(clear);\n frame.clearAll();\n }\n break;\n case IMAGE_REQ:\n System.out.print(\"IMAGE REQUEST: \");\n System.out.println(data[2] + \" vs \" + frame.getId());\n if (data[2] == frame.getId())\n {\n ip = String.format(\"%d.%d.%d.%d\", data[4], data[5], data[6], data[7]);\n System.out.println(\"Image request from \" + ip);\n BufferedImage image = frame.getImageCache().get(data[3], data[7]);\n\n TcpClient tcpClient = new TcpClient(ip, image);\n Thread tcpThread = new Thread(tcpClient);\n tcpThread.start();\n }\n break;\n default:\n //Rogue packet protection.\n System.out.println(\"Received invalid packet.\");\n System.out.println(Arrays.toString(data));\n }\n }\n } catch (ClassNotFoundException | IndexOutOfBoundsException e)\n {\n //Rogue packet protection.\n //Message given, loop continues.\n System.out.println(\"Exception: Received invalid packet.\");\n e.printStackTrace();\n }\n }\n }\n } catch (IOException | InterruptedException e)\n {\n System.err.println(\"Error in Receiver class.\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "abstract protected void RunTest(Socket s);", "@SuppressWarnings(\"WeakerAccess\")\n\tprotected abstract void onMessageReceived(@NonNull BroadcastMessage message);", "private void registerBroadcastReceivers(){\n if (!mBufferBroadcastIsRegistered){\n this.registerReceiver(BufferBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_BUFFER));\n mBufferBroadcastIsRegistered=true;\n }\n /** register broadcastReceiver for seekBar*/\n if (!mSeekBarBroadcastIsRegistered) {\n this.registerReceiver(seekBarBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_ACTION));\n mSeekBarBroadcastIsRegistered = true;\n }\n /** register broadcastReceiver for alertDialog in case call when audioTale is playing*/\n if(!mADialogBroadcastIsRegistered){\n this.registerReceiver(afterCallBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_ADIALOG));\n mADialogBroadcastIsRegistered = true;\n }\n\n\n }", "private void sendMyBroadCast(String s)\n {\n try\n {\n Intent broadCastIntent = new Intent();\n broadCastIntent.setAction(MainActivity.BROADCAST_ACTION);\n\n // uncomment this line if you want to send data\n broadCastIntent.putExtra(\"data\", s);\n\n sendBroadcast(broadCastIntent);\n\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "public void Bcast(double[] data, int root) {\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\tEntered Bcast double[]\");\n }\n\n int size = group_.Size();\n int old_rank = Rank();\n int rank = relativeRank(root,old_rank,size);\n\n int dest;\n int src;\n\n boolean received = false;\n\n Message send;\n Message recv = null;\n\n /*\n * Error checking\n */\n\n /*\n * Binary-tree broadcast\n */\n for (int stage = 0; stage < (int)Math.ceil(Math.log(size)/Math.log(2)); stage++) {\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\tRank: \" + old_rank + \", Relative rank: \" + rank + \" Stage: \" + stage);\n }\n\n // Receive stage\n if (rank < Math.pow(2,stage+1) && rank >= Math.pow(2,stage)) {\n\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\t\" + rank + \" is receiving from \" + (rank - (Math.pow(2,stage))));\n }\n\n // Copy the received message into recv.\n recv = group_.Recv(originalRank(root, (int)(rank-Math.pow(2,stage)), size), BROADCAST_TAG);\n // Set received to true\n received = true;\n\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\t\" + rank + \" received OK\");\n }\n\n if (recv.getType() != Message.TYPE_DOUBLE) {\n throw new MpiException(\"Message types do not match, please check your tag usage\");\n }\n else {\n System.arraycopy(recv.dataToPrimitiveDouble(), 0, data, 0, recv.dataToPrimitiveDouble().length);\n }\n }\n\n // Send stage\n else if (rank < Math.pow(2,stage) && (rank+Math.pow(2,stage)) < size) {\n if (DEBUG_MODE) {\n System.err.println(\"Comm: \\t\" + rank + \" is sending to \" + (int)(rank + Math.pow(2,stage)));\n }\n\n // If a message has been received then recycle this and update its source before sending it on.\n if (received) {\n send = recv;\n send.setSource(originalRank(root,rank,size));\n }\n // Otherwise read in the values from the given data (this should only happen at the \"root\")\n else {\n send = new Message(Message.dataToByteArray(data), originalRank(root,rank,size), BROADCAST_TAG, Message.TYPE_DOUBLE);\n recv = send;\n received = true;\n }\n\n // Send the message\n group_.Send(send, originalRank(root, (int)(rank+Math.pow(2,stage)), size));\n }\n }\n\n BROADCAST_TAG--;\n }", "@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\n\t}", "@Test\n public void testNotifyUserOfApBandConversion() throws Exception {\n WifiApConfigStore store = createWifiApConfigStore();\n store.notifyUserOfApBandConversion(TAG);\n // verify the notification is posted\n ArgumentCaptor<Notification> notificationCaptor =\n ArgumentCaptor.forClass(Notification.class);\n verify(mNotificationManager).notify(eq(SystemMessage.NOTE_SOFTAP_CONFIG_CHANGED),\n notificationCaptor.capture());\n Notification notification = notificationCaptor.getValue();\n assertEquals(TEST_APCONFIG_CHANGE_NOTIFICATION_TITLE,\n notification.extras.getCharSequence(Notification.EXTRA_TITLE));\n assertEquals(TEST_APCONFIG_CHANGE_NOTIFICATION_DETAILED,\n notification.extras.getCharSequence(Notification.EXTRA_BIG_TEXT));\n assertEquals(TEST_APCONFIG_CHANGE_NOTIFICATION_SUMMARY,\n notification.extras.getCharSequence(Notification.EXTRA_SUMMARY_TEXT));\n }", "@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t}" ]
[ "0.64478344", "0.63394904", "0.62421376", "0.62408674", "0.6013743", "0.59860265", "0.59254175", "0.5865353", "0.57766855", "0.57559514", "0.56964093", "0.5690892", "0.56615365", "0.5655047", "0.5595015", "0.5535657", "0.54766655", "0.5474995", "0.542304", "0.5422531", "0.54081607", "0.5403162", "0.5388171", "0.5383439", "0.53802454", "0.5379944", "0.53569365", "0.5297288", "0.5294689", "0.52911067", "0.5279541", "0.5255824", "0.5243417", "0.5227265", "0.5223219", "0.5214797", "0.5206963", "0.5206277", "0.51205784", "0.5112026", "0.50964594", "0.5094362", "0.5089386", "0.50893784", "0.5085111", "0.50795853", "0.50755644", "0.50459355", "0.50336766", "0.50334334", "0.50139135", "0.49991438", "0.49957788", "0.49901745", "0.4979694", "0.49786845", "0.49606657", "0.49566823", "0.4953965", "0.49478048", "0.4940438", "0.49284133", "0.4925677", "0.49248642", "0.4916404", "0.49096423", "0.48997504", "0.48978904", "0.48973984", "0.48957503", "0.4893835", "0.48900157", "0.48864982", "0.48811537", "0.4877994", "0.48656198", "0.4865478", "0.48624885", "0.4856639", "0.48485458", "0.48420995", "0.48396644", "0.48391223", "0.48273385", "0.48273385", "0.48239917", "0.4822691", "0.4814933", "0.48141408", "0.47967094", "0.4792427", "0.4788007", "0.4774505", "0.4771973", "0.47700527", "0.4759823", "0.47586268", "0.47551376", "0.47521356", "0.47425354" ]
0.75928134
0
Test of receiveLocalAssociation method, of class WorkspaceImpl.
@Test public void testReceiveLocalAssociation() { content.addDefaultNode(node1); eBuffer.addBufferContent((WorkspaceContent) content); workspace.addSubModule(eBuffer); MockWorkspaceListener listener = new MockWorkspaceListener(); workspace.addWorkspaceListener(listener); NodeStructure localAssociation = new NodeStructureImpl(); Node node3 = factory.getNode(); node3.setId(9); localAssociation.addDefaultNode(node3); workspace.receiveLocalAssociation(localAssociation); assertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer); assertTrue(listener.content.containsNode(node1)); assertTrue(listener.content.containsNode(node3)); assertTrue(eBuffer.content.containsNode(node3)); // System.out.println(eBuffer.content.toString()); // System.out.println(listener.content.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testAddWorkspaceListener() {\r\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\t}", "abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);", "@Test\n\tpublic void notifiesOnLocalChatReceived() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\t\n\t\tQualifiedObserver obs = EasyMock.createMock(QualifiedObserver.class);\n\t\tChatReceivedReport report = new ChatReceivedReport(\"message\", \"sender\", ChatType.Local);\n\t\tQualifiedObservableConnector.getSingleton().registerObserver(obs,\n\t\t\t\tChatReceivedReport.class);\n\t\tobs.receiveReport(EasyMock.eq(report));\n\t\tEasyMock.replay(obs);\n\n\t\tChatManager.getSingleton().sendChatToUI(\"message\", \"sender\", new Position(0,0), ChatType.Local);\n\n\t\tEasyMock.verify(obs);\n\t}", "@Test\r\n\tpublic void testAddListener() {\r\n\t\t// workspace listener\n\t\tMockWorkspaceListener listener = new MockWorkspaceListener();\r\n\t\tworkspace.addListener(listener);\r\n\t\tworkspace.addSubModule(eBuffer);\r\n\t\tcontent.addDefaultNode(node1);\r\n\r\n\t\tworkspace.receiveLocalAssociation(content);\r\n\r\n\t\tassertEquals(ModuleName.EpisodicBuffer, listener.originatingBuffer);\r\n\t\tassertTrue(listener.content.containsNode(node1));\r\n\r\n\t\t// cue listener\n\t\tMockCueListener cueListener = new MockCueListener();\r\n\t\tworkspace.addListener(cueListener);\r\n\t\tcontent.addDefaultNode(node2);\r\n\r\n\t\tworkspace.cueEpisodicMemories(content);\r\n\r\n\t\tNodeStructure ns = cueListener.ns;\r\n\t\tassertNotNull(ns);\r\n\t\tassertTrue(ns.containsNode(node1));\r\n\t\tassertTrue(ns.containsNode(node2));\r\n\t}", "public void testNormalOperation() throws java.io.IOException{\n AssociationIF assoc = (AssociationIF) tm.getAssociations().iterator().next();\n TopicIF topic = getTopicById(tm, \"gamst\");\n String topicId = topic.getObjectId();\n TopicIF currType = assoc.getType();\n \n assertFalse(\"has no type\", currType == null);\n //make action\n ActionIF action = new SetType();\n \n //build parms\n ActionParametersIF params = makeParameters(assoc, topicId);\n ActionResponseIF response = makeResponse();\n \n //execute \n action.perform(params, response);\n //test \n TopicIF newType = assoc.getType();\n assertFalse(\"Type not changed\", newType == currType); \n }", "@Test\n public void testGetServerLocal() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_LOCAL_CONNECTOR);\n String result = instance.getServer(\"localhost\").getClass().getName();\n assertEquals(expResult, result);\n }", "public void testAssociation() {\n \t\tString ID1 = \"iu.1\";\n \t\tString IDF1 = \"iu.fragment.1\";\n \t\tIInstallableUnit iu1 = createEclipseIU(ID1);\n \t\tIInstallableUnit iuf1 = createBundleFragment(IDF1);\n \t\tProfileChangeRequest req = new ProfileChangeRequest(createProfile(getName()));\n \t\treq.addInstallableUnits(iu1, iuf1);\n \t\tcreateTestMetdataRepository(new IInstallableUnit[] {iu1, iuf1});\n \t\tIQueryable<IInstallableUnit> additions = createPlanner().getProvisioningPlan(req, null, null).getAdditions();\n \t\t{\n \t\t\tIterator<IInstallableUnit> iterator = additions.query(QueryUtil.createIUQuery(ID1), null).iterator();\n \t\t\tassertTrue(\"Solution contains IU \" + ID1, iterator.hasNext());\n \t\t\tIInstallableUnit iu = iterator.next();\n \t\t\tassertEquals(\"Number of attached fragments to IU \" + ID1, 1, iu.getFragments().size());\n \t\t\tassertEquals(\"Attached fragment to IU \" + ID1, IDF1, iu.getFragments().iterator().next().getId());\n \t\t}\n \t\t{\n \t\t\tIterator<IInstallableUnit> iterator = additions.query(QueryUtil.createIUQuery(IDF1), null).iterator();\n \t\t\tassertTrue(\"Solution contains IU \" + IDF1, iterator.hasNext());\n \t\t\tIInstallableUnit iu = iterator.next();\n \t\t\tassertEquals(\"Number of attached fragments to IU \" + IDF1, 0, iu.getFragments().size());\n \t\t}\n \t\t//\t\tResolutionHelper rh = new ResolutionHelper(new Hashtable(), null);\n \t\t//\t\tHashSet set = new HashSet();\n \t\t//\t\tset.add(iu1);\n \t\t//\t\tset.add(iu2);\n \t\t//\t\tCollection result = rh.attachCUs(set);\n \t}", "@Test\n\tpublic void canReceiveLocalMessageValid() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\t\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(5,5)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,5)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(5,0)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,0)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(6,6)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(10,10)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,10)));\n\t\tassertTrue(ChatManager.getSingleton().canReceiveLocalMessage(new Position(10,0)));\n\t}", "@Test\n public void testNonLocalMailboxId() {\n InMemoryMailboxService mailboxService = new InMemoryMailboxService(\"localhost\", 0, ignored -> { });\n final StringMailboxIdentifier mailboxId = new StringMailboxIdentifier(\n \"happyPathJob\", \"localhost\", 0, \"localhost\", 1);\n\n // Test getReceivingMailbox\n try {\n mailboxService.getReceivingMailbox(mailboxId);\n Assert.fail(\"Method call above should have failed\");\n } catch (IllegalStateException e) {\n Assert.assertTrue(e.getMessage().contains(\"non-local transport\"));\n }\n\n // Test getSendingMailbox\n try {\n mailboxService.getSendingMailbox(mailboxId);\n Assert.fail(\"Method call above should have failed\");\n } catch (IllegalStateException e) {\n Assert.assertTrue(e.getMessage().contains(\"non-local transport\"));\n }\n }", "private void assertLocalAndRemote(RestClient local, RestClient remote, int localGeometries, int remoteGeometries, String param)\n throws IOException {\n final Request mvtRequest = new Request(HttpPost.METHOD_NAME, \"test/_mvt/location/0/0/0\" + param);\n final VectorTile.Tile localTile = execute(local, mvtRequest);\n assertThat(getLayer(localTile, \"hits\").getFeaturesCount(), Matchers.equalTo(localGeometries));\n assertEquals(localGeometries, countFeaturesWithTag(getLayer(localTile, \"hits\"), \"_index\", \"test\"));\n final VectorTile.Tile remoteTile = execute(remote, mvtRequest);\n assertThat(getLayer(remoteTile, \"hits\").getFeaturesCount(), Matchers.equalTo(remoteGeometries));\n assertEquals(remoteGeometries, countFeaturesWithTag(getLayer(remoteTile, \"hits\"), \"_index\", \"test\"));\n // call to both clusters\n final Request mvtCCSRequest = new Request(HttpPost.METHOD_NAME, \"/test,other:test/_mvt/location/0/0/0\" + param);\n final VectorTile.Tile ccsTile = execute(local, mvtCCSRequest);\n assertThat(getLayer(ccsTile, \"hits\").getFeaturesCount(), Matchers.equalTo(localGeometries + remoteGeometries));\n assertEquals(localGeometries, countFeaturesWithTag(getLayer(ccsTile, \"hits\"), \"_index\", \"test\"));\n assertEquals(remoteGeometries, countFeaturesWithTag(getLayer(ccsTile, \"hits\"), \"_index\", \"other:test\"));\n }", "private void provisionAssociation(final Context ctx, final SubscriberAuxiliaryService association,\r\n final Subscriber subscriber, final Home subAuxServiceHome, final Home subHomezoneHome)\r\n {\r\n if (association.getContext() == null)\r\n {\r\n association.setContext(ctx);\r\n }\r\n\r\n AuxiliaryService service = null;\r\n try\r\n {\r\n service = association.getAuxiliaryService(ctx);\r\n }\r\n catch (final HomeException e)\r\n {\r\n new MajorLogMsg(this, \"ProvisionAuxiliaryServiceAgent can not Provision AuxiliaryService for subscriber \"\r\n + subscriber.getId(), e).log(ctx);\r\n }\r\n\r\n if (service != null\r\n && !(subscriber.getState().equals(SubscriberStateEnum.SUSPENDED)\r\n && (service.isHLRProvisionable() || service.getType().equals(AuxiliaryServiceTypeEnum.HomeZone))))\r\n {\r\n boolean provisionOnSuspendDisable = ProvisionableAuxSvcExtension.DEFAULT_PROVONSUSPENDDISABLE;\r\n ProvisionableAuxSvcExtension provisionableAuxSvcExtension = ExtensionSupportHelper.get(ctx).getExtension(ctx, service, ProvisionableAuxSvcExtension.class);\r\n if (provisionableAuxSvcExtension!=null)\r\n {\r\n provisionOnSuspendDisable = provisionableAuxSvcExtension.isProvOnSuspendDisable();\r\n }\r\n else \r\n {\r\n LogSupport.minor(ctx, this,\r\n \"Unable to find required extension of type '\" + ProvisionableAuxSvcExtension.class.getSimpleName()\r\n + \"' for auxiliary service \" + service.getIdentifier());\r\n }\r\n \r\n if (provisionOnSuspendDisable)\r\n {\r\n setExtraParams(ctx, subHomezoneHome, service, association);\r\n \r\n try\r\n {\r\n if (LogSupport.isDebugEnabled(ctx))\r\n {\r\n final StringBuilder sb = new StringBuilder();\r\n sb.append(\"Removing SubscriberAuxiliaryService association \");\r\n sb.append(association.getIdentifier());\r\n sb.append(\" [subscriber=\");\r\n sb.append(association.getSubscriberIdentifier());\r\n sb.append(\", auxiliaryService=\");\r\n sb.append(association.getAuxiliaryServiceIdentifier());\r\n sb.append(\"] to ensure proper unprovision (if applicable)\");\r\n LogSupport.debug(ctx, this, sb.toString(), null);\r\n }\r\n subAuxServiceHome.remove(ctx, association);\r\n // going to provision it to set to true\r\n association.setProvisioned(true);\r\n \r\n if (LogSupport.isDebugEnabled(ctx))\r\n {\r\n final StringBuilder sb = new StringBuilder();\r\n sb.append(\"Re-creating SubscriberAuxiliaryService association \");\r\n sb.append(association.getIdentifier());\r\n sb.append(\" [subscriber=\");\r\n sb.append(association.getSubscriberIdentifier());\r\n sb.append(\", auxiliaryService=\");\r\n sb.append(association.getAuxiliaryServiceIdentifier());\r\n sb.append(\"] to ensure proper provision\");\r\n LogSupport.debug(ctx, this, sb.toString(), null);\r\n }\r\n SubscriberAuxiliaryServiceSupport.createSubscriberAuxiliaryService(ctx, association);\r\n try\r\n {\r\n NoteSupportHelper.get(ctx).addSubscriberNote(\r\n ctx,\r\n subscriber.getId(),\r\n \"Subscriber updating succeeded\\nSubscriber Auxiliary Service \"\r\n + association.getAuxiliaryServiceIdentifier() + \" provisioned.\",\r\n SystemNoteTypeEnum.EVENTS, SystemNoteSubTypeEnum.SUBUPDATE);\r\n }\r\n catch (HomeException e)\r\n {\r\n LogSupport.minor(ctx, this, \"Unable to log note: \" + e.getMessage(), e);\r\n }\r\n CrmCharger charger = new SubscriberAuxiliaryServiceCharger(subscriber, association);\r\n charger.charge(ctx, null); \r\n }\r\n catch (final HomeException he)\r\n {\r\n new MajorLogMsg(this,\r\n \"ProvisionAuxiliaryServiceAgent can not Provision AuxiliaryService for subscriber \"\r\n + subscriber.getId(), he).log(ctx);\r\n }\r\n }\r\n }\r\n }", "@Test\n public void testIslocal() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n boolean result = library.islocal(songId);\n assertTrue(result);\n\n }", "@Test\n public void testLocalClient()\n {\n generateEvents(\"local-client\");\n checkEvents(true, false);\n }", "public GrupoLocalResponse actualizarGrupoLocal(Integer idGrupoLocal, GrupoLocalRequest grupoLocalRequest);", "public void testSetLocalRessources() {\n\t\ttry {\n\t\t\tthis.part.setLocalRessources(null);\n\t\t\tfail(\"NullPointerException must be thrown\");\n\t\t}\n\t\tcatch (NullPointerException e) {\n\t\t\t/* all clear */\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tfail(\"wrong Exception\");\n\t\t}\n\n\t\ttry {\n\t\t\tDotplotFile file = new DotplotFile(\"./testfiles/fmatrix/test.txt\");\n\t\t\tCollection<DotplotFile> coll = new Vector<DotplotFile>();\n\t\t\tcoll.add(file);\n\t\t\tassertNotNull(this.part.getSourceList());\n\t\t\tassertEquals(0, this.part.getSourceList().size());\n\t\t\tthis.part.setLocalRessources(coll);\n\t\t\tISourceList list = this.part.getSourceList();\n\t\t\tassertEquals(1, list.size());\n\t\t\tassertTrue(list.contains(file));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tfail(\"no exception:\" + e.getClass().getName() + \":\"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "CompositionSpaceToDraftAssociation storeIfAbsent(CompositionSpaceToDraftAssociation association);", "@Test\n public void testReplicatedBm()\n {\n generateEvents(\"repl-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@SuppressWarnings(\"unused\")\n public void localFolderSetupComplete(Folder localFolder) throws MessagingException {\n // Do nothing - return immediately\n }", "@Ignore\n @Test\n public void testSetupReciever() throws JMSException {\n System.out.println(\"setupReciever\");\n PooledConnection MQConn = null;\n String QueueName = \"\";\n MessageListener listener = null;\n String messageSelector = \"\";\n JMSUtil.setupReciever(MQConn, QueueName, listener, messageSelector);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testAssociation2() {\n \t\tString ID1 = \"iu.1\";\n \t\tString ID2 = \"iu.2\";\n \t\tString IDF1 = \"iu.fragment.1\";\n \t\tIInstallableUnit iu1 = createEclipseIU(ID1);\n \t\tIInstallableUnit iu2 = createEclipseIU(ID2);\n \t\tIInstallableUnit iuf1 = createBundleFragment(IDF1);\n \t\tProfileChangeRequest req = new ProfileChangeRequest(createProfile(getName()));\n \t\treq.addInstallableUnits(iu1, iuf1, iu2);\n \t\tcreateTestMetdataRepository(new IInstallableUnit[] {iu1, iuf1, iu2});\n \t\tIQueryable<IInstallableUnit> additions = createPlanner().getProvisioningPlan(req, null, null).getAdditions();\n \t\t{\n \t\t\tIterator<IInstallableUnit> iterator = additions.query(QueryUtil.createIUQuery(ID1), null).iterator();\n \t\t\tassertTrue(\"Solution contains IU \" + ID1, iterator.hasNext());\n \t\t\tIInstallableUnit iu = iterator.next();\n \t\t\tassertEquals(\"Number of attached fragments to IU \" + ID1, 1, iu.getFragments().size());\n \t\t\tassertEquals(\"Attached fragment to IU \" + ID1, IDF1, iu.getFragments().iterator().next().getId());\n \t\t}\n \t\t{\n \t\t\tIterator<IInstallableUnit> iterator = additions.query(QueryUtil.createIUQuery(ID2), null).iterator();\n \t\t\tassertTrue(\"Solution contains IU \" + ID2, iterator.hasNext());\n \t\t\tIInstallableUnit iu = iterator.next();\n \t\t\tassertEquals(\"Number of attached fragments to IU \" + ID2, 1, iu.getFragments().size());\n \t\t\tassertEquals(\"Attached fragment to IU \" + ID2, IDF1, iu.getFragments().iterator().next().getId());\n \t\t}\n \t\t{\n \t\t\tIterator<IInstallableUnit> iterator = additions.query(QueryUtil.createIUQuery(IDF1), null).iterator();\n \t\t\tassertTrue(\"Solution contains IU \" + IDF1, iterator.hasNext());\n \t\t\tIInstallableUnit iu = iterator.next();\n \t\t\tassertEquals(\"Number of attached fragments to IU \" + IDF1, 0, iu.getFragments().size());\n \t\t}\n \t}", "protected void setupLocal() {}", "public interface EOAssociationConnector{\n /**\n * Invoked when one of the receiver's subcontrollers is disposed as a transient controller. Instructs the receiver to assume responsibility for managing the subcontroller's EOAssociation, association.\n */\n abstract void takeResposibilityForConnectionOfAssociation(com.webobjects.eointerface.EOAssociation association);\n\n}", "@Test\r\n\tpublic void testCancelAddObstetricsRecord() {\r\n\t\toic.setLmp(\"a\");\r\n\t\toic.cancelAddObstetricsRecord();\r\n\t\t//Make sure LMP was cleared\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t}", "@Test\n public void testReplicatedBoth()\n {\n generateEvents(\"repl-both-test\");\n checkEvents(true, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Test\n public void testColibriMultiThreading()\n throws Exception\n {\n ProviderListener providerListener\n = new ProviderListener(FocusBundleActivator.bundleContext);\n\n MockProtocolProvider mockProvider\n = (MockProtocolProvider) providerListener.obtainProvider(1000);\n\n MockColibriOpSet colibriOpSet = mockProvider.getMockColibriOpSet();\n\n String mockBridgeJid = \"some.mock.bridge.com\";\n\n MockVideobridge mockBridge\n = new MockVideobridge(\n mockProvider.getMockXmppConnection(),\n mockBridgeJid);\n\n mockBridge.start(osgi.bc);\n\n AllocThreadingTestColibriConference colibriConf\n = colibriOpSet.createAllocThreadingConf();\n\n colibriConf.setJitsiVideobridge(mockBridgeJid);\n\n colibriConf.blockConferenceCreator(true);\n colibriConf.blockResponseReceive(true);\n\n MockPeerAllocator[] allocators = new MockPeerAllocator[20];\n\n List<String> endpointList = new ArrayList<String>(allocators.length);\n\n for (int i=0; i < allocators.length; i++)\n {\n String endpointName = \"peer\" + i;\n allocators[i] = new MockPeerAllocator(endpointName, colibriConf);\n endpointList.add(endpointName);\n\n allocators[i].runChannelAllocation();\n }\n\n MockPeerAllocator creator\n = findCreator(\n colibriConf, Arrays.asList(allocators));\n\n assertNotNull(creator);\n assertEquals(0, colibriConf.allocRequestsSentCount());\n\n colibriConf.resumeConferenceCreate();\n\n\n creator.join();\n // At this point conference should be created\n assertEquals(1, mockBridge.getConferenceCount());\n\n // All responses are blocked - here we make sure that all threads have\n // sent their requests\n List<String> requestsToBeSent = new ArrayList<String>(endpointList);\n while (!requestsToBeSent.isEmpty())\n {\n String endpoint = colibriConf.nextRequestSent(5);\n if (endpoint == null)\n {\n fail(\"Endpoints that have failed to \" +\n \"send their request: \" + requestsToBeSent);\n }\n else\n {\n requestsToBeSent.remove(endpoint);\n }\n }\n\n colibriConf.resumeResponses();\n\n // Now wait for all responses to be received\n List<String> responsesToReceive = new ArrayList<String>(endpointList);\n while (!responsesToReceive.isEmpty())\n {\n String endpoint = colibriConf.nextResponseReceived(5);\n if (endpoint == null)\n {\n fail(\"Endpoints that have failed to \" +\n \"send their request: \" + requestsToBeSent);\n }\n else\n {\n responsesToReceive.remove(endpoint);\n }\n }\n\n // Wait for all to finish\n for (MockPeerAllocator allocator : allocators)\n {\n allocator.join();\n }\n\n assertEquals(1, mockBridge.getConferenceCount());\n assertEquals(\n allocators.length,\n mockBridge.getChannelCountByContent(\"audio\"));\n assertEquals(\n allocators.length,\n mockBridge.getChannelCountByContent(\"video\"));\n assertEquals(\n allocators.length,\n mockBridge.getChannelCountByContent(\"data\"));\n\n mockBridge.stop(osgi.bc);\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT02() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c = new ClassDetailsStub(TEST_CONFIG.SatOnly);\n\t\t\n\t\tArrayList<ClassDetailsStub> s = new ArrayList<ClassDetailsStub>();\n\t\ts.add(c);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ArrayList<ClassDetailsStub>> oneSchedule = new ArrayList<ArrayList<ClassDetailsStub>>();\n\t\toneSchedule.add(s);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean schedulesConflict = smc.conflict(oneSchedule);\n\t\tassertFalse(schedulesConflict);\n\t}", "@Test\r\n public void testFindMissionWithAgent() {\r\n \r\n Agent agent = jamesBond;\r\n Mission mission = infiltrateSPD;\r\n missionManager.createMission(mission);\r\n agentManager.create(agent);\r\n manager.attachAgentToMission(agent, mission);\r\n \r\n assertEquals(manager.findMissionWithAgent(agent), mission);\r\n \r\n }", "void processWaitingAssociations() {\n\t\tint numberOfConnectedViaImport = 0;\n\t\tint numberOfConnectedViaPackage = 0;\n\t\tint numberOfConnectedViaAttribute = 0;\n\t\tint numberOfConnectedViaLocalVariable = 0;\n\t\tint numberOfConnectedViaMethod = 0;\n\n for (FamixAssociation association : theModel.waitingAssociations) {\n try {\n \tboolean fromExists = false;\n \tboolean toExists = false;\n \tboolean toHasValue = false;\n \tboolean chainingInvocation = false;\n \tboolean typeIsAccess = false;\n \tboolean nextAssociationIsIndirect = false;\n \tString toRemainderChainingInvocation = \"\";\n \tString toString = \"\";\n \tFamixInvocation theInvocation = null;\n\n /* Test helpers\n \tif (association.from.contains(\"husacct.define.presentation.jdialog.ExceptionRuleJDialog\")) {\n \t\tif (association.lineNumber == 74) {\n \t \t\t\t\tboolean breakpoint = true;\n \t\t\t}\n \t} */\n\n \t// Check if association.from refers to an existing class\n \tif (theModel.classes.containsKey(association.from)) {\n \t\tfromExists = true;\n \t} \n \t// Check if association.to (or a part of it) refers to an existing class or library\n if ((association.to != null) && !association.to.equals(\"\") && !association.to.trim().equals(\".\")){ \n \ttoHasValue = true;\n \tif (theModel.classes.containsKey(association.to) || theModel.libraries.containsKey(\"xLibraries.\" + association.to)) {\n \t\ttoExists = true;\n \t} else { // Check if a part of association.to refers to an existing class or library \n if (association.to.contains(\".\")) {\n\t\t\t \tString[] allSubstrings = association.to.split(\"\\\\.\");\n\t\t\t \ttoString = allSubstrings[0];\n\t\t for (int i = 1; i < allSubstrings.length ; i++) {\n\t\t \ttoString += \".\"+ allSubstrings[i];\n\t\t \tif (theModel.classes.containsKey(toString) || theModel.libraries.containsKey(\"xLibraries.\" + toString)) {\n\t\t \t\tif ((association instanceof FamixInvocation)) {\n\t\t theInvocation = (FamixInvocation) association;\n\t\t association.to = toString;\n\t\t\t \t\ttoExists = true;\n\t\t\t \t\tchainingInvocation = true;\n\t\t\t\t\t // Put the remainder in a variable; needed to create a separate indirect association later on remainder substrings\n\t\t\t\t\t i++;\n\t\t\t \t\tif (allSubstrings.length >= i) {\n\t\t\t\t \t\ttoRemainderChainingInvocation = allSubstrings[i];\n\t\t\t\t\t\t for (int j = i + 1; j < allSubstrings.length ; j++) {\n\t\t\t\t\t\t \ttoRemainderChainingInvocation = toRemainderChainingInvocation + \".\" + allSubstrings[j];\n\t\t\t\t\t\t }\n\t\t\t \t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n }\n \t}\n }\n\n \t// Objective: If FamixAssociation.to is a name instead of a unique name, than replace it by the unique name of a FamixEntity (Class or Library) it represents. \n\n /* 0) Select and process FamixInvocations with a composed to-name\n * If FamixAssociation.to is composed of substrings (a chaining assignment or call), a dependency to the type of the first substring is a direct dependency.\n * Dependencies to types of the following substrings are determined afterwards. The next one is indirect, if the first substring is a method or variable of a super class, otherwise it is direct.\n * Algorithm: Split the string and try to identify the type of the first substring. Create a separate association to identify dependencies to following substring (variables or methods). \n * If the type of the first substring is identified, replace the substring by the type in the next association, and store this association to be processed later on. \n * */\n if (fromExists && !toExists && toHasValue){\n \tif ((association instanceof FamixInvocation)) {\n theInvocation = (FamixInvocation) association;\n if (association.to.contains(\".\")) {\n\t\t\t \tString[] allSubstrings = association.to.split(\"\\\\.\");\n\t\t\t \tif (allSubstrings.length > 1) {\n\t\t\t \tchainingInvocation = true;\n\t\t\t \tassociation.to = allSubstrings[0]; \n\t\t\t // Put the remainder in a variable; needed to create a separate indirect association later on remainder substrings\n\t\t\t toRemainderChainingInvocation = allSubstrings[1];\n\t\t\t for (int i = 2; i < allSubstrings.length ; i++) {\n\t\t\t \ttoRemainderChainingInvocation = toRemainderChainingInvocation + \".\" + allSubstrings[i];\n\t\t\t }\n\t\t\t \t}\n }\n }\n }\n \n // 1) Try to derive the unique name from the imports.\n if (fromExists && !toExists && toHasValue){\n \tif (!association.to.contains(\".\")) {\n\t toString = findClassInImports(association.from, association.to);\n\t if (!toString.equals(\"\")) {\n\t association.to = toString;\n \t\t\ttoExists = true;\n \t\t\tnumberOfConnectedViaImport ++;\n\t }\n \t}\n }\n\t \n // 2) Find out or association.to refers to a type in the same package as the from class.\n if (fromExists && !toExists && toHasValue){\n \tif (!association.to.contains(\".\")) {\n\t \tString belongsToPackage = theModel.classes.get(association.from).belongsToPackage;\n\t toString = findClassInPackage(association.to, belongsToPackage);\n\t if (!toString.equals(\"\")) { // So, in case association.to does not contain \".\" AND association.to shares the same package as association.from \n\t association.to = toString;\n\t \t\t\ttoExists = true;\n \t\t\ttypeIsAccess = true;\n\t \t\t\tnumberOfConnectedViaPackage ++;\n\t }\n \t}\n }\n\n \t// 3) Determine if association.to is an (inherited) attribute. If so determine the type of the attribute. \n if ((association instanceof FamixInvocation) && (!association.to.endsWith(\")\"))) {\n \t \tString classOfAttribute = findAttribute(association.from, association.to);\n \t if (!classOfAttribute.equals(\"\")) {\n\t \t\t\tif (!classOfAttribute.equals(association.from)) { // classOfAttribute refers to a super class \n\t\t \t// Create an access dependency on the superclass.\n\t\t \t\t\t\tFamixInvocation newIndirectInvocation = indirectAssociations_AddIndirectInvocation(\"AccessPropertyOrField\", association.from, classOfAttribute, theInvocation.lineNumber, theInvocation.belongsToMethod, association.to, theInvocation.nameOfInstance, false);\n\t\t \taddToModel(newIndirectInvocation); \n\t\t\t \t\t\tnumberOfDerivedAssociations ++;\n\t }\n \t \t\tFamixStructuralEntity entity = theModel.structuralEntities.get(classOfAttribute + \".\" + association.to);\n \t \t\tif (entity.declareType != null && !entity.declareType.equals(\"\")){\n \t \t\t\tassociation.to = entity.declareType;\n \t \tnumberOfConnectedViaAttribute++;\n \t \tif (chainingInvocation) { \n \t \t\t// The invocation is not added to the model yet, because it reflects an invisible access of the type of variable. Creating a new derived invocation is redundant.\n\t \t \tassociation.type = \"Undetermined\";\n\t \t \ttheInvocation.invocationName = toRemainderChainingInvocation;\n\t \t \twaitingDerivedAssociations.add(theInvocation);\n \t \t} else {\n\t\t\t\t\t\t\t\t// The invocation is added as an access invocation to the referred type; the return value of the complete string.\n\t \t \tassociation.type = \"AccessPropertyOrField\";\n\t\t \t\t\ttoExists = true;\n\t \t\t\ttypeIsAccess = true;\n\t\t\t\t\t\t\t}\n \t \t\t}\n \t \t}\n } \n \n // 4) Find out or association.to refers to a local variable or parameter: Get StructuralEntity on key ClassName.MethodName.VariableName\n\t if (fromExists && !toExists && toHasValue && (!association.to.endsWith(\")\"))){\n if (association instanceof FamixInvocation) {\n\t\t \tString searchKey = association.from + \".\" + theInvocation.belongsToMethod + \".\" + theInvocation.to;\n\t \tif (theModel.structuralEntities.containsKey(searchKey)) {\n\t \t\tFamixStructuralEntity entity = theModel.structuralEntities.get(searchKey);\n\t \t\tif (entity.declareType != null && !entity.declareType.equals(\"\")){\n\t \t\t\ttheInvocation.to = entity.declareType;\n\t\t \t\t\ttoExists = true;\n\t \t\t\ttypeIsAccess = true;\n\t\t \t\t\tnumberOfConnectedViaLocalVariable ++;\n\t \t\t}\n\t \t}\n }\n \t}\n\n \t// 5) Determine if association.to is an (inherited) method. If so determine the return type of the method. \n if ((association instanceof FamixInvocation) && (association.to.endsWith(\")\"))) {\n \tboolean methodFound = false;\n \tFamixMethod foundMethod = findInvokedMethodOnName(association.from, theInvocation.belongsToMethod, association.from, association.to);\n \t if (foundMethod != null) {\n \t \tmethodFound = true;\n \t } else { // Determine if association.to is an inherited method. \n \t \t\tString superClassName = indirectAssociations_findSuperClassThatContainsMethod(association.from, theInvocation.belongsToMethod, association.from, association.to);\n \t \t\tif ((superClassName != null) && !superClassName.equals(\"\")) {\n \t \tfoundMethod = findInvokedMethodOnName(association.from, theInvocation.belongsToMethod, superClassName, association.to);\n \t \t if (foundMethod != null) {\n \t \t \tmethodFound = true;\n \t\t \t// Create a call dependency on the superclass;\n \t\t \t\t\t\tFamixInvocation newInvocation = indirectAssociations_AddIndirectInvocation(\"InvocMethod\", theInvocation.from, superClassName, theInvocation.lineNumber, theInvocation.belongsToMethod, association.to, theInvocation.nameOfInstance, false);\n \t\t \taddToModel(newInvocation); \n \t\t\t \t\t\tnumberOfDerivedAssociations ++;\n \t }\n \t \t\t\t}\n \t }\n \t if (!methodFound) {\n \t \t// Check if the method is a constructor call\n \t \tString className = association.to.substring(0, association.to.indexOf(\"(\"));\n\t toString = findClassInImports(association.from, className);\n\t if (!toString.equals(\"\")) {\n\t \t \t\tassociation.to = toString;\n\t \t \t\tassociation.type = \"InvocMethod\";\n\t\t \t\t\ttoExists = true;\n\t \t \t}\n \t }\n \t if (methodFound) {\n \t \t// Determine the return type of the method.\n \t if ((foundMethod != null) && (foundMethod.declaredReturnType != null) && !foundMethod.declaredReturnType.equals(\"\")) {\n \t \tassociation.to = foundMethod.declaredReturnType;\n \t \tnumberOfConnectedViaMethod++;\n \t \tif (chainingInvocation) { \n \t \t\t// The invocation is not added to the model yet, because it reflects an invisible access of the return type of the method. Creating a new derived invocation is redundant.\n\t \t \tassociation.type = \"Undetermined\";\n\t \t \ttheInvocation.invocationName = toRemainderChainingInvocation;\n\t \t \twaitingDerivedAssociations.add(theInvocation);\n \t \t} else {\n\t\t\t\t\t\t\t\t// The invocation is added as an access invocation to the referred type; the return value of the complete string.\n\t \t \tassociation.type = \"AccessPropertyOrField\";\n\t\t \t\t\ttoExists = true;\n\t\t\t\t\t\t\t}\n \t \t\t}\n \t \t}\n \t}\n \n if (fromExists && toExists) {\n\t\t\t\t\tif (!association.from.equals(association.to) && (theModel.classes.containsKey(association.to) || theModel.libraries.containsKey(\"xLibraries.\" + association.to))) {\n\t \t\t\t\tdetermineSpecificExtendType(association);\n \t\t\tif (typeIsAccess && association.type.startsWith(\"Invoc\")) {\n \t\t\t\tassociation.type = \"AccessPropertyOrField\";\n \t\t\t}\n\t\t\t\t\t\taddToModel(association);\n\t\t\t\t\t} else {\n\t \t\t\t// Do nothing\n\t\t\t\t\t}\n\t\t\t\t\tif (association instanceof FamixInvocation) {\n\t\t\t\t\t\tif (chainingInvocation) { // If true, create an association to identify dependencies to the remaining parts of the chain. Store it temporarily; it is processed in a separate method. \n\t\t FamixInvocation indirectAssociation = new FamixInvocation();\n\t\t indirectAssociation.type = \"Undetermined\";\n\t\t indirectAssociation.isIndirect = nextAssociationIsIndirect;\n\t\t indirectAssociation.from = association.from;\n\t\t indirectAssociation.lineNumber = association.lineNumber;\n\t\t indirectAssociation.to = association.to;\n\t\t indirectAssociation.invocationName = toRemainderChainingInvocation;\n\t\t indirectAssociation.belongsToMethod = theInvocation.belongsToMethod;\n\t\t indirectAssociation.nameOfInstance = theInvocation.nameOfInstance;\n\t\t waitingDerivedAssociations.add(indirectAssociation);\n\t\t\t\t\t\t} else {\n\t\t \t\t\t// Do nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n } else {\n \tif (!chainingInvocation) { \n \t\tnumberOfNotConnectedWaitingAssociations ++;\n \t} else {\n \t\t// Do nothing\n \t}\n \t\n }\n \t\t\t\n calculateProgress();\n //Needed to check if Thread is allowed to continue\n \tif (!ServiceProvider.getInstance().getControlService().getState().contains(States.ANALYSING)) {\n break;\n \t}\n\n } catch (Exception e) {\n \tString associationType = association.type;\n \t this.logger.error(new Date().toString() + \" \" + e + \" \" + associationType + \" \" + association.toString());\n \t e.printStackTrace();\n }\n }\n // Add the indirect associations created during this process to FamixModel.associations\n for (FamixAssociation indirectAssociation : indirectAssociations) {\n \taddToModel(indirectAssociation);\n }\n\n this.logger.info(new Date().toString() + \" Connected via 1) Import: \" + numberOfConnectedViaImport + \", 2) Package: \" + numberOfConnectedViaPackage + \", 3) Variable: \" + numberOfConnectedViaAttribute \n \t\t+ \", 4) Local var: \" + numberOfConnectedViaLocalVariable + \", 5) Method: \" + numberOfConnectedViaMethod + \", 6) Inherited var/method: \" + numberOfDerivedAssociations);\n }", "@Test\r\n\tpublic void testPendingInterviewList() throws Exception {\r\n\t\tList<Candidate> candidateList = new ArrayList<Candidate>();\r\n\t\tCandidate candidate = getCandidateObj();\r\n\t\tcandidate.setInterview(getInterview());\r\n\t\tcandidateList.add(candidate);\r\n\r\n\t\tList<ShowCandidateDTO> showCandidateList = new ArrayList<ShowCandidateDTO>();\r\n\t\tshowCandidateList.add(getShowCandidateDTO());\r\n\r\n\t\twhen(candidateRepository.candidatePendingInterviewApproval(anyLong())).thenReturn(candidateList);\r\n\t\twhen(interviewerService.pendingInterviewApprovalList(anyLong())).thenReturn(showCandidateList);\r\n\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/getpenddingapproval/1\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isOk());\r\n\t}", "@Test\n\tpublic void notifiesOnAreaChatReceived()\n\t{\n\t\tQualifiedObserver obs = EasyMock.createMock(QualifiedObserver.class);\n\t\tChatReceivedReport report = new ChatReceivedReport(\"message\", \"sender\", ChatType.Zone);\n\t\tQualifiedObservableConnector.getSingleton().registerObserver(obs,\n\t\t\t\tChatReceivedReport.class);\n\t\tobs.receiveReport(EasyMock.eq(report));\n\t\tEasyMock.replay(obs);\n\n\t\tChatManager.getSingleton().sendChatToUI(\"message\", \"sender\", new Position(0,0), ChatType.Zone);\n\n\t\tEasyMock.verify(obs);\n\t}", "public void testPlaybackToLocalAndRemote() throws Exception {\n MediaController controller = mSession.getController();\n controller.registerCallback(mCallback, mHandler);\n\n synchronized (mWaitLock) {\n // test setPlaybackToRemote, do this before testing setPlaybackToLocal\n // to ensure it switches correctly.\n mCallback.resetLocked();\n try {\n mSession.setPlaybackToRemote(null);\n fail(\"Expected IAE for setPlaybackToRemote(null)\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n VolumeProvider vp = new VolumeProvider(VolumeProvider.VOLUME_CONTROL_FIXED,\n TEST_MAX_VOLUME, TEST_CURRENT_VOLUME) {};\n mSession.setPlaybackToRemote(vp);\n\n MediaController.PlaybackInfo info = null;\n for (int i = 0; i < MAX_AUDIO_INFO_CHANGED_CALLBACK_COUNT; ++i) {\n mCallback.mOnAudioInfoChangedCalled = false;\n mWaitLock.wait(TIME_OUT_MS);\n assertTrue(mCallback.mOnAudioInfoChangedCalled);\n info = mCallback.mPlaybackInfo;\n if (info != null && info.getCurrentVolume() == TEST_CURRENT_VOLUME\n && info.getMaxVolume() == TEST_MAX_VOLUME\n && info.getVolumeControl() == VolumeProvider.VOLUME_CONTROL_FIXED\n && info.getPlaybackType()\n == MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE) {\n break;\n }\n }\n assertNotNull(info);\n assertEquals(MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE, info.getPlaybackType());\n assertEquals(TEST_MAX_VOLUME, info.getMaxVolume());\n assertEquals(TEST_CURRENT_VOLUME, info.getCurrentVolume());\n assertEquals(VolumeProvider.VOLUME_CONTROL_FIXED, info.getVolumeControl());\n\n info = controller.getPlaybackInfo();\n assertNotNull(info);\n assertEquals(MediaController.PlaybackInfo.PLAYBACK_TYPE_REMOTE, info.getPlaybackType());\n assertEquals(TEST_MAX_VOLUME, info.getMaxVolume());\n assertEquals(TEST_CURRENT_VOLUME, info.getCurrentVolume());\n assertEquals(VolumeProvider.VOLUME_CONTROL_FIXED, info.getVolumeControl());\n\n // test setPlaybackToLocal\n AudioAttributes attrs = new AudioAttributes.Builder().addTag(TEST_VALUE).build();\n mSession.setPlaybackToLocal(attrs);\n\n info = controller.getPlaybackInfo();\n assertNotNull(info);\n assertEquals(MediaController.PlaybackInfo.PLAYBACK_TYPE_LOCAL, info.getPlaybackType());\n Set<String> tags = info.getAudioAttributes().getTags();\n assertNotNull(tags);\n assertTrue(tags.contains(TEST_VALUE));\n }\n }", "@Test\r\n \tpublic void testProjectID() {\n \t\tassertNull(localProject.getGlobalProjectId());\r\n \t}", "@Test\n public void testDoNotifyCommitWitMultipleStreams() throws Exception {\n AccurevTrigger aMasterTrigger = setupProjectWithTrigger(\"host\", \"8080\", \"stream1\", \"depot\", false);\n AccurevTrigger bMasterTrigger = setupProjectWithTrigger(\"host\", \"8080\", \"stream2\", \"depot\", false);\n AccurevTrigger cMasterTrigger = setupProjectWithTrigger(\"host\", \"8080\", \"stream3\", \"depot\", false);\n\n AccurevStatus spy = Mockito.spy(new AccurevStatus());\n spy.doNotifyCommit(requestWithNoParameters, \"host\", \"8080\", \"stream1,stream2\", \"1\", \"testPrincipal\", \"Updated\");\n\n\n Mockito.verify(spy).doNotifyCommit(requestWithNoParameters, \"host\", \"8080\", \"stream1,stream2\", \"1\", \"testPrincipal\", \"Updated\");\n\n assertEquals(\"HOST: host PORT: 8080 Streams: stream1,stream2\", spy.toString());\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT01() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c = new ClassDetailsStub(TEST_CONFIG.MonWedFri1A);\n\t\t\n\t\tArrayList<ClassDetailsStub> s = new ArrayList<ClassDetailsStub>();\n\t\ts.add(c);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ArrayList<ClassDetailsStub>> sameSchedules = new ArrayList<ArrayList<ClassDetailsStub>>();\n\t\tsameSchedules.add(s);\n\t\tsameSchedules.add(s);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean schedulesConflict = smc.conflict(sameSchedules);\n\t\tassertTrue(schedulesConflict);\n\t}", "public void testChannelHopping() throws RemoteException {\n List<Channel> channelList = mBinder.getChannelList();\n for(Channel channel : channelList) {\n mBinder.joinChannel(channel.getId());\n }\n try {\n Thread.sleep(TEST_OBSERVATION_DELAY);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Test\r\n\tpublic void testReceiveBroadcast() {\r\n\t\tMockBroadcastQueueImpl broadcastQueue = new MockBroadcastQueueImpl();\r\n\t\tbroadcastQueue.setModuleName(ModuleName.BroadcastQueue);\r\n\t\tworkspace.addSubModule(broadcastQueue);\r\n\r\n\t\tcontent.addDefaultNode(node2);\r\n\t\tCoalition c = new CoalitionImpl(content, null);\r\n\t\tworkspace.receiveBroadcast(c);\r\n\t\tNodeStructure actual = (NodeStructure) broadcastQueue.broadcastContent;\r\n\t\tassertNotNull(actual);\r\n\t\tassertTrue(actual.containsNode(node2));\r\n\t\tassertTrue(NodeStructureImpl.compareNodeStructures(content, actual));\r\n\t}", "public void process (MGIAssociation assoc)\n throws MGIException\n {\n int i, j;\n\n // Flag that indicates that no associations should be made because a\n // discrepancy error was found.\n //\n boolean skipAssociation = false;\n\n // No probe reference association has been made yet.\n //\n madeProbeRef = false;\n\n // Attributes of a target accession ID/logical DB pair.\n //\n String targetAccID = null;\n int targetLogicalDBKey = 0;\n int targetMGITypeKey = 0;\n int targetObjectKey = 0;\n int targetSameType = 0;\n int targetDiffType = 0;\n String targetMsg = null;\n\n // Get the type of object that the target accession ID/logical DB should\n // be associated with.\n //\n String expTargetMGIType = assoc.getTargetType();\n int expTargetMGITypeKey = assoc.getTargetTypeKey();\n\n // Get arrays containing the attributes of the MGIAssociation object.\n //\n String[] accIDs = assoc.getAccIDs();\n Integer[] logicalDBKeys = assoc.getLogicalDBKeys();\n Boolean[] targets = assoc.getTargets();\n Integer[] mgiTypeKeys = assoc.getMGITypeKeys();\n Integer[] objectKeys = assoc.getObjectKeys();\n\n // Create arrays containing the accession IDs and corresponding\n // logical DBs for each distinct non-target accession ID/logicalDB from\n // the MGIAssociation object.\n //\n int idx1, idx2;\n String pair = null;\n Vector vAccIDs = new Vector();\n Vector vLogicalDBKeys = new Vector();\n Vector vPair = new Vector();\n\n for (i=0; i<accIDs.length; i++)\n {\n if (targets[i].booleanValue() == true)\n continue;\n\n // If the accession ID/logical DB pair is not already in the vectors,\n // add them.\n //\n pair = accIDs[i] + \",\" + logicalDBKeys[i].intValue();\n if (vPair.indexOf(pair) < 0)\n {\n vAccIDs.add(accIDs[i]);\n vLogicalDBKeys.add(logicalDBKeys[i]);\n vPair.add(pair);\n }\n }\n\n // Create arrays from the vectors.\n //\n String[] distinctAccIDs = (String[])vAccIDs.toArray(STRING_ARRAY);\n Integer[] distinctLogicalDBKeys =\n (Integer[])vLogicalDBKeys.toArray(INTEGER_ARRAY);\n\n // Initialize arrays that are used to determine how to handle each\n // distinct accession ID/logical DB pair.\n //\n int[] sameTypeCount = new int[distinctAccIDs.length];\n int[] diffTypeCount = new int[distinctAccIDs.length];\n int[] sameObjCount = new int[distinctAccIDs.length];\n int[] action = new int[distinctAccIDs.length];\n String[] msg = new String[distinctAccIDs.length];\n\n for (i=0; i<distinctAccIDs.length; i++)\n {\n sameTypeCount[i] = 0;\n diffTypeCount[i] = 0;\n sameObjCount[i] = 0;\n action[i] = 0;\n msg[i] = null;\n }\n\n // Check each target accession ID/logical DB to determine what type of\n // object they are associated with in MGI. Count how many associations\n // there are to objects that have the same/different type as the\n // expected target type.\n //\n for (i=0; i<accIDs.length; i++)\n {\n if (targets[i].booleanValue() == true)\n {\n // Save the target accession ID/logical DB for future use.\n //\n targetAccID = accIDs[i];\n targetLogicalDBKey = logicalDBKeys[i].intValue();\n\n // Skip this accession ID/logical DB if it does not exist in MGI.\n //\n if (mgiTypeKeys[i] == null)\n continue;\n\n // Save the target type and object for future use.\n //\n targetMGITypeKey = mgiTypeKeys[i].intValue();\n targetObjectKey = objectKeys[i].intValue();\n\n // Count whether it is the same or different than the expected\n // target type.\n //\n if (targetMGITypeKey == expTargetMGITypeKey)\n targetSameType++;\n else\n targetDiffType++;\n }\n }\n\n // If the target accession ID is not associated with one object of the\n // target type or it is associated with an object of some other type,\n // report an error and do not process any of the accession IDs for the\n // current MGIAssociation object.\n //\n if (targetSameType == 0 && targetDiffType == 0)\n targetMsg = AssociationLoadConstants.TARGET_DISCREP_A;\n else if (targetSameType == 0 && targetDiffType == 1)\n targetMsg = AssociationLoadConstants.TARGET_DISCREP_B;\n else if (targetSameType == 0 && targetDiffType > 1)\n targetMsg = AssociationLoadConstants.TARGET_DISCREP_C;\n else if (targetSameType == 1 && targetDiffType == 1)\n targetMsg = AssociationLoadConstants.TARGET_DISCREP_D;\n else if (targetSameType == 1 && targetDiffType > 1)\n targetMsg = AssociationLoadConstants.TARGET_DISCREP_E;\n else if (targetSameType > 1 && targetDiffType == 0)\n targetMsg = AssociationLoadConstants.TARGET_DISCREP_F;\n else if (targetSameType > 1 && targetDiffType == 1)\n targetMsg = AssociationLoadConstants.TARGET_DISCREP_G;\n else if (targetSameType > 1 && targetDiffType > 1)\n targetMsg = AssociationLoadConstants.TARGET_DISCREP_H;\n\n // If there is a discrepancy with the target accession ID/logical DB,\n // report each discrepancy and do not process this MGIAssociation object\n // any further.\n //\n if (targetMsg != null)\n {\n for (i=0; i<accIDs.length; i++)\n {\n // Skip this accession ID/logical DB if it is not the target.\n //\n if (targets[i].booleanValue() == false)\n continue;\n\n assocRpt.reportTargetDiscrepancy(accIDs[i], logicalDBKeys[i],\n objectKeys[i], mgiTypeKeys[i],\n expTargetMGIType, targetMsg);\n reportCount++;\n }\n\n // Increment the skip count by the number of accession IDs that\n // were supposed to be associated.\n //\n skipCount += distinctAccIDs.length;\n\n return;\n }\n\n // Check each distinct accession ID/logical DB to see how many\n // associations they have with MGI objects and what type of objects\n // they are. This is called the \"current pair\".\n //\n for (i=0; i<distinctAccIDs.length; i++)\n {\n // Check each accession ID/logical DB pair in the MGIAssociation\n // object for ones that are the same as the current pair.\n //\n for (j=0; j<accIDs.length; j++)\n {\n // Skip this accession ID/logical DB if it is not the same as\n // the current pair.\n //\n if ((! accIDs[j].equals(distinctAccIDs[i])) ||\n logicalDBKeys[j].intValue() != distinctLogicalDBKeys[i].intValue())\n continue;\n\n // Skip this accession ID/logical DB if it does not exist in MGI.\n //\n if (mgiTypeKeys[j] == null)\n continue;\n\n // Count whether the accession ID/logical DB is associated with\n // an object that has the same or different object type as the\n // target accession ID/logical DB.\n //\n if (mgiTypeKeys[j].intValue() == targetMGITypeKey)\n {\n sameTypeCount[i]++;\n if (objectKeys[j].intValue() == targetObjectKey)\n sameObjCount[i]++;\n }\n else\n diffTypeCount[i]++;\n }\n logger.logdDebug(\"Counts: \"+sameTypeCount[i]+\" \"+\n diffTypeCount[i]+\" \"+\n sameObjCount[i]+\" \"+\n distinctAccIDs[i]+\" \"+\n distinctLogicalDBKeys[i].intValue(),false);\n }\n\n // Determine the action for each non-target accession ID/logical DB pair\n // based on the counts.\n //\n for (i=0; i<distinctAccIDs.length; i++)\n {\n // Determine the action for a logical DB that is allowed to have\n // only one association.\n //\n if (singleDB.indexOf(distinctLogicalDBKeys[i]) >= 0)\n {\n if (sameTypeCount[i] == 0 && diffTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_ASSOCIATE;\n }\n else if (sameTypeCount[i] == 0 && diffTypeCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_A;\n }\n else if (sameTypeCount[i] == 0 && diffTypeCount[i] > 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_B;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_SKIP;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_C;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] > 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_D;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_E;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_F;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] > 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_G;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_H;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_I;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] > 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_J;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_K;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_L;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] > 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_M;\n }\n }\n\n // Determine the action for a logical DB that is allowed to have\n // multiple associations.\n //\n else if (multipleDB.indexOf(distinctLogicalDBKeys[i]) >= 0)\n {\n if (sameTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_ASSOCIATE;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_SKIP;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_ASSOCIATE;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_E;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_ASSOCIATE;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_F;\n }\n else if (sameTypeCount[i] == 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] > 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_ASSOCIATE;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_G;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_H;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_I;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 1 &&\n diffTypeCount[i] > 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_SKIP;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_J;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] == 0)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_ASSOCIATE;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_K;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] == 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_ASSOCIATE;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_L;\n }\n else if (sameTypeCount[i] > 1 && sameObjCount[i] == 0 &&\n diffTypeCount[i] > 1)\n {\n action[i] = AssociationLoadConstants.ACTION_REPORT_ASSOCIATE;\n msg[i] = AssociationLoadConstants.ASSOC_DISCREP_M;\n }\n }\n\n // Throw an exception if the logical DB if not defined in either\n // of the lists.\n //\n else\n {\n throw new MGIException(\"Logical DB (\" +\n distinctLogicalDBKeys[i] + \") must be \" +\n \"configured to allow either single or \" +\n \"multiple associations.\");\n }\n\n // If a \"Report and Skip\" discrepancy is found, do not allow any\n // associations to be made.\n //\n if (action[i] == AssociationLoadConstants.ACTION_REPORT_SKIP)\n skipAssociation = true;\n }\n\n // Use the action established for each distinct accession ID/logical DB\n // to see if it should be skipped, reported and/or associated.\n //\n for (i=0; i<distinctAccIDs.length; i++)\n {\n // Action: Do nothing (association already exists).\n //\n if (action[i] == AssociationLoadConstants.ACTION_SKIP)\n {\n logger.logdDebug(\"Exists: \"+distinctAccIDs[i]+\",\"+\n distinctLogicalDBKeys[i].intValue(),false);\n existCount++;\n continue;\n }\n\n // Action: Report a discrepancy.\n //\n if (action[i] == AssociationLoadConstants.ACTION_REPORT_SKIP ||\n action[i] == AssociationLoadConstants.ACTION_REPORT_ASSOCIATE)\n {\n for (j=0; j<accIDs.length; j++)\n {\n // Skip this accession ID/logical DB if it is not the same as\n // the current pair.\n //\n if ((!accIDs[j].equals(distinctAccIDs[i])) ||\n logicalDBKeys[j].intValue() !=\n distinctLogicalDBKeys[i].intValue())\n continue;\n\n assocRpt.reportAssocDiscrepancy(targetAccID, targetLogicalDBKey,\n targetObjectKey, expTargetMGITypeKey,\n accIDs[j], logicalDBKeys[j],\n objectKeys[j], mgiTypeKeys[j],\n msg[i]);\n reportCount++;\n }\n }\n\n // Action: Make the association.\n //\n if (action[i] == AssociationLoadConstants.ACTION_ASSOCIATE ||\n action[i] == AssociationLoadConstants.ACTION_REPORT_ASSOCIATE)\n {\n // If any of the accession ID/logical DB pairs could not be\n // associated because of an error condition, do not make\n // the association.\n //\n if (skipAssociation)\n continue;\n\n associate(distinctAccIDs[i],distinctLogicalDBKeys[i],\n targetMGITypeKey, targetObjectKey);\n assocCount++;\n }\n }\n\n // If any of the accession ID/logical DB pairs could not be associated\n // because of an error condition, increment the skip count by the number\n // of accession IDs that were supposed to be associated.\n //\n if (skipAssociation)\n skipCount += distinctAccIDs.length;\n }", "@Test\n public void testDoNotifyCommitWithTwoStreams() throws Exception {\n AccurevTrigger bMasterTrigger = setupProjectWithTrigger(\"host\", \"8080\", \"stream2\", \"depot\", false);\n AccurevTrigger aMasterTrigger = setupProjectWithTrigger(\"host\", \"8080\", \"stream1\", \"depot\", false);\n\n\n AccurevStatus spy = Mockito.spy(new AccurevStatus());\n\n spy.doNotifyCommit(requestWithNoParameters, \"host\", \"8080\", \"stream1\", \"1\", \"testPrincipal\", \"Updated\");\n\n\n Mockito.verify(spy).doNotifyCommit(requestWithNoParameters, \"host\", \"8080\", \"stream1\", \"1\", \"testPrincipal\", \"Updated\");\n\n assertEquals(\"HOST: host PORT: 8080 Streams: stream1\", spy.toString());\n }", "@Test\n public void NewDataAvailableTest() {\n String vatNumber = \"vatNumber\";\n Date birthDate = new Date(000000000);\n String fiscalCode = \"fiscalCodeTest00\";\n String password = \"password\";\n Individual individual = new Individual(fiscalCode, \"name\", \"surname\", password, birthDate, 40.5f, 10.0f);\n userController.addIndividual(individual);\n ThirdParty thirdParty = new ThirdParty(vatNumber,\"thirdParty\", password);\n userController.addThirdParty(thirdParty);\n thirdPartyService.addIndividualRequest(thirdParty, individual, true);\n IndividualData individualData = new IndividualData(new Date(00000000), 60f ,120f ,150f ,50f );\n List individualDataList= new ArrayList();\n individualDataList.add(individualData);\n individualData.setIndividual(individual);\n individualService.saveData(individualDataList);\n\n assertEquals(thirdPartyService.getNewDataNotificationList(thirdParty,individual).size(),1);\n }", "private void provisionSubscriber(final Context ctx, final Subscriber subscriber, final List<SubscriberAuxiliaryService> associations,\r\n final Home subAuxServiceHome, final Home subHomezoneHome, final Date runningDate) throws AbortVisitException\r\n {\r\n /*\r\n * TODO - Don't process subscriber if it's deactivated?\r\n */\r\n\r\n /*\r\n * start to set auxiliary service and future auxiliaryService field for this\r\n * subscriber\r\n */\r\n for (final SubscriberAuxiliaryService association : associations)\r\n {\r\n if (!LifecycleStateEnum.RUNNING.equals(this.getState()))\r\n {\r\n String msg = \"Lifecycle agent '\" + this.getAgentId() + \"' no longer running. Remaining auxiliary services will be processed next time.\";\r\n new InfoLogMsg(this, msg, null).log(ctx);\r\n throw new AbortVisitException(msg);\r\n }\r\n\r\n provisionAssociation(ctx, association, subscriber, subAuxServiceHome, subHomezoneHome);\r\n }\r\n\r\n /*\r\n * Actually there is no explicit need of setting these services to subscriber and\r\n * then calling SubscriberHome.store instead we can directly call\r\n * SubscriberAuxiliaryServiceHome.create() and remove\r\n */\r\n\r\n /*\r\n * If this collection is empty then no point in storing that because to be valid\r\n * something should be there, if we are adding future auxiliary service at least\r\n * it should be there. This check is put because upon any error in getting correct\r\n * data in above steps, the store action may remove current active auxiliary\r\n * services erroneously\r\n */\r\n\r\n /*\r\n * if(!existingActiveAuxSvcs.isEmpty()) {\r\n * subscriber.setAuxiliaryServices(existingActiveAuxSvcs);\r\n * subscriber.setFutureAuxiliaryServices(existingFutureAuxSvcs); try {\r\n * subscriberHome.store(ctx,subscriber); } catch(Exception e) { new\r\n * MajorLogMsg(this, \"ProvisionAuxiliaryServiceAgent can not Provision\r\n * AuxiliaryService for subscriber \" + subId, e).log(ctx); } // catch }\r\n */\r\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT03() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c1 = new ClassDetailsStub(TEST_CONFIG.SatOnly),\n\t\t\t\t\t\t c2 = new ClassDetailsStub(TEST_CONFIG.MonWedFri2),\n\t\t\t\t\t\t c3 = new ClassDetailsStub(TEST_CONFIG.TueThu);\n\t\t\n\t\tArrayList<ClassDetailsStub> s1 = new ArrayList<ClassDetailsStub>();\n\t\ts1.add(c1);\n\t\ts1.add(c3);\n\t\t\n\t\tArrayList<ClassDetailsStub> s2 = new ArrayList<ClassDetailsStub>();\n\t\ts2.add(c2);\n\t\ts2.add(c3);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ArrayList<ClassDetailsStub>> twoSchedules = new ArrayList<ArrayList<ClassDetailsStub>>();\n\t\ttwoSchedules.add(s1);\n\t\ttwoSchedules.add(s2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean schedulesConflict = smc.conflict(twoSchedules);\n\t\tassertTrue(schedulesConflict);\n\t}", "@Test\n public void testDoNotifyCommitWithSingleStream() throws Exception {\n AccurevTrigger aMasterTrigger = setupProjectWithTrigger(\"host\", \"8080\", \"stream1\", \"depot\", false);\n\n AccurevStatus spy = Mockito.spy(new AccurevStatus());\n spy.doNotifyCommit(requestWithNoParameters, \"host\", \"8080\", \"stream1\", \"1\", \"testPrincipal\", \"Updated\");\n\n Mockito.verify(spy).doNotifyCommit(requestWithNoParameters, \"host\", \"8080\", \"stream1\", \"1\", \"testPrincipal\", \"Updated\");\n assertEquals(\"HOST: host PORT: 8080 Streams: stream1\", spy.toString());\n }", "@Test\r\n\tpublic void test() {\r\n\t\tassertEquals(subscribe.getTopic() , \"room1\");\r\n\t\tassertEquals(subscribe.getTypeMap() , \"Galilei\");\r\n\t\tassertTrue(subscribe.isPossible(server));\r\n\t\tassertTrue(!subscribe2.isPossible(server));\r\n\t}", "public void testCtor() throws Exception {\n PasteAssociationAction pasteAction = new PasteAssociationAction(transferable, namespace);\n\n assertEquals(\"Should return Association instance.\", association, pasteAction.getModelElement());\n }", "@Test\r\n\tpublic void testPendingInterviewListReturnNull() throws Exception {\r\n\t\tList<Candidate> candidateList = new ArrayList<Candidate>();\r\n\t\tCandidate candidate = getCandidateObj();\r\n\t\tcandidate.setInterview(getInterview());\r\n\r\n\t\tList<ShowCandidateDTO> showCandidateList = new ArrayList<ShowCandidateDTO>();\r\n\t\tshowCandidateList.add(getShowCandidateDTO());\r\n\r\n\t\twhen(candidateRepository.candidatePendingInterviewApproval(anyLong())).thenReturn(candidateList);\r\n\t\twhen(interviewerService.pendingInterviewApprovalList(anyLong())).thenReturn(showCandidateList);\r\n\r\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/getpenddingapproval/1\"))\r\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isOk());\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n private Void receiveObjectsAnswerVehicle()\r\n {\r\n List<Geometry> adds = (List<Geometry>)EasyMock.getCurrentArguments()[1];\r\n List<Geometry> removes = (List<Geometry>)EasyMock.getCurrentArguments()[2];\r\n\r\n assertTrue(removes.isEmpty());\r\n // 119\n assertEquals(138, adds.size());\r\n boolean containsMeshes = false;\r\n boolean containsLines = false;\r\n\r\n for (Geometry geom : adds)\r\n {\r\n if (geom instanceof PolygonMeshGeometry)\r\n {\r\n containsMeshes = true;\r\n }\r\n else if (geom instanceof PolylineGeometry)\r\n {\r\n containsLines = true;\r\n }\r\n }\r\n\r\n assertTrue(containsMeshes);\r\n assertTrue(containsLines);\r\n\r\n return null;\r\n }", "@Test\r\n public void testAttachAgentToMission() {\r\n Agent agent = jamesBond;\r\n Mission mission = infiltrateSPD;\r\n missionManager.createMission(mission);\r\n agentManager.create(agent);\r\n manager.attachAgentToMission(agent, mission);\r\n \r\n }", "public final void testCall() throws Exception\n {\n \n Logger.getLogger(this.getClass()).info(\"waiting for Remote message...\");\n \n Logger.getLogger(this.getClass()).info(\"press enter to shutdown server\");\n \n //TODO raffaele.picardi: report this class out of this test and remain only Monitor.onWait for itnegration test\n // Monitor.waitOn(WAIT);\n //Init section to transfer in External system\n UMOMessage result=null;\n MuleClient client;\n while (true) {\n try {\n \n client = new MuleClient();\n RemoteDispatcher rd = client.getRemoteDispatcher(MessagesTest.getString(\"EHelloServiceObjectArrayTest.10\")); //$NON-NLS-1$\n \n/* SoapMethod method = new SoapMethod(new QName(\"\", Messages.getString(\"SOAP_METHOD_NAME\")));\n method.addNamedParameter(new QName( Messages.getString(\"NAMED_PARAMETER\")), new javax.xml.namespace.QName( Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QNAME\")), \"in\");\n method.setReturnType( new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n method.setReturnClass(Class.forName(Messages.getString(\"RETURN_CLASSNAME\")));\n */\n \n Map props = new HashMap();\n props.put(\"style\", \"wrapped\");\n props.put(\"use\", \"literal\"); \n //props.put(MuleProperties.MULE_SOAP_METHOD, method);\n \n props.put(\"resourceKey\", MessagesTest.getString(\"RESOURCE_KEY\"));\n props.put(WSRFParameter.SERVICE_NAMESPACE , MessagesTest.getString(\"SERVICE_NAMESPACE_URI\"));\n props.put(WSRFParameter.RESOURCE_KEY_NAME , MessagesTest.getString(\"RESOURCE_KEY_NAME\"));\n props.put(WSRFParameter.RETURN_QNAME, MessagesTest.getString(\"RETURN_QNAME\"));\n \n /* props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n \n props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n */\n \n props.put(WSRFParameter.RETURN_CLASS, Class.forName(MessagesTest.getString(\"RETURN_CLASSNAME\")));\n props.put(WSRFParameter.SOAP_ACTION_URI, MessagesTest.getString(\"SOAP_ACTION_URI\"));\n result = rd.sendRemote(\"vm://vmQueue\", new Integer(2), props);\n \n //result = rd.sendRemote(Messages.getString(\"EHelloServiceObjectArrayTest.11\"),\"\", null); //$NON-NLS-1$\n //logger.info(this, \"invoke done.\",\"\"); //$NON-NLS-1$\n System.out.println(\"invoke done.\");\n Thread.sleep(5000);\n } \n catch (UMOException e) \n {\n\n e.printStackTrace();\n } \n catch (InterruptedException e) \n {\n\n e.printStackTrace();\n }\n finally \n {\n if (result != null)\n {\n System.out.println(result.getPayload().toString()); //$NON-NLS-1$\n }\n else\n {\n System.out.println(\"result is null\");\n }\n \n }\n //end section to transfer in External system\n }\n \n }", "@Test\n\tpublic void testFormalizeMessageWithBridgeOperation() {\n\t\ttest_id = \"1\";\n\t\tString diagramName = \"Communication in Package\";\n\n\t\tPackage_c communication = getPackage(diagramName);\n\n\t\tcommunication = Package_c.getOneEP_PKGOnR1405(m_sys,\n\t\t\t\tnew ClassQueryInterface_c() {\n\n\t\t\t\t\tpublic boolean evaluate(Object candidate) {\n\t\t\t\t\t\tPackage_c selected = (Package_c) candidate;\n\t\t\t\t\t\treturn selected.getName().equals(\n\t\t\t\t\t\t\t\t\"Communication in Package\");\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\tCanvasUtilities.openCanvasEditor(communication);\n\n\t\tGraphicalEditor ce = CanvasTestUtilities.getCanvasEditor(diagramName\n\t\t\t\t);\n\t\t// test that an external entity participant may\n\t\t// be formalized against an external entity\n\t\tExternalEntityParticipant_c eep = ExternalEntityParticipant_c\n\t\t\t\t.ExternalEntityParticipantInstance(\n\t\t\t\t\t\tcommunication.getModelRoot(),\n\t\t\t\t\t\tnew ClassQueryInterface_c() {\n\n\t\t\t\t\t\t\tpublic boolean evaluate(Object candidate) {\n\t\t\t\t\t\t\t\tExternalEntityParticipant_c selected = (ExternalEntityParticipant_c) candidate;\n\t\t\t\t\t\t\t\treturn selected.getLabel().equals(\n\t\t\t\t\t\t\t\t\t\t\"Informal External Entity\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\t\tassertNotNull(eep);\n\n\t\tselection.clear();\n\t\tselection.addToSelection(eep);\n\n\t\t// before calling the action setup a thread that will\n\t\t// configure the necessary values\n\t\tShell[] existingShells = PlatformUI.getWorkbench().getDisplay().getShells();\n\t\tFailableRunnable runnable = TestUtil.chooseItemInDialog(200, \"Time\", existingShells);\n\t\tTestUtil.okElementSelectionDialog(runnable, existingShells);\n\t\ttry {\n\t\t\t// get the action and execute it\n\t\t\tGenericPackageFormalizeOnSQ_EEPAction action = new GenericPackageFormalizeOnSQ_EEPAction();\n\t\t\taction.run(null);\n\t\n\t\t\tvalidateOrGenerateResults(ce, generateResults);\n\t\n\t\t\ttest_id = \"2\";\n\t\n\t\t\t// test formalizing the message against one of the operations\n\t\t\tSynchronousMessage_c synchronousMessage = getSynchronousMessage(\"Informal Synchronous Message\");\n\t\n\t\t\tassertNotNull(synchronousMessage);\n\t\n\t\t\tselection.clear();\n\t\t\tselection.addToSelection(synchronousMessage);\n\t\t\tselection.addToSelection(eep);\n\t\n\t\t\tIStructuredSelection sel = Selection.getInstance().getStructuredSelection();\n\t\n\t\t\t// create and initialize the wizard\n\t\t\tCommunicationBridgeOperationFormalizeOnMSG_SMWizard wizard2 = new CommunicationBridgeOperationFormalizeOnMSG_SMWizard();\n\t\t\twizard2.init(workbench, sel, null);\n\t\t\tWizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow()\n\t\t\t\t\t.getShell(), wizard2);\n\t\t\tdialog.create();\n\t\n\t\t\t// Select the association in the wizard\n\t\t\tCommunicationBridgeOperationFormalizeOnMSG_SMWizardPage4 page3 = (CommunicationBridgeOperationFormalizeOnMSG_SMWizardPage4) wizard2\n\t\t\t\t\t.getStartingPage();\n\t\t\tpage3.createControl(workbench.getActiveWorkbenchWindow().getShell());\n\t\t\tCombo combo = page3.MessageCombo;\n\t\t\tselectItemInList(\"current_date\", combo);\n\t\t\tassertTrue(\"Bridge Operation: \" + \"current_date, \"\n\t\t\t\t\t+ \"was not selected in the wizard.\", wizard2.performFinish());\n\t\n\t\t\tvalidateOrGenerateResults(ce, generateResults);\n\t\t} finally {\n\t\t\t// test unformalizing and external entity and the message\n\t\t\t// through the external entity\n\t\t\ttest_id = \"3\";\n\t\n\t\t\tselection.clear();\n\t\t\tselection.addToSelection(eep);\n\n\t\t\tExternalEntityUnformalizeOnSQ_EEPAction unformalizeAction = new ExternalEntityUnformalizeOnSQ_EEPAction();\n\t\t\tunformalizeAction.run(new Action() {\n\t\t\t});\n\t\n\t\t\tvalidateOrGenerateResults(ce, generateResults);\n\t\t}\n\t}", "@Test\n public void testLocalExtendedCircuitId() throws Exception {\n isisNeighbor.setLocalExtendedCircuitId(1);\n result = isisNeighbor.localExtendedCircuitId();\n assertThat(result, is(1));\n }", "@Test\n public void testRwbmInternal()\n {\n generateEvents(\"dist-rwbm-internal-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }", "public void testRetrieveAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddresses(new long[]{address.getId()});\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\n public void testGetCandidates() {\n assertTrue(mWifiCandidates.add(mScanDetail1, mConfig1, 2, 0.0, false, 100));\n assertNotNull(mWifiCandidates.getCandidates());\n assertEquals(1, mWifiCandidates.getCandidates().size());\n }", "@Test\n public void testAddEventListener() {\n List<SimulatorEventListener> eventListeners = eventDispatcher.getSimulatorEventListeners();\n assertTrue(eventListeners.size() == 0);\n SimulatorEventListener listener = new SimulatorEventListener() {\n\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n\n }\n };\n eventDispatcher.addSimulatorEventListener(listener);\n assertTrue(eventListeners.size() == 1);\n }", "@Test\r\n\tpublic final void testGetRoomByName() {\n\t\tRoom actual = roomServices.getRoomByName(expected.getName());\r\n\t\tassertEquals(expected, actual);\r\n\t}", "@Before\n public void setUp() {\n ofProtocolListener = new OpenflowProtocolListenerFullImpl(connectionAdapter, deviceReplyProcessor);\n connectionAdapter.setMessageListener(ofProtocolListener);\n Mockito.when(connectionAdapter.getRemoteAddress())\n .thenReturn(InetSocketAddress.createUnresolved(\"ofp-junit.example.org\", 6663));\n Mockito.verify(connectionAdapter).setMessageListener(any(OpenflowProtocolListener.class));\n }", "@Test\n public void testCreateFailure()\n throws Exception\n {\n ProviderListener providerListener\n = new ProviderListener(FocusBundleActivator.bundleContext);\n\n MockProtocolProvider mockProvider\n = (MockProtocolProvider) providerListener.obtainProvider(1000);\n\n MockColibriOpSet colibriOpSet = mockProvider.getMockColibriOpSet();\n\n String mockBridgeJid = \"some.mock.bridge.com\";\n\n MockVideobridge mockBridge\n = new MockVideobridge(\n mockProvider.getMockXmppConnection(),\n mockBridgeJid);\n\n mockBridge.start(osgi.bc);\n\n AllocThreadingTestColibriConference colibriConf\n = colibriOpSet.createAllocThreadingConf();\n\n colibriConf.setJitsiVideobridge(mockBridgeJid);\n\n colibriConf.setResponseError(XMPPError.Condition.interna_server_error);\n\n //colibriConf.blockConferenceCreator(true);\n\n MockPeerAllocator[] allocators = new MockPeerAllocator[20];\n\n List<String> endpointList = new ArrayList<String>(allocators.length);\n\n for (int i=0; i < allocators.length/2; i++)\n {\n String endpointName = \"peer\" + i;\n allocators[i] = new MockPeerAllocator(endpointName, colibriConf);\n endpointList.add(endpointName);\n\n allocators[i].runChannelAllocation();\n }\n\n colibriConf.waitAllOnCreateConfSemaphore(endpointList);\n\n colibriConf.resumeConferenceCreate();\n\n // Drain conference creator queue\n assertNotNull(colibriConf.obtainConferenceCreator());\n\n // Wait for this series to finish\n for (int i=0; i < allocators.length/2; i++)\n {\n allocators[i].join();\n // No channels allocated\n assertNull(allocators[i].channels);\n }\n\n // Only 1 request sent by the allocator thread\n assertEquals(1, colibriConf.allocRequestsSentCount());\n\n // No conference created\n assertEquals(0, mockBridge.getConferenceCount());\n\n // Start 2nd burst\n endpointList.clear();\n colibriConf.blockConferenceCreator(true);\n\n for (int i=allocators.length/2; i < allocators.length; i++)\n {\n String endpointName = \"peer\" + i;\n allocators[i] = new MockPeerAllocator(endpointName, colibriConf);\n endpointList.add(endpointName);\n\n allocators[i].runChannelAllocation();\n }\n\n colibriConf.waitAllOnCreateConfSemaphore(endpointList);\n\n colibriConf.resumeConferenceCreate();\n\n // Drain conference creator queue\n assertNotNull(colibriConf.obtainConferenceCreator());\n\n // Wait for all to finish\n for (int i=allocators.length/2; i < allocators.length; i++)\n {\n allocators[i].join();\n\n // No channels allocated\n assertNull(allocators[i].channels);\n }\n\n // Only 1 request sent by the allocator thread\n assertEquals(2, colibriConf.allocRequestsSentCount());\n\n // No conference created\n assertEquals(0, mockBridge.getConferenceCount());\n\n mockBridge.stop(osgi.bc);\n }", "@Test(dependsOnMethods = {\"testAddConnection\"})\n public void testGetStoredConnections() {\n System.out.println(\"getStoredConnections\");\n instance.addConnection(testConnection);\n Set result = instance.getStoredConnections();\n assertTrue(result.contains(testConnection));\n }", "public boolean setupOwnAddress() {\n\t\tboolean success = false;\n\t\ttry {\n\t\t\tthis.ownAddress = NetworkLayer.getOwnAddress(); // TODO replace by discover?\n\t\t\tthis.showNamedMessage(\"Client listing on: \" + this.ownAddress);\n\t\t\tthis.showNamedMessage(\"NOTE: depending on detection method,\"\n\t\t\t\t\t+ \" this may NOT be the actual interface used\");\n\t\t\tthis.showNamedMessage(\"Discovered preferred local address: \" \n\t\t\t\t\t+ NetworkLayer.discoverLocalAddress());\n\t\t\tsuccess = true;\n\t\t} catch (UnknownHostException e) {\n\t\t\tthis.showNamedMessage(\"Could not determine own address: \" + e.getLocalizedMessage());\n\t\t} \n\t\treturn success;\n\t}", "@Test\n\tpublic void TEAM3_CONTROLLER_UT04() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c1 = new ClassDetailsStub(TEST_CONFIG.SatOnly),\n\t\t\t\t\t\t c2 = new ClassDetailsStub(TEST_CONFIG.MonWedFri2);\n\t\t\n\t\tArrayList<ClassDetailsStub> s1 = new ArrayList<ClassDetailsStub>();\n\t\ts1.add(c1);\n\t\t\n\t\tArrayList<ClassDetailsStub> s2 = new ArrayList<ClassDetailsStub>();\n\t\ts2.add(c2);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ArrayList<ClassDetailsStub>> twoSchedules = new HashSet<ArrayList<ClassDetailsStub>>();\n\t\ttwoSchedules.add(s1);\n\t\ttwoSchedules.add(s2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tException exceptionThrown = null;\n\t\tboolean schedulesConflict = false;\n\t\ttry {\n\t\t\tschedulesConflict = smc.conflict(twoSchedules);\n\t\t} catch (ClassCastException cce) {\n\t\t\texceptionThrown = cce;\n\t\t}\n\t\t\n\t\tassertNull(exceptionThrown);\n\t\tassertFalse(schedulesConflict);\n\t}", "public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\n public void persistenceTest()\n {\n // Add the new conversation and save it\n m_instance.addConversation(new Conversation(5435435432L));\n m_fileSystem.saveConversations(m_instance.getConversations());\n\n // Load the conversations back from the file system.\n ArrayList<Conversation> loadedConversations = new ArrayList<Conversation>();\n m_fileSystem.loadConversations(loadedConversations);\n\n // Set a conversation existence flag\n boolean isConversationPresent = false;\n\n // Set the flag true if we find a conversation with the same attached number\n for(Conversation conversation : loadedConversations)\n {\n if(conversation.getRecipientPhone() == 5435435432L)\n {\n isConversationPresent = true;\n }\n }\n\n // Pass this test if the flag is set\n assertTrue(isConversationPresent);\n }", "private DSEMergeManager(EObject original, ChangeSet local, ChangeSet remote) {\n buildScope(original, local, remote);\n configureMerge(original);\n\n dse = new DesignSpaceExplorer();\n }", "@Test\n public void testAddCarrierOrPrivilegedCandidate() {\n WifiCandidates.Key key = mWifiCandidates\n .keyFromScanDetailAndConfig(mScanDetail1, mConfig1);\n WifiCandidates.Candidate candidate;\n // Make sure the CarrierOrPrivileged false is remembered\n assertTrue(mWifiCandidates.add(key, mConfig1, 0, -50, 2412, 0.0, false, false, 100));\n candidate = mWifiCandidates.getCandidates().get(0);\n assertFalse(candidate.isCarrierOrPrivileged());\n mWifiCandidates.remove(candidate);\n // Make sure the CarrierOrPrivileged true is remembered\n assertTrue(mWifiCandidates.add(key, mConfig1, 0, -50, 2412, 0.0, false, true, 100));\n candidate = mWifiCandidates.getCandidates().get(0);\n assertTrue(candidate.isCarrierOrPrivileged());\n mWifiCandidates.remove(candidate);\n }", "@Test\n void runWithBroadcastMessageTest() throws Exception {\n\n Prattle.startUp();\n\n\n\n Field initialized = client1.getClass().getDeclaredField(\"initialized\");\n Field input = client1.getClass().getDeclaredField(\"input\");\n Field output = client1.getClass().getDeclaredField(\"output\");\n\n initialized.setAccessible(true);\n input.setAccessible(true);\n output.setAccessible(true);\n\n initialized.set(client1, false);\n when(scanNetNB.hasNextMessage()).thenReturn(true);\n Message msg = Message.makeBroadcastMessage(\"Mandy\", \"test\");\n when(scanNetNB.nextMessage()).thenReturn(msg);\n\n input.set(client1, scanNetNB);\n\n\n client1.run();\n assertEquals(true, client1.isInitialized());\n client1.run();\n Message msgLogOff = Message.makeBroadcastMessage(\"Mandy\", \"Prattle says everyone log off\");\n when(scanNetNB.nextMessage()).thenReturn(msgLogOff);\n client1.run();\n\n Message msgWithDiffName = Message.makeBroadcastMessage(\"Noodle\", \"Hello from Noodle\");\n client1.setName(\"Mandy\");\n System.out.print(client1.getName());\n System.out.print(msgWithDiffName.getName());\n client1.run();\n\n assertEquals(true, client1.isInitialized());\n when(scanNetNB.hasNextMessage()).thenReturn(true);\n when(scanNetNB.nextMessage()).thenReturn(msgWithDiffName);\n input.set(client1, scanNetNB);\n output.set(client1, printNetNB);\n\n ClientRunnable clientRunnable = spy(client1);\n Mockito.doNothing().when(clientRunnable).terminateClient();\n clientRunnable.run();\n\n\n\n\n\n }", "protected boolean isCorrInLocalConfig(DNode cutoff, DNode corr) {\n\t\tList<Integer> todo = new ArrayList<Integer>();\n\t\tMap<Integer, DNode> i2d = new HashMap<Integer, DNode>();\n\t\tfor (DNode n : Arrays.asList(cutoff.pre)) {\n\t\t\ttodo.add(n.globalId);\n\t\t\ti2d.put(n.globalId, n);\n\t\t}\n\t\tSet<Integer> visited = new HashSet<Integer>();\n\n\t\twhile (!todo.isEmpty()) {\n\t\t\tInteger n = todo.remove(0);\n\t\t\tvisited.add(n);\n\n\t\t\tif (n.equals(corr.globalId))\n\t\t\t\treturn true;\n\n\t\t\tfor (DNode m : i2d.get(n).pre) {\n\t\t\t\tif (!visited.contains(m.globalId)) {\n\t\t\t\t\ttodo.add(m.globalId);\n\t\t\t\t\ti2d.put(m.globalId, m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public void test_61277a() {\n \t\tIProject project = getProject(getUniqueString());\n \t\tIProject destProject = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\tensureDoesNotExistInWorkspace(destProject);\n \t\tIScopeContext context = new ProjectScope(project);\n \t\tString qualifier = getUniqueString();\n \t\tPreferences node = context.getNode(qualifier);\n \t\tString key = getUniqueString();\n \t\tString value = getUniqueString();\n \t\tnode.put(key, value);\n \t\tassertEquals(\"1.0\", value, node.get(key, null));\n \n \t\ttry {\n \t\t\t// save the prefs\n \t\t\tnode.flush();\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"1.1\", e);\n \t\t}\n \n \t\t// rename the project\n \t\ttry {\n \t\t\tproject.move(destProject.getFullPath(), true, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"2.0\", e);\n \t\t}\n \n \t\tcontext = new ProjectScope(destProject);\n \t\tnode = context.getNode(qualifier);\n \t\tassertEquals(\"3.0\", value, node.get(key, null));\n \t}", "@Test\n\tpublic void hasWorkstationTest(){\n\t\tcmcSystem.logInUser(2);\n\t\tOrder testOrder = makeOrder(new ModelA());\n\t\tcmcSystem.logInUser(2);\n\t\tOrder testOrder2 = makeOrder(new ModelB());\n//\t\tOrder testOrder3 = makeOrder(new ModelC());\n//\t\tOrder testOrder4 = makeOrder(new ModelX());\n//\t\tcmcSystem.logInUser(2);\n//\t\tOrder testOrder5 = makeOrder(new ModelY());\n\t\tcmcSystem.logInUser(1);\n\t\tassemblyLine.setStatus(Status.OPERATIONAL, 1);\n\t\tassertTrue(assemblyLine.supports(testOrder));\n\t\tassertTrue(assemblyLine.supports(testOrder2));\n//\t\tassertFalse(assemblyLine.supports(testOrder3));\n//\t\tassertFalse(assemblyLine.supports(testOrder4));\n//\t\tassertFalse(assemblyLine.supports(testOrder5));\n\t}", "public void join() throws OperationFailedException\n {\n if (chatRoomSession == null && chatInvitation == null)\n { // the session is not set and we don't have a chatInvitatoin\n // so we try to join the chatRoom again\n ChatRoomManager chatRoomManager =\n provider.getAimConnection().getChatRoomManager();\n chatRoomSession = chatRoomManager.joinRoom(this.getName());\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n else if (chatInvitation != null)\n {\n chatRoomSession = chatInvitation.accept();\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n\n // We don't specify a reason.\n opSetMuc.fireLocalUserPresenceEvent(this,\n LocalUserAdHocChatRoomPresenceChangeEvent.LOCAL_USER_JOINED, null);\n }", "@Test\n public void allow_joining_when_open() {\n\n Deck deck = new Deck();\n\n Game game = new Game(deck);\n\n game.join(\"john\");\n\n\n\n assertThat(game.getPlayerNames(), is(new HashSet<>(Arrays.asList(\"john\"))));\n }", "@Test\n public void testBeforeOffer_MgrTrue() {\n when(mgr1.beforeOffer(any(), any())).thenReturn(true);\n\n assertTrue(pool.beforeOffer(controller1, CommInfrastructure.UEB, TOPIC1, EVENT1));\n verify(mgr1).beforeOffer(TOPIC1, EVENT1);\n\n // ensure it's still in the map by re-invoking\n assertTrue(pool.beforeOffer(controller1, CommInfrastructure.UEB, TOPIC2, EVENT2));\n verify(mgr1).beforeOffer(TOPIC2, EVENT2);\n\n assertFalse(pool.beforeOffer(controllerDisabled, CommInfrastructure.UEB, TOPIC1, EVENT1));\n }", "@Test\n public void testProcessProtocolResearchAreaBusinessRules() throws Exception {\n ProtocolDocument document = getNewProtocolDocument();\n setProtocolRequiredFields(document);\n // check case 1\n assertTrue(rule.processProtocolResearchAreaBusinessRules(document));\n \n // check case 2\n ProtocolResearchArea dummyPRA0 = new ProtocolResearchArea();\n ResearchArea dummyRA0 = new ResearchArea();\n dummyRA0.setActive(true);\n dummyPRA0.setResearchAreas(dummyRA0);\n \n ProtocolResearchArea dummyPRA1 = new ProtocolResearchArea();\n ResearchArea dummyRA1 = new ResearchArea();\n dummyRA1.setActive(true);\n dummyPRA1.setResearchAreas(dummyRA1);\n \n ProtocolResearchArea dummyPRA2 = new ProtocolResearchArea();\n ResearchArea dummyRA2 = new ResearchArea();\n dummyRA2.setActive(true);\n dummyPRA2.setResearchAreas(dummyRA2);\n \n ProtocolResearchArea dummyPRA3 = new ProtocolResearchArea();\n ResearchArea dummyRA3 = new ResearchArea();\n dummyRA3.setActive(true);\n dummyPRA3.setResearchAreas(dummyRA3);\n \n List<ProtocolResearchAreaBase> pras = new ArrayList<ProtocolResearchAreaBase>();\n pras.add(dummyPRA0);\n pras.add(dummyPRA1);\n pras.add(dummyPRA2);\n pras.add(dummyPRA3);\n \n document.getProtocol().setProtocolResearchAreas(pras);\n \n assertTrue(document.getProtocol().getProtocolResearchAreas(0).getResearchAreas().isActive());\n assertTrue(document.getProtocol().getProtocolResearchAreas(1).getResearchAreas().isActive());\n assertTrue(document.getProtocol().getProtocolResearchAreas(2).getResearchAreas().isActive());\n assertTrue(document.getProtocol().getProtocolResearchAreas(3).getResearchAreas().isActive());\n \n assertTrue(rule.processProtocolResearchAreaBusinessRules(document));\n \n // check case 3\n assertTrue(document.getProtocol().getProtocolResearchAreas(0).getResearchAreas().isActive());\n \n dummyRA1.setActive(false);\n assertFalse(document.getProtocol().getProtocolResearchAreas(1).getResearchAreas().isActive());\n \n assertTrue(document.getProtocol().getProtocolResearchAreas(2).getResearchAreas().isActive());\n \n dummyRA3.setActive(false);\n assertFalse(document.getProtocol().getProtocolResearchAreas(3).getResearchAreas().isActive());\n \n assertFalse(rule.processProtocolResearchAreaBusinessRules(document));\n String errorPropertyKey = INACTIVE_RESEARCH_AREAS_PREFIX + SEPERATOR + \"1.3.\";\n assertError(errorPropertyKey, KeyConstants.ERROR_PROTOCOL_RESEARCH_AREA_INACTIVE);\n }", "@Local\npublic interface CobranzaServiceLocal {\n\n ResumenInicialVO getCarteraPorTramos(List<Object[]> resultList);\n\n Response obtenerDocumentosSAP(Request request);\n\n Response getCargosSAP(Request request);\n}", "@Override\n public boolean isLocalPlayersTurn() {\n return getTeam().equals(currentBoard.turn());\n }", "@Before\n @Override\n public void setUp() throws Exception {\n super.setUp();\n summary = this.getClass().getName() + \" \" + UUID.randomUUID().toString();\n /*\n * Create event\n */\n EventData eventToCreate = EventFactory.createSingleTwoHourEvent(0, summary);\n replyingAttendee = prepareCommonAttendees(eventToCreate);\n eventToCreate = prepareAttendeeConference(eventToCreate);\n eventToCreate = prepareModeratorConference(eventToCreate);\n createdEvent = eventManager.createEvent(eventToCreate, true);\n\n /*\n * Receive mail as attendee\n */\n MailData iMip = receiveIMip(apiClientC2, userResponseC1.getData().getEmail1(), summary, 0, SchedulingMethod.REQUEST);\n rememberMail(apiClientC2, iMip);\n AnalysisChangeNewEvent newEvent = assertSingleChange(analyze(apiClientC2, iMip)).getNewEvent();\n assertNotNull(newEvent);\n assertEquals(createdEvent.getUid(), newEvent.getUid());\n assertAttendeePartStat(newEvent.getAttendees(), replyingAttendee.getEmail(), PartStat.NEEDS_ACTION.status);\n\n /*\n * reply with \"accepted\"\n */\n attendeeEvent = assertSingleEvent(accept(apiClientC2, constructBody(iMip), null), createdEvent.getUid());\n rememberForCleanup(apiClientC2, attendeeEvent);\n assertAttendeePartStat(attendeeEvent.getAttendees(), replyingAttendee.getEmail(), PartStat.ACCEPTED.status);\n\n /*\n * Receive mail as organizer and check actions\n */\n MailData reply = receiveIMip(apiClient, replyingAttendee.getEmail(), summary, 0, SchedulingMethod.REPLY);\n analyze(reply.getId());\n rememberMail(reply);\n\n /*\n * Take over accept and check in calendar\n */\n assertSingleEvent(update(constructBody(reply)), createdEvent.getUid());\n EventResponse eventResponse = chronosApi.getEvent(createdEvent.getId(), createdEvent.getFolder(), createdEvent.getRecurrenceId(), null, null);\n assertNull(eventResponse.getError(), eventResponse.getError());\n createdEvent = eventResponse.getData();\n for (Attendee attendee : createdEvent.getAttendees()) {\n assertThat(\"Participant status is not correct.\", PartStat.ACCEPTED.status, is(attendee.getPartStat()));\n }\n }", "public void test_61843() {\n \t\t// create the project and manually give it a settings file\n \t\tfinal String qualifier = getUniqueString();\n \t\tfinal IProject project = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\tIFile settingsFile = getFileInWorkspace(project, qualifier);\n \n \t\t// write some property values in the settings file\n \t\tProperties properties = new Properties();\n \t\tproperties.put(\"key\", \"value\");\n \t\tOutputStream output = null;\n \t\ttry {\n \t\t\tFile file = settingsFile.getLocation().toFile();\n \t\t\tfile.getParentFile().mkdirs();\n \t\t\toutput = new BufferedOutputStream(new FileOutputStream(file));\n \t\t\tproperties.store(output, null);\n \t\t} catch (FileNotFoundException e) {\n \t\t\tfail(\"1.0\", e);\n \t\t} catch (IOException e) {\n \t\t\tfail(\"1.1\", e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (output != null)\n \t\t\t\t\toutput.close();\n \t\t\t} catch (IOException e) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \n \t\t// add a log listener to ensure that no errors are reported silently\n \t\tILogListener logListener = new ILogListener() {\n \t\t\tpublic void logging(IStatus status, String plugin) {\n \t\t\t\tThrowable exception = status.getException();\n \t\t\t\tif (exception == null || !(exception instanceof CoreException))\n \t\t\t\t\treturn;\n \t\t\t\tif (IResourceStatus.WORKSPACE_LOCKED == ((CoreException) exception).getStatus().getCode())\n \t\t\t\t\tfail(\"3.0\");\n \t\t\t}\n \t\t};\n \n \t\t// listener to react to changes in the workspace\n \t\tIResourceChangeListener rclistener = new IResourceChangeListener() {\n \t\t\tpublic void resourceChanged(IResourceChangeEvent event) {\n \t\t\t\tnew ProjectScope(project).getNode(qualifier);\n \t\t\t}\n \t\t};\n \n \t\t// add the listeners\n \t\tPlatform.addLogListener(logListener);\n \t\tgetWorkspace().addResourceChangeListener(rclistener, IResourceChangeEvent.POST_CHANGE);\n \n \t\ttry {\n \t\t\tproject.refreshLocal(IResource.DEPTH_INFINITE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"4.0\", e);\n \t\t} finally {\n \t\t\tPlatform.removeLogListener(logListener);\n \t\t\tgetWorkspace().removeResourceChangeListener(rclistener);\n \t\t}\n \t}", "@Test\n public void testLocalStatistics() {\n ObjectStatisticsImpl stat1 = getStatistics();\n ObjectStatisticsImpl stat2 = getStatistics();\n\n repo.saveLocalStatistics(K1, stat1, AffinityTopologyVersion.ZERO);\n repo.saveLocalStatistics(K2, stat2, AffinityTopologyVersion.ZERO);\n\n assertEquals(stat1, repo.getLocalStatistics(K1, null));\n assertEquals(stat1, repo.getLocalStatistics(K2, AffinityTopologyVersion.ZERO));\n\n repo.clearLocalPartitionsStatistics(K1, null);\n\n assertNull(repo.getLocalStatistics(K1, AffinityTopologyVersion.ZERO));\n assertEquals(stat2, repo.getLocalStatistics(K2, null));\n }", "@Test\n public void testLeaveParty()\n {\n System.out.println(\"leaveParty\");\n Account leaveAccount = null;\n Party instance = null;\n Account expResult = null;\n Account result = instance.leaveParty(leaveAccount);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "Association findAssociation(World w, BlockPos pos, String strategy);", "public void setLocalRichFinder(LocalRichFinder localRichFinder) {\n\t\tthis.localRichFinder = localRichFinder;\n\t}", "@Test\n public void testSetLocalExtendedCircuitId() throws Exception {\n isisNeighbor.setLocalExtendedCircuitId(1);\n result = isisNeighbor.localExtendedCircuitId();\n assertThat(result, is(1));\n }", "@Test(expected = JargonException.class)\n\tpublic void testExecuteRequestClientActionPutLocalFileNotExists() throws Exception {\n\t\tString testFileName = \"testClientAction.txt\";\n\t\tscratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH);\n\t\tString putFileName = \"/a/bogus/dir/\" + testFileName;\n\n\t\tIRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties);\n\n\t\tIRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory();\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"testClientAction||msiDataObjPut(\");\n\t\tbuilder.append(testingPropertiesHelper.buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties,\n\t\t\t\tIRODS_TEST_SUBDIR_PATH));\n\t\tbuilder.append('/');\n\t\tbuilder.append(\"testExecuteRequestClientActionPutLocalFileNotExists.txt,null,\");\n\t\tbuilder.append(putFileName);\n\t\tbuilder.append(\",*status)|nop\\n\");\n\t\tbuilder.append(\"*A=null\\n\");\n\t\tbuilder.append(\"*ruleExecOut\");\n\t\tRuleProcessingAO ruleProcessingAO = accessObjectFactory.getRuleProcessingAO(irodsAccount);\n\n\t\truleProcessingAO.executeRule(builder.toString());\n\n\t}", "public void testInitializePersistRetrieve() throws Exception {\n System.out.println(\"initialize, persist, and retrieve connection info records with different info\");\n \n JMSConnectionInfoFilePersister instance = new JMSConnectionInfoFilePersister();\n \n // initialize with some records\n instance.initialize(persisterProps); \n JMSConnectionInfoRecord recs [] = new JMSConnectionInfoRecord [6];\n recs[0] = new JMSConnectionInfoRecord(\"mq://localhost:7676\", \"admin\", \"admin\", null);\n recs[1] = new JMSConnectionInfoRecord(\"mq://foohost:7878\", \"foo\", \"fighter\", \"\");\n recs[2] = new JMSConnectionInfoRecord(\"mq://mqhost:7878\", \"admin\", \"admin\", \"\");\n recs[3] = new JMSConnectionInfoRecord(\"mq://localhost:7676\", \"guest\", \"guest\", \"\");\n Properties jndiEnvProps1 = new Properties();\n jndiEnvProps1.setProperty(\"jndiSys1-Ent1\", \"jndiSys1-Val1\");\n jndiEnvProps1.setProperty(\"jndiSys1-Ent2\", \"jndiSys1-Val2\");\n Properties jndiEnvProps2 = new Properties();\n jndiEnvProps2.setProperty(\"jndiSys2-Ent1\", \"jndiSys2-Val1\");\n jndiEnvProps2.setProperty(\"jndiSys2-Ent2\", \"jndiSys2-Val2\");\n recs[4] = new JMSJndiConnectionInfoRecord(\"jndi://\", \"guest\", \"guest\", \"\", \"MyTCF\",\n \"tcp://somehost\", \"MyInitialContext\", \"mySecPrincipal\",\n \"mySecCredentials\", jndiEnvProps1);\n recs[5] = new JMSJndiConnectionInfoRecord(\"jndi://\", \"guest\", \"guest\", \"\", \"MyQCF\",\n \"tcp://somehost\", \"MyInitialContext\", \"mySecPrincipal\",\n \"mySecCredentials\", jndiEnvProps2);\n instance.persist(recs);\n \n ConnectionInfoRecord [] recsRestored = instance.retrieve();\n ConnectionInfoRecord fooFighterRec = null;\n ConnectionInfoRecord jndiRecMyTCF = null;\n for (int i=0; i < recsRestored.length; i++) {\n if (((JMSConnectionInfoRecord)recsRestored[i]).getPassword().equals(\"fighter\")) {\n fooFighterRec = recsRestored[i];\n }\n \n if (((JMSConnectionInfoRecord)recsRestored[i]).getConnectionURL().equals(\"jndi://\") && \n ((JMSJndiConnectionInfoRecord)recsRestored[i]).getConnectionFactoryName().equals(\"MyTCF\")) {\n jndiRecMyTCF = recsRestored[i];\n }\n }\n \n assertTrue (recs[1].getUsername().equals(((JMSConnectionInfoRecord)fooFighterRec).getUsername()));\n assertTrue (((JMSJndiConnectionInfoRecord)recs[4]).getJndiEnv().getProperty(\"jndiSys1-Ent2\").equals(((JMSJndiConnectionInfoRecord)jndiRecMyTCF).getJndiEnv().getProperty(\"jndiSys1-Ent2\")));\n }", "@Ignore \n @Test\n public void testReceiveMessage() throws Exception {\n System.out.println(\"receiveMessage\");\n PooledConnection MQConn = null;\n String QueueName = \"\";\n String messageSelector = \"\";\n long timeout = 0L;\n ObjectMessage expResult = null;\n ObjectMessage result = JMSUtil.receiveMessage(MQConn, QueueName, messageSelector, timeout);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void canReceiveLocalMessageInvalid() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\t\n\t\tassertFalse(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,-1)));\n\t\tassertFalse(ChatManager.getSingleton().canReceiveLocalMessage(new Position(-1,0)));\n\t\tassertFalse(ChatManager.getSingleton().canReceiveLocalMessage(new Position(11,0)));\n\t\tassertFalse(ChatManager.getSingleton().canReceiveLocalMessage(new Position(0,11)));\n\t\tassertFalse(ChatManager.getSingleton().canReceiveLocalMessage(new Position(5,11)));\n\t\tassertFalse(ChatManager.getSingleton().canReceiveLocalMessage(new Position(11,5)));\n\t}", "public interface OperationSetPersistentPresence extends OperationSetPresence\n{\n /**\n * Persistently adds a subscription for the presence status of the contact corresponding to the\n * specified contactIdentifier to the top level group. Note that this method, unlike the\n * subscribe method in OperationSetPresence, is going the subscribe the specified contact in a\n * persistent manner or in other words, it will add it to a server stored contact list and thus\n * making the subscription for its presence status last along multiple registrations/login/signon.\n *\n * Apart from an exception in the case of an immediate failure, the method won't return any\n * indication of success or failure. That would happen later on through a SubscriptionEvent\n * generated by one of the methods of the SubscriptionListener.\n *\n *\n * @param contactIdentifier the contact whose status updates we are subscribing for.\n * @param pps the owner of the contact to be added to RootGroup.\n * @throws OperationFailedException with code NETWORK_FAILURE if subscribing fails due to errors experienced during\n * network communication\n * @throws IllegalArgumentException if <code>contact</code> is not a contact known to the underlying protocol provider\n * @throws IllegalStateException if the underlying protocol provider is not registered/signed on a public service.\n */\n void subscribe(ProtocolProviderService pps, String contactIdentifier)\n throws IllegalArgumentException, IllegalStateException, OperationFailedException, XmppStringprepException;\n\n /**\n * Persistently adds a subscription for the presence status of the contact corresponding to the\n * specified contactIdentifier and indicates that it should be added to the specified group of\n * the server stored contact list. Note that apart from an exception in the case of an immediate\n * failure, the method won't return any indication of success or failure. That would happen\n * later on through a SubscriptionEvent generated by one of the methods of the\n * SubscriptionListener.\n *\n *\n * @param contactIdentifier the contact whose status updates we are subscribing for.\n * @param parent the parent group of the server stored contact list where the contact should be added.\n *\n * @throws OperationFailedException with code NETWORK_FAILURE if subscribing fails due to errors experienced during\n * network communication\n * @throws IllegalArgumentException if <code>contact</code> or <code>parent</code> are not a contact known to the underlying\n * protocol provider.\n * @throws IllegalStateException if the underlying protocol provider is not registered/signed on a service.\n */\n void subscribe(ContactGroup parent, String contactIdentifier)\n throws IllegalArgumentException, IllegalStateException, OperationFailedException, XmppStringprepException;\n\n /**\n * Persistently removes a subscription for the presence status of the specified contact. This\n * method has a persistent effect and the specified contact is completely removed from any\n * server stored contact lists.\n *\n * @param contact the contact whose status updates we are unsubscribing from.\n * @throws OperationFailedException with code NETWORK_FAILURE if unsubscribing fails due to errors experienced during\n * network communication\n * @throws IllegalArgumentException if <code>contact</code> is not a contact known to the underlying protocol provider\n * @throws IllegalStateException if the underlying protocol provider is not registered/signed on a service.\n */\n void unsubscribe(Contact contact)\n throws IllegalArgumentException, IllegalStateException, OperationFailedException;\n\n /**\n * Creates a group with the specified name and parent in the server stored contact list.\n *\n * @param groupName the name of the new group to create.\n * @param parent the group where the new group should be created\n * @throws OperationFailedException with code NETWORK_FAILURE if creating the group fails because of a network error.\n * @throws IllegalArgumentException if <code>parent</code> is not a contact known to the underlying protocol provider\n * @throws IllegalStateException if the underlying protocol provider is not registered/signed on a service.\n */\n void createServerStoredContactGroup(ContactGroup parent, String groupName)\n throws OperationFailedException;\n\n /**\n * Removes the specified group from the server stored contact list.\n *\n * @param group the group to remove.\n * @throws OperationFailedException with code NETWORK_FAILURE if deleting the group fails because of a network error.\n * @throws IllegalArgumentException if <code>parent</code> is not a contact known to the underlying protocol provider.\n * @throws IllegalStateException if the underlying protocol provider is not registered/signed on a service.\n */\n void removeServerStoredContactGroup(ContactGroup group)\n throws OperationFailedException;\n\n /**\n * Renames the specified group from the server stored contact list. This method would return\n * before the group has actually been renamed. A <code>ServerStoredGroupEvent</code> would be\n * dispatched once new name has been acknowledged by the server.\n *\n * @param group the group to rename.\n * @param newName the new name of the group.\n */\n void renameServerStoredContactGroup(ContactGroup group, String newName);\n\n /**\n * Removes the specified contact from its current parent and places it under <code>newParent</code>.\n *\n * @param contactToMove the <code>Contact</code> to move\n * @param newParent the <code>ContactGroup</code> where <code>Contact</code> would be placed.\n * @throws OperationFailedException when the operation didn't finished successfully.\n */\n void moveContactToGroup(Contact contactToMove, ContactGroup newParent)\n throws OperationFailedException;\n\n /**\n * Returns the root group of the server stored contact list. Most often this would be a dummy\n * group that user interface implementations may better not show.\n *\n * @return the root ContactGroup for the ContactList stored by this service.\n */\n ContactGroup getServerStoredContactListRoot();\n\n /**\n * Registers a listener that would receive events upon changes in server stored groups.\n *\n * @param listener a ServerStoredGroupChangeListener that would receive events upon group changes.\n */\n void addServerStoredGroupChangeListener(ServerStoredGroupListener listener);\n\n /**\n * Removes the specified group change listener so that it won't receive any further events.\n *\n * @param listener the ServerStoredGroupChangeListener to remove\n */\n void removeServerStoredGroupChangeListener(ServerStoredGroupListener listener);\n\n /**\n * Creates and returns a unresolved contact from the specified <code>address</code> and\n * <code>persistentData</code>. The method will not try to establish a network connection and\n * resolve the newly created Contact against the server. The protocol provider may will later\n * try and resolve the contact. When this happens the corresponding event would notify\n * interested subscription listeners.\n *\n * @param address an identifier of the contact that we'll be creating.\n * @param persistentData a String returned Contact's getPersistentData() method during a previous run and that\n * has been persistently stored locally.\n * @param parentGroup the group where the unresolved contact is supposed to belong to.\n * @return the unresolved <code>Contact</code> created from the specified <code>address</code> and\n * <code>persistentData</code>\n */\n Contact createUnresolvedContact(String address, String persistentData, ContactGroup parentGroup);\n\n /**\n * Creates and returns a unresolved contact group from the specified <code>address</code> and\n * <code>persistentData</code>. The method will not try to establish a network connection and\n * resolve the newly created <code>ContactGroup</code> against the server or the contact itself. The\n * protocol provider will later resolve the contact group. When this happens the corresponding\n * event would notify interested subscription listeners.\n *\n * @param groupUID an identifier, returned by ContactGroup's getGroupUID, that the protocol provider may\n * use in order to create the group.\n * @param persistentData a String returned ContactGroups's getPersistentData() method during a previous run and\n * that has been persistently stored locally.\n * @param parentGroup the group under which the new group is to be created or null if this is group directly\n * underneath the root.\n * @return the unresolved <code>ContactGroup</code> created from the specified <code>uid</code> and\n * <code>persistentData</code>\n */\n ContactGroup createUnresolvedContactGroup(String groupUID, String persistentData, ContactGroup parentGroup);\n\n /**\n * Sets the display name for <code>contact</code> to be <code>newName</code>.\n *\n *\n * @param contact the <code>Contact</code> that we are renaming\n * @param newName a <code>String</code> containing the new display name for <code>metaContact</code>.\n * @throws IllegalArgumentException if <code>contact</code> is not an instance that belongs\n * to the underlying implementation.\n */\n void setDisplayName(Contact contact, String newName)\n throws IllegalArgumentException;\n\n}", "private void setUpLocalServices() {\n tearDownLocalServices();\n\n // UriGrantsManagerInternal\n final UriGrantsManagerInternal ugmi = mock(UriGrantsManagerInternal.class);\n LocalServices.addService(UriGrantsManagerInternal.class, ugmi);\n\n // AppOpsManager\n final AppOpsManager aom = mock(AppOpsManager.class);\n doReturn(aom).when(mContext).getSystemService(eq(Context.APP_OPS_SERVICE));\n\n // DeviceStateManager\n final DeviceStateManager dsm = mock(DeviceStateManager.class);\n doReturn(dsm).when(mContext).getSystemService(eq(Context.DEVICE_STATE_SERVICE));\n\n // Prevent \"WakeLock finalized while still held: SCREEN_FROZEN\".\n final PowerManager pm = mock(PowerManager.class);\n doReturn(pm).when(mContext).getSystemService(eq(Context.POWER_SERVICE));\n mStubbedWakeLock = createStubbedWakeLock(false /* needVerification */);\n doReturn(mStubbedWakeLock).when(pm).newWakeLock(anyInt(), anyString());\n doReturn(mStubbedWakeLock).when(pm).newWakeLock(anyInt(), anyString(), anyInt());\n\n // DisplayManagerInternal\n final DisplayManagerInternal dmi = mock(DisplayManagerInternal.class);\n doReturn(dmi).when(() -> LocalServices.getService(eq(DisplayManagerInternal.class)));\n\n // ColorDisplayServiceInternal\n final ColorDisplayService.ColorDisplayServiceInternal cds =\n mock(ColorDisplayService.ColorDisplayServiceInternal.class);\n doReturn(cds).when(() -> LocalServices.getService(\n eq(ColorDisplayService.ColorDisplayServiceInternal.class)));\n\n final UsageStatsManagerInternal usmi = mock(UsageStatsManagerInternal.class);\n LocalServices.addService(UsageStatsManagerInternal.class, usmi);\n\n // PackageManagerInternal\n final PackageManagerInternal packageManagerInternal = mock(PackageManagerInternal.class);\n LocalServices.addService(PackageManagerInternal.class, packageManagerInternal);\n doReturn(false).when(packageManagerInternal).isPermissionsReviewRequired(\n anyString(), anyInt());\n doReturn(null).when(packageManagerInternal).getDefaultHomeActivity(anyInt());\n\n ComponentName systemServiceComponent = new ComponentName(\"android.test.system.service\", \"\");\n doReturn(systemServiceComponent).when(packageManagerInternal).getSystemUiServiceComponent();\n\n // PowerManagerInternal\n final PowerManagerInternal pmi = mock(PowerManagerInternal.class);\n final PowerSaveState state = new PowerSaveState.Builder().build();\n doReturn(state).when(pmi).getLowPowerState(anyInt());\n doReturn(pmi).when(() -> LocalServices.getService(eq(PowerManagerInternal.class)));\n\n // PermissionPolicyInternal\n final PermissionPolicyInternal ppi = mock(PermissionPolicyInternal.class);\n LocalServices.addService(PermissionPolicyInternal.class, ppi);\n doReturn(true).when(ppi).checkStartActivity(any(), anyInt(), any());\n\n // InputManagerService\n mImService = mock(InputManagerService.class);\n // InputChannel cannot be mocked because it may pass to InputEventReceiver.\n final InputChannel[] inputChannels = InputChannel.openInputChannelPair(TAG);\n inputChannels[0].dispose();\n mInputChannel = inputChannels[1];\n doReturn(mInputChannel).when(mImService).monitorInput(anyString(), anyInt());\n doReturn(mInputChannel).when(mImService).createInputChannel(anyString());\n\n // StatusBarManagerInternal\n final StatusBarManagerInternal sbmi = mock(StatusBarManagerInternal.class);\n doReturn(sbmi).when(() -> LocalServices.getService(eq(StatusBarManagerInternal.class)));\n }", "@Test\n public void testHandleMessages() throws Exception {\n Controller controller = getController();\n controller.removeOFMessageListeners(OFType.PACKET_IN);\n \n IOFSwitch sw = createMock(IOFSwitch.class);\n expect(sw.getStringId()).andReturn(\"00:00:00:00:00:00:00\").anyTimes();\n expect(sw.getFeaturesReply()).andReturn(new OFFeaturesReply()).anyTimes();\n \n // Build our test packet\n IPacket testPacket = new Ethernet()\n .setSourceMACAddress(\"00:44:33:22:11:00\")\n .setDestinationMACAddress(\"00:11:22:33:44:55\")\n .setEtherType(Ethernet.TYPE_ARP)\n .setPayload(\n new ARP()\n .setHardwareType(ARP.HW_TYPE_ETHERNET)\n .setProtocolType(ARP.PROTO_TYPE_IP)\n .setHardwareAddressLength((byte) 6)\n .setProtocolAddressLength((byte) 4)\n .setOpCode(ARP.OP_REPLY)\n .setSenderHardwareAddress(Ethernet.toMACAddress(\"00:44:33:22:11:00\"))\n .setSenderProtocolAddress(IPv4.toIPv4AddressBytes(\"192.168.1.1\"))\n .setTargetHardwareAddress(Ethernet.toMACAddress(\"00:11:22:33:44:55\"))\n .setTargetProtocolAddress(IPv4.toIPv4AddressBytes(\"192.168.1.2\")));\n byte[] testPacketSerialized = testPacket.serialize();\n \n // Build the PacketIn \n OFPacketIn pi = ((OFPacketIn) new BasicFactory().getMessage(OFType.PACKET_IN))\n .setBufferId(-1)\n .setInPort((short) 1)\n .setPacketData(testPacketSerialized)\n .setReason(OFPacketInReason.NO_MATCH)\n .setTotalLength((short) testPacketSerialized.length);\n \n IOFMessageListener test1 = createMock(IOFMessageListener.class);\n expect(test1.getName()).andReturn(\"test1\").anyTimes();\n expect(test1.isCallbackOrderingPrereq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test1.isCallbackOrderingPostreq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test1.receive(eq(sw), eq(pi), isA(FloodlightContext.class))).andThrow(new RuntimeException(\"This is NOT an error! We are testing exception catching.\"));\n IOFMessageListener test2 = createMock(IOFMessageListener.class);\n expect(test2.getName()).andReturn(\"test2\").anyTimes();\n expect(test2.isCallbackOrderingPrereq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test2.isCallbackOrderingPostreq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n // expect no calls to test2.receive() since test1.receive() threw an exception\n \n replay(test1, test2, sw);\n controller.addOFMessageListener(OFType.PACKET_IN, test1);\n controller.addOFMessageListener(OFType.PACKET_IN, test2);\n try {\n controller.handleMessage(sw, pi, null);\n } catch (RuntimeException e) {\n assertEquals(e.getMessage().startsWith(\"This is NOT an error!\"), true);\n }\n verify(test1, test2, sw);\n \n // verify STOP works\n reset(test1, test2, sw);\n expect(test1.receive(eq(sw), eq(pi), isA(FloodlightContext.class))).andReturn(Command.STOP); \n expect(test1.getId()).andReturn(0).anyTimes();\n expect(sw.getStringId()).andReturn(\"00:00:00:00:00:00:00\").anyTimes();\n expect(sw.getFeaturesReply()).andReturn(new OFFeaturesReply()).anyTimes();\n replay(test1, test2, sw);\n controller.handleMessage(sw, pi, null);\n verify(test1, test2, sw);\n }", "public void testClusterJoinDespiteOfPublishingIssues() throws Exception {\n String clusterManagerNode = internalCluster().startClusterManagerOnlyNode();\n String nonClusterManagerNode = internalCluster().startDataOnlyNode();\n\n DiscoveryNodes discoveryNodes = internalCluster().getInstance(ClusterService.class, nonClusterManagerNode).state().nodes();\n\n TransportService clusterManagerTranspotService = internalCluster().getInstance(\n TransportService.class,\n discoveryNodes.getClusterManagerNode().getName()\n );\n\n logger.info(\"blocking requests from non cluster-manager [{}] to cluster-manager [{}]\", nonClusterManagerNode, clusterManagerNode);\n MockTransportService nonClusterManagerTransportService = (MockTransportService) internalCluster().getInstance(\n TransportService.class,\n nonClusterManagerNode\n );\n nonClusterManagerTransportService.addFailToSendNoConnectRule(clusterManagerTranspotService);\n\n assertNoClusterManager(nonClusterManagerNode);\n\n logger.info(\n \"blocking cluster state publishing from cluster-manager [{}] to non cluster-manager [{}]\",\n clusterManagerNode,\n nonClusterManagerNode\n );\n MockTransportService clusterManagerTransportService = (MockTransportService) internalCluster().getInstance(\n TransportService.class,\n clusterManagerNode\n );\n TransportService localTransportService = internalCluster().getInstance(\n TransportService.class,\n discoveryNodes.getLocalNode().getName()\n );\n if (randomBoolean()) {\n clusterManagerTransportService.addFailToSendNoConnectRule(\n localTransportService,\n PublicationTransportHandler.PUBLISH_STATE_ACTION_NAME\n );\n } else {\n clusterManagerTransportService.addFailToSendNoConnectRule(\n localTransportService,\n PublicationTransportHandler.COMMIT_STATE_ACTION_NAME\n );\n }\n\n logger.info(\n \"allowing requests from non cluster-manager [{}] to cluster-manager [{}], waiting for two join request\",\n nonClusterManagerNode,\n clusterManagerNode\n );\n final CountDownLatch countDownLatch = new CountDownLatch(2);\n nonClusterManagerTransportService.addSendBehavior(\n clusterManagerTransportService,\n (connection, requestId, action, request, options) -> {\n if (action.equals(JoinHelper.JOIN_ACTION_NAME)) {\n countDownLatch.countDown();\n }\n connection.sendRequest(requestId, action, request, options);\n }\n );\n\n nonClusterManagerTransportService.addConnectBehavior(clusterManagerTransportService, Transport::openConnection);\n\n countDownLatch.await();\n\n logger.info(\"waiting for cluster to reform\");\n clusterManagerTransportService.clearOutboundRules(localTransportService);\n nonClusterManagerTransportService.clearOutboundRules(localTransportService);\n\n ensureStableCluster(2);\n\n // shutting down the nodes, to avoid the leakage check tripping\n // on the states associated with the commit requests we may have dropped\n internalCluster().stopRandomNonClusterManagerNode();\n }", "@Test\n\tpublic void test() \n\t{\n\t\t\n\t\tfor(int i =0; i< 100; i++)\n\t\t{\n\t\t\tConnection uno = new RMIConnection(true);\n\t\t\tuno.setActive();\n\t\tConnection due = new RMIConnection(true);\n\t\t\tdue.setActive();\n\t\t\n\t\tMap<Integer, Connection> wRoom = new HashMap<>();\n\t\twRoom.put(0, uno);\n\t\twRoom.put(1, due);\n\t\t\n\t\tWaitingRoom.setConnection(wRoom);\n\t\t\n\t\t\n\t\tList<Integer> players = new ArrayList<>();\n\t\tplayers.add(0);\n\t\tplayers.add(1);\n\t\tModel m = new Model(players);\n\t\t\t\n\t\t\tBusinessCard first = m.getMap().getRegionByType(RegionType.PLAIN).getFirstcard();\n\t\t\tBusinessCard second = m.getMap().getRegionByType(RegionType.PLAIN).getSecondcard();\n\t\t\t\n\t\t\tGameController g = new GameController(m);\n\t\t\tRedrawBusinessCardMessage message = new RedrawBusinessCardMessage(RegionType.PLAIN);\n\t\t\n\t\t\tmessage.setId(0);\n\t\t\n\t\t\tg.update(null, message);\n\t\t\n\t\t\tBusinessCard firstNew = m.getMap().getRegionByType(RegionType.PLAIN).getFirstcard();\n\t\t\tBusinessCard secondNew = m.getMap().getRegionByType(RegionType.PLAIN).getSecondcard();\n\n\t\t\tassertTrue(\"prima \" + first.getId() + \" - seconda \" + firstNew.getId(), first.getId() != firstNew.getId());\n\t\t\tassertTrue(\"prima \" + second.getId() + \" - seconda \" + secondNew.getId(), second.getId() != secondNew.getId());\n\t\t}\n\t}", "@Before\n public void setup() {\n monitor = new ControlPlaneMonitor();\n\n mockCommunicationService = new ClusterCommunicationServiceAdapter();\n monitor.communicationService = mockCommunicationService;\n\n nodeId = new NodeId(\"1\");\n mockControllerNode = new MockControllerNode(nodeId);\n mockClusterService = createMock(ClusterService.class);\n monitor.clusterService = mockClusterService;\n\n expect(mockClusterService.getNode(anyObject()))\n .andReturn(mockControllerNode).anyTimes();\n expect(mockClusterService.getLocalNode())\n .andReturn(mockControllerNode).anyTimes();\n replay(mockClusterService);\n\n monitor.activate();\n }", "private String checkForUnitAssociation() {\r\n\t\t\r\n\t\tStringBuilder buffer=new StringBuilder();\r\n\t\tString associated=\"\";\r\n\t\tfor(UIUnitType model:uiUnitType.getUnitValueList()){\r\n\t\t\tif(model.isSelected()){\r\n\t\t\tList<Long> association=wsrdAdminService.getUnitAssociation(model.getUnitIdWsrd());\r\n\t\t\tif(ObjectUtil.isListNotEmpty(association)){\r\n\t\t\tbuffer.append(\"Selected item is linked with with attribute.\");\t\t\t\r\n\t\t\t associated=buffer.toString();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn associated;\r\n\t}", "@Test\n public void test_createLocalGame(){\n CheckersMainActivity checkersActivity = new CheckersMainActivity();\n CheckersLocalGame localGame =\n (CheckersLocalGame) checkersActivity.createLocalGame(new CheckersGameState());\n assertNotNull(\"GameState was null\", localGame.getGameState());\n }", "private Collection<SubscriberAuxiliaryService> getAssociationsToBeProvisioned(final Context ctx,\r\n final Date runningDate)\r\n {\r\n Collection<SubscriberAuxiliaryService> result = null;\r\n try\r\n {\r\n final And predicate = new And();\r\n predicate.add(new LTE(SubscriberAuxiliaryServiceXInfo.START_DATE, CalendarSupportHelper.get(ctx).getEndOfDay(runningDate)));\r\n predicate.add(new GT(SubscriberAuxiliaryServiceXInfo.END_DATE, CalendarSupportHelper.get(ctx).getEndOfDay(runningDate)));\r\n predicate.add(new EQ(SubscriberAuxiliaryServiceXInfo.PROVISIONED, Boolean.FALSE));\r\n \r\n result = HomeSupportHelper.get(ctx).getBeans(ctx, SubscriberAuxiliaryService.class, predicate);\r\n }\r\n catch (final Throwable t)\r\n {\r\n new MajorLogMsg(this, \"Failed to look-up AuxiliaryService associations for startDate= \" + runningDate, t)\r\n .log(ctx);\r\n }\r\n return result;\r\n }", "@Test\n public void testDeployCommandInOpponentCountry() {\n d_gameData.getD_playerList().get(0).setD_noOfArmies(10);\n d_orderProcessor.processOrder(\"deploy nepal 6\", d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(false, l_order.executeOrder());\n }", "@Test\r\n public void testContains() {\r\n System.out.println(\"contains\");\r\n ModeloListaOrganizadores instance = new ModeloListaOrganizadores(e.getListaOrganizadores());\r\n Organizador o =new Organizador(new Utilizador(\"teste\", \"teste@isep.ipp.pt\", \"teste\", \"teste\", true, 5));\r\n instance.addElement(o);\r\n boolean expResult = true;\r\n boolean result = instance.contains(o);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n public void testAreUiccApplicationsEnabled_nullRadioProxy() throws Exception {\n doReturn(null).when(mRILUnderTest).getRadioProxy(any());\n Message message = obtainMessage();\n mRILUnderTest.areUiccApplicationsEnabled(message);\n processAllMessages();\n verify(mRadioProxy, never()).areUiccApplicationsEnabled(mSerialNumberCaptor.capture());\n // Sending message is handled by getRadioProxy when proxy is null.\n // areUiccApplicationsEnabled shouldn't explicitly send another callback.\n assertEquals(null, message.obj);\n }", "@Test\n\tpublic void notifiesOnSendChatToServer() throws AlreadyBoundException, NotBoundException\n\t{\n\t\tClientPlayerManager.getSingleton().initiateLogin(\"X\", \"X\");\n\t\tClientPlayer p = ClientPlayerManager.getSingleton().finishLogin(1);\n\t\tp.setPosition(new Position(5,5));\n\t\tp.setName(\"my name\");\n\t\t\n\t\tQualifiedObserver obs = EasyMock.createMock(QualifiedObserver.class);\n\t\tChatSentReport report = new ChatSentReport(\"message\", \"my name\", p.getPosition(), ChatType.Local);\n\t\tQualifiedObservableConnector.getSingleton().registerObserver(obs,\n\t\t\t\tChatSentReport.class);\n\t\tobs.receiveReport(EasyMock.eq(report));\n\t\tEasyMock.replay(obs);\n\n\t\tChatManager.getSingleton().sendChatToServer(\"message\", ChatType.Local);\n\n\t\tEasyMock.verify(obs);\n\t}", "@Test\n public void testLocalCircuitId() throws Exception {\n isisNeighbor.setLocalCircuitId((byte) 1);\n result4 = isisNeighbor.localCircuitId();\n assertThat(result4, is((byte) 1));\n }" ]
[ "0.5631442", "0.5383922", "0.51834095", "0.5028487", "0.49877128", "0.4863204", "0.47861302", "0.47751725", "0.4756788", "0.4735105", "0.46635994", "0.46455985", "0.46388358", "0.4560148", "0.4519115", "0.451557", "0.45143813", "0.4439799", "0.44379357", "0.44008645", "0.43808764", "0.43552285", "0.43504348", "0.43295208", "0.43253562", "0.4322459", "0.43078244", "0.4300811", "0.42954364", "0.42838773", "0.427757", "0.42737052", "0.4273563", "0.426886", "0.42680928", "0.42616642", "0.42604133", "0.42572367", "0.42458627", "0.42273346", "0.42264032", "0.42228237", "0.42221263", "0.42187917", "0.42178762", "0.4205143", "0.4204392", "0.42022625", "0.4199409", "0.41962555", "0.41942945", "0.4185665", "0.4179956", "0.41599128", "0.41592097", "0.4155986", "0.41552252", "0.4153908", "0.41514972", "0.4145718", "0.4145287", "0.41435534", "0.4143032", "0.41387442", "0.41342655", "0.41335145", "0.41327634", "0.4132347", "0.41258824", "0.41240123", "0.41199753", "0.411992", "0.41184387", "0.41178983", "0.41166568", "0.4109504", "0.4104345", "0.4102464", "0.40980893", "0.4096069", "0.40939766", "0.40865254", "0.40830255", "0.40817517", "0.40813276", "0.40799916", "0.40757406", "0.40733767", "0.40611345", "0.40606678", "0.40591124", "0.40572643", "0.40550593", "0.40521473", "0.40503842", "0.40499598", "0.40486422", "0.40450138", "0.40424255", "0.404233" ]
0.7546626
0
/ JADX WARN: Incorrect args count in method signature: (Lcom/google/gson/JsonSerializer;LX/hn;LX/hr;LX/h6;LX/hg;)V
public LE(AbstractC0242hn hnVar, C0246hr hrVar, h6 h6Var, AbstractC0237hg hgVar) { this.A02 = hnVar; this.A01 = hrVar; this.A05 = h6Var; this.A03 = hgVar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static org.json.JSONObject m5902a(org.json.JSONObject r1, java.lang.String r2, org.json.JSONObject r3) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = r1.has(r2);\t Catch:{ JSONException -> 0x0013 }\n if (r0 == 0) goto L_0x0011;\t Catch:{ JSONException -> 0x0013 }\n L_0x0006:\n r0 = r1.isNull(r2);\t Catch:{ JSONException -> 0x0013 }\n if (r0 != 0) goto L_0x0011;\t Catch:{ JSONException -> 0x0013 }\n L_0x000c:\n r1 = r1.getJSONObject(r2);\t Catch:{ JSONException -> 0x0013 }\n goto L_0x0012;\n L_0x0011:\n r1 = 0;\n L_0x0012:\n return r1;\n L_0x0013:\n return r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.i.a(org.json.JSONObject, java.lang.String, org.json.JSONObject):org.json.JSONObject\");\n }", "public static org.json.JSONArray m5901a(org.json.JSONObject r1, java.lang.String r2, org.json.JSONArray r3) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = r1.has(r2);\t Catch:{ JSONException -> 0x0013 }\n if (r0 == 0) goto L_0x0011;\t Catch:{ JSONException -> 0x0013 }\n L_0x0006:\n r0 = r1.isNull(r2);\t Catch:{ JSONException -> 0x0013 }\n if (r0 != 0) goto L_0x0011;\t Catch:{ JSONException -> 0x0013 }\n L_0x000c:\n r1 = r1.getJSONArray(r2);\t Catch:{ JSONException -> 0x0013 }\n goto L_0x0012;\n L_0x0011:\n r1 = 0;\n L_0x0012:\n return r1;\n L_0x0013:\n return r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.i.a(org.json.JSONObject, java.lang.String, org.json.JSONArray):org.json.JSONArray\");\n }", "private final void zaa(java.lang.StringBuilder r10, java.util.Map<java.lang.String, com.google.android.gms.common.server.response.FastJsonResponse.Field<?, ?>> r11, android.os.Parcel r12) {\n /*\n r9 = this;\n android.util.SparseArray r0 = new android.util.SparseArray\n r0.<init>()\n java.util.Set r11 = r11.entrySet()\n java.util.Iterator r11 = r11.iterator()\n L_0x000d:\n boolean r1 = r11.hasNext()\n if (r1 == 0) goto L_0x0027\n java.lang.Object r1 = r11.next()\n java.util.Map$Entry r1 = (java.util.Map.Entry) r1\n java.lang.Object r2 = r1.getValue()\n com.google.android.gms.common.server.response.FastJsonResponse$Field r2 = (com.google.android.gms.common.server.response.FastJsonResponse.Field) r2\n int r2 = r2.getSafeParcelableFieldId()\n r0.put(r2, r1)\n goto L_0x000d\n L_0x0027:\n r11 = 123(0x7b, float:1.72E-43)\n r10.append(r11)\n int r11 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(r12)\n r1 = 1\n r2 = 0\n r3 = 0\n L_0x0033:\n int r4 = r12.dataPosition()\n if (r4 >= r11) goto L_0x0262\n int r4 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(r12)\n int r5 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(r4)\n java.lang.Object r5 = r0.get(r5)\n java.util.Map$Entry r5 = (java.util.Map.Entry) r5\n if (r5 == 0) goto L_0x0033\n if (r3 == 0) goto L_0x0050\n java.lang.String r3 = \",\"\n r10.append(r3)\n L_0x0050:\n java.lang.Object r3 = r5.getKey()\n java.lang.String r3 = (java.lang.String) r3\n java.lang.Object r5 = r5.getValue()\n com.google.android.gms.common.server.response.FastJsonResponse$Field r5 = (com.google.android.gms.common.server.response.FastJsonResponse.Field) r5\n java.lang.String r6 = \"\\\"\"\n r10.append(r6)\n r10.append(r3)\n java.lang.String r3 = \"\\\":\"\n r10.append(r3)\n boolean r3 = r5.zacn()\n if (r3 == 0) goto L_0x010a\n int r3 = r5.zapt\n switch(r3) {\n case 0: goto L_0x00f9;\n case 1: goto L_0x00f4;\n case 2: goto L_0x00eb;\n case 3: goto L_0x00e2;\n case 4: goto L_0x00d9;\n case 5: goto L_0x00d4;\n case 6: goto L_0x00cb;\n case 7: goto L_0x00c6;\n case 8: goto L_0x00c1;\n case 9: goto L_0x00c1;\n case 10: goto L_0x0097;\n case 11: goto L_0x008f;\n default: goto L_0x0074;\n }\n L_0x0074:\n java.lang.IllegalArgumentException r10 = new java.lang.IllegalArgumentException\n int r11 = r5.zapt\n r12 = 36\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n r0.<init>(r12)\n java.lang.String r12 = \"Unknown field out type = \"\n r0.append(r12)\n r0.append(r11)\n java.lang.String r11 = r0.toString()\n r10.<init>(r11)\n throw r10\n L_0x008f:\n java.lang.IllegalArgumentException r10 = new java.lang.IllegalArgumentException\n java.lang.String r11 = \"Method does not accept concrete type.\"\n r10.<init>(r11)\n throw r10\n L_0x0097:\n android.os.Bundle r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBundle(r12, r4)\n java.util.HashMap r4 = new java.util.HashMap\n r4.<init>()\n java.util.Set r6 = r3.keySet()\n java.util.Iterator r6 = r6.iterator()\n L_0x00a8:\n boolean r7 = r6.hasNext()\n if (r7 == 0) goto L_0x00bc\n java.lang.Object r7 = r6.next()\n java.lang.String r7 = (java.lang.String) r7\n java.lang.String r8 = r3.getString(r7)\n r4.put(r7, r8)\n goto L_0x00a8\n L_0x00bc:\n java.lang.Object r3 = zab(r5, (java.lang.Object) r4)\n goto L_0x0105\n L_0x00c1:\n byte[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createByteArray(r12, r4)\n goto L_0x0101\n L_0x00c6:\n java.lang.String r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createString(r12, r4)\n goto L_0x0101\n L_0x00cb:\n boolean r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readBoolean(r12, r4)\n java.lang.Boolean r3 = java.lang.Boolean.valueOf(r3)\n goto L_0x0101\n L_0x00d4:\n java.math.BigDecimal r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBigDecimal(r12, r4)\n goto L_0x0101\n L_0x00d9:\n double r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readDouble(r12, r4)\n java.lang.Double r3 = java.lang.Double.valueOf(r3)\n goto L_0x0101\n L_0x00e2:\n float r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readFloat(r12, r4)\n java.lang.Float r3 = java.lang.Float.valueOf(r3)\n goto L_0x0101\n L_0x00eb:\n long r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readLong(r12, r4)\n java.lang.Long r3 = java.lang.Long.valueOf(r3)\n goto L_0x0101\n L_0x00f4:\n java.math.BigInteger r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBigInteger(r12, r4)\n goto L_0x0101\n L_0x00f9:\n int r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r12, r4)\n java.lang.Integer r3 = java.lang.Integer.valueOf(r3)\n L_0x0101:\n java.lang.Object r3 = zab(r5, (java.lang.Object) r3)\n L_0x0105:\n r9.zab((java.lang.StringBuilder) r10, (com.google.android.gms.common.server.response.FastJsonResponse.Field<?, ?>) r5, (java.lang.Object) r3)\n goto L_0x025f\n L_0x010a:\n boolean r3 = r5.zapu\n if (r3 == 0) goto L_0x0188\n java.lang.String r3 = \"[\"\n r10.append(r3)\n int r3 = r5.zapt\n switch(r3) {\n case 0: goto L_0x017d;\n case 1: goto L_0x0175;\n case 2: goto L_0x016d;\n case 3: goto L_0x0165;\n case 4: goto L_0x015d;\n case 5: goto L_0x0158;\n case 6: goto L_0x0150;\n case 7: goto L_0x0148;\n case 8: goto L_0x0140;\n case 9: goto L_0x0140;\n case 10: goto L_0x0140;\n case 11: goto L_0x0120;\n default: goto L_0x0118;\n }\n L_0x0118:\n java.lang.IllegalStateException r10 = new java.lang.IllegalStateException\n java.lang.String r11 = \"Unknown field type out.\"\n r10.<init>(r11)\n throw r10\n L_0x0120:\n android.os.Parcel[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelArray(r12, r4)\n int r4 = r3.length\n r6 = 0\n L_0x0126:\n if (r6 >= r4) goto L_0x0184\n if (r6 <= 0) goto L_0x012f\n java.lang.String r7 = \",\"\n r10.append(r7)\n L_0x012f:\n r7 = r3[r6]\n r7.setDataPosition(r2)\n java.util.Map r7 = r5.zacq()\n r8 = r3[r6]\n r9.zaa((java.lang.StringBuilder) r10, (java.util.Map<java.lang.String, com.google.android.gms.common.server.response.FastJsonResponse.Field<?, ?>>) r7, (android.os.Parcel) r8)\n int r6 = r6 + 1\n goto L_0x0126\n L_0x0140:\n java.lang.UnsupportedOperationException r10 = new java.lang.UnsupportedOperationException\n java.lang.String r11 = \"List of type BASE64, BASE64_URL_SAFE, or STRING_MAP is not supported\"\n r10.<init>(r11)\n throw r10\n L_0x0148:\n java.lang.String[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createStringArray(r12, r4)\n com.google.android.gms.common.util.ArrayUtils.writeStringArray(r10, r3)\n goto L_0x0184\n L_0x0150:\n boolean[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBooleanArray(r12, r4)\n com.google.android.gms.common.util.ArrayUtils.writeArray((java.lang.StringBuilder) r10, (boolean[]) r3)\n goto L_0x0184\n L_0x0158:\n java.math.BigDecimal[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBigDecimalArray(r12, r4)\n goto L_0x0179\n L_0x015d:\n double[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createDoubleArray(r12, r4)\n com.google.android.gms.common.util.ArrayUtils.writeArray((java.lang.StringBuilder) r10, (double[]) r3)\n goto L_0x0184\n L_0x0165:\n float[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createFloatArray(r12, r4)\n com.google.android.gms.common.util.ArrayUtils.writeArray((java.lang.StringBuilder) r10, (float[]) r3)\n goto L_0x0184\n L_0x016d:\n long[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createLongArray(r12, r4)\n com.google.android.gms.common.util.ArrayUtils.writeArray((java.lang.StringBuilder) r10, (long[]) r3)\n goto L_0x0184\n L_0x0175:\n java.math.BigInteger[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBigIntegerArray(r12, r4)\n L_0x0179:\n com.google.android.gms.common.util.ArrayUtils.writeArray((java.lang.StringBuilder) r10, (T[]) r3)\n goto L_0x0184\n L_0x017d:\n int[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createIntArray(r12, r4)\n com.google.android.gms.common.util.ArrayUtils.writeArray((java.lang.StringBuilder) r10, (int[]) r3)\n L_0x0184:\n java.lang.String r3 = \"]\"\n goto L_0x0227\n L_0x0188:\n int r3 = r5.zapt\n switch(r3) {\n case 0: goto L_0x0258;\n case 1: goto L_0x0250;\n case 2: goto L_0x0248;\n case 3: goto L_0x0240;\n case 4: goto L_0x0238;\n case 5: goto L_0x0233;\n case 6: goto L_0x022b;\n case 7: goto L_0x0215;\n case 8: goto L_0x0207;\n case 9: goto L_0x01f9;\n case 10: goto L_0x01a5;\n case 11: goto L_0x0195;\n default: goto L_0x018d;\n }\n L_0x018d:\n java.lang.IllegalStateException r10 = new java.lang.IllegalStateException\n java.lang.String r11 = \"Unknown field type out\"\n r10.<init>(r11)\n throw r10\n L_0x0195:\n android.os.Parcel r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcel(r12, r4)\n r3.setDataPosition(r2)\n java.util.Map r4 = r5.zacq()\n r9.zaa((java.lang.StringBuilder) r10, (java.util.Map<java.lang.String, com.google.android.gms.common.server.response.FastJsonResponse.Field<?, ?>>) r4, (android.os.Parcel) r3)\n goto L_0x025f\n L_0x01a5:\n android.os.Bundle r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBundle(r12, r4)\n java.util.Set r4 = r3.keySet()\n r4.size()\n java.lang.String r5 = \"{\"\n r10.append(r5)\n java.util.Iterator r4 = r4.iterator()\n r5 = 1\n L_0x01ba:\n boolean r6 = r4.hasNext()\n if (r6 == 0) goto L_0x01f6\n java.lang.Object r6 = r4.next()\n java.lang.String r6 = (java.lang.String) r6\n if (r5 != 0) goto L_0x01cd\n java.lang.String r5 = \",\"\n r10.append(r5)\n L_0x01cd:\n java.lang.String r5 = \"\\\"\"\n r10.append(r5)\n r10.append(r6)\n java.lang.String r5 = \"\\\"\"\n r10.append(r5)\n java.lang.String r5 = \":\"\n r10.append(r5)\n java.lang.String r5 = \"\\\"\"\n r10.append(r5)\n java.lang.String r5 = r3.getString(r6)\n java.lang.String r5 = com.google.android.gms.common.util.JsonUtils.escapeString(r5)\n r10.append(r5)\n java.lang.String r5 = \"\\\"\"\n r10.append(r5)\n r5 = 0\n goto L_0x01ba\n L_0x01f6:\n java.lang.String r3 = \"}\"\n goto L_0x0227\n L_0x01f9:\n byte[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createByteArray(r12, r4)\n java.lang.String r4 = \"\\\"\"\n r10.append(r4)\n java.lang.String r3 = com.google.android.gms.common.util.Base64Utils.encodeUrlSafe(r3)\n goto L_0x0222\n L_0x0207:\n byte[] r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createByteArray(r12, r4)\n java.lang.String r4 = \"\\\"\"\n r10.append(r4)\n java.lang.String r3 = com.google.android.gms.common.util.Base64Utils.encode(r3)\n goto L_0x0222\n L_0x0215:\n java.lang.String r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createString(r12, r4)\n java.lang.String r4 = \"\\\"\"\n r10.append(r4)\n java.lang.String r3 = com.google.android.gms.common.util.JsonUtils.escapeString(r3)\n L_0x0222:\n r10.append(r3)\n java.lang.String r3 = \"\\\"\"\n L_0x0227:\n r10.append(r3)\n goto L_0x025f\n L_0x022b:\n boolean r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readBoolean(r12, r4)\n r10.append(r3)\n goto L_0x025f\n L_0x0233:\n java.math.BigDecimal r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBigDecimal(r12, r4)\n goto L_0x0254\n L_0x0238:\n double r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readDouble(r12, r4)\n r10.append(r3)\n goto L_0x025f\n L_0x0240:\n float r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readFloat(r12, r4)\n r10.append(r3)\n goto L_0x025f\n L_0x0248:\n long r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readLong(r12, r4)\n r10.append(r3)\n goto L_0x025f\n L_0x0250:\n java.math.BigInteger r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createBigInteger(r12, r4)\n L_0x0254:\n r10.append(r3)\n goto L_0x025f\n L_0x0258:\n int r3 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r12, r4)\n r10.append(r3)\n L_0x025f:\n r3 = 1\n goto L_0x0033\n L_0x0262:\n int r0 = r12.dataPosition()\n if (r0 != r11) goto L_0x026e\n r11 = 125(0x7d, float:1.75E-43)\n r10.append(r11)\n return\n L_0x026e:\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader$ParseException r10 = new com.google.android.gms.common.internal.safeparcel.SafeParcelReader$ParseException\n r0 = 37\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>(r0)\n java.lang.String r0 = \"Overread allowed size end=\"\n r1.append(r0)\n r1.append(r11)\n java.lang.String r11 = r1.toString()\n r10.<init>(r11, r12)\n throw r10\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.server.response.SafeParcelResponse.zaa(java.lang.StringBuilder, java.util.Map, android.os.Parcel):void\");\n }", "void mo28373a(JSONObject jSONObject);", "public void mo15090a(JSONObject jSONObject) {\n }", "private java.lang.String b(java.lang.String r7, java.lang.String r8) {\n /*\n r6 = this;\n r0 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x0041 }\n r0.<init>(r8);\t Catch:{ JSONException -> 0x0041 }\n r8 = \"tParams\";\n r8 = com.timespointssdk.g.b(r8);\t Catch:{ JSONException -> 0x0041 }\n r1 = \",\";\n r8 = r8.split(r1);\t Catch:{ JSONException -> 0x0041 }\n r1 = r8.length;\t Catch:{ JSONException -> 0x0041 }\n r2 = 0;\n L_0x0013:\n if (r2 >= r1) goto L_0x0045;\n L_0x0015:\n r3 = r8[r2];\t Catch:{ JSONException -> 0x0041 }\n r4 = new java.lang.StringBuilder;\t Catch:{ JSONException -> 0x0041 }\n r4.<init>();\t Catch:{ JSONException -> 0x0041 }\n r5 = \"$\";\n r4.append(r5);\t Catch:{ JSONException -> 0x0041 }\n r4.append(r3);\t Catch:{ JSONException -> 0x0041 }\n r5 = \"$\";\n r4.append(r5);\t Catch:{ JSONException -> 0x0041 }\n r4 = r4.toString();\t Catch:{ JSONException -> 0x0041 }\n r3 = r0.getString(r3);\t Catch:{ JSONException -> 0x0037 }\n r3 = r7.replace(r4, r3);\t Catch:{ JSONException -> 0x0037 }\n L_0x0035:\n r7 = r3;\n goto L_0x003e;\n L_0x0037:\n r3 = \"\";\n r3 = r7.replace(r4, r3);\t Catch:{ JSONException -> 0x0041 }\n goto L_0x0035;\n L_0x003e:\n r2 = r2 + 1;\n goto L_0x0013;\n L_0x0041:\n r8 = move-exception;\n com.google.devtools.build.android.desugar.runtime.ThrowableExtension.printStackTrace(r8);\n L_0x0045:\n r8 = r6.a;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"Final rawHtmlString ====>\";\n r0.append(r1);\n r0.append(r7);\n r0 = r0.toString();\n android.util.Log.e(r8, r0);\n return r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.timespointssdk.TPView.b(java.lang.String, java.lang.String):java.lang.String\");\n }", "@Override // com.google.gson.JsonDeserializer\n @org.jetbrains.annotations.Nullable\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public com.avito.android.remote.model.SearchRadius deserialize(@org.jetbrains.annotations.NotNull com.google.gson.JsonElement r10, @org.jetbrains.annotations.NotNull java.lang.reflect.Type r11, @org.jetbrains.annotations.NotNull com.google.gson.JsonDeserializationContext r12) {\n /*\n r9 = this;\n java.lang.String r1 = \"json\"\n java.lang.String r3 = \"typeOfT\"\n java.lang.String r5 = \"context\"\n r0 = r10\n r2 = r11\n r4 = r12\n com.google.gson.JsonObject r10 = a2.b.a.a.a.I1(r0, r1, r2, r3, r4, r5)\n java.lang.String r11 = \"id\"\n com.google.gson.JsonElement r11 = r10.get(r11)\n r0 = 0\n if (r11 == 0) goto L_0x001c\n java.lang.String r11 = r11.getAsString()\n r2 = r11\n goto L_0x001d\n L_0x001c:\n r2 = r0\n L_0x001d:\n java.lang.String r11 = \"title\"\n com.google.gson.JsonElement r11 = r10.get(r11)\n if (r11 == 0) goto L_0x002b\n java.lang.String r11 = r11.getAsString()\n r3 = r11\n goto L_0x002c\n L_0x002b:\n r3 = r0\n L_0x002c:\n java.lang.String r11 = \"distanceInMeters\"\n com.google.gson.JsonElement r11 = r10.get(r11)\n if (r11 == 0) goto L_0x003c\n long r0 = r11.getAsLong()\n java.lang.Long r0 = java.lang.Long.valueOf(r0)\n L_0x003c:\n r4 = r0\n java.lang.String r11 = \"coordinates\"\n com.google.gson.JsonElement r10 = r10.get(r11)\n if (r10 == 0) goto L_0x0055\n java.lang.Class<com.avito.android.remote.model.Coordinates> r11 = com.avito.android.remote.model.Coordinates.class\n java.lang.Object r10 = r12.deserialize(r10, r11)\n java.lang.String r11 = \"deserialize(json, T::class.java)\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r10, r11)\n com.avito.android.remote.model.Coordinates r10 = (com.avito.android.remote.model.Coordinates) r10\n if (r10 == 0) goto L_0x0055\n goto L_0x005c\n L_0x0055:\n com.avito.android.remote.model.Coordinates r10 = new com.avito.android.remote.model.Coordinates\n r11 = 0\n double r11 = (double) r11\n r10.<init>(r11, r11)\n L_0x005c:\n r5 = r10\n com.avito.android.remote.model.SearchRadius r10 = new com.avito.android.remote.model.SearchRadius\n r6 = 0\n r7 = 16\n r8 = 0\n r1 = r10\n r1.<init>(r2, r3, r4, r5, r6, r7, r8)\n return r10\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.avito.android.remote.parse.adapter.SearchRadiusAdapter.deserialize(com.google.gson.JsonElement, java.lang.reflect.Type, com.google.gson.JsonDeserializationContext):com.avito.android.remote.model.SearchRadius\");\n }", "public abstract VKRequest mo118416a(JSONObject jSONObject);", "public JsonElement serialize(hv paramhv, Type paramType, JsonSerializationContext paramJsonSerializationContext)\r\n/* 82: */ {\r\n/* 83:344 */ if (paramhv.g()) {\r\n/* 84:345 */ return null;\r\n/* 85: */ }\r\n/* 86:347 */ JsonObject localJsonObject1 = new JsonObject();\r\n/* 87:349 */ if (hv.b(paramhv) != null) {\r\n/* 88:350 */ localJsonObject1.addProperty(\"bold\", hv.b(paramhv));\r\n/* 89: */ }\r\n/* 90:352 */ if (hv.c(paramhv) != null) {\r\n/* 91:353 */ localJsonObject1.addProperty(\"italic\", hv.c(paramhv));\r\n/* 92: */ }\r\n/* 93:355 */ if (hv.d(paramhv) != null) {\r\n/* 94:356 */ localJsonObject1.addProperty(\"underlined\", hv.d(paramhv));\r\n/* 95: */ }\r\n/* 96:358 */ if (hv.e(paramhv) != null) {\r\n/* 97:359 */ localJsonObject1.addProperty(\"strikethrough\", hv.e(paramhv));\r\n/* 98: */ }\r\n/* 99:361 */ if (hv.f(paramhv) != null) {\r\n/* 100:362 */ localJsonObject1.addProperty(\"obfuscated\", hv.f(paramhv));\r\n/* 101: */ }\r\n/* 102:364 */ if (hv.g(paramhv) != null) {\r\n/* 103:365 */ localJsonObject1.add(\"color\", paramJsonSerializationContext.serialize(hv.g(paramhv)));\r\n/* 104: */ }\r\n/* 105:367 */ if (hv.h(paramhv) != null) {\r\n/* 106:368 */ localJsonObject1.add(\"insertion\", paramJsonSerializationContext.serialize(hv.h(paramhv)));\r\n/* 107: */ }\r\n/* 108: */ JsonObject localJsonObject2;\r\n/* 109:371 */ if (hv.i(paramhv) != null)\r\n/* 110: */ {\r\n/* 111:372 */ localJsonObject2 = new JsonObject();\r\n/* 112:373 */ localJsonObject2.addProperty(\"action\", hv.i(paramhv).a().b());\r\n/* 113:374 */ localJsonObject2.addProperty(\"value\", hv.i(paramhv).b());\r\n/* 114:375 */ localJsonObject1.add(\"clickEvent\", localJsonObject2);\r\n/* 115: */ }\r\n/* 116:378 */ if (hv.j(paramhv) != null)\r\n/* 117: */ {\r\n/* 118:379 */ localJsonObject2 = new JsonObject();\r\n/* 119:380 */ localJsonObject2.addProperty(\"action\", hv.j(paramhv).a().b());\r\n/* 120:381 */ localJsonObject2.add(\"value\", paramJsonSerializationContext.serialize(hv.j(paramhv).b()));\r\n/* 121:382 */ localJsonObject1.add(\"hoverEvent\", localJsonObject2);\r\n/* 122: */ }\r\n/* 123:385 */ return localJsonObject1;\r\n/* 124: */ }", "public final void mo18964b(JSONObject jSONObject) {\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n int int0 = new Byte((byte)97);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"*bpp)j7=\", (Collection) linkedList0);\n jSONObject1.accumulate(\"] is not a JSONArray.\", linkedList0);\n try { \n jSONObject0.getJSONObject(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMGL\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMGL\", (Object) \"MnMGL\");\n try { \n jSONObject1.append(\"MnMGL\", jSONObject0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[MnMGL] is not a JSONArray.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "void mo59932a(String str, JSONObject jSONObject);", "void mo16412a(String str, JSONObject jSONObject);", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "public abstract T zzb(JSONObject jSONObject);", "private synchronized org.json.JSONObject a(com.a.a.a.c.a r11, java.lang.String r12, java.lang.String r13, java.util.List<java.lang.String> r14, int r15, int r16) {\n /*\n r10 = this;\n r9 = 2;\n monitor-enter(r10);\n r5 = new java.util.HashMap;\t Catch:{ all -> 0x0041 }\n r5.<init>();\t Catch:{ all -> 0x0041 }\n r6 = r14.iterator();\t Catch:{ all -> 0x0041 }\n L_0x000b:\n r1 = r6.hasNext();\t Catch:{ all -> 0x0041 }\n if (r1 == 0) goto L_0x024d;\n L_0x0011:\n r1 = r6.next();\t Catch:{ all -> 0x0041 }\n r1 = (java.lang.String) r1;\t Catch:{ all -> 0x0041 }\n r2 = com.a.a.a.c.AnonymousClass1.b;\t Catch:{ all -> 0x0041 }\n r3 = r11.ordinal();\t Catch:{ all -> 0x0041 }\n r2 = r2[r3];\t Catch:{ all -> 0x0041 }\n switch(r2) {\n case 1: goto L_0x0044;\n case 2: goto L_0x009c;\n case 3: goto L_0x00a2;\n case 4: goto L_0x00a8;\n default: goto L_0x0022;\n };\t Catch:{ all -> 0x0041 }\n L_0x0022:\n r1 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x0041 }\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0041 }\n r2.<init>();\t Catch:{ all -> 0x0041 }\n r3 = \"Method \";\n r2 = r2.append(r3);\t Catch:{ all -> 0x0041 }\n r2 = r2.append(r11);\t Catch:{ all -> 0x0041 }\n r3 = \" is not supported\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x0041 }\n r2 = r2.toString();\t Catch:{ all -> 0x0041 }\n r1.<init>(r2);\t Catch:{ all -> 0x0041 }\n throw r1;\t Catch:{ all -> 0x0041 }\n L_0x0041:\n r1 = move-exception;\n monitor-exit(r10);\n throw r1;\n L_0x0044:\n r4 = new org.apache.http.client.methods.HttpDelete;\t Catch:{ all -> 0x0041 }\n r4.<init>();\t Catch:{ all -> 0x0041 }\n L_0x0049:\n r2 = new java.net.URI;\t Catch:{ URISyntaxException -> 0x00ae }\n r3 = new java.lang.StringBuilder;\t Catch:{ URISyntaxException -> 0x00ae }\n r3.<init>();\t Catch:{ URISyntaxException -> 0x00ae }\n r7 = \"https://\";\n r3 = r3.append(r7);\t Catch:{ URISyntaxException -> 0x00ae }\n r3 = r3.append(r1);\t Catch:{ URISyntaxException -> 0x00ae }\n r3 = r3.append(r12);\t Catch:{ URISyntaxException -> 0x00ae }\n r3 = r3.toString();\t Catch:{ URISyntaxException -> 0x00ae }\n r2.<init>(r3);\t Catch:{ URISyntaxException -> 0x00ae }\n r4.setURI(r2);\t Catch:{ URISyntaxException -> 0x00ae }\n r2 = \"X-Algolia-Application-Id\";\n r3 = r10.d;\t Catch:{ all -> 0x0041 }\n r4.setHeader(r2, r3);\t Catch:{ all -> 0x0041 }\n r2 = \"X-Algolia-API-Key\";\n r3 = r10.e;\t Catch:{ all -> 0x0041 }\n r4.setHeader(r2, r3);\t Catch:{ all -> 0x0041 }\n r2 = r10.k;\t Catch:{ all -> 0x0041 }\n r2 = r2.entrySet();\t Catch:{ all -> 0x0041 }\n r7 = r2.iterator();\t Catch:{ all -> 0x0041 }\n L_0x0080:\n r2 = r7.hasNext();\t Catch:{ all -> 0x0041 }\n if (r2 == 0) goto L_0x00b5;\n L_0x0086:\n r2 = r7.next();\t Catch:{ all -> 0x0041 }\n r2 = (java.util.Map.Entry) r2;\t Catch:{ all -> 0x0041 }\n r3 = r2.getKey();\t Catch:{ all -> 0x0041 }\n r3 = (java.lang.String) r3;\t Catch:{ all -> 0x0041 }\n r2 = r2.getValue();\t Catch:{ all -> 0x0041 }\n r2 = (java.lang.String) r2;\t Catch:{ all -> 0x0041 }\n r4.setHeader(r3, r2);\t Catch:{ all -> 0x0041 }\n goto L_0x0080;\n L_0x009c:\n r4 = new org.apache.http.client.methods.HttpGet;\t Catch:{ all -> 0x0041 }\n r4.<init>();\t Catch:{ all -> 0x0041 }\n goto L_0x0049;\n L_0x00a2:\n r4 = new org.apache.http.client.methods.HttpPost;\t Catch:{ all -> 0x0041 }\n r4.<init>();\t Catch:{ all -> 0x0041 }\n goto L_0x0049;\n L_0x00a8:\n r4 = new org.apache.http.client.methods.HttpPut;\t Catch:{ all -> 0x0041 }\n r4.<init>();\t Catch:{ all -> 0x0041 }\n goto L_0x0049;\n L_0x00ae:\n r1 = move-exception;\n r2 = new java.lang.IllegalStateException;\t Catch:{ all -> 0x0041 }\n r2.<init>(r1);\t Catch:{ all -> 0x0041 }\n throw r2;\t Catch:{ all -> 0x0041 }\n L_0x00b5:\n r2 = \"User-Agent\";\n r3 = \"Algolia for Android 2.5.0\";\n r4.setHeader(r2, r3);\t Catch:{ all -> 0x0041 }\n r2 = r10.j;\t Catch:{ all -> 0x0041 }\n if (r2 == 0) goto L_0x00c7;\n L_0x00c0:\n r2 = \"X-Algolia-UserToken\";\n r3 = r10.j;\t Catch:{ all -> 0x0041 }\n r4.setHeader(r2, r3);\t Catch:{ all -> 0x0041 }\n L_0x00c7:\n r2 = r10.i;\t Catch:{ all -> 0x0041 }\n if (r2 == 0) goto L_0x00d2;\n L_0x00cb:\n r2 = \"X-Algolia-TagFilters\";\n r3 = r10.i;\t Catch:{ all -> 0x0041 }\n r4.setHeader(r2, r3);\t Catch:{ all -> 0x0041 }\n L_0x00d2:\n r2 = \"Accept-Encoding\";\n r3 = \"gzip\";\n r4.addHeader(r2, r3);\t Catch:{ all -> 0x0041 }\n if (r13 == 0) goto L_0x011f;\n L_0x00db:\n r2 = r4 instanceof org.apache.http.client.methods.HttpEntityEnclosingRequestBase;\t Catch:{ all -> 0x0041 }\n if (r2 != 0) goto L_0x00fe;\n L_0x00df:\n r1 = new java.lang.IllegalArgumentException;\t Catch:{ all -> 0x0041 }\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0041 }\n r2.<init>();\t Catch:{ all -> 0x0041 }\n r3 = \"Method \";\n r2 = r2.append(r3);\t Catch:{ all -> 0x0041 }\n r2 = r2.append(r11);\t Catch:{ all -> 0x0041 }\n r3 = \" cannot enclose entity\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x0041 }\n r2 = r2.toString();\t Catch:{ all -> 0x0041 }\n r1.<init>(r2);\t Catch:{ all -> 0x0041 }\n throw r1;\t Catch:{ all -> 0x0041 }\n L_0x00fe:\n r2 = \"Content-type\";\n r3 = \"application/json\";\n r4.setHeader(r2, r3);\t Catch:{ all -> 0x0041 }\n r3 = new org.apache.http.entity.StringEntity;\t Catch:{ UnsupportedEncodingException -> 0x0182 }\n r2 = \"UTF-8\";\n r3.<init>(r13, r2);\t Catch:{ UnsupportedEncodingException -> 0x0182 }\n r2 = new org.apache.http.message.BasicHeader;\t Catch:{ UnsupportedEncodingException -> 0x0182 }\n r7 = \"Content-Type\";\n r8 = \"application/json\";\n r2.<init>(r7, r8);\t Catch:{ UnsupportedEncodingException -> 0x0182 }\n r3.setContentEncoding(r2);\t Catch:{ UnsupportedEncodingException -> 0x0182 }\n r0 = r4;\n r0 = (org.apache.http.client.methods.HttpEntityEnclosingRequestBase) r0;\t Catch:{ UnsupportedEncodingException -> 0x0182 }\n r2 = r0;\n r2.setEntity(r3);\t Catch:{ UnsupportedEncodingException -> 0x0182 }\n L_0x011f:\n r2 = r10.h;\t Catch:{ all -> 0x0041 }\n r2 = r2.getParams();\t Catch:{ all -> 0x0041 }\n r3 = \"http.socket.timeout\";\n r7 = java.lang.Integer.valueOf(r16);\t Catch:{ all -> 0x0041 }\n r2.setParameter(r3, r7);\t Catch:{ all -> 0x0041 }\n r2 = r10.h;\t Catch:{ all -> 0x0041 }\n r2 = r2.getParams();\t Catch:{ all -> 0x0041 }\n r3 = \"http.connection.timeout\";\n r7 = java.lang.Integer.valueOf(r15);\t Catch:{ all -> 0x0041 }\n r2.setParameter(r3, r7);\t Catch:{ all -> 0x0041 }\n r2 = r10.h;\t Catch:{ IOException -> 0x019c }\n r2 = r2.execute(r4);\t Catch:{ IOException -> 0x019c }\n r3 = r2.getStatusLine();\t Catch:{ all -> 0x0041 }\n r3 = r3.getStatusCode();\t Catch:{ all -> 0x0041 }\n r4 = r3 / 100;\n if (r4 != r9) goto L_0x01bd;\n L_0x014f:\n r1 = r2.getEntity();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r1 = r1.getContentEncoding();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n if (r1 == 0) goto L_0x021e;\n L_0x0159:\n r1 = r2.getEntity();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r1 = r1.getContentEncoding();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r1 = r1.getValue();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n L_0x0165:\n if (r1 == 0) goto L_0x0221;\n L_0x0167:\n r3 = \"gzip\";\n r1 = r1.contains(r3);\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n if (r1 == 0) goto L_0x0221;\n L_0x016f:\n r1 = new java.util.zip.GZIPInputStream;\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r2 = r2.getEntity();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r2 = r2.getContent();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r1.<init>(r2);\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r1 = r10.a(r1);\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n L_0x0180:\n monitor-exit(r10);\n return r1;\n L_0x0182:\n r1 = move-exception;\n r1 = new com.a.a.a.b;\t Catch:{ all -> 0x0041 }\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0041 }\n r2.<init>();\t Catch:{ all -> 0x0041 }\n r3 = \"Invalid JSON Object: \";\n r2 = r2.append(r3);\t Catch:{ all -> 0x0041 }\n r2 = r2.append(r13);\t Catch:{ all -> 0x0041 }\n r2 = r2.toString();\t Catch:{ all -> 0x0041 }\n r1.<init>(r2);\t Catch:{ all -> 0x0041 }\n throw r1;\t Catch:{ all -> 0x0041 }\n L_0x019c:\n r2 = move-exception;\n r3 = \"%s=%s\";\n r4 = 2;\n r4 = new java.lang.Object[r4];\t Catch:{ all -> 0x0041 }\n r7 = 0;\n r8 = r2.getClass();\t Catch:{ all -> 0x0041 }\n r8 = r8.getName();\t Catch:{ all -> 0x0041 }\n r4[r7] = r8;\t Catch:{ all -> 0x0041 }\n r7 = 1;\n r2 = r2.getMessage();\t Catch:{ all -> 0x0041 }\n r4[r7] = r2;\t Catch:{ all -> 0x0041 }\n r2 = java.lang.String.format(r3, r4);\t Catch:{ all -> 0x0041 }\n r5.put(r1, r2);\t Catch:{ all -> 0x0041 }\n goto L_0x000b;\n L_0x01bd:\n r4 = r3 / 100;\n r7 = 4;\n if (r4 != r7) goto L_0x0201;\n L_0x01c2:\n r1 = \"Error detected in backend\";\n r1 = r2.getEntity();\t Catch:{ IOException -> 0x0294, JSONException -> 0x01e3 }\n r1 = r1.getContent();\t Catch:{ IOException -> 0x0294, JSONException -> 0x01e3 }\n r1 = r10.a(r1);\t Catch:{ IOException -> 0x0294, JSONException -> 0x01e3 }\n r3 = \"message\";\n r1 = r1.getString(r3);\t Catch:{ IOException -> 0x0294, JSONException -> 0x01e3 }\n r2 = r2.getEntity();\t Catch:{ all -> 0x0041 }\n r10.a(r2);\t Catch:{ all -> 0x0041 }\n r2 = new com.a.a.a.b;\t Catch:{ all -> 0x0041 }\n r2.<init>(r1);\t Catch:{ all -> 0x0041 }\n throw r2;\t Catch:{ all -> 0x0041 }\n L_0x01e3:\n r1 = move-exception;\n r2 = new com.a.a.a.b;\t Catch:{ all -> 0x0041 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0041 }\n r3.<init>();\t Catch:{ all -> 0x0041 }\n r4 = \"JSON decode error:\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x0041 }\n r1 = r1.getMessage();\t Catch:{ all -> 0x0041 }\n r1 = r3.append(r1);\t Catch:{ all -> 0x0041 }\n r1 = r1.toString();\t Catch:{ all -> 0x0041 }\n r2.<init>(r1);\t Catch:{ all -> 0x0041 }\n throw r2;\t Catch:{ all -> 0x0041 }\n L_0x0201:\n r4 = r2.getEntity();\t Catch:{ IOException -> 0x0215 }\n r4 = org.apache.http.util.EntityUtils.toString(r4);\t Catch:{ IOException -> 0x0215 }\n r5.put(r1, r4);\t Catch:{ IOException -> 0x0215 }\n L_0x020c:\n r1 = r2.getEntity();\t Catch:{ all -> 0x0041 }\n r10.a(r1);\t Catch:{ all -> 0x0041 }\n goto L_0x000b;\n L_0x0215:\n r4 = move-exception;\n r3 = java.lang.String.valueOf(r3);\t Catch:{ all -> 0x0041 }\n r5.put(r1, r3);\t Catch:{ all -> 0x0041 }\n goto L_0x020c;\n L_0x021e:\n r1 = 0;\n goto L_0x0165;\n L_0x0221:\n r1 = r2.getEntity();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r1 = r1.getContent();\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n r1 = r10.a(r1);\t Catch:{ IOException -> 0x0291, JSONException -> 0x022f }\n goto L_0x0180;\n L_0x022f:\n r1 = move-exception;\n r2 = new com.a.a.a.b;\t Catch:{ all -> 0x0041 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0041 }\n r3.<init>();\t Catch:{ all -> 0x0041 }\n r4 = \"JSON decode error:\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x0041 }\n r1 = r1.getMessage();\t Catch:{ all -> 0x0041 }\n r1 = r3.append(r1);\t Catch:{ all -> 0x0041 }\n r1 = r1.toString();\t Catch:{ all -> 0x0041 }\n r2.<init>(r1);\t Catch:{ all -> 0x0041 }\n throw r2;\t Catch:{ all -> 0x0041 }\n L_0x024d:\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0041 }\n r1 = \"Hosts unreachable: \";\n r3.<init>(r1);\t Catch:{ all -> 0x0041 }\n r1 = 1;\n r1 = java.lang.Boolean.valueOf(r1);\t Catch:{ all -> 0x0041 }\n r2 = r5.entrySet();\t Catch:{ all -> 0x0041 }\n r4 = r2.iterator();\t Catch:{ all -> 0x0041 }\n r2 = r1;\n L_0x0262:\n r1 = r4.hasNext();\t Catch:{ all -> 0x0041 }\n if (r1 == 0) goto L_0x0287;\n L_0x0268:\n r1 = r4.next();\t Catch:{ all -> 0x0041 }\n r1 = (java.util.Map.Entry) r1;\t Catch:{ all -> 0x0041 }\n r2 = r2.booleanValue();\t Catch:{ all -> 0x0041 }\n if (r2 != 0) goto L_0x0279;\n L_0x0274:\n r2 = \", \";\n r3.append(r2);\t Catch:{ all -> 0x0041 }\n L_0x0279:\n r1 = r1.toString();\t Catch:{ all -> 0x0041 }\n r3.append(r1);\t Catch:{ all -> 0x0041 }\n r1 = 0;\n r1 = java.lang.Boolean.valueOf(r1);\t Catch:{ all -> 0x0041 }\n r2 = r1;\n goto L_0x0262;\n L_0x0287:\n r1 = new com.a.a.a.b;\t Catch:{ all -> 0x0041 }\n r2 = r3.toString();\t Catch:{ all -> 0x0041 }\n r1.<init>(r2);\t Catch:{ all -> 0x0041 }\n throw r1;\t Catch:{ all -> 0x0041 }\n L_0x0291:\n r1 = move-exception;\n goto L_0x000b;\n L_0x0294:\n r1 = move-exception;\n goto L_0x000b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.a.a.a.c.a(com.a.a.a.c$a, java.lang.String, java.lang.String, java.util.List, int, int):org.json.JSONObject\");\n }", "public final void mo18962a(JSONObject jSONObject) {\n }", "@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }", "private JSON() {\n\t}", "private static org.json.JSONObject a(org.json.JSONObject r7, java.lang.String r8) {\n /*\n if (r7 != 0) goto L_0x0007\n org.json.JSONObject r7 = new org.json.JSONObject\n r7.<init>()\n L_0x0007:\n if (r8 == 0) goto L_0x0056\n java.lang.String r0 = \"&\"\n java.lang.String[] r8 = r8.split(r0)\n int r0 = r8.length\n r1 = 0\n r2 = 0\n L_0x0012:\n if (r2 >= r0) goto L_0x0056\n r3 = r8[r2]\n java.lang.String r4 = \"=\"\n java.lang.String[] r3 = r3.split(r4)\n int r4 = r3.length\n r5 = 2\n if (r4 != r5) goto L_0x0053\n r4 = 1\n r5 = r3[r1] // Catch:{ Exception -> 0x0034 }\n java.lang.String r5 = java.net.URLDecoder.decode(r5) // Catch:{ Exception -> 0x0034 }\n r3[r1] = r5 // Catch:{ Exception -> 0x0034 }\n r5 = r3[r4] // Catch:{ Exception -> 0x0034 }\n java.lang.String r5 = java.net.URLDecoder.decode(r5) // Catch:{ Exception -> 0x0034 }\n r3[r4] = r5 // Catch:{ Exception -> 0x0034 }\n goto L_0x0034\n L_0x0032:\n r3 = move-exception\n goto L_0x003c\n L_0x0034:\n r5 = r3[r1] // Catch:{ JSONException -> 0x0032 }\n r3 = r3[r4] // Catch:{ JSONException -> 0x0032 }\n r7.put(r5, r3) // Catch:{ JSONException -> 0x0032 }\n goto L_0x0053\n L_0x003c:\n java.lang.String r4 = \"openSDK_LOG.Util\"\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n java.lang.String r6 = \"decodeUrlToJson has exception: \"\n r5.<init>(r6)\n java.lang.String r3 = r3.getMessage()\n r5.append(r3)\n java.lang.String r3 = r5.toString()\n com.tencent.open.a.f.e(r4, r3)\n L_0x0053:\n int r2 = r2 + 1\n goto L_0x0012\n L_0x0056:\n return r7\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.open.d.h.a(org.json.JSONObject, java.lang.String):org.json.JSONObject\");\n }", "@Override\n\tpublic void visit(JsonExpression arg0) {\n\t\t\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"Qn<G\";\n jSONObject0.put(\"Qn<G\", (Object) \"Qn<G\");\n try { \n jSONObject0.getJSONArray(\"Qn<G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"Qn<G\\\"] is not a JSONArray.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "private JsonUtils() {}", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n Long long0 = new Long((-1L));\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"i3@.UhF(TlbH|]?SS\";\n stringArray0[1] = \"\\\"l{g8@|<`A~s*ul$h\";\n stringArray0[2] = \"QmU{LG(E2hKNIE>tV_N\";\n JSONObject jSONObject0 = new JSONObject(long0, stringArray0);\n StringWriter stringWriter0 = new StringWriter(2247);\n jSONObject0.put(\"getdecode\", false);\n jSONObject0.put(\"i3@.UhF(TlbH|]?SS\", false);\n JSONObject.valueToString(\"i3@.UhF(TlbH|]?SS\", 190, 190);\n stringWriter0.append((CharSequence) \"\\\"java.lang.String@0000000002\\\"\");\n StringWriter stringWriter1 = stringWriter0.append('D');\n Writer writer0 = jSONObject0.write(stringWriter1);\n jSONObject0.write(writer0);\n JSONObject.valueToString(writer0, (-1), 2247);\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "public JsonPath()\r\n {\r\n numberOfParameters = 2;\r\n }", "@Override\n\tprotected byte[] getArgByte() {\n\t\treturn paramsJson.getBytes();\n\t}", "@Test(timeout = 4000)\n public void test079() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject((Object) \"gettoUpperCase\");\n jSONObject1.names();\n Integer integer0 = new Integer(92);\n JSONObject jSONObject2 = jSONObject0.append(\"gettoUpperCase\", integer0);\n jSONObject2.names();\n jSONObject0.optJSONArray(\"gettoUpperCase\");\n JSONObject.numberToString(integer0);\n Boolean boolean0 = new Boolean(true);\n JSONObject.testValidity(boolean0);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n double double0 = 0.0;\n Double double1 = new Double(0.0);\n JSONObject jSONObject0 = new JSONObject(double1);\n long long0 = 0L;\n Long long1 = new Long(0L);\n String string0 = \"] is not a JSONArray.\";\n HashMap<Float, JSONArray> hashMap0 = new HashMap<Float, JSONArray>();\n jSONObject0.optJSONArray(\"] is not a JSONArray.\");\n JSONArray jSONArray0 = new JSONArray();\n jSONObject0.toJSONArray(jSONArray0);\n float float0 = (-2236.0F);\n Float float1 = new Float((float) 0L);\n Object object0 = JSONObject.NULL;\n JSONArray jSONArray1 = null;\n try {\n jSONArray1 = new JSONArray(object0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONArray initial value should be a string or collection or array.\n //\n verifyException(\"wheel.json.JSONArray\", e);\n }\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test069() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n HashMap<Boolean, Integer> hashMap0 = new HashMap<Boolean, Integer>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONArray jSONArray0 = jSONObject1.toJSONArray((JSONArray) null);\n assertNull(jSONArray0);\n }", "@Override\n\tpublic void visit(JsonOperator arg0) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.put(0, 2094L);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject0.optInt(\"$\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "public final void mo18970e(JSONObject jSONObject) {\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n JSONObject jSONObject2 = jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)42, (byte)42);\n JSONObject.quote(\"\");\n Byte.toUnsignedInt((byte)42);\n JSONObject.valueToString(jSONObject2, (-1394), (-1394));\n JSONObject jSONObject3 = new JSONObject(\"{\\n\\\"java.lang.String@0000000003\\\": {},\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n String string0 = \"&<uWyN63)KiOjjs&n3\";\n JSONObject jSONObject4 = null;\n try {\n jSONObject4 = new JSONObject(\"&<uWyN63)KiOjjs&n3\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of &<uWyN63)KiOjjs&n3\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "public final void mo18968d(JSONObject jSONObject) {\n }", "public interface C22932f {\n /* renamed from: a */\n void mo59932a(String str, JSONObject jSONObject);\n}", "public interface ArrayJson {\r\n\t//size for array used,for map, arraySize is map.size*2\r\n\tpublic int arraySize();\r\n\r\n\tpublic int length();// orig length\r\n\r\n\t// getters for getXX By index\r\n\tpublic Object get(int index);\r\n\r\n\tpublic boolean getBoolean(int index);\r\n\r\n\tpublic double getDouble(int index);\r\n\r\n\tpublic <E extends Enum<E>> E getEnum(Class<E> clazz, int index);\r\n\r\n\tpublic BigDecimal getBigDecimal(int index);\r\n\r\n\tpublic BigInteger getBigInteger(int index);\r\n\r\n\tpublic int getInt(int index);\r\n\r\n\tpublic JSONArray getJSONArray(int index);\r\n\r\n\tpublic JSONObject getJSONObject(int index);\r\n\r\n\tpublic long getLong(int index);\r\n\r\n\tpublic String getString(int index);\r\n}", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n linkedList0.offerFirst(jSONObject0);\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertEquals(1, jSONArray1.length());\n assertNotNull(jSONArray1);\n assertNotSame(jSONArray1, jSONArray0);\n }", "private JSONHelper() {\r\n\t\tsuper();\r\n\t}", "@Test(timeout = 4000)\n public void test081() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.optBoolean(46);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n Integer integer0 = new Integer((-884));\n jSONObject1.append(\"su\", integer0);\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n StringWriter stringWriter0 = new StringWriter();\n jSONObject1.write(stringWriter0);\n jSONObject1.optDouble(\"8k\\\"]Uu:+Wz~|:~8#4\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"*\";\n jSONObject0.putOpt(\"*\", jSONObject0);\n StringWriter stringWriter0 = new StringWriter();\n // Undeclared exception!\n jSONObject0.write(stringWriter0);\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n try { \n jSONObject1.getJSONObject(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a JSONObject.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "private JsonUtils() { }", "@Override\n public void call(final Object... args) {\n try {\n JSONArray data = (JSONArray) args[0];\n System.out.print(\"data:\" + data.toString());\n } catch (Exception e) {\n // return;\n }\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"] is not a JSONArray.\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.optDouble(\"] is not a JSONArray.\", (-2064.666));\n jSONObject0.optBoolean(\"] is not a JSONArray.\");\n jSONObject0.put(\"wheel.json.JSONException\", (int) (byte)44);\n String string0 = null;\n JSONTokener jSONTokener0 = new JSONTokener(\"istoUnsignedLong\");\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of istoUnsignedLong\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test\n public void testWithEmptyJsonObject() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(new JSONObject());\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n HashMap<String, Double> hashMap0 = new HashMap<String, Double>();\n JSONObject.getNames((Object) null);\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject0 = jSONArray0.optJSONObject((byte)106);\n assertNull(jSONObject0);\n }", "protected abstract Object buildJsonObject(R response);", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n assertEquals(1, jSONObject0.length());\n \n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n JSONObject.quote(\"wheel.json.JSONObject$1\");\n String string0 = JSONObject.doubleToString(216);\n assertEquals(\"216\", string0);\n }", "public static com.airbnb.lottie.C0955d m4067a(android.util.JsonReader r28) {\n /*\n r0 = r28;\n r1 = com.airbnb.lottie.p036d.C0954f.m4101a();\n r8 = new android.support.v4.f.f;\n r8.<init>();\n r7 = new java.util.ArrayList;\n r7.<init>();\n r9 = new java.util.HashMap;\n r9.<init>();\n r10 = new java.util.HashMap;\n r10.<init>();\n r12 = new java.util.HashMap;\n r12.<init>();\n r11 = new android.support.v4.f.n;\n r11.<init>();\n r13 = new com.airbnb.lottie.d;\n r13.<init>();\n r28.beginObject();\n r2 = 0;\n r2 = 0;\n r4 = 0;\n r5 = 0;\n r6 = 0;\n r14 = 0;\n L_0x0032:\n r15 = r28.hasNext();\n if (r15 == 0) goto L_0x0138;\n L_0x0038:\n r15 = r28.nextName();\n r16 = -1;\n r17 = r15.hashCode();\n r18 = 2;\n r19 = 1;\n switch(r17) {\n case -1408207997: goto L_0x00a7;\n case -1109732030: goto L_0x009d;\n case 104: goto L_0x0093;\n case 118: goto L_0x0089;\n case 119: goto L_0x007f;\n case 3276: goto L_0x0075;\n case 3367: goto L_0x006b;\n case 3553: goto L_0x0061;\n case 94623709: goto L_0x0056;\n case 97615364: goto L_0x004b;\n default: goto L_0x0049;\n };\n L_0x0049:\n goto L_0x00b1;\n L_0x004b:\n r3 = \"fonts\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x0053:\n r3 = 8;\n goto L_0x00b2;\n L_0x0056:\n r3 = \"chars\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x005e:\n r3 = 9;\n goto L_0x00b2;\n L_0x0061:\n r3 = \"op\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x0069:\n r3 = 3;\n goto L_0x00b2;\n L_0x006b:\n r3 = \"ip\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x0073:\n r3 = 2;\n goto L_0x00b2;\n L_0x0075:\n r3 = \"fr\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x007d:\n r3 = 4;\n goto L_0x00b2;\n L_0x007f:\n r3 = \"w\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x0087:\n r3 = 0;\n goto L_0x00b2;\n L_0x0089:\n r3 = \"v\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x0091:\n r3 = 5;\n goto L_0x00b2;\n L_0x0093:\n r3 = \"h\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x009b:\n r3 = 1;\n goto L_0x00b2;\n L_0x009d:\n r3 = \"layers\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x00a5:\n r3 = 6;\n goto L_0x00b2;\n L_0x00a7:\n r3 = \"assets\";\n r3 = r15.equals(r3);\n if (r3 == 0) goto L_0x00b1;\n L_0x00af:\n r3 = 7;\n goto L_0x00b2;\n L_0x00b1:\n r3 = -1;\n L_0x00b2:\n switch(r3) {\n case 0: goto L_0x012a;\n case 1: goto L_0x0120;\n case 2: goto L_0x0116;\n case 3: goto L_0x0107;\n case 4: goto L_0x00fd;\n case 5: goto L_0x00ce;\n case 6: goto L_0x00ca;\n case 7: goto L_0x00c6;\n case 8: goto L_0x00c2;\n case 9: goto L_0x00be;\n default: goto L_0x00b5;\n };\n L_0x00b5:\n r27 = r11;\n r26 = r12;\n r28.skipValue();\n goto L_0x0132;\n L_0x00be:\n com.airbnb.lottie.p035c.C0944t.m4068a(r0, r13, r11);\n goto L_0x0102;\n L_0x00c2:\n com.airbnb.lottie.p035c.C0944t.m4071a(r0, r12);\n goto L_0x0102;\n L_0x00c6:\n com.airbnb.lottie.p035c.C0944t.m4070a(r0, r13, r9, r10);\n goto L_0x0102;\n L_0x00ca:\n com.airbnb.lottie.p035c.C0944t.m4069a(r0, r13, r7, r8);\n goto L_0x0102;\n L_0x00ce:\n r3 = r28.nextString();\n r15 = \"\\\\.\";\n r3 = r3.split(r15);\n r15 = 0;\n r16 = r3[r15];\n r20 = java.lang.Integer.parseInt(r16);\n r15 = r3[r19];\n r21 = java.lang.Integer.parseInt(r15);\n r3 = r3[r18];\n r22 = java.lang.Integer.parseInt(r3);\n r23 = 4;\n r24 = 4;\n r25 = 0;\n r3 = com.airbnb.lottie.p036d.C0954f.m4108a(r20, r21, r22, r23, r24, r25);\n if (r3 != 0) goto L_0x0102;\n L_0x00f7:\n r3 = \"Lottie only supports bodymovin >= 4.4.0\";\n r13.m4112a(r3);\n goto L_0x0102;\n L_0x00fd:\n r14 = r28.nextDouble();\n r14 = (float) r14;\n L_0x0102:\n r27 = r11;\n r26 = r12;\n goto L_0x0132;\n L_0x0107:\n r27 = r11;\n r26 = r12;\n r11 = r28.nextDouble();\n r3 = (float) r11;\n r6 = 1008981770; // 0x3c23d70a float:0.01 double:4.9850323E-315;\n r6 = r3 - r6;\n goto L_0x0132;\n L_0x0116:\n r27 = r11;\n r26 = r12;\n r11 = r28.nextDouble();\n r5 = (float) r11;\n goto L_0x0132;\n L_0x0120:\n r27 = r11;\n r26 = r12;\n r3 = r28.nextInt();\n r4 = r3;\n goto L_0x0132;\n L_0x012a:\n r27 = r11;\n r26 = r12;\n r2 = r28.nextInt();\n L_0x0132:\n r12 = r26;\n r11 = r27;\n goto L_0x0032;\n L_0x0138:\n r27 = r11;\n r26 = r12;\n r28.endObject();\n r0 = (float) r2;\n r0 = r0 * r1;\n r0 = (int) r0;\n r2 = (float) r4;\n r2 = r2 * r1;\n r1 = (int) r2;\n r3 = new android.graphics.Rect;\n r2 = 0;\n r3.<init>(r2, r2, r0, r1);\n r2 = r13;\n r4 = r5;\n r5 = r6;\n r6 = r14;\n r2.m4111a(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12);\n return r13;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.airbnb.lottie.c.t.a(android.util.JsonReader):com.airbnb.lottie.d\");\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertNull(jSONArray1);\n }", "void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n JSONObject.testValidity(jSONObject1);\n jSONObject0.optBoolean(\"Z\");\n try { \n jSONObject0.getJSONArray(\"A1 `'ski<ljrq9;O7L\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"A1 `'ski<ljrq9;O7L\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n jSONObject1.put(\"su\", 4135.211029659);\n jSONObject1.getDouble(\"su\");\n try { \n jSONObject1.getBoolean(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.getJSONArray(\"su\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "public int processingContract(String json,List<Object[]> list);", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n HashMap<Float, Object> hashMap0 = new HashMap<Float, Object>();\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 0.0F);\n hashMap0.put(float0, float0);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n hashMap0.remove((Object) jSONObject0);\n Long long0 = new Long((-1L));\n JSONObject.valueToString(long0);\n hashMap0.getOrDefault(jSONObject0, jSONObject0);\n JSONObject.valueToString(hashMap0, 8, 13);\n JSONObject.doubleToString(0.0);\n jSONObject0.keys();\n jSONObject0.toString(13);\n try { \n jSONObject0.getJSONArray(\";&7Li\\\"+g4z OK%1i76o\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\";&7Li\\\\\\\"+g4z OK%1i76o\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n Integer.remainderUnsigned((-821), (-821));\n StringWriter stringWriter0 = new StringWriter(1782);\n jSONObject0.write(stringWriter0);\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"Ih?`q\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of Ih?`q\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.put(\",\\n\", (Object) null);\n Float float0 = new Float(1.0);\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(float0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONArray initial value should be a string or collection or array.\n //\n verifyException(\"wheel.json.JSONArray\", e);\n }\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getLong(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{+HgP:|4P2;HQ~Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ':' after a key at character 16 of {+HgP:|4P2;HQ~Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n jSONObject0.optLong(\"su\");\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "void mo350a(C0636l c0636l, JsonValue jsonValue);", "public void a(JSONObject paramJSONObject) {\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n StringWriter stringWriter0 = new StringWriter(12);\n Double.sum(0.0, (-2252.167794836282));\n Double.isFinite((-710.25));\n JSONObject.getNames((Object) stringWriter0);\n String string0 = \"\";\n String string1 = \"RT8u3l.~].,i\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"RT8u3l.~].,i\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of RT8u3l.~].,i\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.accumulate(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "private DatasetJsonConversion() {}", "public final void mo18966c(JSONObject jSONObject) {\n }", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n JSONObject.doubleToString(1.0);\n JSONTokener jSONTokener0 = new JSONTokener(\"{}\");\n JSONObject jSONObject0 = new JSONObject(jSONTokener0);\n assertEquals(0, jSONObject0.length());\n }", "@Test\n public void testWithEmptyJsonObjectAsString() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(\"{}\");\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject1 = jSONObject0.accumulate(\"sum\", jSONArray0);\n assertSame(jSONObject0, jSONObject1);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"] is not a Boolean.\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n stringArray0[3] = \"p0JV~u{VV\";\n stringArray0[4] = \"a>(3H]W1\";\n stringArray0[5] = \"4v)7wYwy@>>\";\n stringArray0[6] = \"`00MMvjO_a\";\n stringArray0[7] = \";Az%j \";\n stringArray0[8] = \"L;IoBM\";\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n JSONObject.testValidity(\";Az%j \");\n jSONObject1.optBoolean(\"`00MMvjO_a\");\n try { \n jSONObject1.getJSONArray((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test\n public void testDeserialize_3args() {\n System.out.println(\"deserialize\");\n JsonElement element = null;\n Type arg1 = null;\n JsonDeserializationContext arg2 = null;\n DateDeserializer instance = new DateDeserializer();\n Date expResult = null;\n Date result = instance.deserialize(element, arg1, arg2);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private void m2172a(Object obj, JsonValue jsonValue) {\n SerializationException e;\n Class cls = obj.getClass();\n C0710q a = m2171a(cls);\n for (JsonValue jsonValue2 = jsonValue.f2957f; jsonValue2 != null; jsonValue2 = jsonValue2.f2958g) {\n C0693a c0693a = (C0693a) a.m2467a(jsonValue2.f2956e.replace(\" \", \"_\"));\n if (c0693a != null) {\n C0715c c0715c = c0693a.f3093a;\n try {\n c0715c.f3200a.set(obj, mo511a(c0715c.f3200a.getType(), c0693a.f3094b, jsonValue2));\n } catch (Throwable e2) {\n throw new ReflectionException(\"Argument not valid for field: \" + c0715c.f3200a.getName(), e2);\n } catch (Throwable e22) {\n throw new ReflectionException(\"Illegal access to field: \" + c0715c.f3200a.getName(), e22);\n } catch (Throwable e222) {\n throw new SerializationException(\"Error accessing field: \" + c0715c.f3200a.getName() + \" (\" + cls.getName() + \")\", e222);\n } catch (SerializationException e3) {\n e3.m2283a(c0715c.f3200a.getName() + \" (\" + cls.getName() + \")\");\n throw e3;\n } catch (Throwable e2222) {\n SerializationException serializationException = new SerializationException(e2222);\n serializationException.m2283a(jsonValue2.m2281p());\n serializationException.m2283a(c0715c.f3200a.getName() + \" (\" + cls.getName() + \")\");\n throw serializationException;\n }\n } else if (!(jsonValue2.f2956e.equals(this.f2885b) || this.f2884a)) {\n e3 = new SerializationException(\"Field not found: \" + jsonValue2.f2956e + \" (\" + cls.getName() + \")\");\n e3.m2283a(jsonValue2.m2281p());\n throw e3;\n }\n }\n }", "public JsonRequestSerializer() {\n this(JNC.GSON);\n }", "protected Object readResolve()\n/* */ {\n/* 353 */ return new JsonFactory(this, this._objectCodec);\n/* */ }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }", "protected MatchStrength hasJSONFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 507 */ return ByteSourceJsonBootstrapper.hasJSONFormat(acc);\n/* */ }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n JSONObject jSONObject1 = jSONObject0.put(\"Unclosed comment\", (Object) \"%|bmZP$ms4*`Z\");\n String string0 = \"'z2mb\";\n Long long0 = new Long((-487L));\n jSONObject0.append(\"'z2mb\", long0);\n String string1 = null;\n try { \n jSONObject1.getDouble((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n String string0 = \"{+H1R$Cu|49H=>Jn\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{+H1R$Cu|49H=>Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ',' or '}' at character 16 of {+H1R$Cu|49H=>Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n String string0 = \"{*+HgP:6|49HQ~Jn\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{*+HgP:6|49HQ~Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ',' or '}' at character 16 of {*+HgP:6|49HQ~Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "private JsonUtils() {\n\t\tsuper();\n\t}", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = 12;\n StringWriter stringWriter0 = new StringWriter(12);\n Float float0 = new Float((float) 12);\n JSONObject.numberToString(float0);\n String string0 = \"\";\n try { \n jSONObject0.getInt(\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "void mo28760a(View view, C4211a aVar, JSONObject jSONObject);", "public void testGetJSON() {\n\t}", "@Test(timeout = 4000)\n public void test024() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String[] stringArray0 = new String[0];\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n assertFalse(jSONObject1.equals((Object)jSONObject0));\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must end with '}' at character 1 of {\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"\";\n jSONObject0.optDouble(\"\", Double.NaN);\n jSONObject0.optLong(\"\");\n jSONObject0.optJSONObject(\"Z\");\n LinkedList<JSONArray> linkedList0 = new LinkedList<JSONArray>();\n LinkedList<JSONArray> linkedList1 = new LinkedList<JSONArray>();\n linkedList1.add((JSONArray) null);\n JSONObject jSONObject1 = jSONObject0.put(\"wheel.json.JSONException\", (Collection) linkedList1);\n Float float1 = new Float((float) 0L);\n try { \n jSONObject1.append((String) null, float1);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Null key.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }", "public static Object gvRenderData(Object... arg) {\r\nUNSUPPORTED(\"epzew3wavf5f9mykc38usb6r9\"); // int gvRenderData(GVC_t *gvc, graph_t *g, const char *format, char **result, unsigned int *length)\r\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\r\nUNSUPPORTED(\"1bh3yj957he6yv2dkeg4pzwdk\"); // int rc;\r\nUNSUPPORTED(\"1ag9dz4apxn0w3cz8w2bfm6se\"); // GVJ_t *job;\r\nUNSUPPORTED(\"8msotrfl0cngiua3j57ylm26b\"); // g = g->root;\r\nUNSUPPORTED(\"exts51afuertju5ed5v7pdpg7\"); // /* create a job for the required format */\r\nUNSUPPORTED(\"dn6z1r1bbrtmr58m8dnfgfnm0\"); // rc = gvjobs_output_langname(gvc, format);\r\nUNSUPPORTED(\"5apijrijm2r8b1g2l4x7iee7s\"); // job = gvc->job;\r\nUNSUPPORTED(\"5wvj0ph8uqfgg8jl3g39jsf51\"); // if (rc == 999) {\r\nUNSUPPORTED(\"cpui2f5hfk3cihua2ie59746n\"); // \tagerr(AGERR, \"Format: \\\"%s\\\" not recognized. Use one of:%s\\n\",\r\nUNSUPPORTED(\"2pjgp86rkudo6mihbako5yps2\"); // format, gvplugin_list(gvc, API_device, format));\r\nUNSUPPORTED(\"8d9xfgejx5vgd6shva5wk5k06\"); // \treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"ect62lxc3zm51lhzifift55m\"); // job->output_lang = gvrender_select(job, job->output_langname);\r\nUNSUPPORTED(\"ewlceg1k4gs2e6syq4ear5kzo\"); // if (!(agbindrec(g, \"Agraphinfo_t\", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) {\r\nUNSUPPORTED(\"3yo4xyapbp7osp8uyz4kff98s\"); // \tagerrorf( \"Layout was not done\\n\");\r\nUNSUPPORTED(\"8d9xfgejx5vgd6shva5wk5k06\"); // \treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"e2razcqp20hymeukedg9bannu\"); // /* page size on Linux, Mac OS X and Windows */\r\nUNSUPPORTED(\"78h54wwr6x96fwwes4nhn1tnu\"); // if(!result || !(*result = malloc(4096))) {\r\nUNSUPPORTED(\"48p1xzjf31myn1slku76g3c8j\"); // \tagerr(AGERR, \"failure malloc'ing for result string\");\r\nUNSUPPORTED(\"8d9xfgejx5vgd6shva5wk5k06\"); // \treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"f3ljfuaa9qaj4cd1xhojgsd7d\"); // job->output_data = *result;\r\nUNSUPPORTED(\"619t5sjk3c37ujk3ndu91wamv\"); // job->output_data_allocated = 4096;\r\nUNSUPPORTED(\"dbvvz39zyfsbhofeha2hb1wpf\"); // job->output_data_position = 0;\r\nUNSUPPORTED(\"9szsye4q9jykqvtk0bc1r91d0\"); // rc = gvRenderJobs(gvc, g);\r\nUNSUPPORTED(\"7l8ugws8ptgtlxc1ymmh3cf18\"); // gvrender_end_job(job);\r\nUNSUPPORTED(\"78jlu7v0o8b8itbx8ri5ptkc7\"); // if (rc == 0) {\r\nUNSUPPORTED(\"2w0i2qgohz8ogcqrg43r585dh\"); // \t*result = job->output_data;\r\nUNSUPPORTED(\"cnqap0ow188zdpvtqu6bfrmyr\"); // \t*length = job->output_data_position;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"a9p7yonln7g91ge7xab3xf9dr\"); // gvjobs_delete(gvc);\r\nUNSUPPORTED(\"5bc9k4vsl6g7wejc5xefc5964\"); // return rc;\r\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\r\n\r\nthrow new UnsupportedOperationException();\r\n}", "public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "void validateJson();", "public abstract JsonElement serialize();", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n assertEquals(1, jSONObject1.length());\n \n jSONObject0.toJSONArray((JSONArray) null);\n JSONObject jSONObject2 = jSONObject0.put(\"false\", (Object) \"false\");\n boolean boolean0 = jSONObject2.getBoolean(\"false\");\n assertFalse(boolean0);\n \n String string0 = JSONObject.quote(\"true\");\n assertEquals(\"\\\"true\\\"\", string0);\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"] is not a Boolean.\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n stringArray0[3] = \"p0JV~u{VV\";\n jSONObject0.optLong(\"wheel.json.JSONException\");\n jSONObject0.remove((String) null);\n jSONObject0.optString(\"is\");\n LinkedList<Short> linkedList0 = new LinkedList<Short>();\n jSONObject0.put(\"\\b\", (Collection) linkedList0);\n String string0 = \"-)#>`U+F=\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"JSON does not allow non-finite numbers.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of JSON does not allow non-finite numbers.\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.putOpt(\"\", jSONObject0);\n jSONObject1.getJSONObject(\"\");\n Object object0 = JSONObject.NULL;\n JSONObject jSONObject2 = new JSONObject();\n assertEquals(0, jSONObject2.length());\n }", "public InvalidJsonException() {\n\t\tsuper();\n\t}", "@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}", "JSONObject mo28758a(View view);" ]
[ "0.6306197", "0.6263573", "0.6135622", "0.59936327", "0.5897762", "0.5873251", "0.5848183", "0.5830949", "0.5825108", "0.57482547", "0.57474834", "0.5736386", "0.5725765", "0.5700244", "0.5679232", "0.5657816", "0.56564254", "0.5641209", "0.5626812", "0.56167316", "0.56157416", "0.56132776", "0.5612499", "0.5595862", "0.55779284", "0.5572921", "0.557134", "0.5558507", "0.5516975", "0.5512505", "0.5489573", "0.5455565", "0.5450775", "0.543949", "0.54227996", "0.5409529", "0.540874", "0.5396724", "0.539067", "0.5385612", "0.5384376", "0.53753364", "0.5370145", "0.53576595", "0.5352186", "0.53456795", "0.5336722", "0.53308874", "0.5321476", "0.5315782", "0.53033805", "0.52767974", "0.52733463", "0.5273329", "0.52649796", "0.5257666", "0.5250279", "0.52488506", "0.52427745", "0.52421546", "0.5241847", "0.5241169", "0.52396834", "0.52304184", "0.5226694", "0.5213952", "0.5207008", "0.52001005", "0.51989275", "0.5193969", "0.519381", "0.51905966", "0.5188694", "0.51846373", "0.5178633", "0.5170305", "0.51651317", "0.5133043", "0.5122714", "0.5120266", "0.5109501", "0.5105309", "0.5096799", "0.5089473", "0.5087057", "0.5080085", "0.507682", "0.5076313", "0.5072013", "0.5071096", "0.5070203", "0.5068566", "0.5051869", "0.5051808", "0.50448394", "0.5043061", "0.5035096", "0.50288844", "0.5025899", "0.50212485", "0.5016455" ]
0.0
-1
Create an operation that will insert the request to the feed.
public static FeedOperation add(HomeFeedRequest request) { return new RequestOperation(request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@ApiMethod(name = \"insertRequest\")\n public Request insertRequest(Request request) throws ConflictException {\n//If if is not null, then check if it exists. If yes, throw an Exception\n//that it is already present\n//Since our @Id field is a Long, Objectify will generate a unique value for us\n//when we use put\n ofy().save().entity(request).now();\n return request;\n }", "private void addInsertOp() {\n\n if (!mIsNewAlert) {\n mValues.put(AlertContentProvider.KEY_ALERT_ID, mRawAlertId);\n }\n ContentProviderOperation.Builder builder =\n newInsertCpo(Data.CONTENT_URI, mIsSyncOperation, mIsYieldAllowed);\n builder.withValues(mValues);\n if (mIsNewAlert) {\n builder.withValueBackReference(AlertContentProvider.KEY_ALERT_ID, mBackReference);\n }\n mIsYieldAllowed = false;\n mBatchOperation.add(builder.build());\n }", "<K, V, R extends IResponse> R insert(IInsertionRequest<K, V> insertionRequest);", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest addNewEvSORequest();", "WriteRequest insert(PiEntity entity);", "Operation createOperation();", "Operation createOperation();", "@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE, produces = \"application/hal+json\")\n @ApiOperation(value = \"Retrieves an existing operator entity identified by its id if it's available for the requesting entity.\", produces = \"application/hal+json\")\n @ApiResponses({@ApiResponse(code = 200, message = \"Success!\"),\n @ApiResponse(code = 409, message = \"Operator already exists!\")})\n public ResponseEntity<EntityModel<Operator>> create(\n @RequestHeader(\"X-MBP-Access-Request\") String accessRequestHeader,\n @ApiParam(value = \"Page parameters\", required = true) Pageable pageable,\n @RequestBody OperatorRequestDTO requestDTO) throws EntityAlreadyExistsException, EntityNotFoundException {\n Operator operator = (Operator) new Operator()\n .setName(requestDTO.getName())\n .setDataModel(requestDTO.getDataModelId() == null ? null : userEntityService.getForId(dataModelRepository, requestDTO.getDataModelId()))\n .setDescription(requestDTO.getDescription())\n .setParameters(requestDTO.getParameters())\n .setRoutines(requestDTO.getRoutines())\n .setUnit(requestDTO.getUnit())\n .setAccessControlPolicyIds(requestDTO.getAccessControlPolicyIds());\n\n //Replace bad line breaks of plain text operator files\n operator.replaceLineBreaks();\n\n // Save operator in the database\n Operator createdOperator = userEntityService.create(operatorRepository, operator);\n return ResponseEntity.ok(userEntityService.entityToEntityModel(createdOperator));\n }", "public G insertar(G entity, HttpServletRequest httpRequest) throws AppException;", "public abstract void insert(DataAction data, DataRequest source) throws ConnectorOperationException;", "com.indosat.eai.catalist.standardInputOutput.RequestType addNewRequest();", "private Request addRequest(Session session, long idPackage, Date receiveTime,\n Concentrator concentrator) {\n \n Request req = new Request(idPackage, receiveTime, concentrator, null);\n session.save(req);\n int idReq = ((BigInteger) session.createSQLQuery(\"SELECT LAST_INSERT_ID()\")\n .uniqueResult()).intValue();\n req.setIdRequest(idReq);\n return req;\n }", "void createRequest(EnumOperationType opType, IParameter parameter);", "public void addRequest(Request req) {\n\n }", "Request _request(String operation);", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public com.google.common.util.concurrent.ListenableFuture<injective.ocr.v1beta1.Tx.MsgCreateFeedResponse> createFeed(\n injective.ocr.v1beta1.Tx.MsgCreateFeed request) {\n return futureUnaryCall(\n getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request);\n }", "private void insertServiceRequest() {\n Random rand = new Random();\r\n service_id = rand.nextInt(Integer.MAX_VALUE);\r\n int tokenSeed = rand.nextInt(Integer.MAX_VALUE);\r\n current_token = md5(tokenSeed + \"\");\r\n\r\n Calendar cal = Calendar.getInstance();\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\r\n String fecha = sdf.format(cal.getTime());\r\n\r\n int deliver_state = 1;\r\n\r\n int costo = (int) Math.round(destinations.get(0).total_price);\r\n\r\n ArrayList<String> param = new ArrayList<>();\r\n param.add(service_id + \"\");\r\n param.add(current_token);\r\n param.add(fecha);\r\n param.add(deliver_state + \"\");\r\n param.add(id_cliente + \"\");\r\n param.add(costo + \"\");\r\n param.add(\"0\");\r\n RestClient.get().executeCommand(\"8\", param.toString(), new Callback<Response>() {\r\n @Override\r\n public void success(Response response, retrofit.client.Response response2) {\r\n\r\n insertRoutes();\r\n }\r\n\r\n @Override\r\n public void failure(RetrofitError error) {\r\n hideOverlay();\r\n showDialog(\r\n getResources().getString(\r\n R.string.msg_serverError_title),\r\n getResources().getString(\r\n R.string.msg_serverError), false, false);\r\n }\r\n });\r\n\r\n\r\n }", "private MetaSparqlRequest createInsertMT1() {\n\t\tString sparqlStr = \"\"+\n\t\t\t\t\"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\r\\n\" + \n\t\t\t\t\"PREFIX ub: \"+_ontology+\"\\r\\n\" + \n\t\t\t\t\"INSERT DATA { GRAPH \"+_graph+\" { \"+\n\t\t\t\tbuilderBindInsert\n\t\t\t\t+\" } }\";\n\t\t\n\t\tSparqlObj sparql= new SparqlObj(sparqlStr) ;\n\t\tEndPoint endPointHost= new EndPoint(_protocol,_host,_port,\"/update\");\n\t\tMetaSparqlRequest msr = new MetaSparqlRequest(new SparqlRequest(sparql,endPointHost));\n\t\tmsr.setTripleInsert(createTripleBaseMT1());\n\t\treturn msr;\n\t}", "private long insertWaypoint(WaypointCreationRequest request) throws RemoteException {\n ITrackRecordingService trackRecordingService = serviceConnection.getServiceIfBound();\n if (trackRecordingService == null) {\n throw new IllegalStateException(\"The recording service is not bound.\");\n }\n try {\n long waypointId = trackRecordingService.insertWaypoint(request);\n if (waypointId >= 0) {\n Toast.makeText(this, R.string.marker_insert_success, Toast.LENGTH_LONG).show();\n }\n return waypointId;\n } catch (RemoteException e) {\n Toast.makeText(this, R.string.marker_insert_error, Toast.LENGTH_LONG).show();\n throw e;\n }\n }", "public AddOperationAction(Classifier classifier, Operation operation) {\n super(\"Add operation\");\n Helper.checkNotNull(classifier, \"classifier\");\n Helper.checkNotNull(operation, \"operation\");\n this.classifier = classifier;\n this.operation = operation;\n }", "@PostMapping(\"/operations\")\n @Timed\n public ResponseEntity<OperationDTO> createOperation(@Valid @RequestBody OperationDTO operationDTO) throws URISyntaxException {\n log.debug(\"REST request to save Operation : {}\", operationDTO);\n if (operationDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new operation cannot already have an ID\")).body(null);\n }\n OperationDTO result = operationService.save(operationDTO);\n return ResponseEntity.created(new URI(\"/api/operations/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "@RequestMapping(value=\"/orderentry/insert\", method= RequestMethod.POST)\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@ApiOperation(value = \"Insert Order Entries\")\n\t@ApiResponses(value = {\n\t\t\t@ApiResponse(code = 200, message = \"Ok\"),\n\t\t\t@ApiResponse(code = 400, message = \"Bad / Invalid input\"),\n\t\t\t@ApiResponse(code = 401, message = \"Authorization failed\"),\n\t\t\t@ApiResponse(code = 404, message = \"Resource not found\"),\n\t\t\t@ApiResponse(code = 500, message = \"Server error\"),\n\t})\n\tpublic Response insertOrderEntry(\n\t\t\t@RequestParam(\"foodItem\") @ApiParam(\"food item\") final String foodItem,\n\t\t\t@RequestParam(\"orderTime\") @ApiParam(\"order time (epoch)\") final String orderTime,\n\t\t\t@RequestParam(\"orderLogId\") @ApiParam(\"order log id\") final Integer orderLogId) {\n\t\t\n\t\tInteger dbResponse = orderEntryService.insertOrderEntry(foodItem, orderTime, orderLogId);\n\t\tif (dbResponse == 1) {\n\t\t\treturn Response.ok().build();\n\t\t} else {\n\t\t\treturn Response.serverError().build();\n\t\t}\n\t}", "public org.xmlsoap.schemas.wsdl.http.OperationType addNewOperation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.http.OperationType target = null;\n target = (org.xmlsoap.schemas.wsdl.http.OperationType)get_store().add_element_user(OPERATION$0);\n return target;\n }\n }", "public void createFeed(injective.ocr.v1beta1.Tx.MsgCreateFeed request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgCreateFeedResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request, responseObserver);\n }", "@Deprecated\n public Request createRequestEntity(Request request) throws RequestCreationException;", "WriteRequest insert(Iterable<? extends PiEntity> entities);", "public void createFeed(injective.ocr.v1beta1.Tx.MsgCreateFeed request,\n io.grpc.stub.StreamObserver<injective.ocr.v1beta1.Tx.MsgCreateFeedResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getCreateFeedMethod(), responseObserver);\n }", "@Override\r\n\tpublic int insertRequest(UserDto user) {\n\t\treturn 0;\r\n\t}", "public void addRequest(T request) {\n\t\tinputQueue.add(request);\n\t}", "@RequestMapping(value = \"/operations\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<OperationDTO> create(@Valid @RequestBody OperationDTO operationDTO) throws URISyntaxException {\n log.debug(\"REST request to save Operation : {}\", operationDTO);\n // if (operationDTO.getName() != null) {\n // return ResponseEntity.badRequest().header(\"Failure\", \"A new operation cannot already have an ID\").body(null);\n // }\n Operation operation = operationMapper.operationDtoToOperation(operationDTO);\n Operation result = operationRepository.save(operation);\n return ResponseEntity.created(new URI(\"/api/operations/\" + result.getName()))\n .headers(HeaderUtil.createEntityCreationAlert(\"operation\", result.getName().toString()))\n .body(operationMapper.operationToOperationDto(result));\n }", "public RequestedDocument addRequestedDocument(AddRequestedDocumentCommand aCommand);", "public interface ActionRepository {\n\n @GET(\"/action/\")\n Call<List<Action>> findAll(@Header(\"Authorization\") String token);\n\n @POST(\"/action/\")\n Call<Action> insert(@Header(\"Authorization\") String token, @Body Action action);\n}", "void saveOrUpdateExecution(Execution request);", "public long createRequest(Request _request) throws RequestManagerException, PersistenceResourceAccessException;", "Operations createOperations();", "@Insert\n long insert(Task task);", "@Override\n\tpublic void insertZzblPlantTeethOperation(ZzblPlantTeethOperation dp, HttpServletRequest request) throws Exception {\n\t\tdp.setSEQ_ID(YZUtility.getUUID());\n\t\tdp.setCreatetime(YZUtility.getCurDateTimeStr());\n\t\tString id = request.getParameter(\"id\");\n\t\tString order_number = request.getParameter(\"order_number\");\n\t\tString remove = request.getParameter(\"remove\");\n\t\tString thicknessGum = request.getParameter(\"thicknessGum\");\n\t\tString alveolarRidgeThickness = request.getParameter(\"alveolarRidgeThickness\");\n\t\tString locator = request.getParameter(\"locator\");\n\t\tString kindBone = request.getParameter(\"kindBone\");\n\t\tString plantSystem = request.getParameter(\"plantSystem\");\n\t\tString modelNumber = request.getParameter(\"modelNumber\");\n\t\tString twistingForce = request.getParameter(\"twistingForce\");\n\t\tString boneMeal = request.getParameter(\"boneMeal\");\n\t\tString coveringPeriosteum = request.getParameter(\"coveringPeriosteum\");\n\t\tString doctorSignature = request.getParameter(\"doctorSignature\");\n\t\tString signatureTime = request.getParameter(\"signatureTime\");\n\t\t\n\t\tString blm_milliliter = request.getParameter(\"blm_milliliter\");\n\t\tString plant_bonemeal = request.getParameter(\"plant_bonemeal\");\n\t\tString operation_date = request.getParameter(\"operation_date\");\n\t\tString username = request.getParameter(\"username\");\n\t String sex = request.getParameter(\"sex\");\n\t String age = request.getParameter(\"age\");\n\t String put_down = request.getParameter(\"put_down\");\n\t String operation_alltext = request.getParameter(\"operation_alltext\");\n\t dp.setPut_down(put_down);\n\t dp.setOperation_alltext(operation_alltext);\n\t dp.setAge(age);\n\t dp.setUsername(username);\n\t dp.setSex(sex);\n\t\tdp.setBlm_milliliter(blm_milliliter);\n\t\tdp.setPlant_bonemeal(plant_bonemeal);\n\t\tdp.setOperation_date(operation_date);\n\t\tdp.setRemove(remove);\n\t\tdp.setId(id);\n\t\tdp.setOrder_number(order_number);\n\t\tdp.setThicknessGum(thicknessGum);\n\t\tdp.setAlveolarRidgeThickness(alveolarRidgeThickness);\n\t\tdp.setLocator(locator);\n\t\tdp.setKindBone(kindBone);\n\t\tdp.setPlantSystem(plantSystem);\n\t\tdp.setModelNumber(modelNumber);\n\t\tdp.setTwistingForce(twistingForce);\n\t\tdp.setCoveringPeriosteum(coveringPeriosteum);\n\t\tdp.setBoneMeal(boneMeal);\n\t\tdp.setDoctorSignature(doctorSignature);\n\t\tdp.setSignatureTime(signatureTime);\n\t\topertaionDao.insertZzblPlantTeethOperation(dp);\n\t}", "public Request _request(String operation) {\n throw new NO_IMPLEMENT(reason);\n }", "@org.junit.Test\r\n\tpublic void insert() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"/org/save\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"name\", \"112\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t\tSystem.out.println(string);\r\n\t}", "ActionResult onInsert(HopperBlockEntity hopperBlockEntity, BlockPos insertPosition);", "@Override\n public EvRequest submitRequest(EvRequest request) {\n request.time = request.time.plusNanos(new Random().nextInt(250));\n String s = new ToStringCreator(request)\n .append(\"energy\", request.energy)\n .append(\"date\", request.date)\n .append(\"time\", request.time)\n .append(\"window\", request.window)\n .toString();\n logger.info(\"New request: \" + s);\n\n int hash = Objects.hash(request.energy, request.date, request.time, request.window);\n\n EvRequest copy = new EvRequest();\n copy.id = Objects.toString(Math.abs(hash));\n copy.energy = request.energy;\n copy.date = request.date;\n copy.time = request.time;\n copy.window = request.window;\n\n requests.add(copy);\n return copy;\n }", "public injective.ocr.v1beta1.Tx.MsgCreateFeedResponse createFeed(injective.ocr.v1beta1.Tx.MsgCreateFeed request) {\n return blockingUnaryCall(\n getChannel(), getCreateFeedMethod(), getCallOptions(), request);\n }", "private void insert(HttpServletRequest request)throws Exception {\n\t\tPedido p = new Pedido();\r\n\t\tCliente c = new Cliente();\r\n\t\tCancion ca = new Cancion();\r\n\t\tp.setCod_pedido(request.getParameter(\"codigo\"));\r\n\t\tca.setCod_cancion(request.getParameter(\"cod_cancion\"));\r\n\t\tc.setCod_cliente(request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCan(ca);\r\n\t\tp.setCl(c);\r\n\t\t\r\n\t\tpdmodel.RegistrarPedido(p);\r\n\t\t\r\n\t}", "private AddAction makeAddAction(boolean isImpt, String input)\r\n throws MakeActionException, InvalidDateRangeException {\r\n if (params.length == 0) {\r\n throw new MakeActionException(AddAction.ERR_INSUFFICIENT_ARGS);\r\n }\r\n AddAction addAction = new AddAction(goku);\r\n addAction.input = input;\r\n\r\n if (isImpt == true) {\r\n addAction.isImpt = true;\r\n }\r\n DateTime dl = extractDeadline();\r\n DateRange dr = extractPeriod();\r\n addAction.dline = dl;\r\n addAction.period = dr;\r\n addAction.title = extractTitle();\r\n return addAction;\r\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> create(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateMethod(), getCallOptions()), request);\n }", "@PostMapping(\"/add\")\n public EmptyResponse create(@Valid @RequestBody DiscountAddRequest request){\n discountAddService.createNewDiscount(request);\n\n return new EmptyResponse();\n }", "public void addRequest(CustomerRequest request) {\n\n\t}", "protected Response createInsertingrequest(String urlFA,JSONObject jsonObject,HttpBasicAuthFilter auth,String type){\n ClientConfig config = new ClientConfig();\n Client client = ClientBuilder.newClient(config);\n WebTarget target;\n target = client.target(getBaseURI(urlFA));\n //Response plainAnswer =null; \n target.register(auth);\n \n Invocation.Builder invocationBuilder =target.request(MediaType.APPLICATION_JSON);\n MultivaluedHashMap<String,Object> mm=new MultivaluedHashMap<String,Object>();\n mm.add(\"content-type\", MediaType.APPLICATION_JSON);\n mm.add(\"Accept\", \"application/json\");\n mm.add(\"charsets\", \"utf-8\");\n invocationBuilder.headers(mm);\n //preliminary operation of request creation ended\n Response plainAnswer=null;\n switch(type){\n case \"post\":\n {\n plainAnswer=invocationBuilder\n .post(Entity.entity(jsonObject.toString(), MediaType.APPLICATION_JSON_TYPE));\n break;\n }\n case \"put\":\n {\n plainAnswer =invocationBuilder\n .put(Entity.entity(jsonObject.toString(), MediaType.APPLICATION_JSON));\n break;\n }\n }\n return plainAnswer;\n }", "@ApiMethod(name = \"insertEvent\")\n public Event insertEvent(Event event) {\n DatastoreService datastoreService = DatastoreServiceFactory.getDatastoreService();\n // TODO: Implement this function\n logger.info(\"Calling insertEvent method\");\n return event;\n }", "com.exacttarget.wsdl.partnerapi.QueryRequest addNewQueryRequest();", "public abstract RepositoryOperation getAddOperation(URI repoLocation);", "private MetaSparqlRequest createInsertMT2() {\n\t\t//is the same of MT1\n\t\treturn createInsertMT1();\n\t}", "@CustomAnnotation(value = \"INSERT_ACTIVITY\")\n\t@RequestMapping(\n\t\t\tvalue=\"/activity\",\n\t\t\tmethod=RequestMethod.PUT,\n\t\t\tconsumes=MediaType.APPLICATION_JSON_VALUE,\n\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE\n\t\t\t)\n\tpublic ResponseEntity<Activity> createActivity(@RequestBody Activity newActivity, @Context HttpServletRequest request){\n\t\treturn new ResponseEntity<Activity>(activityService.create(newActivity), HttpStatus.OK);\n\t}", "void add(CallRecordAddReqDto req);", "Operacion createOperacion();", "@PostMapping(\"/attractions\")\n @Timed\n public ResponseEntity<Attraction> createAttraction(@RequestBody Attraction attraction) throws URISyntaxException {\n log.debug(\"REST request to save Attraction : {}\", attraction);\n if (attraction.getId() != null) {\n throw new BadRequestAlertException(\"A new attraction cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Attraction result = attractionRepository.save(attraction);\n return ResponseEntity.created(new URI(\"/api/attractions/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "@POST\r\n\t@Produces({\"application/xml\" , \"application/json\"})\r\n\t@Path(\"/order\")\r\n\tpublic String addOrder(OrderRequest orderRequest) {\n\t\tOrderActivity ordActivity = new OrderActivity();\r\n\t\treturn ordActivity.addOrder(orderRequest.getOrderDate(),orderRequest.getTotalPrice(), orderRequest.getProductOrder(),orderRequest.getCustomerEmail());\r\n\t}", "@Override\n public void addRequest(Request<?> request, Object tag) {\n request.setTag(tag);\n getRequestQueue().add(request);\n }", "@Test\n\tpublic void insertTradeRequest() {\n\t\t\n\t\tDBI dbi = TEST_ENVIRONMENT.getDbi();\n\t\tTradeDao tradeDao = dbi.onDemand(TradeDao.class);\n\t\t\n\t\tString collectionId = \"1\";\n\t\tString itemId = \"1\";\n\t\tString itemAmount = \"1\";\n\t\tTrade insertedTrade = new Trade(collectionId, itemId, itemAmount);\n\t\t\n\t\ttradeDao.insert(insertedTrade);\n\t\t\n\t\tint expectedSize = 1;\n\t\t\n\t\tList<Trade> allTrades = tradeDao.getAll();\n\t\t\n\t\tint actualSize = allTrades.size();\n\t\t\n\t\tAssert.assertEquals(\"Trade table should have 1 trade\", expectedSize, actualSize);\n\t\t\n\t\tSet<String> insertedTradeRequest = new HashSet<String>();\n\t\tDBI dbi1 = TEST_ENVIRONMENT.getDbi();\n\t\tTradeRequestDao tradeRequestDao = dbi1.onDemand(TradeRequestDao.class);\n\t\t\n\t\tString offeredCollectionId = \"1\";\n\t\tString userId = \"1\";\n\t\tString requestId = \"1\";\n\t\tTradeRequest insertedRequest = new TradeRequest(offeredCollectionId, \n\t\t\t\tuserId);\n\t\t\n\t\tinsertedRequest = insertedRequest.setRequestId(requestId);\n\t\t\n\t\ttradeRequestDao.insert(insertedRequest);\n\t\t\n\t\tint expectedSize1 = 1;\n\t\t\n\t\tList<TradeRequest> allTrades1 = tradeRequestDao.getAll();\n\t\t\n\t\tint actualSize1 = allTrades1.size();\n\t\t\n\t\tAssert.assertEquals(\"Trade Request table should have 1 Request made\", expectedSize1, actualSize1);\n\t\t\n\t}", "public GraphNode addOperation(String op){\n\t\tGraphNode opVar = new GraphNode(addElement(op, 3), 3);\n\t\tauthGraph.addVertex(opVar);\n\t\treturn opVar;\n\t}", "@Override\r\n\tpublic void doInsert(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "int insert(OauthApprovals record);", "int insert(_task record);", "@PostMapping(\"/data-set-operations\")\n @Timed\n public ResponseEntity<DataSetOperationDTO> createDataSetOperation(@Valid @RequestBody DataSetOperationDTO dataSetOperationDTO) throws URISyntaxException {\n log.debug(\"REST request to save DataSetOperation : {}\", dataSetOperationDTO);\n if (dataSetOperationDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new dataSetOperation cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n DataSetOperation dataSetOperation = dataSetOperationMapper.toEntity(dataSetOperationDTO);\n dataSetOperation = dataSetOperationRepository.save(dataSetOperation);\n DataSetOperationDTO result = dataSetOperationMapper.toDto(dataSetOperation);\n dataSetOperationSearchRepository.save(dataSetOperation);\n return ResponseEntity.created(new URI(\"/api/data-set-operations/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "com.google.spanner.v1.Mutation.Write getInsert();", "CreateResponse create(@NonNull CreateRequest request);", "public long insertFeedEntry(ActivityFeedEntity activityFeed) throws SQLException;", "@PostMapping(\"/impacts\")\n @Timed\n public ResponseEntity<Impact> createImpact(@Valid @RequestBody Impact impact) throws URISyntaxException {\n log.debug(\"REST request to save Impact : {}\", impact);\n if (impact.getId() != null) {\n throw new BadRequestAlertException(\"A new impact cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Impact result = impactRepository.save(impact);\n return ResponseEntity.created(new URI(\"/api/impacts/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public InsertDataAction() {\n\t\tsuper();\n\t}", "public InsertSymbolResponse insertSymbol(InsertSymbolRequest request) throws GPUdbException {\n InsertSymbolResponse actualResponse_ = new InsertSymbolResponse();\n submitRequest(\"/insert/symbol\", request, actualResponse_, false);\n return actualResponse_;\n }", "IOperationable create(String operationType);", "public yandex.cloud.api.operation.OperationOuterClass.Operation create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateMethod(), getCallOptions(), request);\n }", "int insert(Task record);", "@PUT\n @Timed\n public ApiResponse pushSRMFeeders(@Auth AuthUser user,\n @Valid PostPutRequest<DataScienceFeederParam> request) {\n try {\n if (request == null || request.getParam() == null) {\n throw new SupplyException(\"The request body should be provided\", HttpServletResponse.SC_BAD_REQUEST);\n }\n this.srmFeederManager.pushSRMFeeder(user, request.getParam());\n return MetadataApiResponseFactory.createResponse(null);\n } catch (Exception e) {\n return ErrorHandler.handle(e, logger);\n }\n }", "public void storeCommentFeed(GetCommentFeedRequest request, GetCommentFeedResponse response) throws SQLException {\n if (TextUtils.isEmpty(request.getCursor())) {\n DeleteBuilder<CommentFeedRelation, Integer> deleteBuilder = commentFeedDao.deleteBuilder();\n deleteBuilder.where()\n .eq(DbSchemas.CommentFeedRelation.TOPIC_HANDLE, request.getTopicHandle())\n .and()\n .eq(DbSchemas.CommentFeedRelation.FEED_TYPE, request.getCommentFeedType());\n deleteBuilder.delete();\n }\n DbTransaction.performTransaction(commentDao,\n () -> insertCommentFeedContent(request, response));\n }", "Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);", "com.exacttarget.wsdl.partnerapi.QueryRequestMsgDocument.QueryRequestMsg addNewQueryRequestMsg();", "@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE, produces = \"application/hal+json\")\n @ApiOperation(value = \"Creates a new request topic.\", produces = \"application/hal+json\")\n @ApiResponses({@ApiResponse(code = 200, message = \"Success!\"), @ApiResponse(code = 400, message = \"Request topic is invalid.\")})\n public ResponseEntity<EntityModel<RequestTopic>> create(@RequestBody RequestTopic requestTopic) throws EntityNotFoundException {\n RequestTopic createdRequestTopic = userEntityService.create(requestTopicRepository, requestTopic);\n\n //Return created request topic\n return ResponseEntity.ok(userEntityService.entityToEntityModel(createdRequestTopic));\n }", "public void addRR(Request req) {\n\n }", "public void insert(Spot spot) { mRepository.insert(spot); }", "private void addOp(Class op){\n try {\n //Create a new instance and add it to the list\n Operation operation = (Operation)op.newInstance();\n operations.put(operation.getTextualRepresentation(), operation);\n } catch (InstantiationException | IllegalAccessException ex) {\n Logger.getLogger(RPC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "int insert(ResultDto record);", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "@Override\n public Optional<CursorResourceInfo> create(String queryId, CreateCursorRequest cursorRequest) {\n Optional<QueryResource> queryResource = this.resourceStore.getQueryResource(queryId);\n if (!queryResource.isPresent()) {\n return Optional.of(new CursorResourceInfo().error(\n new FuseError(Query.class.getSimpleName(), \"failed fetching next page for query \" + queryId)));\n }\n //outer query cursor id\n String cursorId = queryResource.get().getNextCursorId();\n //inner cursors for inner queries\n createInnerCursor(queryResource.get(),cursorRequest);\n CursorResource resource = this.createResource(queryResource.get(), cursorId, cursorRequest);\n this.resourceStore.addCursorResource(queryId, resource);\n\n return Optional.of(new CursorResourceInfo(\n urlSupplier.resourceUrl(queryId, cursorId),\n cursorId,\n cursorRequest,\n urlSupplier.pageStoreUrl(queryId, cursorId)));\n }", "@Override\n\tpublic int insertAction(JSONObject params) {\n\t\tint result = -1;\n\t\tString actionId = UUIDUtil.getUUID();\n\t\tparams.put(\"actionId\", actionId);\n\t\tresult = this.insert(\"insertAction\", params);\n\t\treturn result;\n\t}", "private Request(MarketDataRequestAtom inAtom,\n MarketDataRequest inCompleteRequest)\n {\n atom = inAtom;\n receiver.subscribe(this);\n flow = moduleManager.createDataFlow(new DataRequest[] { new DataRequest(feed.getURN(),generateRequestFromAtom(inAtom,inCompleteRequest)),new DataRequest(receiver.getURN()) });\n }", "int insert(ResourcePojo record);", "public AddNodeWorkflow(AddNodeRequest request) {\n this.id = UUID.randomUUID();\n this.request = request;\n actions = ImmutableList.of(new BootstrapNode(),\n new AddNodeToLayout(),\n new RestoreRedundancy());\n }", "public void insertOffer(Offer o);", "public void addRequest(Request q) {\n\t\trequestList.add(q);\n\t}", "public AddResponse add(AddRequest request) {\n log.debug(\"Processing add request\");\n // instance variables are thread safe. here you may wanna set\n // state variables like ids, progress, etc.\n\n double a = request.getA();\n double b = request.getB();\n\n log.info(\"Processing add operation with a:{}, b:{}\", a, b);\n double sum = a + b;\n\n AddResponse addResponse = AddResponse.newBuilder().setSum(sum).build();\n return addResponse;\n }", "private <M extends Model> GraphQLRequest<M> createRequest(Class<M> clazz, Operation operation)\n throws AmplifyException {\n return AppSyncGraphQLRequest.builder()\n .modelClass(clazz)\n .operation(operation)\n .requestOptions(new ApiGraphQLRequestOptions())\n .responseType(clazz)\n .build();\n }", "protected void insert(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\t\r\n\t\tString s1= request.getParameter(\"req1\");\r\n\t\t\r\n\t\tString id4= request.getParameter(\"countid\");\r\n\t\t//Cat r1=new Cat();\r\n\t\t//r1.setId(Long.valueOf(id2));\r\n\t\t\r\n\t\r\n\t\tCountry r=new Country();\r\n\t\t\r\n\t\tr.setCountName(s1);\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\tAdd_count cu= new Add_count();\r\n\t\tcu.insert(r);\r\n\t\tresponse.sendRedirect(\"EH_Admin/manage_count.jsp\");\r\n\r\n\t\t\r\n\t\r\n\t}", "RocketDTO addRocket(CreateRocketDTO rocket);", "public void addTradeRequest(TradeRequest request){\n tradeRequests.add(request);\n }", "protected ModelNode createOperation(String address, String operation, String... params) {\n ModelNode op = new ModelNode();\n String[] pathSegments = address.split(\"/\");\n ModelNode list = op.get(\"address\").setEmptyList();\n for (String segment : pathSegments) {\n String[] elements = segment.split(\"=\");\n list.add(elements[0], elements[1]);\n }\n op.get(\"operation\").set(operation);\n for (String param : params) {\n String[] elements = param.split(\"=\");\n op.get(elements[0]).set(elements[1]);\n }\n return op;\n }", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key insertNewKey(int i);", "private MarketDataRequest generateRequestFromAtom(MarketDataRequestAtom inAtom,\n MarketDataRequest inCompleteRequest)\n {\n return MarketDataRequestBuilder.newRequest().withAssetClass(inCompleteRequest.getAssetClass()).withSymbols(inAtom.getSymbol()).withContent(inAtom.getContent()).withExchange(inAtom.getExchange()).create();\n }", "@Override\n\tpublic void insertBoard(HttpServletRequest request) throws Exception {\n \n List<Map<String,Object>> list = fileUtils.parseInsertFileInfo(request);\n for(int i=0, size=list.size(); i<size; i++){\n sampleDao.insertFile(list.get(i));\n }\n\t}" ]
[ "0.6475588", "0.63482696", "0.62743104", "0.60648704", "0.59227365", "0.5795576", "0.5795576", "0.5628517", "0.5625823", "0.56033856", "0.55627495", "0.55385906", "0.5534219", "0.54615146", "0.5381565", "0.5332984", "0.5305757", "0.5274636", "0.5242594", "0.5232737", "0.5229565", "0.522846", "0.5216317", "0.5184017", "0.5164085", "0.5155276", "0.5143212", "0.51350015", "0.5124206", "0.5114033", "0.5106634", "0.5101966", "0.50999075", "0.5092108", "0.5083972", "0.5081236", "0.50752014", "0.5028001", "0.50113046", "0.5009122", "0.5007825", "0.49729222", "0.49691075", "0.49635252", "0.49557707", "0.49458286", "0.49375293", "0.49118248", "0.4910961", "0.4902837", "0.48901847", "0.48838145", "0.48832345", "0.48736694", "0.4834021", "0.48252183", "0.4819396", "0.48184013", "0.4806301", "0.48057655", "0.48021746", "0.48005226", "0.47953948", "0.4794308", "0.4777431", "0.4776249", "0.4772192", "0.47632012", "0.47598925", "0.47592956", "0.47538984", "0.47482243", "0.47475845", "0.47423553", "0.4741825", "0.47352067", "0.4729944", "0.47176653", "0.4715655", "0.47104678", "0.47073847", "0.4707302", "0.4703481", "0.47033384", "0.4698798", "0.46964929", "0.46963695", "0.46916363", "0.4688407", "0.4685648", "0.46835536", "0.46789795", "0.467816", "0.4667249", "0.4661792", "0.46534857", "0.4653231", "0.4651719", "0.4651572", "0.4651129" ]
0.6203571
3
Create an operation that will remove a card type from the feed.
public static FeedOperation del(@HomeCard.CardType int cardType) { return new RemoveOperation(cardType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CardCollection destroyCardType(String type) ;", "public void removeByType(long typeId);", "public void actionTYPE(Node<TokenAttributes> node) {\n if (node.getChildren().get(0).getNodeData().getText().equals(\"TYPE\")) {\n BIB.removeNode(node);\n }\n }", "public void removeInputType(IInputType type);", "public static Remove remove(String byTypeURI) {\n\t\treturn new Remove(byTypeURI);\n\t}", "public boolean remove(Type t);", "void removeConnectorType(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectorTypeGUID,\n String connectorTypeExternalIdentifier,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public void removeByProductType(String productType);", "public void discard(Type type) {\n \t\tType choice = type;\n \n \t\t// pick random type if none is specified\n \t\tif (choice == null) {\n \t\t\twhile (true) {\n \t\t\t\tint pick = (int) (Math.random() * Hexagon.TYPES.length);\n \t\t\t\tif (resources[pick] > 0) {\n \t\t\t\t\tchoice = Hexagon.TYPES[pick];\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tuseResources(choice, 1);\n \n \t\tint res = Hexagon.getTypeStringResource(choice);\n \t\tappendAction(R.string.player_discarded, res);\n \t}", "void remove(KeyType key);", "Builder withReason(FlowRemoveReason reason);", "public void clear_type(String type) {\n\t\t/* Iterate through draw list */\n\t\tIterator<ArrayList<Drawable>> iter = this.drawlist.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tArrayList<Drawable> layer = iter.next();\n\t\t\t/* Iterate through the layer. */\n\t\t\tIterator<Drawable> jter = layer.iterator();\n\t\t\twhile(jter.hasNext()) {\n\t\t\t\tif(jter.next().getType().equals(type)) {\n\t\t\t\t\tjter.remove();\n\t\t\t\t}//fi\n\t\t\t}//elihw\n\t\t}//elihw\n\t}", "public void setClearCards(String type) {\r\n int currentSize = getGiftCardList().size();\r\n \r\n setGiftCardList(new ArrayList());\r\n for (int i = 0; i < currentSize; i++) {\r\n addBlankGiftCard(getGiftCardList());\r\n }\r\n \r\n setGiftCardTempList(new ArrayList());\r\n for (int i = 0; i < getMaxNumGiftCards(); i++) {\r\n addBlankGiftCard(getGiftCardTempList());\r\n }\r\n }", "public void removePresentCard() {\n storageCards.remove();\n }", "DeleteType createDeleteType();", "void unsetType();", "private void setPlayerDeckByCardType(List<CardModel> cards, EnumHandler.CardType cardType) {\n ArrayList<CardModel> playerCards=playerModel.getDeck();\n ArrayList<CardModel> playerCardsToRemove=new ArrayList<CardModel>();\n int cardCounter=0;\n int cardsLimit=(3 * (cards.size()/ 3));\n if(cards!=null){\n\n for (int i = 0; i < playerCards.size(); i++){\n if(playerCards.get(i).getCardType() == cardType && cardCounter<cardsLimit){\n playerCardsToRemove.add(playerCards.get(i));\n cardCounter=cardCounter+1;\n }\n }\n if(playerCardsToRemove.size() >0) {\n playerCards.removeAll(playerCardsToRemove);\n }\n cardCounter=0;\n }\n }", "<T extends Component> Optional<T> removeComponent(Class<T> type);", "int deleteByExample(CardExample example);", "public abstract void removeAction(Context context, NAAction action);", "@PostMapping(value = \"/delete\", produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n @PreAuthorize(\"@permissionApplication.canWrite(#typeFichierDto.application.id,principal)\")\n public ResponseEntity<Void> removeTypeFichier(@RequestBody TypeFichierDto typeFichierDto) {\n LOGGER.debug(\"REST request to remove a type fichier\");\n typeFichierService.deleteTypeFichier(typeFichierDto.getId());\n return new ResponseEntity<>(HttpStatus.OK);\n }", "void delete(String typeName, String id);", "public void addResourceCard(HexType type){\n \n }", "public maestro.payloads.FlyerFeaturedItem.Builder clearType() {\n type = null;\n fieldSetFlags()[0] = false;\n return this;\n }", "void removeRocket(RocketDTO rocket);", "public boolean delete(String cardid);", "public void removeIngredient(String type) {\n\t\tMyStack newBurger = new MyStack();\n\t\twhile (myBurger.size() != 0) {\n\t\t\tif (myBurger.peek().equals(type)) {\n\t\t\t\tmyBurger.pop();\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\tnewBurger.push(ingredient);\n\t\t\t}\n\t\t}\n\t\twhile (newBurger.size() != 0) {\n\t\t\tString ingredient = (String) newBurger.pop();\n\t\t\tmyBurger.push(ingredient);\n\t\t}\n\t\tif (type.equals(\"Beef\") || type.equals(\"Chicken\") || type.equals(\"Veggie\")) {\n\t\t\tpattyCount--;\n\t\t}\n\t}", "public int remove(ArcanaType type, Integer amount)\n {\n int typeAmount = this.arcanaMixMap.getOrDefault(type,0);\n int removeAmount = max(amount,typeAmount);\n\n this.arcanaMixMap.put(type,typeAmount-removeAmount);\n\n this.totalArcana-=removeAmount;\n return removeAmount;\n }", "void removeCardFromArgument(UUID argumentId, UUID cardId, short index);", "public void cancelCard() {}", "@WebMethod public void removePaymentMethod(Account user,String card);", "public Integer deletePaymentType(PaymentTypeObject paymentTypeObject) throws AppException;", "public CardDeletedCommand(Card card) {\n this.card = card;\n }", "public void remove(int type) {\n\t\tint n = check(type);\n\t\tif (n >= 64) {\n\t\t\tn1 &= ~mask(n - 64);\n\t\t} else {\n\t\t\tn0 &= ~mask(n);\n\t\t}\n\t}", "public void setPlayerDeckByCardType(List<CardModel> cards, EnumHandler.CardType cardType, int numbeOfUnits) {\n ArrayList<CardModel> playerCards=playerModel.getDeck();\n ArrayList<CardModel> playerCardsToRemove=new ArrayList<CardModel>();\n int cardCounter=0;\n if(cards!=null){\n\n for (int i = 0; i < playerCards.size(); i++){\n if(playerCards.get(i).getCardType() == cardType && cardCounter<numbeOfUnits){\n playerCardsToRemove.add(playerCards.get(i));\n cardCounter=cardCounter+1;\n }\n }\n if(playerCardsToRemove.size() > 0) {\n playerCards.removeAll(playerCardsToRemove);\n }\n cardCounter=0;\n }\n\n\n /// CardModel card = cards.stream().filter(x -> x.getCardType().equals(cardType)).findFirst().get();\n// if (card != null) {\n// //card.setNumberOfCards(card.getNumberOfCards() - numbeOfUnits);\n// }\n\n }", "@DELETE\n @Path(\"/actions/{actionTypeId}\")\n public void removeActionType(@PathParam(\"actionTypeId\") String actionTypeId) {\n definitionsService.removeActionType(actionTypeId);\n }", "public static void destroyType() {\n\t\t\n\t}", "ResponseEntity<Cart> removeCartItem(CartFormData formData);", "private void removeCard() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC ID number you'd like to remove:\");\n\t\tsic_idHolder = scan.nextInt(); // prompts user to input sic_idHolder\n\t\tscan.nextLine();\n\t\t\n\t\tinventoryObject.removeStockIndexCard(sic_idHolder); //calls removeStockIndexCard from InventoryManagement\n\t\tgetUserInfo();\n\t}", "public void removeMediaType( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.model, this.getResource(), MEDIATYPE, value);\r\n\t}", "Set<Card> remove();", "public void discard(Card card) {\n discardPile.add(card);\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public void cancelCard(String cardNumber) {}", "public final void removeType(CompositeType type, int index)\n {\n\tif(!type.getIsInferred()) {\n\t listModel.removeElementAt(index);\n\t //System.out.println(\"in TypeManager.removeType, index = \" + index);\n\t}\n\t\n\tindex = -1;\n\tfor (int i = 0; i < allTypes.size(); i++) {\n\t CompositeType otherType = (CompositeType)allTypes.get(i);\n\t if ((otherType.getName()).equals(type.getName())) {\n\t\tindex = i;\n\t }\n\t}\n\t//System.out.println(\"in TypeManager.removeType, vector index = \" + index);\n\t\n\tif (index != -1) {\n\t allTypes.removeElementAt(index);\n\t}\n }", "public static void removeByRunType(String runType) {\n\t\tgetPersistence().removeByRunType(runType);\n\t}", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n \n type_ = 0;\n onChanged();\n return this;\n }", "public void unsetContructionType()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(CONTRUCTIONTYPE$24);\r\n }\r\n }", "public void removeActionType(ActionTypeDescriptor actionType) {\r\n this.actionTypes.remove(actionType);\r\n }", "FlowRemoveReason reason();", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public void unsetMediaType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(MEDIATYPE$18);\n }\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public Builder clearType() {\n\n type_ = 0;\n onChanged();\n return this;\n }", "public void removeCategory(String type) {\n\t\tif (type.equals(\"Sauces\")) {\n\t\t\tthis.removeIngredient(\"Ketchup\");\n\t\t\tthis.removeIngredient(\"Mustard\");\n\t\t\tthis.removeIngredient(\"Mayonnaise\");\n\t\t\tthis.removeIngredient(\"Baron-Sauce\");\n\t\t} else if (type.equals(\"Cheese\")) {\n\t\t\tthis.removeIngredient(\"Cheddar\");\n\t\t\tthis.removeIngredient(\"Mozzarella\");\n\t\t\tthis.removeIngredient(\"Pepperjack\");\n\t\t} else if (type.equals(\"Veggies\")) {\n\t\t\tthis.removeIngredient(\"Lettuce\");\n\t\t\tthis.removeIngredient(\"Tomato\");\n\t\t\tthis.removeIngredient(\"Onions\");\n\t\t\tthis.removeIngredient(\"Pickle\");\n\t\t\tthis.removeIngredient(\"Mushrooms\");\n\t\t}\n\t}", "public void deleteCard(final int id) {\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Start: ERetailCardTypeServiceImpl.deleteCard()\");\n\t\t}\n\t\tCardTypeServiceClient.deleteCard(id);\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"End: ERetailCardTypeServiceImpl.deleteCard()\");\n\t\t}\n\n\t}", "public void removeType(String name) {\n String nameInLowerCase = Ascii.toLowerCase(name);\n Preconditions.checkState(!registered);\n Preconditions.checkArgument(types.containsKey(nameInLowerCase), \"missing key: %s\", name);\n types.remove(nameInLowerCase);\n }", "public boolean delete(@SuppressWarnings(\"rawtypes\") Class type, String key);", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "boolean delete(Long id, Class<T> type);", "public MockServerClient clear(RequestDefinition requestDefinition, ClearType type) {\n sendRequest(\n request()\n .withMethod(\"PUT\")\n .withContentType(APPLICATION_JSON_UTF_8)\n .withPath(calculatePath(\"clear\"))\n .withQueryStringParameter(\"type\", type.name().toLowerCase())\n .withBody(requestDefinition != null ? requestDefinitionSerializer.serialize(requestDefinition) : \"\", StandardCharsets.UTF_8),\n true\n );\n return clientClass.cast(this);\n }", "public <T extends Component> T removeComponent(Class<T> componentType);", "public void removeMediaType(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), MEDIATYPE, value);\r\n\t}", "public Type remove(int index);", "@Test\n public void removeFromAllTypesTest(){\n ResourceStack stack5 = new ResourceStack(50, 50, 50, 50);\n ResourceStack stack6 = new ResourceStack(10, 15, 20, 25);\n stack5.removeFromAllTypes(stack6);\n\n assertEquals(40, stack5.getResource(ResourceType.SHIELDS));\n assertEquals(35, stack5.getResource(ResourceType.SERVANTS));\n assertEquals(30, stack5.getResource(ResourceType.COINS));\n assertEquals(25, stack5.getResource(ResourceType.STONES));\n\n stack6 = new ResourceStack(123, 432235, 55, 1);\n stack5.removeFromAllTypes(stack6);\n\n assertEquals(0, stack5.getResource(ResourceType.SHIELDS));\n assertEquals(0, stack5.getResource(ResourceType.SERVANTS));\n assertEquals(0, stack5.getResource(ResourceType.COINS));\n assertEquals(24, stack5.getResource(ResourceType.STONES));\n }", "public void remove(Card card) {\r\n\t\tcards.remove(card);\r\n\t}", "@Override\n public void deleteType(String repositoryId, String typeId, ExtensionsData extension) {\n CmisSpi spi = CmisBindingsHelper.getSPI(session);\n spi.getRepositoryService().deleteType(repositoryId, typeId, extension);\n\n // remove the type from cache\n TypeDefinitionCache cache = CmisBindingsHelper.getTypeDefinitionCache(session);\n cache.remove(repositoryId, typeId);\n }", "Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);", "public abstract void remove(Class<?> entity, Object paramObject);", "public Builder clearType() {\n\n\t\t\t\t\ttype_ = 0;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "public static void removeMediaType(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.remove(model, instanceResource, MEDIATYPE, value);\r\n\t}", "public void removeChild( ChildType child );", "public Builder clearType() {\n\n\t\t\t\ttype_ = 0;\n\t\t\t\tonChanged();\n\t\t\t\treturn this;\n\t\t\t}", "int deleteByPrimaryKey(String card);", "public synchronized void createDisconnectOrRemoveClusterSubscription(AndesSubscription subscription,\n SubscriptionChange type) throws AndesException {\n\n if (SubscriptionChange.ADDED == type) {\n clusterSubscriptionProcessor.addSubscription(subscription);\n } else if (SubscriptionChange.DELETED == type) {\n clusterSubscriptionProcessor.removeSubscription(subscription);\n } else if (SubscriptionChange.DISCONNECTED == type) {\n subscription.setHasExternalSubscriptions(false);\n clusterSubscriptionProcessor.updateSubscription(subscription);\n }\n }", "public CardCollection destroyCards(List<AbstractCard> cardsToDestroy) ;", "public Builder clearType() {\n bitField0_ = (bitField0_ & ~0x00000001);\n type_ = com.rpg.framework.database.Protocol.ItemType.ITEM_TYPE_USE;\n onChanged();\n return this;\n }", "void clearConnectorType(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String connectionGUID,\n String connectorTypeGUID,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "public CommandBase removeCmd(String name){\n\t\treturn cmds.remove(name.toLowerCase());\n\t}", "public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }", "public void setCardType(java.lang.String cardType) {\r\n this.cardType = cardType;\r\n }", "public void clearTokenType() {\n genClient.clear(CacheKey.tokenType);\n }", "void remove(KeyType key, ValueType value);", "public void removeType(ModelContainer model, OWLIndividual i, \n\t\t\tOWLClassExpression ce, METADATA metadata) {\n\t\tSet<OWLClassAssertionAxiom> allAxioms = model.getAboxOntology().getClassAssertionAxioms(i);\n\t\t// use search to remove also axioms with annotations\n\t\tfor (OWLClassAssertionAxiom ax : allAxioms) {\n\t\t\tif (ce.equals(ax.getClassExpression())) {\n\t\t\t\tremoveAxiom(model, ax, metadata);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic String delFoodType(int typeid) {\n\t\treturn ftb.delFoodType(typeid);\n\t}", "public void unsetTypeId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(TYPEID$2, 0);\n }\n }", "public void removeFromInventoryDHandles (String inputType, String inputColor, String inputStandard){\n }", "void removeCategory(Category category);", "public abstract <T> T delete(String name, Class<T> clazz);", "public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }", "public void removeByDataTypeId(long dataTypeId);", "@Override\n\tpublic boolean delTypeFood(int typeid) {\n\t\treturn fb.delTypeFood(typeid);\n\t}" ]
[ "0.755281", "0.5842887", "0.5750768", "0.5661536", "0.56161994", "0.5583863", "0.5538959", "0.55189973", "0.54530376", "0.54498684", "0.5441255", "0.541625", "0.5411811", "0.5383138", "0.53799295", "0.5371542", "0.5341632", "0.5284613", "0.52651566", "0.52641076", "0.52475184", "0.5233586", "0.5230688", "0.5193866", "0.51875025", "0.5150214", "0.51462615", "0.51361686", "0.51326007", "0.5130642", "0.51004714", "0.509888", "0.5094689", "0.50874066", "0.50690895", "0.50341254", "0.50297505", "0.50291973", "0.5027485", "0.50240993", "0.5020371", "0.5019807", "0.50196457", "0.501893", "0.50039005", "0.49891898", "0.49867415", "0.49867415", "0.49867415", "0.49867415", "0.49867415", "0.49867415", "0.49867415", "0.49794638", "0.49709877", "0.49697533", "0.4964796", "0.4962174", "0.49602357", "0.4956938", "0.4956938", "0.4956938", "0.4954113", "0.49516726", "0.49486652", "0.49472114", "0.49367204", "0.4931831", "0.49302447", "0.49265042", "0.48987898", "0.48949134", "0.48948562", "0.4886658", "0.48847002", "0.48822397", "0.48736885", "0.48689184", "0.48573488", "0.48564702", "0.48506662", "0.48399416", "0.48271254", "0.48232588", "0.4817192", "0.48084465", "0.48061165", "0.48028752", "0.48012245", "0.47993132", "0.47990304", "0.47983357", "0.47926787", "0.478926", "0.47856826", "0.47810858", "0.4774211", "0.47725412", "0.476525", "0.47581697" ]
0.7571447
0
Create a RecordEnumeration from the network. Query a network service for addresses matching the specified criteria. The base URL of the service has the query parameters appended. The request is made and the contents parsed into a Vector which is used as the basis of the RecordEnumeration. lastname the last name to search for firstname the first name to search for sortorder the order in which to sort 1 is by last name, 0 is by first name
public NetworkQuery(String firstname, String lastname, int sortorder) { HttpConnection c = null; int ch; InputStream is = null; InputStreamReader reader; String url; // Format the complete URL to request buffer.setLength(0); buffer.append(baseurl); buffer.append("?last="); buffer.append((lastname != null) ? lastname : empty); buffer.append("&first="); buffer.append((firstname != null) ? firstname : empty); buffer.append("&sort=" + sortorder); url = buffer.toString(); // Open the connection to the service try { c = open(url); results.removeAllElements(); /* * Open the InputStream and construct a reader to convert from bytes * to chars. */ is = c.openInputStream(); reader = new InputStreamReader(is); while (true) { int i = 0; fields[0] = empty; fields[1] = empty; fields[2] = empty; fields[3] = empty; fields[4] = empty; fields[5] = empty; fields[6] = empty; do { buffer.setLength(0); while ((ch = reader.read()) != -1 && (ch != ',') && (ch != '\n')) { if (ch == '\r') { continue; } buffer.append((char) ch); } if (ch == -1) { throw new EOFException(); } if (buffer.length() > 0) { if (i < fields.length) { fields[i++] = buffer.toString(); } } } while (ch != '\n'); if (fields[0].length() > 0) { results.addElement(SimpleRecord.createRecord(Integer.valueOf(fields[0]), fields[1], fields[2], fields[3], fields[4], Integer.valueOf(fields[5]), fields[6])); } } } catch (Exception e) { } finally { try { if (is != null) { is.close(); } if (c != null) { c.close(); } } catch (Exception e) { } } resultsEnumeration = results.elements(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initData() {\r\n allElements = new Vector<PageElement>();\r\n\r\n String className = Utility.getDisplayName(queryResult.getOutputEntity());\r\n List<AttributeInterface> attributes = Utility.getAttributeList(queryResult);\r\n int attributeSize = attributes.size();\r\n //int attributeLimitInDescStr = (attributeSize < 10) ? attributeSize : 10;\r\n\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n serviceURLComboContents.add(\" All service URLs \");\r\n for (String url : allRecords.keySet()) {\r\n\r\n List<IRecord> recordList = allRecords.get(url);\r\n \r\n StringBuilder urlNameSize = new StringBuilder( url );\r\n urlNameSize = new StringBuilder( urlNameSize.substring(urlNameSize.indexOf(\"//\")+2));\r\n urlNameSize = new StringBuilder(urlNameSize.substring(0,urlNameSize.indexOf(\"/\")));\r\n urlNameSize.append(\" ( \" + recordList.size() + \" )\");\r\n serviceURLComboContents.add(urlNameSize.toString());\r\n Vector<PageElement> elements = new Vector<PageElement>();\r\n for (IRecord record : recordList) {\r\n StringBuffer descBuffer = new StringBuffer();\r\n for (int i = 0; i < attributeSize; i++) {\r\n Object value = record.getValueForAttribute(attributes.get(i));\r\n if (value != null) {\r\n if (i != 0) {\r\n descBuffer.append(',');\r\n }\r\n descBuffer.append(value);\r\n }\r\n }\r\n String description = descBuffer.toString();\r\n // if (description.length() > 150) {\r\n // //150 is allowable chars at 1024 resolution\r\n // description = description.substring(0, 150);\r\n // //To avoid clipping of attribute value in-between\r\n // int index = description.lastIndexOf(\",\");\r\n // description = description.substring(0, index);\r\n // }\r\n PageElement element = new PageElementImpl();\r\n element.setDisplayName(className + \"_\" + record.getRecordId().getId());\r\n element.setDescription(description);\r\n\r\n DataRow dataRow = new DataRow(record, queryResult.getOutputEntity());\r\n dataRow.setParent(parentDataRow);\r\n dataRow.setAssociation(queryAssociation);\r\n\r\n Vector recordListUserObject = new Vector();\r\n recordListUserObject.add(dataRow);\r\n recordListUserObject.add(record);\r\n\r\n element.setUserObject(recordListUserObject);\r\n\r\n allElements.add(element);\r\n elements.add(element);\r\n }\r\n URLSToResultRowMap.put(urlNameSize.toString(), elements);\r\n }\r\n }", "public AddressBook search(String query)\n {\n Integer count = 0;\n Integer size = addressEntryList.size();\n AddressBook ab = new AddressBook();\n int indexes[] = new int[size];\n //For loop, iterating through our entire list of Address Entries\n for (int i = 0; i < addressEntryList.size(); i++)\n {\n //If the lastname is the search query\n if(addressEntryList.get(i).getLastName().contains(query))\n {\n indexes[count] = i;\n count++;\n }\n }\n //If we found anything\n if (count > 0)\n {\n //Add entries found\n for (int i = 0; i < count; i++)\n {\n ab.addressEntryList.add(addressEntryList.get(indexes[i]));\n }\n }\n //No entries were found\n else {\n System.out.println(\"No entries were found.\");\n }\n\n return ab;\n\n }", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query, Pagination pagination);", "public interface ContentList extends Enumeration\n{\n /**\n * Gets the number of ContentEntry objects in this ContentList.\n * \n * @return Number of entries in this list. Returns 0 if the list is empty.\n */\n public int size();\n\n /**\n * Gets to total number of ContentEntry matches in the filter, browse or\n * search operation that generated this ContentList. This value SHALL be\n * greater than or equal to the value returned from the size() method of\n * this ContentList.\n * \n * This value SHALL be greater than the value returned from the size()\n * method of this ContentList if the <i>requestedCount</i> parameter of the\n * originating content entry request was less than the total entry matches\n * of the requesting operation.\n * \n * See {@link org.ocap.hn.ContentServerNetModule}.\n * \n * \n * @return the total number of ContentEntry matches from the originating\n * content entry request\n */\n public int totalMatches();\n\n /**\n * Sets the metadata sort order of the items in this list based on metadata\n * key identifiers using signed property values.\n * \n * The sortOrder parameter of this method is a string containing the\n * properties and sort modifiers to be used to sort the resulting\n * ContentList. The format of the string containing the sort criteria shall\n * follow the format defined in UPnP Content Directory Service 3.0\n * specification section 2.3.16: A_ARG_TYPE_SortCriteria.\n * \n * @param sortOrder\n * a String representing the sortOrder for this ContentList.\n */\n public void setSortOrder(String sortOrder);\n\n /**\n * Gets the sort order set by the #setSortOrder method.\n * \n * @return The array of sort keys, or null if the setPreferredSortOrder\n * method has not been called for this list.\n */\n public String getSortOrder();\n\n /**\n * Finds the first {@link ContentEntry} which identifier for the key '\n * <code>key</code>' equals the given object <code>obj</code>. For instance,\n * if key == \"Title\" then obj represents the title, e.g. \"Best movie ever\"\n * and this method will return the first ContentEntry in the list than\n * contains a match for the (key, value) pair.\n * \n * @param key\n * The identifier key.\n * @param value\n * The object to compare to\n * \n * @return The first matched ContentEntry, or null if no match found.\n */\n public ContentEntry find(String key, Object value);\n\n /**\n * Finds the first ContentEntry which matches the search. The keys and\n * values parameters are parallel arrays. For example, if keys[0] == \"TITLE\"\n * and values[0] == \"Best movie ever\", the implementation SHALL match the\n * first ContentEntry in the list where the metadata contains that (key,\n * value) pair, as well as matches any other entries in the parameter\n * arrays.\n * \n * @param keys\n * Array of identifier keys.\n * @param values\n * Array of values.\n * \n * @return The first matching ContentEntry found, or null if no match. If\n * the parameter arrays are not the same length this method returns\n * null.\n */\n public ContentEntry find(String[] keys, Object[] values);\n\n /**\n * Finds all ContentEntry objects which match the search. Same as the\n * #find(String[], Object[]) method except all matches are returned instead\n * of just the first match.\n * \n * @param keys\n * Array of identifier keys.\n * @param values\n * Array of values.\n * \n * @return A ContentList containing all matches, or null if no matches were\n * found.\n */\n public ContentList findAll(String[] keys, Object[] values);\n\n /**\n * Filters the ContentList. The returned ContentList is a new ContentList\n * only containing ContentItems on which ContentDatabaseFilter.accept\n * returned true.\n * \n * @param filter\n * the ContentDatabaseFilter\n * \n * @return newly created ContentList containing only the filtered\n * ContentItems.\n * \n * @throws DatabaseException\n * ; see DatabaseException for exception reasons.\n */\n public ContentList filterContentList(ContentDatabaseFilter filter) throws DatabaseException;\n}", "private Collection<Record> getResults(SimpleSurnameAndPostcodeQuery query) {\n\t\treturn search(query);\n\t}", "private void search(int i) throws UnsupportedEncodingException{\n //assemble the esearch URL\n String base = \"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/\";\n String url = base + \"esearch.fcgi?db=\" + db;\n \n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > URL :\" + url);\n } \n\n // send POST request\n RequestConfig globalConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.IGNORE_COOKIES).build();\n CloseableHttpClient client = HttpClients.custom().setDefaultRequestConfig(globalConfig).build();\n \n HttpPost request = new HttpPost (url);\n List <NameValuePair> nvps = new ArrayList <>();\n nvps.add(new BasicNameValuePair(\"term\", queries.get(i)));\n nvps.add(new BasicNameValuePair(\"usehistory\", \"y\"));\n request.setEntity(new UrlEncodedFormEntity(nvps));\n\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > query : \" + queries.get(i));\n } \n \n CloseableHttpResponse response;\n try {\n response = client.execute(request);\n BufferedReader rd = new BufferedReader( new InputStreamReader(response.getEntity().getContent()));\n StringBuffer result = new StringBuffer();\n String line = \"\";\n\n Matcher matcher = null;\n while ((line = rd.readLine()) != null) {\n //parse WebEnv, QueryKey and Count (# records retrieved)\n if(line.startsWith(\"<eSearchResult>\")){\n// System.out.println(line);\n //Get webEnv\n matcher = webEnvPattern.matcher(line);\n if (matcher.find())\n {\n webEnvs.add(i,matcher.group(1));\n } else {\n System.out.println(\"No WebEnv found in \" + line);\n }\n // get QueryKey\n matcher = queryKeyPattern.matcher(line);\n if (matcher.find())\n {\n queryKeys.add(i,matcher.group(1));\n } else {\n System.out.println(\"No QueryKey found in \" + line);\n }\n // get Count\n matcher = countPattern.matcher(line);\n if (matcher.find())\n {\n counts.add(i,matcher.group(1));\n } else {\n System.out.println(\"No Count found in \" + line);\n }\n } else if (line.startsWith(\"<ERROR>\")){\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > ERROR :\" + line);\n System.out.println(line);\n }\n// just for testing\n// result.append(line);\n// if(debugMode) {\n// System.out.println(\" \\t\\t\" + line );\n// }\n }\n response.close();\n \n // Log printing\n if(debugMode) {\n if(counts.size() > 0 && queryKeys.size() > 0 && webEnvs.size() > 0 ){\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Search data :\" \n + \"\\t count > \" + counts.get(i)\n + \",\\t queryKey > \" + queryKeys.get(i)\n + \",\\t WebEnv > \" + webEnvs.get(i));\n } else {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Search data : No count and/or queryKey and/or WebEnv found \" );\n }\n } \n } catch (IOException ex) {\n // Log printing\n if(debugMode) {\n System.out.println(\" \" + new Date().toString() + \" \" + db + \" Search > Exception :\" + ex.getMessage());\n } \n } \n }", "public BerString Request(int referenceId, int smallSetUpperBound,\n\t\tint largeSetLowerBound, int mediumSetPresentNumber,\n\t\tint replaceIndicator, String resultSetName, \n\t\tString databaseNames, String smallSetElementSetNames, \n\t\tString mediumSetElementSetNames, String preferredRecordSyntax, \n\t\tString query, int query_type, String searchResultsOID,\n\t \tDataDir Z39attributesPlusTerm, \n DataDir oclcUserInfo,\n String oclcUserInfoOID, Object rankQuery, String rankOID,\n int extraLen, int offset) {\n\t DataDir parm = null, subdir = null;\n\t StringTokenizer st;\n\n // Reset for a new request\n reset();\n\n\t DataDir dir = new DataDir(Z39api.searchRequest, (int)ASN1.CONTEXT);\n\t if (referenceId != 0)\n\t dir.add(Z39api.ReferenceId, ASN1.CONTEXT, referenceId);\n\n\t\t\n\t dir.add(Z39searchApi.smallSetUpperBound, ASN1.CONTEXT,\n\t\tsmallSetUpperBound);\n\t dir.add(Z39searchApi.largeSetLowerBound, ASN1.CONTEXT,\n\t\tlargeSetLowerBound);\n\t dir.add(Z39searchApi.mediumSetPresentNumber, ASN1.CONTEXT,\n\t\tmediumSetPresentNumber);\n\t dir.add(Z39searchApi.replaceIndicator, ASN1.CONTEXT,\n\t\treplaceIndicator);\n\t\n\t zsession.ResultSetNames.addElement(resultSetName);\n\t if(zsession != null && zsession.utf8Encode)\n\t\tdir.addUTF(Z39searchApi.resultSetName, ASN1.CONTEXT, \n\t\t\t resultSetName); \n\t else \n\t\tdir.add(Z39searchApi.resultSetName, ASN1.CONTEXT, resultSetName); \n \n\n\t parm = dir.add(Z39searchApi.databaseNames, ASN1.CONTEXT);\n\t st = new StringTokenizer(databaseNames, \" \");\n\t while (st.hasMoreTokens())\n\t\tif(zsession!=null && zsession.utf8Encode)\n\t\t parm.addUTF(Z39api.DatabaseName, ASN1.CONTEXT, st.nextToken()); \n\t\telse \n\t\t parm.add(Z39api.DatabaseName, ASN1.CONTEXT, st.nextToken()); \n\n\t if (smallSetElementSetNames != null)\n\t {\n\t\tsubdir = dir.add(Z39searchApi.smallSetElementSetNames, \n\t\t ASN1.CONTEXT);\n\t\tif(zsession!=null && zsession.utf8Encode) \n\t\t subdir.addUTF(Z39presentApi.genericElementSetName, \n\t\t\t\t ASN1.CONTEXT, smallSetElementSetNames); \n\t\telse \n\t\t subdir.add(Z39presentApi.genericElementSetName, ASN1.CONTEXT, \n\t\t\t smallSetElementSetNames); \n\t }\n\n\t if (mediumSetElementSetNames != null)\n\t {\n\t\tsubdir = dir.add(Z39searchApi.mediumSetElementSetNames,\n\t\t ASN1.CONTEXT);\n\t\tif(zsession!=null && zsession.utf8Encode) \n\t\t subdir.addUTF(Z39presentApi.genericElementSetName, \n\t\t\t\t ASN1.CONTEXT, mediumSetElementSetNames); \n\t\telse \n\t\t subdir.add(Z39presentApi.genericElementSetName, ASN1.CONTEXT, \n\t\t\t mediumSetElementSetNames); \n\t }\n\n\t if (preferredRecordSyntax != null)\n\t\tdir.addOID(Z39presentApi.PreferredRecordSyntax, ASN1.CONTEXT,\n\t\t preferredRecordSyntax);\n\t else\n\t\tdir.addOID(Z39presentApi.PreferredRecordSyntax, ASN1.CONTEXT,\n\t\t Z39presentApi.MARC_SYNTAX);\n\t parm = dir.add(Z39searchApi.query, ASN1.CONTEXT);\n\n\t if (Z39attributesPlusTerm != null && query_type != 0)\n\t {\n\t parm = parm.add(query_type, ASN1.CONTEXT);\n\t parm.addOID(ASN1.OBJECTIDENTIFIER, ASN1.UNIVERSAL, \n\t\t \"1.2.840.10003.3.1\");\n\t\tparm.add(Z39attributesPlusTerm);\n\t }\n\t else if (query_type==1 || query_type==100) // 100 for backward comp.\n\t {\n\t\tif (!this.make_type_x(query, parm, Z39searchApi.type_1, zsession, true))\n\t\t return null;\n\t }\n\t else if (query_type==101)\n\t {\n\t\tif (!this.make_type_x(query, parm, Z39searchApi.type_101, zsession, true))\n\t\t return null;\n\t }\n\t else if (query_type==0) {\n\t\tif(zsession !=null && zsession.utf8Encode) \n\t\t parm.addUTF(Z39searchApi.type_0, ASN1.CONTEXT, query); \n\t\telse \n\t\t parm.add(Z39searchApi.type_0, ASN1.CONTEXT, query); \n\t }\n\n\n\t if (searchResultsOID != null)\n\t {\n // The FirstSearch request is built with the\n // the InfoCategory field in the otherInformation request\n if (searchResultsOID.equals(oclcUserInformation6.OID)) {\n\n \t\t OtherInformation.addOIDandData(dir,\n oclcUserInformation6.OID, 1, \n Z39searchApi.additionalSearchInfo);\n }\n else \n \t\t OtherInformation.addOIDandData(dir, searchResultsOID,\n\t\t null, Z39searchApi.additionalSearchInfo);\n\t }\n\n if (oclcUserInfo != null) {\n OtherInformation.addOIDandData(dir, oclcUserInfoOID,\n oclcUserInfo, Z39searchApi.additionalSearchInfo);\n }\n\n if (rankQuery != null)\n {\n DataDir t = null;\n \n if (rankQuery instanceof DataDir)\n t = (DataDir)rankQuery;\n else\n {\n t = new DataDir(0, (byte)0);\n\t\t if (query_type != 0) {\n\t\t\tif (!this.make_type_x((String)rankQuery, t,\n\t\t\t Z39searchApi.type_101, zsession, true))\n\t\t\t t = null;\n\t\t } else if (query_type == 0) {\n\t\t\tif(zsession!=null && zsession.utf8Encode) \n\t\t\t t.addUTF(Z39searchApi.type_0, ASN1.CONTEXT, \n\t\t\t\t (String)rankQuery); \n\t\t\telse \n\t\t\t t.add(Z39searchApi.type_0, ASN1.CONTEXT, \n\t\t\t (String)rankQuery); \n\t\t }\n\t\t if (t != null)\n\t\t\tt = t.child();\n }\n if (t != null)\n OtherInformation.addOIDandData(dir,\n oclcUserInformation8.OID,\n oclcUserInformation8.buildDir(rankOID, t),\n Z39searchApi.additionalSearchInfo);\n }\n\n if (zsession != null && zsession.sessionId != null)\n {\n OtherInformation.addOIDandData(dir,\n oclcUserInformation2.OID, \n oclcUserInformation2.buildDir(null, 0, zsession.sessionId));\n }\n\n if (zsession.logger != null && \n\t\tzsession.logger.getLevel() == Z39logging.HIGH) {\n synchronized (zsession.logger) {\n\t\tzsession.logger.println(\"SEARCH REQUEST: \" + dir.toString());\n }\n } \n\n\n requestLength = dir.recLen() + extraLen;\n\t if (extraLen != 0 || offset != 0)\n return new BerString(dir, extraLen, offset);\n else\n return new BerString(dir);\n\t}", "private WebSearchRequest createNextRequest() {\n\t\tWebSearchRequest _request = new WebSearchRequest(query);\n\t\t_request.setStart(BigInteger.valueOf(cacheStatus+1));\t\t\t\t\t//Yahoo API starts index with 1, not with 0\n\t\t_request.setResults(getFetchBlockSize());\n\t\treturn _request;\n\t}", "void remoteSearch(String groupId, String type, String attr, \n String value, int threshold, String serviceHandler, \n DiscoveryListener listener)\n \tthrows IOException\n {\n Query query = new Query(groupId, type, attr, value, \n serviceHandler,listener);\n \n queries.put(listener, query);\n \n\t //if resource not found in local cache\n\t String requestId = getNextRequestId();\n\t \n\t int urisize =0;\n\t EndpointAddress[] myURIs = peer.getURIList();\n\t \n\t if (myURIs != null)\n\t urisize = myURIs.length;\n\t \n\t Element[] elm = new Element[9 + urisize];\n\t //Element[] elm = new Element[9];\n\t \n\t\n\t elm[0] = new Element(Message.MESSAGE_TYPE_TAG, Message.REQUEST_SEARCH,\n\t Message.JXTA_NAME_SPACE);\n\t elm[1] = new Element(Message.TYPE_TAG, type, \n\t Message.JXTA_NAME_SPACE);\n\t elm[2] = new Element(Message.ATTRIBUTE_TAG, attr, \n\t Message.JXTA_NAME_SPACE);\n\t elm[3] = new Element(Message.VALUE_TAG, value, \n\t Message.JXTA_NAME_SPACE);\n\t elm[4] = new Element(Message.THRESHOLD_TAG, Integer.toString(threshold), \n\t Message.JXTA_NAME_SPACE);\n\t elm[5] = new Element(Message.REQUESTID_TAG, requestId, \n\t Message.JXTA_NAME_SPACE);\n\t elm[6] = new Element(Message.ID_TAG, peer.getID().toString(), \n\t Message.JXTA_NAME_SPACE);\n\t elm[7] = new Element(Message.GROUP_ID_TAG, groupId, \n\t Message.JXTA_NAME_SPACE);\n\t elm[8] = new Element(Message.HOPCOUNT_TAG, Integer.toString(DEFAULT_HOP_COUNT), \n\t Message.JXTA_NAME_SPACE);\n\t\n\t if (urisize > 0)\n\t {\n\t\t for (int i = 0; i < myURIs.length; i++)\n\t\t {\n\t\t EndpointAddress uri = myURIs[i];\n\t\t uri = new EndpointAddress(uri, serviceName, serviceHandler);\n\t\t elm[9 + i] = new Element(NamedResource.URITAG + String.valueOf(i), uri.toString().getBytes(),\n\t\t Message.JXTA_NAME_SPACE, null);\n\t\t }\n\t }\n\t \n\t send(elm, serviceHandler);\n }", "public void doSearch(int referenceId, int smallSetUpperBound,\n\t\tint largeSetLowerBound, int mediumSetPresentNumber,\n\t\tint replaceIndicator, String resultSetName, \n\t\tString databaseNames, String smallSetElementSetNames, \n\t\tString mediumSetElementSetNames, String preferredRecordSyntax, \n\t\tString query, int query_type, String searchResultsOID,\n\t \tDataDir Z39attributesPlusTerm, DataDir oclcUserInfo,\n String oclcUserInfoOID, Object rankQuery, String rankOID,\n boolean fMakeDataDir) \n throws Exception, Diagnostic1, AccessControl {\n\n \n BerString zRequest=null, zResponse=null;\n BerConnect zConnection;\n\n if (zsession == null) \n throw new Diagnostic1(Diagnostic1.temporarySystemError, \n \"User's Z39.50 session is not initialized\");\n\n // Re-init to the server\n if (zsession.isConnected() == false) {\n try {\n\n zsession.init.reInit();\n\n if (zsession.connection == null)\n throw new Diagnostic1(Diagnostic1.databaseUnavailable, \n \"Unable to connect to the Z39.50 server\");\n }\n catch (Exception e) {\n throw new Diagnostic1(Diagnostic1.databaseUnavailable, \n \"Unable to connect to the Z39.50 server\");\n } \n catch (Diagnostic1 d) {\n throw d;\n } \n } \n\n\n zConnection = (BerConnect)zsession.connection;\n\n zRequest = Request(referenceId, smallSetUpperBound,\n\t\tlargeSetLowerBound, mediumSetPresentNumber,\n\t\treplaceIndicator, resultSetName, \n\t\tdatabaseNames, smallSetElementSetNames, \n\t\tmediumSetElementSetNames, preferredRecordSyntax, \n\t\tquery, query_type, searchResultsOID,\n Z39attributesPlusTerm, oclcUserInfo, oclcUserInfoOID,\n rankQuery, rankOID, 0, 0);\n \n if (zRequest == null) {\n throw new Diagnostic1(Diagnostic1.malformedQuery, \"Unable to create search request\");\n\n// System.out.println(\"unable to build search request\");\n }\n\n try {\n zResponse = zConnection.doRequest(zRequest); \n }\n\t catch (InterruptedIOException ioe) { \n\t if (zsession.doTRC) { \n\t\t try {\n\t\t if (zsession.logger != null && \n\t\t\t zsession.logger.getLevel() != Z39logging.OFF) {\n\t\t\t synchronized (zsession.logger) {\n\t\t\t zsession.logger.println(\"Sending TRC to search\");\n\t\t\t }\n\t\t } \n\t\t zsession.trc.doTriggerResourceControl(0, 3);\n\t\t }\n\t\t catch (Exception trce) {\n\t\t // trce.printStackTrace();\n\t\t }\n\t\t catch (Diagnostic1 trcd) {\n\t\t // System.out.println(trcd);\n\t\t }\n\t }\n\n //differentiate between 105 and 109 diagnostics\n if (ioe.getMessage().endsWith(\"user\"))\n throw new Diagnostic1(Diagnostic1.terminatedAtOriginRequest,\n \"Unable to send request to the Z39.50 server\");\n else\n throw new Diagnostic1(Diagnostic1.databaseUnavailable,\n \"Unable to send request to the Z39.50 server\");\n\n } \n catch (Exception e1) {\n zsession.reset();\n throw new Diagnostic1(Diagnostic1.databaseUnavailable, \n \"Unable to send request to the Z39.50 server\");\n }\n\n if (zResponse == null) {\n throw new Diagnostic1(Diagnostic1.temporarySystemError,\n \"Invalid search response received from the Z39.50 Server\");\n }\n\n\n Response(zResponse);\n\n // If flag is set to decode recs into datadir and we\n // got records back, then decode and make sure we got\n // all we wanted \n if (resultCount > 0 && \n Present.numberOfRecordsReturned > 0) {\n\n if (fMakeDataDir) \n Present.decodeRecords();\n\n\n if(Present.numberOfRecordsReturned != mediumSetPresentNumber &&\n resultCount > Present.numberOfRecordsReturned) {\n \n int numrecs = mediumSetPresentNumber - \n Present.numberOfRecordsReturned;\n //System.out.println(\"Numrecs returned = \" + numrecs +\n //\" asked for: \" + mediumSetPresentNumber);\n\n try {\n\n zsession.present.doPresent(zsession.refId > 0 ? \n zsession.refId++ : 0,\n resultSetName, Present.numberOfRecordsReturned+1,\n numrecs, resultCount, \n mediumSetElementSetNames, preferredRecordSyntax, \n fMakeDataDir);\n }\n catch (Exception e) {\n // Don't barf good results received.\n }\n catch (Diagnostic1 d) {\n // Don't barf good results received.\n }\n // If we got the records back. add them to the\n // Present Vector or the BerString\n saveGoodRecords(fMakeDataDir);\n }\n }\n }", "private ClientModel getRecords(final String searchText) {\n\t\tthis.model = new ClientModel();\n\t\tlong[] recNoArray = null;\n\n\t\tif (this.applicationMode == ApplicationMode.STANDALONE_CLIENT) {\n\t\t\tif (searchText == null || searchText.equals(\"\")) {\n\t\t\t\trecNoArray = this.database.findByCriteria(null);\n\t\t\t} else {\n\t\t\t\tfinal String[] search = new String[this.model.getColumnCount()];\n\t\t\t\tsearch[this.model.findColumn(\"Name\")] = searchText;\n\t\t\t\tsearch[this.model.findColumn(\"Location\")] = searchText;\n\t\t\t\trecNoArray = this.database.findByCriteria(search);\n\t\t\t}\n\n\t\t\tfor (final long recNo : recNoArray) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.model\n\t\t\t\t\t\t\t.addRecord(this.database.readRecord(recNo), recNo);\n\t\t\t\t} catch (final RecordNotFoundException rnfe) {\n\t\t\t\t\tthis.log.log(Level.WARNING, rnfe.getMessage(), rnfe);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Cannot retrieve record: \" + rnfe.getMessage(),\n\t\t\t\t\t\t\t\"Warning\", Level.WARNING);\n\n\t\t\t\t\tSystem.err.println(\"Cannot retrieve record: \"\n\t\t\t\t\t\t\t+ rnfe.getMessage());\n\t\t\t\t\trnfe.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.applicationMode == ApplicationMode.NETWORKED_CLIENT) {\n\t\t\tif (searchText == null || searchText.equals(\"\")) {\n\t\t\t\ttry {\n\t\t\t\t\trecNoArray = this.remoteDatabase.findByCriteria(null);\n\t\t\t\t} catch (final RemoteException re) {\n\t\t\t\t\tthis.log.log(Level.SEVERE, re.getMessage(), re);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage(), \"Error\", Level.SEVERE);\n\n\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t.println(\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage());\n\t\t\t\t\tre.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfinal String[] search = new String[this.model.getColumnCount()];\n\t\t\t\tsearch[this.model.findColumn(\"Name\")] = searchText;\n\t\t\t\tsearch[this.model.findColumn(\"Location\")] = searchText;\n\t\t\t\ttry {\n\t\t\t\t\trecNoArray = this.remoteDatabase.findByCriteria(search);\n\t\t\t\t} catch (final RemoteException re) {\n\t\t\t\t\tthis.log.log(Level.SEVERE, re.getMessage(), re);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage(), \"Error\", Level.SEVERE);\n\n\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t.println(\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage());\n\t\t\t\t\tre.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (final long recNo : recNoArray) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.model.addRecord(this.remoteDatabase.readRecord(recNo),\n\t\t\t\t\t\t\trecNo);\n\t\t\t\t} catch (final RemoteException re) {\n\t\t\t\t\tthis.log.log(Level.SEVERE, re.getMessage(), re);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage(), \"Error\", Level.SEVERE);\n\n\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t.println(\"Remote Exception encountered when retrieving search results\"\n\t\t\t\t\t\t\t\t\t+ re.getMessage());\n\t\t\t\t\tre.printStackTrace();\n\t\t\t\t} catch (final RecordNotFoundException rnfe) {\n\t\t\t\t\tthis.log.log(Level.WARNING, rnfe.getMessage(), rnfe);\n\n\t\t\t\t\tthis.clientUI.showError(\n\t\t\t\t\t\t\t\"Cannot retrieve record: \" + rnfe.getMessage(),\n\t\t\t\t\t\t\t\"Warning\", Level.WARNING);\n\n\t\t\t\t\tSystem.err.println(\"Cannot retrieve record: \"\n\t\t\t\t\t\t\t+ rnfe.getMessage());\n\t\t\t\t\trnfe.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.log.severe(\"Client controller started with incorrect Application Mode. Exiting application\");\n\t\t\tthis.clientUI\n\t\t\t\t\t.showError(\n\t\t\t\t\t\t\t\"Client controller started with incorrect Application Mode. Exiting application\",\n\t\t\t\t\t\t\t\"Error\", Level.SEVERE);\n\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\treturn this.model;\n\t}", "public void incomingSearchRequest(APDUEvent e)\n {\n LOGGER.finer(\"Processing incomingSearch_Request\");\n \n SearchRequest_type search_request = (SearchRequest_type) (e.getPDU().o);\n \n // Create a search response\n PDU_type pdu = new PDU_type();\n pdu.which=PDU_type.searchresponse_CID;\n SearchResponse_type response = new SearchResponse_type();\n pdu.o = response;\n \n int ssub = search_request.smallSetUpperBound.intValue();\n int lslb = search_request.largeSetLowerBound.intValue();\n int mspn = search_request.mediumSetPresentNumber.intValue();\n \n LOGGER.finer(\"ssub = \" + ssub + \" lslb = \" + lslb + \" mspn = \" + mspn);\n \n response.referenceId = search_request.referenceId; \n \n // Assume failure unless something below sets to true\n response.searchStatus = Boolean.FALSE;\n \n RootNode rn = null;\n \n try\n {\n switch(search_request.query.which)\n {\n case Query_type.type_0_CID:\n LOGGER.finer(\"Processing Any Query\");\n // Any\n break;\n case Query_type.type_1_CID:\n case Query_type.type_101_CID:\n // RPN query\n LOGGER.finer(\"Processing RPN Query\");\n rn = com.k_int.z3950.util.RPN2Internal.zRPNStructure2RootNode\n \t ((RPNQuery_type)(search_request.query.o));\n break;\n case Query_type.type_2_CID:\n case Query_type.type_100_CID:\n case Query_type.type_102_CID:\n LOGGER.finer(\"Processing OctetString Query\");\n // Octet String\n break;\n }\n \n if ( rn != null )\n {\n LOGGER.finer(\"Got root node\");\n \n IRQuery q = new IRQuery();\n q.collections = search_request.databaseNames;\n q.query = new com.k_int.IR.QueryModels.RPNTree(rn);\n \n // Process the query\n LOGGER.finer(\"Create Search Task with query:\" + q);\n SearchTask st = search_service.createTask\n \t (q, search_request.referenceId);\n \t\n \n // Evaluate the query, waiting 10 seconds for the task to complete. \n \t//We really want to be\n // able to pass in a predicate to wait for here, \n \t//e.g. evaluate(10000, \"NumHits > 100 OR Status=Complete\");\n LOGGER.finer(\"Evaluate Search Task\");\n try\n {\n st.evaluate(10000);\n }\n catch ( TimeoutExceededException tee )\n {\n LOGGER.finer(\"Timeout exceeded waiting for search to complete\");\n }\n \n if ( search_request.resultSetName != null ) {\n \t LOGGER.finer(\"putting st with name \" + \n \t\t\t search_request.resultSetName);\n \t active_searches.put(search_request.resultSetName, st);\n \t}\n \tactive_searches.put(\"Default\", st);\n \t\n // Result records processing\n int result_count = st.getTaskResultSet().getFragmentCount();\n LOGGER.finer(\"result count is \"+result_count);\n \n // Number of hits\n response.resultCount = BigInteger.valueOf(result_count);\n \n // Figure out Search Status\n if ( ( st.getTaskStatusCode() != SearchTask.TASK_FAILURE ) )\n {\n response.searchStatus = Boolean.TRUE;\n }\n else\n {\n // Figure out Result Set Status\n switch ( st.getTaskStatusCode() )\n {\n case SearchTask.TASK_EXECUTING_ASYNC:\n case SearchTask.TASK_EXECUTING_SYNC:\n // resultSetStatus = 2 (interim) Partial results available, \n \t\t//not necessarily valid\n response.resultSetStatus = BigInteger.valueOf(2);\n break;\n case SearchTask.TASK_FAILURE:\n // resultSetStatus = 3 (none) No result set\n response.resultSetStatus = BigInteger.valueOf(3);\n break;\n }\n }\n \n LOGGER.finer(\"Is \"+result_count+\" <= \"+lslb +\" or <= \"+ssub);\n \n if ( ( result_count <= lslb ) || ( result_count <= ssub ) )\n {\n LOGGER.finer(\"Yep\");\n \n int start = 1;\n int count = ( result_count <= ssub ? result_count : mspn );\n \n if ( count > 0 )\n \t {\n \t\t LOGGER.finer(\"Asking for \"+count+\n \t\t\t \" response records from \"+start);\n \t\t LOGGER.finer(\"Search request default = \" \n \t\t\t + search_request.preferredRecordSyntax);\n \t\t response.records = createRecordsFor\n \t\t (st, search_request.preferredRecordSyntax, start, \n \t\t count, GeoProfile.BREIF_SET);\n \t\t \n \n \t\t if (response.records.which == \n \t\t Records_type.responserecords_CID ){\n \t\t LOGGER.finer(\"We have records\");\n \t\t \n \t\t // Looks like we managed to present some records OK..\n \t\t response.numberOfRecordsReturned = \n \t\t\t BigInteger.valueOf(((Vector)\n \t\t\t\t\t (response.records.o)).size());\n \t\t response.nextResultSetPosition = \n \t\t\t BigInteger.valueOf(count+1);\n \t\t response.presentStatus = BigInteger.valueOf(0);\n \t\t } else { // Non surrogate diagnostics ( Single or Multiple )\n \t\t \n \t\t LOGGER.finer(\"Diagnostics\");\n \t\t response.presentStatus = BigInteger.valueOf(5);\n \t\t response.numberOfRecordsReturned = \n \t\t\t BigInteger.valueOf(0);\n \t\t response.nextResultSetPosition = \n \t\t\t BigInteger.valueOf(1);\n \t\t }\n \t } else {\n \t\t LOGGER.finer(\"No need to piggyback records....\");\n \t\t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t\t response.nextResultSetPosition = BigInteger.valueOf(1);\n \t\t response.presentStatus = BigInteger.valueOf(0);\n \t }\n } else {\n \t response.presentStatus = BigInteger.valueOf(5);\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(1); \t\n \t}\n }\n else\n \t LOGGER.finer(\"Unable to process query into root node\");\n }\n catch ( com.k_int.IR.InvalidQueryException iqe )\n \t{\n \t // Need to send a diagnostic\n \t iqe.printStackTrace();\n \t response.resultCount = BigInteger.valueOf(0);\n \t response.presentStatus = BigInteger.valueOf(5); // Failure\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(0);\n \t response.resultSetStatus = BigInteger.valueOf(3);\n \t // No result set available\n \t response.records = createNSD(null, iqe.toString());\n \t}\n catch ( SearchException se )\n \t{\n \t // We need to populate a diagnostic here\n \t LOGGER.finer(\"Search returning diagnostic. Reason:\"+se.toString());\n \t se.printStackTrace();\n \t response.resultCount = BigInteger.valueOf(0);\n \t response.presentStatus = BigInteger.valueOf(5); // Failure\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(0);\n \t response.resultSetStatus = BigInteger.valueOf(3); \n \t // No result set available\n \t response.records = createNSD((String)(se.additional), \n \t\t\t\t\t se.toString());\n \t}\n \n LOGGER.finer(\"Send search response : \");\n try\n \t{\n \t assoc.encodeAndSend(pdu);\n \t}\n catch ( java.io.IOException ioe )\n \t{\n \t ioe.printStackTrace();\n \t} \n }", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query);", "private void search(SearchRequest request) {\r\n\t\tif(request == null)return;\r\n\t\tList<Record> results = handler.search(request);\r\n\t\tlist.show(results);\r\n\t\tpanInfo.setNumRec(results.size());\r\n\t\tpanInfo.setTotalAmt(Record.sumBalance(results));\r\n\t}", "com.exacttarget.wsdl.partnerapi.QueryRequest getQueryRequest();", "public static int PrintSearchList(NamingEnumeration sl, String dnbase) {\r\n\r\n int EntryCount = 0;\r\n if (sl == null) {\r\n return (EntryCount);\r\n } else {\r\n try {\r\n while (sl.hasMore()) {\r\n SearchResult si = (SearchResult) sl.next();\r\n EntryCount++;\r\n\r\n // *****************************\r\n // Formulate the DN.\r\n //\r\n String DN = null;\r\n if (dnbase.equals(\"\")) {\r\n DN = si.getName();\r\n } else if (!si.isRelative()) {\r\n DN = si.getName();\r\n } else if (si.getName().equals(\"\")) {\r\n DN = dnbase;\r\n } else {\r\n DN = si.getName() + \",\" + dnbase;\r\n }\r\n\r\n // ************************************\r\n // Is the DN from a deReference Alias?\r\n // If so, then we have a URL, we need\r\n // to remove the URL.\r\n //\r\n if (!si.isRelative()) {\r\n DN = extractDNfromURL(DN);\r\n }\r\n\r\n // ******************************************\r\n // Write out the DN.\r\n // Do not write out a JNDI Quoted DN.\r\n // That is not LDIF Compliant.\r\n //\r\n idxParseDN pDN = new idxParseDN(DN);\r\n if (pDN.isQuoted()) {\r\n System.out.println(\"dn: \" + pDN.getDN());\r\n } else {\r\n System.out.println(\"dn: \" + DN);\r\n }\r\n\r\n // Obtain Attributes\r\n Attributes entryattrs = si.getAttributes();\r\n\r\n // First Write out Objectclasses.\r\n Attribute eo = entryattrs.get(ObjectClassName);\r\n if (eo != null) {\r\n for (NamingEnumeration eov = eo.getAll(); eov.hasMore(); ) {\r\n System.out.println(eo.getID() + \": \" + eov.next());\r\n }\r\n } // End of check for null if.\r\n\r\n\r\n // Obtain Naming Attribute Next.\r\n if (!\"\".equals(pDN.getNamingAttribute())) {\r\n Attribute en = entryattrs.get(pDN.getNamingAttribute());\r\n if (en != null) {\r\n for (NamingEnumeration env = en.getAll(); env.hasMore(); ) {\r\n System.out.println(en.getID() + \": \" + env.next());\r\n }\r\n } // End of check for null if.\r\n } // End of Naming Attribute.\r\n\r\n\r\n // Finish Obtaining remaining Attributes,\r\n // in no special sequence.\r\n for (NamingEnumeration ea = entryattrs.getAll(); ea.hasMore(); ) {\r\n Attribute attr = (Attribute) ea.next();\r\n\r\n if ((!ObjectClassName.equalsIgnoreCase(attr.getID())) &&\r\n (!pDN.getNamingAttribute().equalsIgnoreCase(attr.getID()))) {\r\n for (NamingEnumeration ev = attr.getAll(); ev.hasMore(); ) {\r\n String Aname = attr.getID();\r\n Aname = Aname.toLowerCase();\r\n Object Aobject = ev.next();\r\n if (Aname.startsWith(UserPasswordName)) {\r\n // *****************************\r\n // Show A trimmed Down Version.\r\n System.out.println(UserPasswordName + \": \" +\r\n \"********\");\r\n\r\n } else if (cnxidaXObjectBlob.equalsIgnoreCase(attr.getID())) {\r\n // *****************************\r\n // Show A trimmed Down Version.\r\n String blob;\r\n blob = (String) Aobject;\r\n blob = blob.replace('\\n', ' ');\r\n int obloblen = blob.length();\r\n\r\n if (blob.length() > 64) {\r\n blob = blob.substring(0, 25) + \" ...... \" +\r\n blob.substring((blob.length() - 25));\r\n\r\n } // end of if.\r\n System.out.println(attr.getID() +\r\n \": \" + blob + \", Full Length:[\" + obloblen + \"]\");\r\n\r\n } else if (Aobject instanceof byte[]) {\r\n System.out.println(attr.getID() +\r\n \": [ Binary data \" + ((byte[]) Aobject).length + \" in length ]\");\r\n } else { // Show normal Attributes as is...\r\n System.out.println(attr.getID() +\r\n \": \" + Aobject);\r\n } // End of Else.\r\n\r\n } // End of Inner For Loop.\r\n } // End of If.\r\n } // End of Outer For Loop\r\n\r\n System.out.println(\"\");\r\n\r\n } // End of While Loop\r\n } catch (NamingException e) {\r\n System.err.println(MP + \"Cannot continue listing search results - \" + e);\r\n return (-1);\r\n } catch (Exception e) {\r\n System.err.println(MP + \"Cannot continue listing search results - \" + e);\r\n e.printStackTrace();\r\n return (-1);\r\n } // End of Exception\r\n\r\n } // End of Else\r\n\r\n return (EntryCount);\r\n\r\n }", "public OperationLog[] SearchOperationLog (String opName, String opType, String wsName, String status, String[] domains,\r\n String userName, String token, String transID, Date start, Date end, String version_no)\r\n {\r\n\t if (version_no == null || version_no.equals(\"\"))\r\n\t\t version_no = \"VER_11\";\r\n\t \r\n OperationLog[] retArray = null;\r\n IDBAdapter db = null;\r\n ResultSet rs = null;\r\n try {\r\n String sql = \"select A.\"+this.OpLogID+\",B.\"+this.OperationName+\",B.\"+this.OperationType+\",C.\"+this.WebService+\",D.\"+this.NodeDomain;\r\n sql += \",A.\"+this.UserName+\",A.\"+this.TransID+\",E.\"+this.OperationLogStatus+\",A.\"+this.StartDate+\",A.\"+this.EndDate;\r\n sql += \" from \"+this.TableName+\" A,\"+this.OperationTableName+\" B,\"+this.WebServiceTableName+\" C,\";\r\n sql += this.NodeDomainTableName+\" D,\"+this.OperationLogStatusTableName+\" E\";\r\n sql += \" where A.\"+this.OperationID+\" = B.\"+this.OperationID+\" and A.\"+this.OpLogID+\" = E.\"+this.OpLogID;\r\n sql += \" and B.\"+this.WebServiceID+\" = C.\"+this.WebServiceID+\" (+) and B.\"+this.NodeDomainID+\" = D.\"+this.NodeDomainID;\r\n sql += \" and B.\"+this.VersionNo+\" = '\"+version_no+\"'\";//Added by Helen 20081030\r\n if (opName != null)\r\n sql += \" and B.\"+this.OperationName+\" = '\"+opName+\"'\";\r\n if (opType != null)\r\n sql += \" and B.\" + this.OperationType + \" = '\" + opType + \"'\";\r\n if (wsName != null)\r\n sql += \" and C.\"+this.WebService+\" = '\"+wsName+\"'\";\r\n if (domains != null && domains.length > 0) {\r\n sql += \" and (D.\"+this.NodeDomain+\" in (\";\r\n for (int i = 0; i < domains.length; i++) {\r\n if (i != 0) sql += \",\";\r\n sql += \"'\"+domains[i]+\"'\";\r\n }\r\n sql += \")\";\r\n sql += \" or (C.\" + this.WebService + \" = '\" + Phrase.WEB_METHOD_AUTHENTICATE + \"'\";\r\n sql += \" and A.\" + this.Token + \" in (select F.\" + this.Token + \" from \" + this.TableName + \" F\";\r\n sql += \", \" + this.OperationTableName + \" G, \" + this.NodeDomainTableName + \" H\";\r\n sql += \" where F.\" + this.OperationID + \" = G.\" + this.OperationID + \" and G.\" + this.NodeDomainID + \" = H.\" + this.NodeDomainID;\r\n sql += \" and H.\" + this.NodeDomain + \" in (\";\r\n for (int i = 0; i < domains.length; i++) {\r\n if (i != 0) sql += \",\";\r\n sql += \"'\"+domains[i]+\"'\";\r\n }\r\n sql += \")))\";\r\n sql += \" or (C.\" + this.WebService + \" = '\" + Phrase.WEB_METHOD_GETSERVICES + \"'\";\r\n sql += \" and A.SERVICE_TYPE in (\";\r\n for (int i = 0; i < domains.length; i++) {\r\n if (i != 0) sql += \",\";\r\n sql += \"'\"+domains[i]+\"'\";\r\n }\r\n sql += \"))\";\r\n sql += \" or (C.\" + this.WebService + \" = '\" + Phrase.WEB_METHOD_GETSTATUS + \"'\";\r\n sql += \" and A.\" + this.SuppliedTransID + \" in (select I.\" + this.TransID + \" from \" + this.TableName + \" I\";\r\n sql += \", \" + this.OperationTableName + \" J, \" + this.NodeDomainTableName + \" K\";\r\n sql += \" where I.\" + this.OperationID + \" = J.\" + this.OperationID + \" and J.\" + this.NodeDomainID + \" = K.\" + this.NodeDomainID;\r\n sql += \" and K.\" + this.NodeDomain + \" in (\";\r\n for (int i = 0; i < domains.length; i++) {\r\n if (i != 0) sql += \",\";\r\n sql += \"'\"+domains[i]+\"'\";\r\n }\r\n sql += \")))\";\r\n sql += \")\";\r\n }\r\n if (userName != null)\r\n sql += \" and upper(A.\"+this.UserName+\") like upper('%\"+userName+\"%')\";\r\n if (token != null)\r\n sql += \" and A.\"+this.Token+\" like '%\"+token+\"%'\";\r\n if (transID != null)\r\n sql += \" and (A.\"+this.TransID+\" like '%\"+transID+\"%' or A.\"+this.SuppliedTransID+\" like '%\"+transID+\"%')\";\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n if (start != null)\r\n sql += \" and (A.\"+this.StartDate+\" > '\"+dateFormat.format(start)+\"' or A.\"+this.EndDate+\" > '\"+dateFormat.format(start)+\"')\";\r\n if (end != null) {\r\n Calendar cal = Calendar.getInstance(TimeZone.getDefault());\r\n cal.setTime(end);\r\n cal.add(Calendar.DAY_OF_MONTH,1);\r\n java.util.Date searchEnd = cal.getTime();\r\n sql += \" and (A.\"+this.StartDate+\" < '\"+dateFormat.format(searchEnd)+\"' or A.\"+this.EndDate+\" < '\"+dateFormat.format(searchEnd)+\"')\";\r\n }\r\n sql += \" and E.\"+this.OperationLogStatusID+\" = (select max(E2.\"+this.OperationLogStatusID+\")\";\r\n sql += \" from \"+this.OperationLogStatusTableName+\" E2 where E2.\"+this.OpLogID+\" = E.\"+this.OpLogID+\")\";\r\n if (status != null && !status.equals(\"\"))\r\n sql += \" and E.\"+this.OperationLogStatus+\" = '\"+status+\"'\";\r\n sql += \" and B.\"+this.VersionNo+\" = '\"+version_no+\"'\";\r\n sql += \" order by A.\"+this.OpLogID+\" desc\";\r\n db = this.GetNodeDB();\r\n rs = db.GetResultSet(sql);\r\n if (rs != null && rs.last() && rs.getRow() > 0) {\r\n retArray = new OperationLog[rs.getRow()];\r\n rs.beforeFirst();\r\n for (int i = 0; rs.next() && i < retArray.length; i++) {\r\n OperationLog temp = new OperationLog(rs.getInt(this.OpLogID));\r\n temp.SetOperationName(rs.getString(this.OperationName));\r\n temp.SetOperationType(rs.getString(this.OperationType));\r\n temp.SetDomain(rs.getString(this.NodeDomain));\r\n temp.SetUserName(rs.getString(this.UserName));\r\n temp.SetTransID(rs.getString(this.TransID));\r\n ArrayList statusList = new ArrayList();\r\n ArrayList tempList = new ArrayList();\r\n tempList.add(rs.getString(this.OperationLogStatus));\r\n statusList.add(tempList);\r\n temp.SetStatus(statusList);\r\n temp.SetStartDate(rs.getString(this.StartDate));\r\n temp.SetEndDate(rs.getString(this.EndDate));\r\n if (temp.GetOperationType() != null)\r\n if (temp.GetOperationType().equals(Phrase.WEB_SERVICE_OPERATION))\r\n temp.SetWebServiceName(rs.getString(this.WebService));\r\n retArray[i] = temp;\r\n }\r\n }\r\n } catch (Exception e) {\r\n this.LogException(\"Could Not Search Operation Log: \" + e.toString());\r\n } finally {\r\n try {\r\n if (rs != null)\r\n rs.close();\r\n if (db != null)\r\n db.Close();\r\n } catch (Exception e) {\r\n this.LogException(e.toString());\r\n }\r\n }\r\n return retArray;\r\n }", "public Iterator getNetworkList(){\n NeutronTest nt=new NeutronTest(this.idsEndpoint,this.tenantName,this.userName,this.password,this.region);\n Networks ns=nt.listNetworks();\n Iterator<Network> itNet=ns.iterator();\n return itNet;\n }", "@Override\r\n\tpublic List<Client> search(HttpServletRequest request) throws ParseException {\n\t\tClientSearchBean searchBean = new ClientSearchBean();\r\n\t\tsearchBean.setNameLike(getStringFilter(\"name\", request));\r\n\t\tsearchBean.setGender(getStringFilter(GENDER, request));\r\n\t\tDateTime[] birthdate = getDateRangeFilter(BIRTH_DATE, request);//TODO add ranges like fhir do http://hl7.org/fhir/search.html\r\n\t\tDateTime[] deathdate = getDateRangeFilter(DEATH_DATE, request);\r\n\t\tif (birthdate != null) {\r\n\t\t\tsearchBean.setBirthdateFrom(birthdate[0]);\r\n\t\t\tsearchBean.setBirthdateTo(birthdate[1]);\r\n\t\t}\r\n\t\tif (deathdate != null) {\r\n\t\t\tsearchBean.setDeathdateFrom(deathdate[0]);\r\n\t\t\tsearchBean.setDeathdateTo(deathdate[1]);\r\n\t\t}\r\n\t\t\r\n\t\tString clientId = getStringFilter(\"identifier\", request);\r\n\t\tif (!StringUtils.isEmptyOrWhitespaceOnly(clientId)) {\r\n\t\t\tClient c = clientService.find(clientId);\r\n\t\t\tList<Client> clients = new ArrayList<Client>();\r\n\t\t\tclients.add(c);\r\n\t\t\treturn clients;\r\n\t\t}\r\n\t\t\r\n\t\tAddressSearchBean addressSearchBean = new AddressSearchBean();\r\n\t\taddressSearchBean.setAddressType(getStringFilter(ADDRESS_TYPE, request));\r\n\t\taddressSearchBean.setCountry(getStringFilter(COUNTRY, request));\r\n\t\taddressSearchBean.setStateProvince(getStringFilter(STATE_PROVINCE, request));\r\n\t\taddressSearchBean.setCityVillage(getStringFilter(CITY_VILLAGE, request));\r\n\t\taddressSearchBean.setCountyDistrict(getStringFilter(COUNTY_DISTRICT, request));\r\n\t\taddressSearchBean.setSubDistrict(getStringFilter(SUB_DISTRICT, request));\r\n\t\taddressSearchBean.setTown(getStringFilter(TOWN, request));\r\n\t\taddressSearchBean.setSubTown(getStringFilter(SUB_TOWN, request));\r\n\t\tDateTime[] lastEdit = getDateRangeFilter(LAST_UPDATE, request);//TODO client by provider id\r\n\t\t//TODO lookinto Swagger https://slack-files.com/files-pri-safe/T0EPSEJE9-F0TBD0N77/integratingswagger.pdf?c=1458211183-179d2bfd2e974585c5038fba15a86bf83097810a\r\n\t\tString attributes = getStringFilter(\"attribute\", request);\r\n\t\tsearchBean.setAttributeType(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(\":\", -1)[0]);\r\n\t\tsearchBean.setAttributeValue(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(\":\", -1)[1]);\r\n\t\t\r\n\t\treturn clientService.findByCriteria(searchBean, addressSearchBean, lastEdit == null ? null : lastEdit[0],\r\n\t\t lastEdit == null ? null : lastEdit[1]);\r\n\t}", "Records_type createRecordsFor(SearchTask st,\n int[] preferredRecordSyntax,\n int start,\n int count, String recordFormatSetname)\n {\n Records_type retval = new Records_type();\n \n LOGGER.finer(\"createRecordsFor(st, \"+start+\",\"+count+\")\");\n LOGGER.finer(\"pref rec syn = \" + preferredRecordSyntax);\n LOGGER.finer(\"record setname = \" + recordFormatSetname);\n LOGGER.finer(\"search task = \" + st);\n \n // Try and do a normal present\n try\n {\n \tif ( start < 1 ) \n \t throw new PresentException(\"Start record must be > 0\",\"13\");\n \tint numRecs = st.getTaskResultSet().getFragmentCount();\n \t\n \tLOGGER.finer(\"numresults = \" + numRecs);\n \tint requestedNum = start + count - 1;\n \tif ( requestedNum > numRecs ) {\n \t count = numRecs - (start - 1);\n \t if (start + count -1 > numRecs) {\n \t\tLOGGER.finer(requestedNum + \" < \" + numRecs);\n \t\tthrow new PresentException\n \t\t (\"Start+Count-1 (\" +requestedNum + \") must be < the \" + \n \t\t \" number of items in the result set: \" +numRecs ,\"13\");\n \t }\n \t}\n \t\n \t\n \tif ( st == null )\n \t throw new PresentException(\"Unable to locate result set\",\"30\");\n \t\n \tVector v = new Vector();\n \tretval.which = Records_type.responserecords_CID;\n \tretval.o = v;\n \t\n \tOIDRegisterEntry requested_syntax = null;\n \tString requested_syntax_name = null;\n \tif ( preferredRecordSyntax != null ) {\n \t requested_syntax = reg.lookupByOID(preferredRecordSyntax);\n \t if(requested_syntax==null) { // unsupported record syntax\n \t\tStringBuffer oid=new StringBuffer();\n \t\tfor(int i=0; i<preferredRecordSyntax.length; i++) {\n \t\t if(i!=0)\n \t\t\toid.append('.');\n \t\t oid.append(preferredRecordSyntax[i]);\n \t\t}\n \t\tLOGGER.warning(\"Unsupported preferredRecordSyntax=\"\n \t\t\t +oid.toString());\n \t\t\n \t\t// Need to set up diagnostic in here\n \t\tretval.which = Records_type.nonsurrogatediagnostic_CID;\n \t\tDefaultDiagFormat_type default_diag = \n \t\t new DefaultDiagFormat_type();\n \t\tretval.o = default_diag;\n \t\t\n \t\tdefault_diag.diagnosticSetId = reg.oidByName(\"diag-1\");\n \t\tdefault_diag.condition = BigInteger.valueOf(239);\n \t\tdefault_diag.addinfo = new addinfo_inline14_type();\n \t\tdefault_diag.addinfo.which = \n \t\t addinfo_inline14_type.v2addinfo_CID;\n \t\tdefault_diag.addinfo.o = (Object)(oid.toString());\n \t\treturn retval;\n \t }\n \t LOGGER.finer(\"requested_syntax=\"+requested_syntax);\n \t requested_syntax_name = requested_syntax.getName();\n\t if(requested_syntax_name.equals(\"usmarc\")) {\n\t\t//HACK! USMARC not yet supported...\n\t\trequested_syntax_name = \"sutrs\";\n\t }\n \t LOGGER.finer(\"requested_syntax_name=\"+requested_syntax_name);\n \t}\n \telse\n {\n\t requested_syntax_name = \"sutrs\"; //REVISIT: should this be\n \t //default? We're sure to have it...\n \t requested_syntax = reg.lookupByName(requested_syntax_name);\n }\n \t\n \tst.setRequestedSyntax(requested_syntax);\n \tst.setRequestedSyntaxName(requested_syntax_name);\n \t\t\n \tInformationFragment[] raw_records;\n \tRecordFormatSpecification rfSpec = \n \t new RecordFormatSpecification\n \t\t(requested_syntax_name, null, recordFormatSetname);\n \tLOGGER.finer(\"calling getFragment(\"+(start)+\",\"+count+\")\");\n \traw_records = st.getTaskResultSet().getFragment(start, count, rfSpec);\n \t\n \tif ( raw_records == null )\n \t throw new PresentException(\"Error retrieving records\",\"30\");\n \n \tfor ( int i=0; i<raw_records.length; i++ ) {\n \t\tLOGGER.finer(\"Adding record \"+i+\" to result\");\n \t\t\n \t\tNamePlusRecord_type npr = new NamePlusRecord_type();\n \t\tnpr.name = raw_records[i].getSourceCollectionName();\n \t\tnpr.record = new record_inline13_type();\n \t\tnpr.record.which = record_inline13_type.retrievalrecord_CID;\n \t\tEXTERNAL_type rec = new EXTERNAL_type();\n \t\tnpr.record.o = rec;\n \t\t\n \t\tif ( requested_syntax_name.equals(Z3950Constants.RECSYN_HTML) \n \t\t || requested_syntax_name.equals(\"sgml\")) {\n \t\t LOGGER.finer(\"Returning OctetAligned record for \"\n \t\t\t\t +requested_syntax_name);\n rec.direct_reference = \n \t\t\treg.oidByName(requested_syntax_name);\n \t\t rec.encoding = new encoding_inline0_type();\n \t\t rec.encoding.which = \n \t\t\tencoding_inline0_type.octet_aligned_CID;\n \t\t String raw_string = (String)raw_records[i].getOriginalObject();\n \t\t rec.encoding.o = raw_string.getBytes(); \n \t\t if(raw_string.length()==0) {\n \t\t\t\n \t\t\t// can't make a html record\n \t\t\tretval.which = Records_type.nonsurrogatediagnostic_CID;\n \t\t\tDefaultDiagFormat_type default_diag =\n \t\t\t new DefaultDiagFormat_type();\n \t\t\tretval.o = default_diag;\n \t\t\t\n \t\t\tdefault_diag.diagnosticSetId = reg.oidByName(\"diag-1\");\n \t\t\tdefault_diag.condition = BigInteger.valueOf(227);\n \t\t\tdefault_diag.addinfo = new addinfo_inline14_type();\n \t\t\tdefault_diag.addinfo.which = \n \t\t\t addinfo_inline14_type.v2addinfo_CID;\n \t\t\tdefault_diag.addinfo.o = \n \t\t\t (Object)\"1.2.840.10003.5.109.3\";\n \t\t\treturn retval;\n \t\t\t\n \t\t }\n \t\t}\n \t\telse if ( requested_syntax_name.equals\n \t\t\t (Z3950Constants.RECSYN_XML) ) {\n \t\n \t\t // Since XML is our canonical internal schema, \n \t\t //all realisations of InformationFragment\n \t\t // are capable of providing an XML representation of \n \t\t //themselves, so just use the\n \t\t // Fragments getDocument method.\n \t\t LOGGER.finer(\"Returning OctetAligned XML\");\n \t\t java.io.StringWriter sw = new java.io.StringWriter();\n \t\t \n \t\t try\n \t\t\t{\n \t\t\t OutputFormat format = \n \t\t\t\tnew OutputFormat\n \t\t\t\t (raw_records[i].getDocument() );\n \t\t\t XMLSerializer serial = \n \t\t\t\tnew XMLSerializer( sw, format );\n \t\t\t serial.asDOMSerializer();\n \t\t\t serial.serialize( raw_records[i].getDocument().\n \t\t\t\t\t getDocumentElement() );\n \t\t\t}\n \t\t catch ( Exception e )\n \t\t\t{\n \t\t\t LOGGER.severe(\"Problem serializing dom tree to\" + \n \t\t\t\t\t \" result record\" + e.getMessage());\n \t\t\t}\n \t\t \n \t\t rec.direct_reference = \n \t\t\treg.oidByName(requested_syntax_name);\n \t\t rec.encoding = new encoding_inline0_type();\n \t\t rec.encoding.which = \n \t\t\tencoding_inline0_type.octet_aligned_CID;\n \t\t rec.encoding.o = sw.toString().getBytes(); \t \n\t\t} else {//if ( requested_syntax_name.equals\n\t\t // (Z3950Constants.RECSYN_SUTRS)){\n \t\t rec.direct_reference = \n \t\t\treg.oidByName(requested_syntax_name);\n \t\t rec.encoding = new encoding_inline0_type();\n \t\t rec.encoding.which = \n \t\t\tencoding_inline0_type.single_asn1_type_CID;\n \t\t rec.encoding.o = \n \t\t\t((String)(raw_records[i].getOriginalObject()));\n \t\t}\n \t\tv.add(npr);\n \t\t\n \t}\n }\n catch ( PresentException pe ) {\n \tLOGGER.warning(\"Processing present exception: \"+pe.toString());\n \t\n // Need to set up diagnostic in here\n \tretval.which = Records_type.nonsurrogatediagnostic_CID;\n DefaultDiagFormat_type default_diag = new DefaultDiagFormat_type();\n retval.o = default_diag;\n \n default_diag.diagnosticSetId = reg.oidByName(\"diag-1\");\n \n if ( pe.additional != null )\n \t default_diag.condition = \n \t BigInteger.valueOf( Long.parseLong(pe.additional.toString()) );\n else\n default_diag.condition = BigInteger.valueOf(0);\n \n default_diag.addinfo = new addinfo_inline14_type();\n default_diag.addinfo.which = addinfo_inline14_type.v2addinfo_CID;\n default_diag.addinfo.o = (Object)(pe.toString());\n } \n \n LOGGER.finer(\"retval = \" + retval);\n return retval;\n }", "public NextPageData getIPv4AddressFirst(int splitCount, String network) {\r\n\t\t\r\n\t\tif (restClient == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\tsb.append(\"/wapi/v2.3/ipv4address\")\r\n\t\t.append(\"?_paging=1\")\r\n\t\t.append(\"&_max_results=\").append(splitCount)\r\n\t\t.append(\"&_return_as_object=1\")\r\n\t\t.append(\"&_return_type=json\")\r\n\t\t.append(\"&network=\").append(network)\t\t\t\t\t\t\t// '192.168.1.0/25'\r\n\t\t.append(\"&status=USED\")\r\n\t\t.append(\"&_return_fields=\")\r\n\t\t\t.append(\"ip_address,network,mac_address,names\")\r\n\t\t\t.append(\",is_conflict,conflict_types\")\r\n\t\t\t.append(\",discover_now_status\")\r\n\t\t\t.append(\",lease_state,status\")\r\n\t\t\t.append(\",types,usage,fingerprint\")\r\n\t\t\t.append(\",discovered_data.os,discovered_data.last_discovered\");\r\n\t\t\r\n\t\tString value = restClient.Get(sb.toString());\r\n\t\t\r\n\t\tif (value == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t// Change unescape-unicode\r\n\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\r\n\t\t// JsonObject Parser\r\n\t\tJsonObject jObj = JsonUtils.parseJsonObject(value);\r\n\t\t\r\n\t\tif (jObj == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t// next_page_id\r\n\t\tString nextPageId = JsonUtils.getValueToString(jObj, \"next_page_id\", \"\");\r\n\t\t\r\n\t\t// result\r\n\t\tJsonArray resultArray = (JsonArray)jObj.get(\"result\");\r\n\t\t\r\n\t\treturn new NextPageData(resultArray, nextPageId);\r\n\t}", "public static <A extends CachedData> Response handleStandardListRequest(int accessKey,\n String accessCred,\n AccountAccessMask mask,\n AttributeSelector at,\n long contid,\n int maxresults,\n boolean reverse,\n QueryCaller<A> query,\n HttpServletRequest request,\n AttributeSelector... sels) {\n ServiceUtil.sanitizeAttributeSelector(at);\n ServiceUtil.sanitizeAttributeSelector(sels);\n maxresults = Math.min(PersistentProperty.getIntegerPropertyWithFallback(PROP_RESULT_LIMIT, DEF_RESULT_LIMIT), maxresults);\n ServiceUtil.AccessConfig cfg = ServiceUtil.start(accessKey, accessCred, at, mask);\n if (cfg.fail) return cfg.response;\n try {\n List<A> results = query.getList(cfg.owner, contid, maxresults, reverse, at, sels);\n for (CachedData next : results) next.prepareTransient();\n cfg.presetExpiry = query.getExpiry(cfg.owner);\n return ServiceUtil.finish(cfg, results, request);\n } catch (NumberFormatException e) {\n return handleIllegalSelector();\n } catch (IOException e) {\n return handleIOError(e);\n }\n }", "private void doRemoteSearch(String query) {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.YEAR,2018);\n cal.set(Calendar.MONTH,12);\n\n String[] titles = {\"Search Party\", \"Lunchtime Search Basketball\", \"Search Games\", \"Pickup Soccer Search\"};\n\n for(int i = 0 ; i < 10; i++ ) {\n cal.set(Calendar.DAY_OF_MONTH,i);\n eventList.add(new Event(titles[i % titles.length], \"test description\", \"test host\", cal.getTime(),cal.getTime(), cal.getTime(), \"test category\", \"test URL\", \"test owner\", \"test location\"));\n }\n }", "public List<UnusualContractInfo> queryUnusualContractList(int chainId, int groupId,\n String contractAddress, Integer pageNumber, Integer pageSize) throws BaseException {\n log.debug(\"start queryUnusualContractList groupId:{} userName:{} pageNumber:{} pageSize:{}\",\n groupId, contractAddress, pageNumber, pageSize);\n\n String tableName = TableName.PARSER.getTableName(chainId, groupId);\n Integer start =\n Optional.ofNullable(pageNumber).map(page -> (page - 1) * pageSize).orElse(null);\n\n List<String> nameList =\n Arrays.asList(\"tableName\", \"groupId\", \"contractAddress\", \"start\", \"pageSize\");\n List<Object> valueList =\n Arrays.asList(tableName, groupId, contractAddress, start, pageSize);\n Map<String, Object> param = CommonTools.buidMap(nameList, valueList);\n\n List<UnusualContractInfo> listOfUnusualContract = parserMapper.listOfUnusualContract(param);\n return listOfUnusualContract;\n }", "public NextPageData getIPv6AddressFirst(int splitCount, String network) {\r\n\t\t\r\n\t\tif (restClient == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\r\n\t\t\t// First Page\r\n\t\t\tsb.append(\"/wapi/v2.3/ipv6address\")\r\n\t\t\t.append(\"?_paging=1&_return_as_object=1&_return_type=json\")\r\n\t\t\t.append(\"&_max_results=\").append(splitCount)\r\n\t\t\t.append(\"&network=\").append(network)\t\t\t// 2002:cafe:feed::/112\r\n\t\t\t.append(\"&status=USED\")\r\n\t\t\t.append(\"&_return_fields=\")\r\n\t\t\t\t.append(\"ip_address,network,duid,names\")\r\n\t\t\t\t.append(\",is_conflict\")\r\n\t\t\t\t.append(\",discover_now_status\")\r\n\t\t\t\t.append(\",conflict_types\")\r\n\t\t\t\t.append(\",lease_state,status\")\r\n\t\t\t\t.append(\",types,usage\")\r\n\t\t\t\t.append(\",fingerprint\")\r\n\t\t\t\t.append(\",discovered_data.os,discovered_data.last_discovered\");\r\n\t\t\t\r\n\t\t\t// type = LEASE, DHCP_RANGE\r\n\t\t\t// usage = DHCP\r\n\r\n\t\t\tString value = restClient.Get(sb.toString());\r\n\t\t\t\r\n\t\t\tif (value == null)\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t\t// Change unescape-unicode\r\n\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\r\n\t\t\t// JsonObject Parser\r\n\t\t\tJsonObject jObj = JsonUtils.parseJsonObject(value);\r\n\t\t\t\r\n\t\t\tif (jObj == null)\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t\t// next_page_id\r\n\t\t\tString nextPageId = JsonUtils.getValueToString(jObj, \"next_page_id\", \"\");\r\n\t\t\t\r\n\t\t\t// result\r\n\t\t\tJsonArray resultArray = (JsonArray)jObj.get(\"result\");\r\n\t\t\t\r\n\t\t\treturn new NextPageData(resultArray, nextPageId);\r\n\t\t}\r\n\t\tcatch(Exception ex) {\r\n\t\t\t_logger.error(ex.getMessage(), ex);\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public RecordsList listRecords(String metadataPrefix, String from, String until, String set) throws OAIException {\n try {\n \tString query = builder.buildListRecordsQuery(metadataPrefix, from, until, set);\n \tDocument document = reader.read(query);\n return new RecordsList(document);\n } catch (ErrorResponseException e) {\n \tthrow e;\n } catch (Exception e) {\n throw new OAIException(e);\n }\n }", "public abstract <T> List<? extends T> createQuery(String query, Class<T> type, int firstResult, int maxResult);", "public List findRecords(String informationType, String queryString) throws DatabaseException;", "public interface RecordEnumeration\n{\n\n public abstract int numRecords();\n\n public abstract byte[] nextRecord()\n throws InvalidRecordIDException, RecordStoreNotOpenException, RecordStoreException;\n\n public abstract int nextRecordId()\n throws InvalidRecordIDException;\n\n public abstract byte[] previousRecord()\n throws InvalidRecordIDException, RecordStoreNotOpenException, RecordStoreException;\n\n public abstract int previousRecordId()\n throws InvalidRecordIDException;\n\n public abstract boolean hasNextElement();\n\n public abstract boolean hasPreviousElement();\n\n public abstract void reset();\n\n public abstract void rebuild();\n\n public abstract void keepUpdated(boolean flag);\n\n public abstract boolean isKeptUpdated();\n\n public abstract void destroy();\n}", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction, Pagination pagination);", "public void Search(ArrayList<Integer> nFilters, String nQuery, String sort, boolean ascending)\n {\n sortOption = sort;\n query = nQuery;\n filters = nFilters;\n ascendingOption = ascending;\n\n BPSearch();\n }", "public Enumeration getReceivers()\t {\n Enumeration allReceivers = receivers.elements();\n Vector tempStore = new Vector();\n String res = null;\n Address addr = null;\n \n while (allReceivers.hasMoreElements()) {\n addr = (Address) allReceivers.nextElement();\n res = addr.getName(); // which should produce a zeus address\n tempStore.addElement(res);\n \n }// end while\n return (tempStore.elements());\n }", "private static Address getOfficialByAddress(String address) throws Exception {\n\t\tString USER_AGENT = \"Mozilla/5.0\";\n\n\t\tString name = \"\", country = \"US\", zip = \"\", city = \"\", state = \"\", line1 = \"\", line2 = \"\";\n\t\tAddress to = null;\n\t\t// Replaces all strings with '%20' for URL completion\n\t\taddress = address.replace(\" \", \"%20\");\n\t\tString urlString = \"https://www.googleapis.com/civicinfo/v2/representatives?key=AIzaSyAEU9J6KzUL_gXPGi-4S6XekJuEC0JRWjA&address=\" + address;\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\n\t\t// By default it is GET request\n\t\tcon.setRequestMethod(\"GET\");\n\t\t//add request header\n\t\tcon.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t\n\t\t// Reading response from input Stream\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t \n\t\tString output;\n\t\tStringBuffer response = new StringBuffer();\n\t\twhile ((output = in.readLine()) != null) {\n\t\t\tresponse.append(output);\t\n\t\t}\n\t\tin.close();\n\t\t\n\t\t// Constructs JSONOBject to parse the response\n\t\tJSONObject object = new JSONObject(response.toString());\n\t\tJSONArray addresses = object.getJSONArray(\"officials\");\n\t\t\n\t\t// Takes array of individuals response and selects last index of it by default (may be optimized for more specific selections)\n\t\tJSONObject person = addresses.getJSONObject(addresses.length()-1);\n\t\tJSONArray fields = person.getJSONArray(\"address\");\n\t\tJSONObject addressTo = fields.getJSONObject(0);\n\t\t\t\t\n\t\tif(person.has(\"name\"))\n\t\t\tname = person.getString(\"name\");\n\t\t\n\t\tif(addressTo.has(\"zip\"))\n\t\t\tzip = addressTo.getString(\"zip\");\n\t\t\n\t\tif(addressTo.has(\"city\"))\n\t\t\tcity = addressTo.getString(\"city\");\n\t\t\n\t\tif(addressTo.has(\"state\"))\n\t\t\tstate = addressTo.getString(\"state\");\n\t\t\n\t\tif(addressTo.has(\"line2\"))\n\t\t\tline2 = addressTo.getString(\"line2\");\n\t\t\n\t\tif(addressTo.has(\"line1\"))\n\t\t\t line1 = addressTo.getString(\"line1\");\n\t\t\n\t\tto = new Address(name, country, zip, city, state, line2, line1);\n\t\t\n\n\t\treturn to;\n\t\t\n\t \n\t }", "public org.tempuri.HISWebServiceStub.AccSearchResponse accSearch(\r\n org.tempuri.HISWebServiceStub.AccSearch accSearch36)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n try {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[18].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/AccSearch\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n accSearch36,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"accSearch\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"AccSearch\"));\r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // set the message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n //execute the operation client\r\n _operationClient.execute(true);\r\n\r\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\r\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(_returnEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.AccSearchResponse.class);\r\n\r\n return (org.tempuri.HISWebServiceStub.AccSearchResponse) object;\r\n } catch (org.apache.axis2.AxisFault f) {\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"AccSearch\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"AccSearch\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"AccSearch\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex, new java.lang.Object[] { messageObject });\r\n\r\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } finally {\r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n }\r\n }\r\n }", "public NextPageData getLeaseIPFirst(int splitCount, String network) throws UnknownHostException {\r\n\t\t\r\n\t\tif (restClient == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tJsonArray resultArray = new JsonArray(); \r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"/wapi/v2.3/lease\");\r\n\t\tsb.append(\"?_paging=1\");\r\n\t\tsb.append(\"&_max_results=\").append(splitCount);\r\n\t\tsb.append(\"&_return_as_object=1\");\r\n\t\tsb.append(\"&_return_type=json\");\r\n\t\t\r\n\t\tIPNetwork ipNetwork = new IPNetwork(network);\r\n\t\tsb.append(\"&address%3E=\").append(ipNetwork.getStartIP().toString());\t\t// > = %3E\r\n\t\tsb.append(\"&address%3C=\").append(ipNetwork.getEndIP().toString());\t\t\t// < = %3C\r\n\r\n\t\tsb.append(\"&_return_fields=\")\r\n\t\t\t.append(\"address,network,binding_state\")\r\n\t\t\t.append(\",starts,ends\")\r\n\t\t\t.append(\",never_ends,never_starts\")\r\n\t\t\t.append(\",ipv6_duid,ipv6_iaid,ipv6_preferred_lifetime\")\r\n\t\t\t//.append(\",protocol,client_hostname,hardware,username\")\r\n\t\t\t//.append(\",discovered_data.last_discovered\")\r\n\t\t\t;\r\n\t\t\r\n\t\tString value = restClient.Get(sb.toString());\r\n\t\t\r\n\t\tif (value == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t// Change unescape-unicode\r\n\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\r\n\t\t// JsonObject Parser\r\n\t\tJsonObject jObj = JsonUtils.parseJsonObject(value);\r\n\t\t\r\n\t\tif (jObj == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t// next_page_id\r\n\t\tString nextPageId = JsonUtils.getValueToString(jObj, \"next_page_id\", \"\");\r\n\t\t\r\n\t\t// result\r\n\t\tJsonArray jIPAddr = (JsonArray)jObj.get(\"result\");\r\n\t\t\r\n\t\tif (jIPAddr.size() > 0)\r\n\t\t\tresultArray.addAll(jIPAddr);\r\n\r\n\t\treturn new NextPageData(resultArray, nextPageId);\r\n\t}", "public List<? extends GTData> search(String query, Type type) throws IOException {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n Search search = new Search.Builder(query)\n .addIndex(INDEX_NAME)\n .addType(type.toString())\n .setParameter(Parameters.SIZE, 10000)\n .build();\n SearchResult result = client.execute(search);\n\n List<? extends GTData> dataList = null;\n if (type.equals(Bid.class)) {\n dataList = result.getSourceAsObjectList(Bid.class);\n } else if (type.equals(Task.class)) {\n dataList = result.getSourceAsObjectList(Task.class);\n } else if (type.equals(User.class)) {\n dataList = result.getSourceAsObjectList(User.class);\n } else if (type.equals(Photo.class)) {\n dataList = result.getSourceAsObjectList(Photo.class);\n }\n\n return dataList;\n }", "public static AccSearch parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n AccSearch object = new AccSearch();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"AccSearch\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (AccSearch) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"request\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"request\").equals(\r\n reader.getName())) {\r\n object.setRequest(Request.Factory.parse(reader));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public List<Computer> findByNameStartingWith(String search, int numPage, int nbObjectToGet,\n FieldSort sort);", "@Test\n public void testSearchFilter_WithAddedSearchBase() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"OU=Users(<%=parameter[\\\"Search String\\\"]%>)\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "List<OwnerOperatorDTO> search(String query);", "public static DirectQuery parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectQuery object =\n new DirectQuery();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directQuery\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectQuery)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\r\n\tpublic <T> IDataEnumeration<T> enumeration(final Class<T> c, String specific, String text, String sort, int batch, List<IJoin> joins, List<IRefiner> refiners) throws Exception{\r\n\t\treturn new DataEnumeration<T>(this,c,specific,text, sort, batch, \"\", joins,refiners,false);\r\n\t}", "public net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse directOrderStateQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQuery directOrderStateQuery0)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directOrderStateQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directOrderStateQuery0,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public NetworkInstance[] queryServers(NetworkFilter filter);", "@Override\r\n\tpublic <T> IDataEnumeration<T> enumeration(String sql, String specific, String sort, int batch, List<IJoin> joins, List<IRefiner> refiners, boolean raw) throws Exception{\r\n\t\treturn new DataEnumeration<T>(this,sql,specific,sort, batch, joins, refiners, raw);\r\n\t}", "public static DirectOrderStateQuery parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectOrderStateQuery object =\n new DirectOrderStateQuery();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directOrderStateQuery\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectOrderStateQuery)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@WebService(targetNamespace = \"http://www.z2systems.com/schemas/neonws/\", name = \"MembershipService\")\n@XmlSeeAlso({com.z2systems.schemas.membership.ObjectFactory.class, com.z2systems.schemas.common.ObjectFactory.class, com.z2systems.schemas.account.ObjectFactory.class, com.z2systems.schemas.donation.ObjectFactory.class, com.z2systems.schemas.store.ObjectFactory.class, ObjectFactory.class, com.z2systems.schemas.event.ObjectFactory.class})\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\npublic interface MembershipService {\n\n @WebResult(name = \"listMembershipsResponse\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\", partName = \"response\")\n @WebMethod\n public com.z2systems.schemas.membership.ListMembershipsResponse listMemberships(\n @WebParam(partName = \"request\", name = \"listMembershipsRequest\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\")\n com.z2systems.schemas.membership.ListMembershipsRequest request\n );\n\n @WebResult(name = \"retrieveMembershipStatsResponse\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\", partName = \"response\")\n @WebMethod\n public com.z2systems.schemas.membership.RetrieveMembershipStatsResponse retrieveMembershipStats(\n @WebParam(partName = \"request\", name = \"retrieveMembershipStatsRequest\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\")\n com.z2systems.schemas.membership.RetrieveMembershipStatsRequest request\n );\n\n @WebResult(name = \"listMembershipHistoryResponse\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\", partName = \"response\")\n @WebMethod\n public com.z2systems.schemas.membership.ListMembershipHistoryResponse listMembershipHistory(\n @WebParam(partName = \"request\", name = \"listMembershipHistoryRequest\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\")\n com.z2systems.schemas.membership.ListMembershipHistoryRequest request\n );\n\n @WebResult(name = \"listMembershipTermsResponse\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\", partName = \"response\")\n @WebMethod\n public com.z2systems.schemas.membership.ListMembershipTermsResponse listMembershipTerms(\n @WebParam(partName = \"request\", name = \"listMembershipTermsRequest\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\")\n com.z2systems.schemas.membership.ListMembershipTermsRequest request\n );\n\n @WebResult(name = \"addMembershipToAccountResponse\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\", partName = \"response\")\n @WebMethod\n public com.z2systems.schemas.membership.AddMembershipToAccountResponse addMembershipToAccount(\n @WebParam(partName = \"request\", name = \"addMembershipToAccountRequest\", targetNamespace = \"http://www.z2systems.com/schemas/neonws/\")\n com.z2systems.schemas.membership.AddMembershipToAccountRequest request\n );\n}", "public ServiceMatchNetwork<E, T> searchComposition(Signature<E> request){\n ServiceMatchNetwork<E, T> network = discoverer.search(request);\n // Apply optimizations\n for(NetworkOptimizer<E,T> opt : optimizations){\n network = opt.optimize(network);\n }\n Algorithms.Search<State<E>,HeuristicNode<State<E>,Double>>.Result searchResult = CompositSearch.create(network).search();\n // Take the service operations from the optimal state path. We reverse the list because\n // the search was done backwards.\n List<State<E>> states = Lists.reverse(searchResult.getOptimalPath());\n List<Set<Operation<E>>> optimalServiceOps = Lists.transform(states, new Function<State<E>, Set<Operation<E>>>() {\n @Override\n public Set<Operation<E>> apply(State<E> state) {\n return state.getStateOperations();\n }\n });\n // Generate a new ServiceMatchNetwork composition with the optimal services.\n // To build the composition, we use the information of the previous network to build the match relations\n // between services among the optimal services.\n ServiceMatchNetwork<E, T> composition = new DirectedAcyclicSMN<E, T>(new HashLeveledServices<E>(optimalServiceOps), network);\n return composition;\n }", "private NetworkScanRequest getNetworkScanRequestForTesting() {\n List<CellInfo> allCellInfo = mTelephonyManager.getAllCellInfo();\n List<RadioAccessSpecifier> radioAccessSpecifier = new ArrayList<>();\n for (int i = 0; i < allCellInfo.size(); i++) {\n RadioAccessSpecifier ras = getRadioAccessSpecifier(allCellInfo.get(i));\n if (ras != null) {\n radioAccessSpecifier.add(ras);\n }\n }\n if (radioAccessSpecifier.size() == 0) {\n RadioAccessSpecifier gsm = new RadioAccessSpecifier(\n AccessNetworkConstants.AccessNetworkType.GERAN,\n null /* bands */,\n null /* channels */);\n radioAccessSpecifier.add(gsm);\n }\n RadioAccessSpecifier[] radioAccessSpecifierArray =\n new RadioAccessSpecifier[radioAccessSpecifier.size()];\n return new NetworkScanRequest(\n NetworkScanRequest.SCAN_TYPE_ONE_SHOT /* scan type */,\n radioAccessSpecifier.toArray(radioAccessSpecifierArray),\n 5 /* search periodicity */,\n 60 /* max search time */,\n true /*enable incremental results*/,\n 5 /* incremental results periodicity */,\n null /* List of PLMN ids (MCC-MNC) */);\n }", "public ArrayList<String> fetchTracks(String query, int limit) throws ClientProtocolException, IOException {\n\t\t\n\t\t//Empty ArrayList to store urls\n\t\tArrayList<String> permaLinkUrls = new ArrayList<String>();\n\t\t\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\n\t\t\n\t\t//Creating request URL with given information\n\t\tString composedUrl = BASE_URL + \"?client_id=\" + CLIENT_ID + \"&q=\" + query.replaceAll(\" \", \"%20\") + \"&limit=\" + limit;\n\t\t\n\t\tHttpGet getRequest = new HttpGet(composedUrl);\n\t\tCloseableHttpResponse response = httpClient.execute(getRequest);\n\t\t\n\t\tString json = \"\";\n\t\t\n\t\ttry {\n\t\t System.out.println(response.getStatusLine());\n\t\t HttpEntity entity = response.getEntity();\n\t\t \n\t\t BufferedReader in = new BufferedReader(new InputStreamReader(entity.getContent()));\n\t\t \n\t\t String line = null;\n\t\t \n\t\t //converting entity response into String \"json\"\n\t\t while((line = in.readLine()) != null){\n\t\t \tjson += line;\n\t\t }\n\t\t \n\t\t //calls method to parse permaLinkUrls and assigns value to the ArrayList\n\t\t permaLinkUrls = permaLinkParser(json, permaLinkUrls);\n\t\t \n\t\t EntityUtils.consume(entity);\n\t\t \n\t\t} finally {\n\t\t response.close();\n\t\t}\n\t\t\n\t\t//returns final ArrayList to UI Class\n\t\treturn permaLinkUrls;\n\t}", "Results getResultsPage(FilterSpecifier.ListBy listBy, int page) throws SearchServiceException;", "static SearchResult<AccountHolder> getHolders(String no) throws RecordSearchException {\n String condition = \"AccountNo = '\" + no + \"'\";\n\n LinkedList<Record> records = AccountHolderTable.getInstance().read(condition);\n\n if (records == null || records.size() == 0) {\n throw new RecordSearchException();\n }\n\n try {\n SearchResult<AccountHolder> holders = new SearchResult<>();\n\n for (LinkedHashMap<String, Object> record : records) {\n holders.add(new AccountHolder(record));\n }\n\n return holders;\n } catch (SchemaCreationException e) {\n Logger.error(e);\n\n throw new RecordSearchException(\"Error reading records from the Database\");\n }\n }", "public SearchResponse search(SearchRequest request) throws SearchServiceException;", "public net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse directQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQuery directQuery6)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directQuery6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public static int LDIFSearchList(NamingEnumeration sl,\r\n String dnbase,\r\n BufferedWriter LDIFOUT,\r\n boolean _NICE)\r\n throws Exception, IOException {\r\n\r\n int EntryCount = 0;\r\n if (sl == null) {\r\n return (EntryCount);\r\n } else {\r\n try {\r\n while (sl.hasMore()) {\r\n SearchResult si = (SearchResult) sl.next();\r\n EntryCount++;\r\n\r\n // ******************************************\r\n // Formulate the DN.\r\n //\r\n String DN = null;\r\n if (dnbase.equals(\"\")) {\r\n DN = si.getName();\r\n } else if (!si.isRelative()) {\r\n DN = si.getName();\r\n } else if (si.getName().equals(\"\")) {\r\n DN = dnbase;\r\n } else {\r\n DN = si.getName() + \",\" + dnbase;\r\n }\r\n\r\n // ************************************\r\n // Is the DN from a deReference Alias?\r\n // If so, then we have a URL, we need\r\n // to remove the URL.\r\n //\r\n if (!si.isRelative()) {\r\n DN = extractDNfromURL(DN);\r\n }\r\n\r\n // ******************************************\r\n // Write out the DN.\r\n // Do not write out a JNDI Quoted DN.\r\n // That is not LDIF Compliant.\r\n //\r\n idxParseDN pDN = new idxParseDN(DN);\r\n if (_NICE) {\r\n LDIFOUT.write(\"dn: \");\r\n\r\n if (pDN.isQuoted()) {\r\n LDIFOUT.write(pDN.getDN());\r\n } else {\r\n LDIFOUT.write(DN);\r\n }\r\n\r\n LDIFOUT.write(\"\\n\");\r\n\r\n } else {\r\n if (pDN.isQuoted()) {\r\n WriteLDIF(\"dn\", pDN.getDN(), LDIFOUT);\r\n } else {\r\n WriteLDIF(\"dn\", DN, LDIFOUT);\r\n }\r\n } // End of DN Output.\r\n\r\n // Obtain the entries Attributes.\r\n Attributes entryattrs = si.getAttributes();\r\n\r\n // Obtain ObjectClass First.\r\n Attribute eo = entryattrs.get(ObjectClassName);\r\n if (eo != null) {\r\n for (NamingEnumeration eov = eo.getAll(); eov.hasMore(); ) {\r\n WriteLDIF(eo.getID(), eov.next(), LDIFOUT);\r\n }\r\n } // End of check for null if.\r\n\r\n // Obtain Naming Attribute Next.\r\n if (!\"\".equals(pDN.getNamingAttribute())) {\r\n Attribute en = entryattrs.get(pDN.getNamingAttribute());\r\n if (en != null) {\r\n for (NamingEnumeration env = en.getAll(); env.hasMore(); ) {\r\n WriteLDIF(en.getID(), env.next(), LDIFOUT);\r\n }\r\n } // End of check for null if.\r\n } // End of Naming Attribute.\r\n\r\n // Finish Obtaining remaining Attributes,\r\n // in no special sequence.\r\n for (NamingEnumeration ea = entryattrs.getAll(); ea.hasMore(); ) {\r\n Attribute attr = (Attribute) ea.next();\r\n\r\n if ((!ObjectClassName.equalsIgnoreCase(attr.getID())) &&\r\n (!pDN.getNamingAttribute().equalsIgnoreCase(attr.getID()))) {\r\n for (NamingEnumeration ev = attr.getAll(); ev.hasMore(); ) {\r\n WriteLDIF(attr.getID(), ev.next(), LDIFOUT);\r\n }\r\n } // End of If\r\n } // End of Outer For Loop\r\n\r\n WriteLDIF(\"\", \"\", LDIFOUT);\r\n\r\n } // End of While Loop\r\n } catch (NamingException e) {\r\n System.err.println(MP + \"Naming Exception, Cannot continue obtaining search results, \" + e);\r\n throw e;\r\n } catch (Exception e) {\r\n System.err.println(MP + \"Exception, Cannot continue obtaining search results, \" + e);\r\n e.printStackTrace();\r\n throw e;\r\n } // End of Exception\r\n\r\n } // End of Else\r\n return (EntryCount);\r\n\r\n }", "@Override\n\tpublic void ConstructNetwork() {\n\t\t\n\t\tAddUnit add_r_t=new AddUnit();\n\t\tUnitIterator ui=new UnitIterator();\n\t\tui.unit=add_r_t;\n\n\t\tnetwork=new UnitList();\n\t\tnetwork.unitList.add(ui);\n\t\tnetwork.unitList.add(new AddUnit());\n\t\t\t\n\t}", "Results sortResults(FilterSpecifier.ListBy listBy, SortSpecifier sortspec) throws SearchServiceException;", "private Collection<Record> handleRequest(SearchRequest request) {\n\t\tCollection<Record> resultSet = getResults(request.getQuery());\n\t\treturn resultSet;\n\t}", "public static DirectQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectQueryResponse object =\n new DirectQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "List<Corretor> search(String query);", "public static void querying(String constructQuery2) {\n\t\t//construct the new query\n\t\t//String constructQuery2 = prefix+\" \"+select+\" \"+selectValues+\" \"+where+openBracket+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket;\n\t\t//constructQuery2 = constructQuery2+\" UNION \"+\" \"+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket+closeBracket;\n\t\t\n\t\tSystem.out.println(constructQuery2);\n\t\tQuery query2 = QueryFactory.create(constructQuery2);\n\t\tQueryExecution qe2 = QueryExecutionFactory.sparqlService(\n\t\t\t\t\"http://localhost:3030/USNA/query\", query2);\n\t\t\n\t\tResultSet results1 = qe2.execSelect();\n\t\tif(constantOutput == \"\") {\n\t\t\tResultSetFormatter.out(System.out, results1);\n\t\t}else {\n\t\t\tString NS = \"http://www.usna.org/ns#\";\n\t\t\tModel rdfssExample = ModelFactory.createDefaultModel();\n\t\t\tString [] constant = constantOutput.trim().split(\" \");\n\t\t\t\n\t\t\tString [] headers = selectValues.split(\" \");\n\t\t System.out.println(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tfor(int i = 0; i< headers.length; i++) {\n\t\t\t\t//System.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t\tSystem.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t int count = 0;\n\t\t while ( results1.hasNext() ) {\n\t\t \t //Resource Response = rdfssExample.createResource(NS+constant[count]);\n\t\t \t \n\t\t QuerySolution soln = results1.nextSolution();\n\t\t Resource first = soln.getResource(headers[0].substring(1,headers[0].length()).trim());\n\t\t //Resource second = soln.getResource(headers[1].substring(1,headers[1].length()).trim());\n\t\t //Resource third = soln.getResource(headers[2].substring(1,headers[2].length()).trim());\n\t\t //Resource fourth = soln.getResource(headers[3].substring(1,headers[3].length()).trim());\n\t\t for(int i=0; i< constant.length; i++) {\n\t\t \t Resource Response = rdfssExample.createResource(NS+constant[i]);\n\t\t \t System.out.format(\"%10s %50s\",first, Response);\n\t\t \t System.out.println();\n\t\t\t\t\t //count++;\n\t\t }\n\t\t //System.out.format(\"%10s %50s\",first, Response);\n\t\t //System.out.format(\"%10s\",first);\n\t\t\t\t System.out.println();\n\t\t\t\t //count++;\n\t\t\t\t \n\t\t\t\t //System.out.println(count);\n\t\t \n\t\t }\n\t\t } finally {\n\t\t \t qe2.close();\n\t\t}\n\t\t\t \n\t\t}\t\t \n\t}", "public static AccSearchResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n AccSearchResponse object = new AccSearchResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"AccSearchResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (AccSearchResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"AccSearchResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"AccSearchResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"AccSearchResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setAccSearchResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "@Test\n\tpublic void testDriverAddressesReturned(){ \n\t\t// Left the driver values in this test method as the driver id and the expected values are very closely tied and extracting\n\t\t// them out to a properties file doesn't seem to make sense as these are old drivers that will not likely change.\n\t\t\n\t\tlong driverId = 3l; // driver with no post address, 2 garaged history addresses and 1 current\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.POST_ADDRESS_TYPE).size(), 0);\t\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.GARAGED_ADDRESS_TYPE).size(), 3);\n\t\t\n\t\tdriverId = 4l; // driver with no history addresses\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.GARAGED_ADDRESS_TYPE).size(), 1);\n\t\t\n\t\tdriverId = 125989l; // driver with multiple post\n\t\tList<DriverAddressHistory> list = driverService.getDriverAddressesByType(driverId, DriverService.POST_ADDRESS_TYPE);\n\t\tassertEquals(list.size(), 4);\n\t\t// check end date of first record\n\t\tassertEquals(list.get(0).getEndDate().toString(), \"2006-12-09 09:39:05.0\"); \n\t\t// check calculated start date of history record when change on same day\n\t\tassertEquals(list.get(1).getStartDate().toString(), \"2006-12-09 09:58:51.0\");\n\t\t// check calculated start date of history record when change not on same day\n\t\tassertEquals(list.get(2).getStartDate().toString(), \"Sun Dec 10 00:00:00 EST 2006\"); //TODO This is too brittle need to redo date/time test\n\t\t// check start date of current record\n\t\tassertEquals(list.get(3).getStartDate().toString(), \"Fri Apr 03 00:00:01 EDT 2009\"); //TODO This is too brittle need to redo date/time test\n\t}", "private DeepSearchRRList() {\n\n\t\t// initialization\n\t\tthis.myRRList = new ArrayList<RiskResult>();\n\t}", "public static List<Address> listAddressIdem(String a, String b, String c, String d,\n String e, String f, String g, String h, String i) throws SQLException, NamingException {\n List<Address> results = new ArrayList<Address>();\n\n String addressIdem = \"select * from ADDRESS where ADDRESS_COMPANY_NAME=? and ADDRESS_L_NAME=? and ADDRESS_F_NAME=? \"\n + \"and ADDRESS_STREET=? and ADDRESS_STREET_EXTRA=? and ADDRESS_POSTCODE=? and ADDRESS_CITY=? \"\n + \"and ADDRESS_PHONE=? and ADDRESS_PHONE_EXTRA=? \";\n Connection db = Database.getInstance().getConnection();\n\n PreparedStatement pstmt = db.prepareStatement(addressIdem);\n\n pstmt.setString(1, a);\n pstmt.setString(2, b);\n pstmt.setString(3, c);\n pstmt.setString(4, d);\n pstmt.setString(5, e);\n pstmt.setString(6, f);\n pstmt.setString(7, g);\n pstmt.setString(8, h);\n pstmt.setString(9, i);\n ResultSet rs = pstmt.executeQuery();\n while (rs.next()) {\n Address address = new Address(\n rs.getString(\"ADDRESS_COMPANY_NAME\"),\n rs.getString(\"ADDRESS_L_NAME\"),\n rs.getString(\"ADDRESS_F_NAME\"),\n rs.getString(\"ADDRESS_STREET\"),\n rs.getString(\"ADDRESS_STREET_EXTRA\"),\n rs.getString(\"ADDRESS_POSTCODE\"),\n rs.getString(\"ADDRESS_CITY\"),\n rs.getString(\"ADDRESS_PHONE\"),\n rs.getString(\"ADDRESS_PHONE_EXTRA\"));\n results.add(address);\n }\n\n return results;\n\n }", "interface List extends Follow {\n @Out Network[] networks();\n\n /**\n * Sets the maximum number of networks to return. If not specified all the networks are returned.\n */\n @In Integer max();\n\n /**\n * A query string used to restrict the returned networks.\n */\n @In String search();\n\n /**\n * Indicates if the search performed using the `search` parameter should be performed taking case into\n * account. The default value is `true`, which means that case is taken into account. If you want to search\n * ignoring case set it to `false`.\n */\n @In Boolean caseSensitive();\n }", "public static void main (String args[]) {\r\n\t String lspName = args[0];\r\n\t if (!lspName.startsWith (\"http://\")) {\r\n\t lspName = \"http://localhost:8080/\" + lspName;\r\n\t }\r\n\r\n String queryFilename = null;\r\n if (args.length == 2) {\r\n queryFilename = args[1];\r\n }\r\n\r\n try {\r\n SDARTSBean startsBean =\r\n \t new SDARTSBean (lspName);\r\n\r\n System.out.println (\"-----------------------------\");\r\n System.out.println (\"Finding supported interfaces of \" + lspName);\r\n String result1 = startsBean.getInterface();\r\n System.out.println (result1);\r\n System.out.println (\"-----------------------------\");\r\n System.out.println (\"Getting subcollection info for \" + lspName);\r\n String result2 = startsBean.getSubcollectionInfo();\r\n System.out.println (result2);\r\n System.out.println (\"-----------------------------\");\r\n String[] subcolNames = getSubCollectionNames (result2);\r\n int len = subcolNames.length;\r\n for (int i = 0 ; i < len ; i++) {\r\n String name = subcolNames[i];\r\n System.out.println (\"Getting subcollection info for \" + lspName +\r\n \":\" + name);\r\n String result3 = startsBean.getPropertyInfo(name);\r\n System.out.println (result3);\r\n System.out.println (\"-----------------------------\");\r\n }\r\n\r\n if (queryFilename != null) {\r\n StringBuffer sb = new StringBuffer();\r\n String testQuery = \"\";\r\n BufferedReader br =\r\n new BufferedReader (\r\n new InputStreamReader (\r\n new FileInputStream (queryFilename)));\r\n String line = null;\r\n while ( (line = br.readLine()) != null ) {\r\n sb.append (line);\r\n }\r\n\r\n testQuery = sb.toString();\r\n IntHolder total = new IntHolder();\r\n String result3 = startsBean.search (null,testQuery,total,1000);\r\n System.out.println (\"-----------------------------\");\r\n System.out.println (\"Found \" + total.value + \" hits.\");\r\n System.out.println (result3);\r\n System.out.println (\"-----------------------------\");\r\n }\r\n }\r\n catch (SDLIPException e) {\r\n System.out.println (e.getCode());\r\n e.printStackTrace();\r\n XMLObject details = e.getDetails();\r\n if (details != null) {\r\n try {\r\n System.out.println (\"DETAILS:\");\r\n System.out.println (details.getString());\r\n }\r\n catch (Exception e2) {\r\n e2.printStackTrace();\r\n }\r\n }\r\n System.exit(1);\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n System.exit(1);\r\n }\r\n }", "private Request makeListRequest(String filterName, String filterHost, String filterIds, String filterLanguage) {\n\t\tHttpUrl.Builder urlBuilder = new HttpUrl.Builder()\n\t\t\t.scheme(URL_SCHEME)\n\t\t\t.host(URL_HOST)\n\t\t\t.addPathSegments(URL_LIST_PATH);\n\t\t\n\t\t// Add optional parameters if they are provided\n\t\tif (filterName != null) { urlBuilder.addQueryParameter(\"filter[name]\", filterName); }\n\t\tif (filterHost != null) { urlBuilder.addQueryParameter(\"filter[host]\", filterHost); }\n\t\tif (filterIds != null) { urlBuilder.addQueryParameter(\"filter[ids]\", filterIds); }\n\t\tif (filterLanguage != null) { urlBuilder.addQueryParameter(\"filter[language]\", filterLanguage); }\n\t\t\n\t\t// Create the request\n\t\tRequest req = new Request.Builder()\n\t\t\t.url(urlBuilder.build())\n\t\t\t.addHeader(\"X-Api-Key\", keys.getRestKey())\n\t\t\t.build();\n\t\treturn req;\n\t}", "public static DirectOrderStateQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectOrderStateQueryResponse object =\n new DirectOrderStateQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directOrderStateQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectOrderStateQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directOrderStateQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectOrderStateQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectOrderStateQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public DataIterator getData(AddressSetView addrSet, boolean forward);", "public static GetVehicleRecordPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPage object =\n new GetVehicleRecordPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "List<SearchResult> search(SearchQuery searchQuery);", "public NetworkSearchResult findNetworks(\n\t\t\tString searchString,\n\t\t\tString accountName,\n\t\t\tint skipBlocks, \n\t\t\tint blockSize) \n\t\t\tthrows JsonProcessingException, IOException, NdexException {\n\t\tfinal String route = NdexApiVersion.v2 + \"/search/network?start=\" + skipBlocks+\"&size=\"+ blockSize;\t\t\n\t\tJsonNode postData = objectMapper.createObjectNode(); // will be of type ObjectNode\n\t\t((ObjectNode) postData).put(\"searchString\", searchString);\n\t\tif (accountName != null) ((ObjectNode) postData).put(\"accountName\", accountName);\n\t\treturn ndexRestClient.postNdexObject(route, postData, NetworkSearchResult.class);\n\t\t\n\t}", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction);", "List<ResultDTO> search(String query);", "@Test\n public void testSearchFilter_WithAddedSearchBaseAsParam() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search Base Append\\\"]%>(<%=parameter[\\\"Search String\\\"]%>)\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n parameters.put(\"Search Base Append\", \"OU=Users\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "private void buildQueryReqInfo(RequestInfo rInfo, String requestType, String[] fetchParam, String projId, String[] filterArray){\r\n\t\trInfo.setRequestType(requestType);\r\n\t\trInfo.setProjectOID(projId);\r\n\t\trInfo.setScopeDown(true);\r\n\t\trInfo.setFetch(fetchParam);\r\n\t\tArrayList<String> filterList = new ArrayList<String>(Arrays.asList(filterArray));\r\n\t\trInfo.setQueryFilter(filterList);\t\r\n\t\tSystem.out.println(requestType + \" -- \" + projId + \" -- \" + fetchParam + \" -- \" +filterList);\r\n\t}", "public static int PrintSearchList(NamingEnumeration sl, String dnbase, boolean _NICE) {\r\n\r\n // ***************************************************\r\n // If not nice output, return the abridged version.\r\n if (!_NICE) {\r\n return (PrintSearchList(sl, dnbase));\r\n }\r\n\r\n int EntryCount = 0;\r\n if (sl == null) {\r\n return (EntryCount);\r\n } else {\r\n try {\r\n while (sl.hasMore()) {\r\n SearchResult si = (SearchResult) sl.next();\r\n EntryCount++;\r\n\r\n // *************************************\r\n // Formulate the DN.\r\n //\r\n String DN = null;\r\n if (dnbase.equals(\"\")) {\r\n DN = si.getName();\r\n } else if (!si.isRelative()) {\r\n DN = si.getName();\r\n } else if (si.getName().equals(\"\")) {\r\n DN = dnbase;\r\n } else {\r\n DN = si.getName() + \",\" + dnbase;\r\n }\r\n\r\n // ************************************\r\n // Is the DN from a deReference Alias?\r\n // If so, then we have a URL, we need\r\n // to remove the URL.\r\n //\r\n if (!si.isRelative()) {\r\n DN = extractDNfromURL(DN);\r\n }\r\n\r\n // ******************************************\r\n // Write out the DN.\r\n // Do not write out a JNDI Quoted DN.\r\n // That is not LDIF Compliant.\r\n //\r\n idxParseDN pDN = new idxParseDN(DN);\r\n if (pDN.isQuoted()) {\r\n System.out.println(\"dn: \" + pDN.getDN());\r\n } else {\r\n System.out.println(\"dn: \" + DN);\r\n }\r\n\r\n // Obtain Attributes\r\n Attributes entryattrs = si.getAttributes();\r\n\r\n // First Write out Objectclasses.\r\n Attribute eo = entryattrs.get(ObjectClassName);\r\n if (eo != null) {\r\n for (NamingEnumeration eov = eo.getAll(); eov.hasMore(); ) {\r\n System.out.println(eo.getID() + \": \" + eov.next());\r\n }\r\n } // End of check for null if.\r\n\r\n\r\n // Obtain Naming Attribute Next.\r\n if (!\"\".equals(pDN.getNamingAttribute())) {\r\n Attribute en = entryattrs.get(pDN.getNamingAttribute());\r\n if (en != null) {\r\n for (NamingEnumeration env = en.getAll(); env.hasMore(); ) {\r\n System.out.println(en.getID() + \": \" + env.next());\r\n }\r\n } // End of check for null if.\r\n } // End of Naming Attribute.\r\n\r\n\r\n // Finish Obtaining remaining Attributes,\r\n // in no special sequence.\r\n for (NamingEnumeration ea = entryattrs.getAll(); ea.hasMore(); ) {\r\n Attribute attr = (Attribute) ea.next();\r\n\r\n if ((!ObjectClassName.equalsIgnoreCase(attr.getID())) &&\r\n (!pDN.getNamingAttribute().equalsIgnoreCase(attr.getID()))) {\r\n for (NamingEnumeration ev = attr.getAll(); ev.hasMore(); ) {\r\n String Aname = attr.getID();\r\n Aname = Aname.toLowerCase();\r\n Object Aobject = ev.next();\r\n if (Aname.startsWith(UserPasswordName)) {\r\n // *****************************\r\n // Show A trimmed Down Version.\r\n System.out.println(UserPasswordName + \": \" +\r\n \"********\");\r\n\r\n } else if (cnxidaXObjectBlob.equalsIgnoreCase(attr.getID())) {\r\n String blob;\r\n blob = (String) Aobject;\r\n System.out.println(attr.getID() +\r\n \": Data Length:[\" + blob.length() + \"]\");\r\n System.out.println(attr.getID() +\r\n \": \" + blob);\r\n\r\n } else if (Aobject instanceof byte[]) {\r\n System.out.println(attr.getID() +\r\n \": [ Binary data \" + ((byte[]) Aobject).length + \" in length ]\");\r\n } else { // Show normal Attributes as is...\r\n System.out.println(attr.getID() +\r\n \": \" + Aobject);\r\n } // End of Else.\r\n\r\n } // End of Inner For Loop.\r\n } // End of If.\r\n } // End of Outer For Loop\r\n\r\n System.out.println(\"\");\r\n\r\n } // End of While Loop\r\n } catch (NamingException e) {\r\n System.err.println(MP + \"Cannot continue listing search results - \" + e);\r\n return (-1);\r\n } catch (Exception e) {\r\n System.err.println(MP + \"Cannot continue listing search results - \" + e);\r\n e.printStackTrace();\r\n return (-1);\r\n } // End of Exception\r\n\r\n } // End of Else\r\n\r\n return (EntryCount);\r\n\r\n }", "public List<ServerServices> searchExternalService(int servId, String dataPort, String servicePort);", "QueryNetworkResponse queryVirtualisedNetworkResource(\n QueryNetworkRequest queryNetworkRequest, PoP poP) throws AdapterException;", "public LDAPUrl(String host,\n int port,\n String dn,\n String[] attrNames,\n int scope,\n String filter,\n String extensions[])\n {\n\t\turl = new com.github.terefang.jldap.ldap.LDAPUrl(\n host, port, dn, attrNames, scope, filter, extensions);\n\t\treturn;\n }", "public List<Record> get(RecordType type, String query) {\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"get: query=\" + query + \", type=\" + type);\n\t\t}\n\n\t\tif (query == null || type == null) {\n\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\tLOGGER.debug(\"get: null argument -> return null\");\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tMap<String, Element> mapOfRecords = getMap(type);\n\t\t\n\t\tElement res = mapOfRecords.get(query);\n\t\tif (res == null) {\n\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\tLOGGER.debug(\"get: no records -> return null\");\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tif (res.getDeathDate() >= 0 && res.getDeathDate() <= System.currentTimeMillis()) {\n\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\tLOGGER.debug(\"get: found a dead record (TTL is in the past) -> remove it from the cache\");\n\t\t\t}\n\t\t\tmapOfRecords.remove (query);\n\t\t\t// we cannot decrement the cache size since it may be accessed in // threads -> need absolute size\n\t\t\tif (_meters != null) _meters.getSet (type)._cacheEntriesMeter.set (mapOfRecords.size ()); // meters is null for hosts cache\n\t\t\treturn null;\n\n\t\t}\n\t\treturn res.getRecords();\n\t}", "public LDAPSearchResults getEntriesUnderBaseDN(String baseDn) throws LDAPException {\n LDAPSearchResults results = null;\n String[] attrs = {\"*\"};\n String filter = \"(objectclass=*)\";\n results = this.LDAPSearch(baseDn, LDAPv2.SCOPE_ONE, filter, attrs, false);\n return results;\n }", "public static GetDoctorList parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetDoctorList object = new GetDoctorList();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetDoctorList\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetDoctorList) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"request\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"request\").equals(\r\n reader.getName())) {\r\n object.setRequest(QueryDoctor.Factory.parse(reader));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "private List<Graph> search(Function<String, BasicQuery> makeJson, String luceneSearch, String queryType) {\n\t\t\n\t\tCacheLocation cacheLocation = \n\t\t\t\tcache.searchForResultSet(\n\t\t\t\t\t\t\"Graph\", \n\t\t\t\t\t\tluceneSearch, \n\t\t\t\t\t\tnew String[] { luceneSearch }\n\t\t\t\t);\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Graph> cachedResult = \n\t\t\t\t(List<Graph>)cacheLocation.getResultSet();\n\t\t\n\t\tList<Graph> graphs = cachedResult;\n\t\tif(graphs==null) {\n\t\t\n\t\t\tSearchString networkSearch = search.networksBy(restrictQuery(luceneSearch));\n\t\t\tBasicQuery subnetQuery = makeJson.apply(luceneSearch);\n\t\t\t\n\t\t\tNetworkList networks = ndex.searchNetworks(networkSearch);\n\t\t\t\n\t\t\tList<CompletableFuture<Network>> futures = new ArrayList<>();\n\t\t\tfor (NetworkSummary network : networks.getNetworks()) {\n\t\t\t\tfutures.add(ndex.queryNetwork(network, subnetQuery, queryType));\n\t\t\t}\n\t\t\t\n\t\t\tList<Network> subnetworks = new ArrayList<>();\n\t\t\tfor (CompletableFuture<Network> future : futures) {\n\t\t\t\ttry {\n\t\t\t\t\tsubnetworks.add(future.get(TIMEOUT, TIMEUNIT));\n\t\t\t\t} catch (InterruptedException | ExecutionException | TimeoutException e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tgraphs = Util.map(Graph::new, subnetworks);\n\t\t\t\n\t\t\tcacheLocation.setResultSet(graphs);\n\t\t\t\n\t\t} \n\t\t\n\t\treturn graphs;\n\t}", "@POST\n\t@Path(\"students\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response searchStudent(ParamsObject input){\n\t\tMap<String,List<String>> map = new HashMap<String,List<String>>();\n\t\tArrayList<Students> studentRecords = new ArrayList<Students>();\n\t\tJSONArray resultArray = new JSONArray();\n\t\tJSONObject finalResult = new JSONObject();\n\t\tint total = -1;\n\t\tint begin = 1;\n\t\tint end = 20;\n\ttry{\n\t\tif (input.getFirstname()!=null){\n\t\t\tSystem.out.println(\"got firstname\"+input.getFirstname());\n\t\t\tArrayList<String> firstnameList = new ArrayList<String>();\n\t\t\tfirstnameList.add(input.getFirstname());\n\t\t\tmap.put(\"firstName\",firstnameList);\n\t\t}\n\t\tif (input.getLastname()!=null){\n\t\t\tArrayList<String> lastnameList = new ArrayList<String>();\n\t\t\tlastnameList.add(input.getLastname());\n\t\t\tmap.put(\"lastName\",lastnameList);\n\t\t}\n\t\tif (input.getEmail()!=null){\n\t\t\tArrayList<String> emailList = new ArrayList<String>();\n\t\t\temailList.add(input.getEmail());\n\t\t\tmap.put(\"email\",emailList);\n\t\t}\n\t\tif (input.getDegreeyear()!=null){\n\t\t\tArrayList<String> degreeyearList = new ArrayList<String>();\n\t\t\tdegreeyearList.add(input.getDegreeyear());\n\t\t\tmap.put(\"expectedLastYear\",degreeyearList);\n\t\t}\n\t\tif (input.getEnrollmentstatus()!=null){\n\t\t\tArrayList<String> enrollmentstatusList = new ArrayList<String>();\n\t\t\tenrollmentstatusList.add(input.getEnrollmentstatus());\n\t\t\tmap.put(\"enrollmentStatus\",enrollmentstatusList);\n\t\t}\n\t\tif (input.getCampus()!=null){\n\t\t\tArrayList<String> campusList = new ArrayList<String>();\n\t\t\tcampusList.add(input.getCampus());\n\t\t\tmap.put(\"campus\",campusList);\n\t\t}\n\t\tif (input.getCompany()!=null){\n\t\t\tArrayList<String> companyList = new ArrayList<String>();\n\t\t\tcompanyList.add(input.getCompany());\n\t\t\tmap.put(\"companyName\",companyList);\n\t\t}\n\t\tif (input.getNeuid()!=null){\n\t\t\tArrayList<String> neuIdList = new ArrayList<String>();\n\t\t\tneuIdList.add(input.getNeuid());\n\t\t\tmap.put(\"neuId\",neuIdList);\n\t\t}\n\t\tif (input.getUndergradmajor()!=null){\n\t\t\tArrayList<String> undergradmajor = new ArrayList<String>();\n\t\t\tundergradmajor.add(input.getUndergradmajor());\n\t\t\tmap.put(\"majorName\",undergradmajor);\n\t\t}\n\t\tif (input.getNuundergrad()!=null){\n\t\t\tArrayList<String> nuundergrad = new ArrayList<String>();\n\t\t\tnuundergrad.add(input.getUndergradmajor());\n\t\t\tmap.put(\"institutionName\",nuundergrad);\n\t\t}\n\t\tif (input.getCoop()!=null){\n\t\t\tArrayList<String> coop = new ArrayList<String>();\n\t\t\tcoop.add(input.getCoop());\n\t\t\tmap.put(\"companyName\",coop);\n\t\t}\n\t\tif (input.getGender()!=null){\n\t\t\tArrayList<String> gender = new ArrayList<String>();\n\t\t\tgender.add(input.getGender());\n\t\t\tmap.put(\"gender\",gender);\n\t\t}\n\t\tif (input.getRace()!=null){\n\t\t\tArrayList<String> race = new ArrayList<String>();\n\t\t\trace.add(input.getRace());\n\t\t\tmap.put(\"race\",race);\n\t\t}\n\t\tif (input.getBeginindex()!=null){\n\t\t\tbegin = Integer.valueOf(input.getBeginindex());\n\t\t}\n\t\tif (input.getEndindex()!=null){\n\t\t\tend = Integer.valueOf(input.getEndindex());\n\t\t}\n\t\tstudentRecords = (ArrayList<Students>) studentDao.getAdminFilteredStudents(map, begin, end);\n\t\ttotal = studentDao.getAdminFilteredStudentsCount(map);\n\t\t\n\t\tfor(Students st : studentRecords) {\n\t\t\tJSONObject studentJson = new JSONObject();\n\t\t\tJSONObject eachStudentJson = new JSONObject(st);\n\t\t\tjava.util.Set<String> keys = eachStudentJson.keySet();\n\t\t\tfor(int i=0;i<keys.toArray().length; i++){\n\t\t\t\tstudentJson.put(((String) keys.toArray()[i]).toLowerCase(), eachStudentJson.get((String) keys.toArray()[i]));\n\t\t\t}\n\t\t\tstudentJson.put(\"notes\",administratorNotesDao.getAdministratorNoteRecordByNeuId(studentJson.get(\"neuid\").toString()));\n\t\t\tresultArray.put(studentJson);\n\t\t}\n\t\tfinalResult.put(\"students\", resultArray);\n\t\tfinalResult.put(\"beginindex\", begin);\n\t\tfinalResult.put(\"endindex\", end);\n\t\tfinalResult.put(\"totalcount\", total);\n\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(\"please check the request.\").build();\n\t\t}\n\t\treturn Response.status(Response.Status.OK).entity(finalResult.toString()).build();\n\t}", "public void getRecords(LVValue query) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\tmyData.record=createRecord(myData.spec,null);\n\t\ttry\n\t\t{\n\t\t\tString s=null;\n\t\t\tif (query!=null) s=query.getStringValue();\n\t\t\tmyData.record.getRecords(background.getClient(),s);\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "public DataRequest() {\n\t\tfilters = new ArrayList<FilteringRule>();\n\t\tsort_by = new ArrayList<SortingRule>();\n\t}", "List<ResultsView1> findByCadd(String addrs);", "public static GetDirectSrvInfo parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectSrvInfo object =\n new GetDirectSrvInfo();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectSrvInfo\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectSrvInfo)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setRequestXml(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setRequestXml(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "entities.Torrent.SearchRequest getSearchRequest();", "public void sendEnumerationResponse(NameEnumerationResponse ner){\n \t\tif(ner!=null && ner.getPrefix()!=null && ner.hasNames()){\n \t\t\tNameEnumerationResponseMessageObject neResponseObject = null;\n \t\t\ttry{\n \t\t\t\tif (SystemConfiguration.getLogging(RepositoryStore.REPO_LOGGING))\n \t\t\t\t\tLog.finer(\"returning names for prefix: {0}\", ner.getPrefix());\n \n \t\t\t\tif (SystemConfiguration.getLogging(RepositoryStore.REPO_LOGGING)) {\n \t\t\t\t\tfor (int x = 0; x < ner.getNames().size(); x++) {\n \t\t\t\t\t\tLog.finer(\"name: {0}\", ner.getNames().get(x));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (ner.getTimestamp()==null)\n \t\t\t\t\tif (SystemConfiguration.getLogging(RepositoryStore.REPO_LOGGING))\n \t\t\t\t\t\tLog.info(\"node.timestamp was null!!!\");\n \t\t\t\tNameEnumerationResponseMessage nem = ner.getNamesForResponse();\n \t\t\t\tneResponseObject = new NameEnumerationResponseMessageObject(new ContentName(ner.getPrefix(), _responseName.components()), nem, _handle);\n \t\t\t\t// TODO this is only temporary until flow control issues can\n \t\t\t\t// be worked out here\n \t\t\t\tneResponseObject.disableFlowControl();\n \t\t\t\tneResponseObject.save(ner.getTimestamp());\n \t\t\t\tif (SystemConfiguration.getLogging(RepositoryStore.REPO_LOGGING))\n \t\t\t\t\tLog.finer(\"saved collection object: {0}\", neResponseObject.getVersionedName());\n \t\t\t\treturn;\n \n \t\t\t} catch(IOException e){\n \t\t\t\tLog.logException(\"error saving name enumeration response for write out (prefix = \"+ner.getPrefix()+\" collection name: \"+neResponseObject.getVersionedName()+\")\", e);\n \t\t\t}\n \t\t}\n \t}", "public List getList(int start, int pernum, SearchParam param);", "String exportResultsData(FilterSpecifier.ListBy listBy, String filename) throws SearchServiceException;", "entities.Torrent.LocalSearchRequest getLocalSearchRequest();", "@ResponseBody\n\t@RequestMapping(value=\"/listChoice\", method=RequestMethod.POST)\n\tpublic List<AuctionDTO> listChoice(String search, String category, int startNum, int lastNum )throws Exception{\n\t\tSystem.out.println(search);\n\t\tSystem.out.println(category);\n\t\tSystem.out.println(startNum);\n\t\tSystem.out.println(lastNum);\n\t\tList<AuctionDTO> l=auctionService.listChoice(search, category, startNum, lastNum);\n\t\tSystem.out.println(l.size());\n\t\treturn l;\n\t}", "public Vector getContactsURI(Request request) {\n try{\n String key=getKey(request);\n Vector contacts=getContactHeaders(key);\n if (contacts==null) return null;\n Vector results=new Vector();\n for (int i=0;i<contacts.size();i++) {\n ContactHeader contact = (ContactHeader)\n contacts.elementAt(i);\n Address address=contact.getAddress();\n URI uri=address.getURI();\n URI cleanedURI=getCleanUri(uri);\n results.addElement(cleanedURI);\n }\n return results;\n }\n catch (Exception ex) {\n\t if (ProxyDebug.debug) {\n ProxyDebug.println\n\t\t(\"Registrar, getContactsURI(), internal error, exception raised:\");\n ProxyDebug.logException(ex);\n\t }\n return null;\n }\n }", "private void display(Network network) {\n if(network == null)\n {\n return;\n }\n DefaultTableModel model = (DefaultTableModel) Consultancy_List_JTable.getModel();\n model.setRowCount(0);\n for(Enterprise enterprise:network.getEnterpriseDirectory().getEnterpriseList()){\n if(enterprise instanceof ConsultancyEnterprise){\n for(Organization org:enterprise.getOrganizationDirectory().getOrganizationList()){\n if(org instanceof ConsultantOrganization){\n int size_temp = org.getWorkQueue().getWorkRequestList().size();\n if(size_temp==0)\n {\n Object[] row = new Object[1];\n row[0] = enterprise;\n model.addRow(row);\n }\n// \n// for(WorkRequest work:org.getWorkQueue().getWorkRequestList()){\n// System.out.println(work);\n// if(work instanceof ConsultancyServiceWorkRequest){\n// ConsultancyServiceWorkRequest workreq = (ConsultancyServiceWorkRequest) work;\n// System.out.println(workreq);\n// if(enterprise.equals(workreq.getEnterprise())){\n// System.out.println(\"4\"+enterprise);\n// }\n// }\n// else{\n// System.out.println(\"5\"+enterprise);\n// Object[] row = new Object[1];\n// row[0] = enterprise;\n// model.addRow(row);\n// }\n// \n// }\n \n }\n \n }\n \n }\n }\n }", "public void recordResult(RangingRequest requests, List<RttResult> results) {\n Map<MacAddress, ResponderConfig> requestEntries = new HashMap<>();\n for (ResponderConfig responder : requests.mRttPeers) {\n requestEntries.put(responder.macAddress, responder);\n }\n\n if (results != null) {\n for (RttResult result : results) {\n if (result == null) {\n continue;\n }\n ResponderConfig responder = requestEntries.remove(\n MacAddress.fromBytes(result.addr));\n if (responder == null) {\n Log.e(TAG,\n \"recordResult: found a result which doesn't match any requests: \"\n + result);\n continue;\n }\n\n if (responder.responderType == ResponderConfig.RESPONDER_AP) {\n updatePeerInfoWithResultInfo(mPerPeerTypeInfo[PEER_AP], result);\n } else if (responder.responderType == ResponderConfig.RESPONDER_AWARE) {\n updatePeerInfoWithResultInfo(mPerPeerTypeInfo[PEER_AWARE], result);\n } else {\n Log.e(TAG, \"recordResult: unexpected peer type in responder: \" + responder);\n }\n }\n }\n\n for (ResponderConfig responder : requestEntries.values()) {\n PerPeerTypeInfo peerInfo;\n if (responder.responderType == ResponderConfig.RESPONDER_AP) {\n peerInfo = mPerPeerTypeInfo[PEER_AP];\n } else if (responder.responderType == ResponderConfig.RESPONDER_AWARE) {\n peerInfo = mPerPeerTypeInfo[PEER_AWARE];\n } else {\n Log.e(TAG, \"recordResult: unexpected peer type in responder: \" + responder);\n continue;\n }\n peerInfo.statusHistogram.put(WifiMetricsProto.WifiRttLog.MISSING_RESULT,\n peerInfo.statusHistogram.get(WifiMetricsProto.WifiRttLog.MISSING_RESULT) + 1);\n }\n }", "public Map lookup(Map constraints) {\n //sanity check\n if (this.isClosed()) {\n //probably an exception should be thrown here!!\n throw new RuntimeException(RLI_NOT_CONNECTED_MSG + this.mRLIURL);\n }\n Map result = new HashMap();\n String url = null,message = null;\n //we need to get hold of all the LRC\n //that report to the RLI and call the\n //list() method on each of them\n for(Iterator it = this.getReportingLRC().iterator();it.hasNext();){\n url = (String)it.next();\n message = \"Querying LRC \" + url;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,url);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + url,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n try{\n Map m = lrc.lookup(constraints);\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n Map.Entry entry = (Map.Entry)mit.next();\n //merge the entries into the main result\n String key = (String)entry.getKey(); //the lfn\n if(result.containsKey(key)){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((List)result.get(key)).addAll((List)entry.getValue());\n }\n else{\n result.put(key,entry.getValue());\n }\n }\n\n }\n catch(Exception e){\n mLogger.log(\"list(String)\",e,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n lrc.close();\n }\n }\n\n return result;\n\n }" ]
[ "0.47208968", "0.47011754", "0.46839514", "0.46523747", "0.46502474", "0.4634851", "0.4633494", "0.4603088", "0.4600469", "0.45661944", "0.45349658", "0.45124924", "0.45108128", "0.44958717", "0.4452055", "0.4451985", "0.44077262", "0.440719", "0.44020194", "0.4394069", "0.43768394", "0.4372232", "0.43634236", "0.43509793", "0.43233392", "0.4291982", "0.42862827", "0.4275712", "0.42723414", "0.42634737", "0.42481524", "0.42437172", "0.4237098", "0.42196256", "0.42126608", "0.4211246", "0.42081022", "0.41977283", "0.4183274", "0.41822088", "0.414011", "0.41344106", "0.41342703", "0.413079", "0.41281778", "0.4126679", "0.41212925", "0.41153383", "0.41006857", "0.4098034", "0.4097667", "0.40952912", "0.4083604", "0.40823802", "0.40752062", "0.40743345", "0.40687776", "0.40683153", "0.40529546", "0.40522626", "0.40499425", "0.4047856", "0.40408888", "0.4040229", "0.40360984", "0.40331888", "0.4017788", "0.40121615", "0.40066335", "0.40041524", "0.40018657", "0.39999047", "0.39998284", "0.39987624", "0.39977401", "0.39942455", "0.3989672", "0.39868787", "0.39845455", "0.3984029", "0.39832842", "0.39830667", "0.39825153", "0.39764354", "0.3976044", "0.39757472", "0.39725873", "0.39716944", "0.39693502", "0.39683163", "0.39644113", "0.39642128", "0.39625782", "0.39620543", "0.39612332", "0.3960611", "0.39519596", "0.39517003", "0.39483628", "0.3943712" ]
0.7215915
0
Read the HTTP headers and the data using HttpConnection. Check the response code to ensure successful open. Connector.open is used to open url and a HttpConnection is returned. The HTTP headers are read and processed. url the URL to open throws IOException for any network related exception
private HttpConnection open(String url) throws IOException { HttpConnection c; int status = -1; // Open the connection and check for redirects while (true) { c = (HttpConnection) Connector.open(url); // Get the status code, // causing the connection to be made status = c.getResponseCode(); if ((status == HttpConnection.HTTP_TEMP_REDIRECT) || (status == HttpConnection.HTTP_MOVED_TEMP) || (status == HttpConnection.HTTP_MOVED_PERM)) { // Get the new location and close the connection url = c.getHeaderField("location"); c.close(); } else { break; } } // Only HTTP_OK (200) means the content is returned. if (status != HttpConnection.HTTP_OK) { c.close(); throw new IOException("Response status not OK"); } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getResponseFromHttpUrl(URL url) throws IOException {\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.addRequestProperty(\"Authorization\",\"Bearer JVNDXWXVDDQN2IJUJJY7NQXCPS23M7DX\");\n try{\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n boolean hasInput = scanner.hasNext();\n if(hasInput){\n return scanner.next();\n }else{\n return null;\n }\n }finally {\n urlConnection.disconnect();\n }\n }", "private InputStream openHttpConnection(String urlStr) {\n InputStream in = null;\n int resCode = -1;\n\n try {\n URL url = new URL(urlStr);\n HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n\n if (!(urlConn instanceof HttpURLConnection)) {\n throw new IOException(\"URL is not an Http URL\");\n }\n HttpURLConnection httpConn = urlConn;\n httpConn.setAllowUserInteraction(false);\n httpConn.setInstanceFollowRedirects(true);\n httpConn.setRequestMethod(\"GET\");\n httpConn.connect();\n resCode = httpConn.getResponseCode();\n\n if (resCode == HttpURLConnection.HTTP_OK) {\n in = httpConn.getInputStream();\n }\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return in;\n }", "static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n String response = null;\n if (hasInput) {\n response = scanner.next();\n }\n scanner.close();\n return response;\n } finally {\n urlConnection.disconnect();\n }\n }", "private InputStream getHttpConnection(String urlString) throws IOException\n \t {\n \t InputStream stream = null;\n \t URL url = new URL(urlString);\n \n \t URLConnection connection = url.openConnection();\n \n \t try \n \t {\n \t HttpURLConnection httpConnection = (HttpURLConnection) connection;\n \t httpConnection.setRequestMethod(\"GET\");\n \t httpConnection.connect();\n \t stream = httpConnection.getInputStream();\n \n \t if (httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK)\n \t {\n \t stream = httpConnection.getInputStream();\n \t }\n \t } \n \t catch (Exception ex)\n \t {\n \t ex.printStackTrace();\n \t }\n \t return stream;\n \t }", "public static HttpURLConnection get(Uri url) throws IOException{\n\n //Create the connection to the url\n HttpURLConnection con = (HttpURLConnection) (new URL(url.toString())).openConnection();\n\n // Add the http header to the request\n con.setRequestProperty(\"User-Agent\", urlCharset);\n\n return con;\n }", "private static InputStream getHttpConnection(String urlString)\n throws IOException {\n InputStream stream = null;\n URL url = new URL(urlString);\n URLConnection connection = url.openConnection();\n\n try {\n HttpURLConnection httpConnection = (HttpURLConnection) connection;\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.connect();\n\n if (httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n stream = httpConnection.getInputStream();\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return stream;\n }", "static String getResponseFromHttpUrl(URL url) throws IOException {\n String jsonReturn = \"\";\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setConnectTimeout(CONNECTION_TIMEOUT); //connection is closed after 7 seconds\n\n try {\n InputStream inputStream = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(inputStream);\n scanner.useDelimiter(\"\\\\A\");\n\n if(!scanner.hasNext()){\n return null;\n }\n\n while(scanner.hasNext()){\n jsonReturn = jsonReturn.concat(scanner.next());\n }\n return jsonReturn;\n\n } catch (Exception e){\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n\n return null;\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String JSONResponse = null;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(Constants.URL_REQUEST_METHOD);\n urlConnection.setReadTimeout(Constants.URL_READ_TIME_OUT);\n urlConnection.setConnectTimeout(Constants.URL_CONNECT_TIME_OUT);\n urlConnection.connect();\n\n if (urlConnection.getResponseCode() == Constants.URL_SUCCESS_RESPONSE_CODE) {\n inputStream = urlConnection.getInputStream();\n JSONResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Response code : \" + urlConnection.getResponseCode());\n // If received any other code(i.e 400) return null JSON response\n JSONResponse = null;\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error Solving JSON response : makeHttpConnection() block\");\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n // Input stream throws IOException when trying to close, that why method signature\n // specify about IOException\n }\n }\n return JSONResponse;\n }", "public static InputStream getHttpConnection(String urlString) {\n InputStream stream = null;\n try {\n URL url = new URL(urlString);\n HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.connect();\n if (httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n stream = httpConnection.getInputStream();\n }\n } catch (UnknownHostException e1) {\n Log.d(\"MyDebugMsg\", \"UnknownHostexception in getHttpConnection()\");\n e1.printStackTrace();\n } catch (Exception ex) {\n Log.d(\"MyDebugMsg\", \"Exception in getHttpConnection()\");\n ex.printStackTrace();\n }\n return stream;\n }", "public Reader openHttp2Reader(URL url) throws IOException {\r\n return new InputStreamReader(openHttpEntity(url).getContent());\r\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\r\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\r\n try {\r\n InputStream in = urlConnection.getInputStream();\r\n\r\n Scanner scanner = new Scanner(in);\r\n scanner.useDelimiter(\"\\\\A\");\r\n\r\n boolean hasInput = scanner.hasNext();\r\n if (hasInput) {\r\n return scanner.next();\r\n } else {\r\n return null;\r\n }\r\n } finally {\r\n urlConnection.disconnect();\r\n }\r\n }", "private String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n return jsonResponse;\n }\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "private String getContent(String url) throws BoilerpipeProcessingException, IOException {\n int code;\n HttpURLConnection connection = null;\n URL uri;\n do{\n uri = new URL(url);\n if(connection != null)\n connection.disconnect();\n connection = (HttpURLConnection)uri.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setConnectTimeout(5000);\n connection.setReadTimeout(5000);\n connection.connect();\n code = connection.getResponseCode();\n if(code == 301)\n url = connection.getHeaderField( \"Location\" );\n }while (code == 301);\n\n System.out.println(url + \" :: \" + code);\n String content = null;\n if(code < 400) {\n content = ArticleExtractor.INSTANCE.getText(uri);\n }\n connection.disconnect();\n return content;\n }", "@Nullable\n public static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n if (hasInput) {\n return scanner.next();\n } else {\n return null;\n }\n } finally {\n urlConnection.disconnect();\n }\n }", "private static InputStream retrieveStream(String url) {\r\n\t\tDefaultHttpClient client = new DefaultHttpClient();\r\n\t\tHttpGet getRequest = new HttpGet(url);\r\n\t\t\r\n\t\ttry{\r\n\t\t\tHttpResponse getResponse = client.execute(getRequest);\r\n\t\t\tfinal int statusCode = getResponse.getStatusLine().getStatusCode();\r\n\t\t\tSystem.out.println(statusCode);\r\n\t\t\t\r\n\t\t\tif(statusCode != HttpStatus.SC_OK){\r\n\t\t\t\t//Log.w(getClass().getSimpleName(),\r\n\t\t\t\t\t\t//\"Error \" + statusCode + \" for URL \" + url);\r\n\t\t\t\tSystem.out.println(statusCode);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tHttpEntity getResponseEntity = getResponse.getEntity();\r\n\t\t\treturn getResponseEntity.getContent();\r\n\t\t}\r\n\t\t\r\n\t\tcatch(IOException e){\r\n\t\t\tgetRequest.abort();\r\n\t\t\t//Log.w(getClass().getSimpleName(),\"Error for URL \" + url, e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public InputStream openHttp2Stream(URL url) throws IOException {\r\n return openHttpEntity(url).getContent();\r\n }", "@Override\n public URLConnection openConnection(URL url) throws IOException {\n return openConnection(url, null);\n }", "private static String makeHTTPRequest(URL url) throws IOException {\n\n // Create an empty json string\n String jsonResponse = \"\";\n\n //IF url is null, return early\n if (url == null) {\n return jsonResponse;\n }\n\n // Create an Http url connection, and an input stream, making both null for now\n HttpURLConnection connection = null;\n InputStream inputStream = null;\n\n try {\n\n // Try to open a connection on the url, request that we GET info from the connection,\n // Set read and connect timeouts, and connect\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(10000 /*Milliseconds*/);\n connection.setConnectTimeout(15000 /*Milliseconds*/);\n connection.connect();\n\n // If response code is 200 (aka, working), then get and read from the input stream\n if (connection.getResponseCode() == 200) {\n\n Log.v(LOG_TAG, \"Response code is 200: Aka, everything is working great\");\n inputStream = connection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n\n } else {\n // if response code is not 200, Log error message\n Log.v(LOG_TAG, \"Error Response Code: \" + connection.getResponseCode());\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error making http request: \" + e);\n } finally {\n // If connection and inputStream are NOT null, close and disconnect them\n if (connection != null) {\n connection.disconnect();\n }\n\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies that an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n\n return jsonResponse;\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n // if the url is null, return the response early;\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code \" + urlConnection.getResponseCode());\n }\n\n } catch (IOException e) {\n // TODO: Handle the exception\n Log.e(LOG_TAG, \"Problem retrieving from the url\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public static InputStream getHttpConnection(String urlString) throws IOException {\n\n InputStream stream = null;\n URL url = new URL(urlString);\n URLConnection connection = url.openConnection();\n\n try {\n HttpURLConnection httpConnection = (HttpURLConnection) connection;\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.connect();\n\n if (httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n stream = httpConnection.getInputStream();\n }\n }\n catch (Exception ex) {\n ex.printStackTrace();\n System.out.println(\"downloadImage\" + ex.toString());\n }\n return stream;\n }", "public String getContentFromUrl(String strUrl) throws IOException {\n String content = \"\";\n URL url = null;\n HttpURLConnection httpURLConnection = null;\n url = new URL(strUrl);\n httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setRequestMethod(Constants.METHOD_GET);\n httpURLConnection.setConnectTimeout(Constants.CONNECTION_TIME_OUT);\n httpURLConnection.setReadTimeout(Constants.READ_INPUT_TIME_OUT);\n httpURLConnection.setDoInput(true);\n httpURLConnection.connect();\n int responseCode = httpURLConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_OK) {\n content = parserResultFromContent(httpURLConnection.getInputStream());\n }\n return content;\n }", "private String verifyHttpProcess(String url) {\n synchronized (httpClient) {\n int statusCode = -1;\n try {\n GetMethod get = getCachedMethod(url);\n statusCode = httpClient.executeMethod(get);\n } catch (HttpException e1) {\n String msg = \"Unable to execute GET against the collaboration dataserver at \"\n + url;\n logger.error(msg, e1);\n setOffline(msg);\n } catch (IOException e2) {\n String msg = \"Unable to read the response from the collaboration dataserver at \"\n + url;\n logger.error(msg, e2);\n setOffline(msg);\n }\n\n if ((statusCode == HttpStatus.SC_OK) == false) {\n String msg = \"Dataserver not is not available - received status \"\n + statusCode;\n logger.error(msg);\n setOffline(msg);\n return null;\n } else {\n String urlConfig = \"sessionDataHttpURL : \" + url;\n setOnline(urlConfig);\n return urlConfig;\n }\n }\n }", "private HttpURLConnection getURLobject (String uri, String xmlMsg, URL url) throws Exception\n {\n URLConnection urlcon = url.openConnection();\n HttpURLConnection conn = (HttpURLConnection) urlcon;\n // ******** Filling of Default Request Header Properties ************\n conn.setUseCaches( false );\n HttpURLConnection.setFollowRedirects( false );\n if (xmlMsg != null && xmlMsg.length() > 0)\n conn.setRequestMethod(\"POST\");\n conn.setDoInput (true);\n conn.setDoOutput(true);\n\n // String encoding = null;\n\n conn.setRequestProperty( \"Accept\", \"text/xml\");\n conn.setRequestProperty( \"Content-type\", \"xml/txt\");\n conn.setRequestProperty( \"Accept-Charset\", \"iso-8859-1,*,utf-8\");\n conn.setRequestProperty( \"User-Agent\", \"CIDS Client/4.0\");\n conn.setRequestProperty( \"Pragma\", \"no-cache\");\n String xmlStr = \"XMLHttpRequest\";\n String contentTypeStr = \"application/x-www-form-urlencoded\";\n conn.setRequestProperty(\"X-Requested-With\", xmlStr);\n conn.setRequestProperty(\"Content-Type\", contentTypeStr);\n if (verbose) {\n // TODO: just get the data from conn \n System.out.println(\"Header request lines\");\n System.out.println(\" key [Accept]\");\n System.out.println(\" value [text/xml]\");\n System.out.println(\" key [Content-type]\");\n System.out.println(\" value [xml/txt]\");\n System.out.println(\" key [Accept-Charset]\");\n System.out.println(\" value [iso-8859-1,*,utf-8]\");\n System.out.println(\" key [User-Agent]\");\n System.out.println(\" value [CIDS Client/4.0]\");\n System.out.println(\" key [Pragma]\");\n System.out.println(\" value [no-cache]\");\n System.out.println(\" key[X-Requested-With]\");\n System.out.println(\" value[\"+xmlStr+\"]\");\n System.out.println(\" key[Content-Type]\");\n System.out.println(\" value[\"+contentTypeStr+\"]\");\n }\n\n return conn;\n }", "private static String getHTTPResponse(URL url){\n\t\t\n\t\tStringBuilder response = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tURLConnection connection = url.openConnection();\n\t\t\tBufferedReader res = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\tString responseLine;\n\t\t\t\n\t\t\twhile((responseLine = res.readLine()) != null)\n\t\t\t\tresponse.append(responseLine);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t\treturn response.toString();\n\t}", "protected URLConnection createConnection(URL url) throws IOException\n {\n URLConnection con = url.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n return con;\n }", "protected HTTPConnection getConnectionToURL(URL url) throws ProtocolNotSuppException\r\n {\r\n\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n\r\n if (proxyRequired)\r\n {\r\n con.addBasicAuthorization(proxyRealm, proxyName, proxyPswd);\r\n }\r\n\r\n return (con);\r\n }", "public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n //conn.setReadTimeout(10000 /* milliseconds */);\n // conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n conn.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 ( compatible ) \");\n conn.setRequestProperty(\"Accept\", \"*/*\");\n // Starts the query\n conn.connect();\n\n return conn.getInputStream();\n }", "private static InputStream performNetworkRequest(URL url) {\n if (url == null) {\n Log.e(LOG_TAG, \"Provided URL is null, exiting method early\");\n return null;\n }\n\n HttpURLConnection connection = null;\n InputStream responseStream = null;\n\n try {\n connection = (HttpURLConnection) url.openConnection();\n connection.setConnectTimeout(10000);\n connection.setReadTimeout(90000);\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n int responseCode = connection.getResponseCode();\n if (responseCode != 200) {\n Log.e(LOG_TAG, \"Response code different from expected code 200. Received code: \" + responseCode + \", exiting method early\");\n return null;\n }\n responseStream = connection.getInputStream();\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem occured while performing network request\");\n e.printStackTrace();\n }\n return responseStream;\n }", "private HttpResponse httpRequest(URL url, List<Header> headers, String method) throws IOException {\n\n BufferedReader streamReader;\n\n HttpURLConnection connection = setupConnection(url,headers,method);\n connection.setDoOutput(false);\n connection.connect();\n\n final int httpResponseCode = connection.getResponseCode();\n final List<Header> responseHeaders = Header.getHeaders(connection.getHeaderFields());\n\n try {\n streamReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n }\n catch (IOException e) {\n streamReader = new BufferedReader(new InputStreamReader(connection.getErrorStream()));\n }\n\n StringBuilder sb = new StringBuilder();\n String currentLine;\n\n while((currentLine = streamReader.readLine()) != null) {\n sb.append(currentLine).append(\"\\n\");\n }\n\n connection.disconnect();\n\n try {\n Objects.requireNonNull(streamReader).close();\n }\n catch (IOException ignored){ }\n\n return new HttpResponse(responseHeaders,httpResponseCode,sb.toString().trim());\n }", "@Override\n protected URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n\n final HttpsURLConnectionImpl httpsURLConnection = (HttpsURLConnectionImpl) super.openConnection(url, proxy);\n if (\"artisan.okta.com\".equals(url.getHost()) && \"/home/amazon_aws/0oad7khqw5gSO701p0x7/272\".equals(url.getPath())) {\n\n return new URLConnection(url) {\n @Override\n public void connect() throws IOException {\n httpsURLConnection.connect();\n }\n\n public InputStream getInputStream() throws IOException {\n byte[] content = IOUtils.toByteArray(httpsURLConnection.getInputStream());\n String contentAsString = new String(content, \"UTF-8\");\n\n //System.out.println(\"########################## got stream content ##############################\");\n //System.out.println(contentAsString);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //contentAsString = contentAsString.replaceAll(\",\\\"ENG_ENABLE_SCRIPT_INTEGRITY\\\"\", \"\"); // nested SRIs?\n baos.write(contentAsString.replaceAll(\"integrity ?=\", \"integrity.disabled=\").getBytes(\"UTF-8\"));\n return new ByteArrayInputStream(baos.toByteArray());\n }\n\n public OutputStream getOutputStream() throws IOException {\n return httpsURLConnection.getOutputStream();\n }\n\n };\n\n } else {\n return httpsURLConnection;\n }\n }", "private static JSONArray getResponseFromHttpUrl(URL url) throws IOException {\n\n Log.d(TAG, \"sending GET http request\");\n\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(3000);\n urlConnection.setConnectTimeout(5000);\n String result = \"\";\n JSONArray ja = null;\n JSONObject jo = null;\n try {\n InputStream in = urlConnection.getInputStream();\n BufferedReader buffer = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while (line != null) {\n line = buffer.readLine();\n result += line;\n }\n\n ja = new JSONArray(result);\n } catch (JSONException e) {\n try {\n jo = new JSONObject(result);\n } catch (JSONException eo) {\n eo.printStackTrace();\n }\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n\n if (jo != null) {\n ja = new JSONArray();\n ja.put(jo);\n }\n return ja;\n }", "@Override\n protected Void doInBackground(Void... arg0) {\n HttpURLConnection urlConnection = null;\n\n try {\n URL data = new URL(url);\n urlConnection = (HttpURLConnection) data.openConnection();\n\n int responseCode = urlConnection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n\n readJsonStream(urlConnection.getInputStream());\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n urlConnection.disconnect();\n return null;\n }", "private static BufferedReader newReader(URL url) throws IOException {\n return newReader(url.openConnection().getInputStream());\n }", "public String sendHeadSecure(String url)\n\t{\n\t\ttry \n\t\t{\n\t\t\t//Creating URL and connection objects\n\t\t\tURL https_url = new URL(url);\n\t\t\tHttpsURLConnection secure_connection = (HttpsURLConnection)https_url.openConnection();\n\t\t\t//Setting request method to HEAD\n\t\t\tsecure_connection.setRequestMethod(\"HEAD\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Setting all Reposnse Headers \n\t\t\tp = new ResponseParser();\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn (\"good head\");\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t\treturn \"invalid url\";\n\t\t}\n\t}", "private void initConnection() throws MalformedURLException, IOException {\n httpConnection = (HttpURLConnection) new URL(initUrlParameter())\n .openConnection();\n httpConnection.setDoOutput(true);\n httpConnection.setDoInput(true);\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n httpConnection.setRequestProperty(\"Authorization\",\n authentificator.generateBasicAuthorization());\n\n }", "public java.io.Reader getReader (URL url) throws java.io.IOException;", "@NonNull\n HttpURLConnection openConnection(@NonNull Uri uri) throws IOException;", "public static Integer getResponseCode(String url) throws IOException {\n\n String chrome_user_agent = \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\";\n\n\n HttpClient client = HttpClientBuilder.create().build();\n HttpGet request = new HttpGet(url);\n request.addHeader(\"User-Agent\", chrome_user_agent);\n HttpResponse response = null;\n try {\n response = client.execute(request);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* System.out.println(\"Response Code : \"\n + response.getStatusLine().getStatusCode());\n*/\n /*BufferedReader rd = new BufferedReader(\n new InputStreamReader(response.getEntity().getContent()));\n\n StringBuffer result = new StringBuffer();\n String line = \"\";\n while ((line = rd.readLine()) != null) {\n result.append(line);\n }\n*/\n return response.getStatusLine().getStatusCode();\n }", "private void http_handler(BufferedReader input, DataOutputStream output) {\n int method = 0; //1 get, 2 head, 0 not supported\n String http = new String(); //a bunch of strings to hold\n String path = new String(); //the various things, what http v, what path,\n String file = new String(); //what file\n String user_agent = new String(); //what user_agent\n try {\n //This is the two types of request we can handle\n //GET /index.html HTTP/1.0\n //HEAD /index.html HTTP/1.0\n String tmp = input.readLine(); //read from the stream\n String tmp2 = new String(tmp);\n String line = input.readLine();\n String header = \"\";\n while (line != null && !line.equals(\"\")) {\n header += line;\n line = input.readLine();\n }\n if(header.contains(\"Content-Length\")){\n int offset = header.indexOf(\"Content-Length: \") + \"Content-Length: \".length();\n int cLength = Integer.parseInt(header.substring(offset, header.length()));\n char[] buffer = new char[cLength];\n input.read(buffer);\n value = new String(buffer);\n }\n tmp.toUpperCase(); //convert it to uppercase\n\n if (tmp.startsWith(\"GET\")) { //compare it is it GET\n method = 1;\n } //if we set it to method 1\n if (tmp.startsWith(\"OPTIONS\")) { //same here is it OPTIONS\n method = 2;\n } //set method to 2\n if (tmp.startsWith(\"POST\")) { //same here is it POST\n method = 3;\n } //set method to 3\n\n if (method == 0) { // not supported\n try {\n output.writeBytes(construct_http_header(501, 0));\n output.close();\n return;\n } catch (Exception e3) { //if some error happened catch it\n s(\"error:\" + e3.getMessage());\n } //and display error\n }\n //}\n\n //tmp contains \"GET /index.html HTTP/1.0 .......\"\n //find first space\n //find next space\n //copy whats between minus slash, then you get \"index.html\"\n //it's a bit of dirty code, but bear with me...\n\n int start = 0;\n int end = 0;\n for (int a = 0; a < tmp2.length(); a++) {\n if (tmp2.charAt(a) == ' ' && start != 0) {\n end = a;\n break;\n }\n if (tmp2.charAt(a) == ' ' && start == 0) {\n start = a;\n }\n }\n path = tmp2.substring(start + 1, end); //fill in the path\n } catch (Exception e) {\n s(\"error\" + e.getMessage());\n } //catch any exception\n\n try {\n //send response header\n output.writeBytes(construct_http_header(200, 5));\n\n if (method == 1) { //1 is GET 2 is head and skips the body\n //Response with data from kinect (persoon aanwezig, positie, ...)\n //output.writeBytes(response);\n }\n if (method == 2) {\n String msg = \"\";\n //Description of the sensor sent back (OPTIONS)\n if (path.equals(\"/\")) {\n msg = \"<link rel=\\\"description\\\" type=\\\"text/n3\\\" href=\\\"/service\\\">\\n<link rel=\\\"goal\\\" type=\\\"text/n3\\\" href=\\\"/serviceGoal\\\">\";\n }\n if (path.equals(\"/service\")) {\n msg = \"@prefix sensor: <http://example.org/sensor/>.\\n\";\n msg += \"@prefix ex: <http://example.org/example/>. \\n\";\n msg += \"@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. \\n\";\n msg += \"@prefix environment: <http://example.org/environment/>. \\n\";\n msg += \"@prefix http: <http://www.w3.org/2011/http#>. \\n\";\n msg += \"@prefix tmpl: <http://purl.org/restdesc/http-template#>. \\n\";\n msg += \"{ \\n\";\n msg += \"?sensor a sensor:Kinect. \\n\";\n msg += \"} \\n\";\n msg += \"=> \\n\";\n msg += \"{ \\n\";\n msg += \"_:request http:methodName \\\"POST\\\"; \\n\";\n msg += \"tmpl:requestURI (?sensor \\\"/lightValue\\\"); \\n\";\n msg += \"http:body ?environmentLight;\\n\";\n msg += \"http:resp [ http:body ?lightingValue]. \\n\";\n msg += \"?environmentLight a environment:lightingCondition.\\n\";\n msg += \"?sensor sensor:lightingCondition ?lightingValue. \\n\";\n msg += \"?lightingValue a xsd:String. \\n\";\n msg += \"}. \\n\";\n msg += \"<http://\" + ip + \"/#sensor> a sensor:Kinect.\\n\";\n }\n if (path.equals(\"/serviceGoal\")) {\n msg = \"@prefix sensor: <http://example.org/sensor/>. \\n\";\n msg += \"@prefix environment: <http://example.org/environment/>. \\n\";\n msg += \"{ \\n\";\n msg += \"<http://\" + ip + \"/#sensor> sensor:lightingCondition ?value. \\n\";\n msg += \"} \\n\";\n msg += \"=> \\n\";\n msg += \"{ \\n\";\n msg += \"<http://\" + ip + \"/#sensor> sensor:lightingCondition ?value. \\n\";\n msg += \"}. \\n\";\n }\n output.writeBytes(msg);\n }\n if (method == 3) {\n //Add something to sensor (LightSensor data)\n if (path.equals(\"/lightValue\")) {\n //get Light Value, send to kinect\n String lightValue = value.substring(value.indexOf(\"=\") + 1, value.length()).trim();\n EnvironmentVars.getInstance().setLightValue(lightValue);\n output.writeBytes(\"OK\");\n }\n if (path.equals(\"/personPresent\")) {\n EnvironmentVars.getInstance().setPersonPresent(true);\n output.writeBytes(\"OK\");\n }\n }\n output.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private BufferedReader readRes(final HttpURLConnection con)\n throws ServerStatusException, IOException {\n int responsecode = con.getResponseCode();\n if (responsecode == HttpURLConnection.HTTP_OK) {\n return new BufferedReader(new InputStreamReader(\n con.getInputStream()));\n }\n\n throw new ServerStatusException(con.getURL().toString(), responsecode);\n }", "URL getStreamURL() throws IOException;", "public ServiceResponse getRequest(String url) throws IOException {\n HttpClient client = HttpClientBuilder.create().build();\n HttpGet request = new HttpGet(url);\n HttpResponse httpResponse = client.execute(request);\n ServiceResponse response = new ServiceResponse(httpResponse.getStatusLine().getStatusCode());\n response.setReader(new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent())));\n return response;\n }", "public String sendHead(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tif (robot!=null)\n\t\t{\n\t\t\tbest_match = findBestMatch();\n\t\t}\n\t\t//Deciding if robots.txt says we should skip url\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\ttry\n\t\t{ \n\t\t\t//Dealing with secure requests\n\t\t\tif (url.startsWith((\"https\")))\n\t\t\t{\n\t\t\t\treturn sendHeadSecure(url);\n\t\t\t}\n\t\t\t\n\t\t\t//Creating URL and connection objects\n\t\t\tURL http_url = new URL(url);\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection) http_url.openConnection();\n\t\t\t//Setting request method to HEAD\n\t\t\tsecure_connection.setRequestMethod(\"HEAD\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Setting all Response Headers \n\t\t\tp = new ResponseParser();\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn (\"good head\");\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"HEAD \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: \" + url);\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}", "private void readHTTPRequest(InputStream is) {\n BufferedReader requestReader = null;\n \n while (true) {\n try {\n requestReader = new BufferedReader(new InputStreamReader(is));\n \n while (!requestReader.ready()) Thread.sleep(1);\n String line = requestReader.readLine();\n System.err.println(\"Request line: (\"+line+\")\");\n \n \n/* Get the complete path from the root directory to the file\n* If no file requested: display default content\n*/\n String rootPath = toCompletePath(line);\n if(noFileRequested) {\n HTMLcontent = \"<html><h1>Welcome to \" + serverName + \"</h1><body>\\n\" +\n \"<p>You may request a file in the URL path.</p>\\n\" +\n \"</body></html>\\n\";\n break;\n }//end\n \n /* Check if file exists\n * If not: change the status and exit\n * If so: read the contents of the file\n */\n File fileRequested = new File(rootPath);\n if(!fileRequested.exists()) {\nstreamStatus = \"HTTP/1.1 404 NOT FOUND\\n\";\nHTMLcontent = \"<html><h1>404 Error.</h1><body>\\n\" +\n \"<p>Page not found.</p>\\n\" +\n \"</body></html>\\n\";\n break;\n }\n else {\n HTMLcontent = readFile(rootPath);\n break;\n }//end\n \n \n } catch (Exception e) {\n System.err.println(\"Request error: \" + e);\n break;\n //close BufferedReader if initialized\n }//end catch\n \n }//end while loop\n}", "public void testURL()\r\n {\r\n\r\n BufferedReader in = null;\r\n PrintStream holdErr = System.err;\r\n String errMsg = \"\";\r\n try\r\n {\r\n\r\n this.setSuccess(false);\r\n\r\n PrintStream fileout = new PrintStream(new FileOutputStream(\"testURLFile.html\"));\r\n System.setErr(fileout);\r\n System.err.println(\"testURL() - entry\");\r\n\r\n System.getProperties().put(\"https.proxyHost\", \"\" + this.getProxyHost());\r\n System.getProperties().put(\"https.proxyPort\", \"\" + this.getProxyPort());\r\n System.getProperties().put(\"http.proxyHost\", \"\" + this.getProxyHost());\r\n System.getProperties().put(\"http.proxyPort\", \"\" + this.getProxyPort());\r\n // System.getProperties().put(\"java.protocol.handler.pkgs\", \"com.sun.net.ssl.internal.www.protocol\");\r\n\r\n URL url = new URL(\"http://www.msn.com\");\r\n\r\n CookieModule.setCookiePolicyHandler(null); // Accept all cookies\r\n // Set the Authorization Handler\r\n // This will let us know waht we are missing\r\n DefaultAuthHandler.setAuthorizationPrompter(this);\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n HTTPResponse headRsp = con.Head(url.getFile());\r\n HTTPResponse rsp = con.Get(url.getFile());\r\n\r\n int sts = headRsp.getStatusCode();\r\n if (sts < 300)\r\n {\r\n System.err.println(\"No authorization required to access \" + url);\r\n this.setSuccess(true);\r\n }\r\n else if (sts >= 400 && sts != 401 && sts != 407)\r\n {\r\n System.err.println(\"Error trying to access \" + url + \":\\n\" + headRsp);\r\n }\r\n else if (sts == 407)\r\n {\r\n System.err.println(\r\n \"Error trying to access \"\r\n + url\r\n + \":\\n\"\r\n + headRsp\r\n + \"\\n\"\r\n + \"<HTML><HEAD><TITLE>Proxy authorization required</TITLE></HEAD>\");\r\n this.setMessage(\"Error trying to access \" + url + \":\\n\" + headRsp + \"\\n\" + \"Proxy authorization required\");\r\n }\r\n // Start reading input\r\n in = new BufferedReader(new InputStreamReader(rsp.getInputStream()));\r\n String inputLine;\r\n\r\n while ((inputLine = in.readLine()) != null)\r\n {\r\n System.err.println(inputLine);\r\n }\r\n // All Done - We were success\r\n\r\n in.close();\r\n\r\n }\r\n catch (ModuleException exc)\r\n {\r\n errMsg = \"ModuleException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (ProtocolNotSuppException exc)\r\n {\r\n errMsg = \"ProtocolNotSuppException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (MalformedURLException exc)\r\n {\r\n errMsg = \"MalformedURLException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (FileNotFoundException exc)\r\n {\r\n errMsg = \"FileNotFoundException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n catch (IOException exc)\r\n {\r\n errMsg = \"IOException caught: \" + exc;\r\n errMsg += \"\\nVerify Host Domain address and Port\";\r\n System.err.println(errMsg);\r\n }\r\n finally\r\n {\r\n System.err.println(\"testURL() - exit\");\r\n System.setErr(holdErr);\r\n if (in != null)\r\n {\r\n try\r\n {\r\n in.close(); // ENSURE we are CLOSED\r\n }\r\n catch (Exception exc)\r\n {\r\n // Do Nothing, It will be throwing an exception \r\n // if it cannot close the buffer\r\n }\r\n }\r\n this.setMessage(errMsg);\r\n System.gc();\r\n }\r\n\r\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(100000 /* milliseconds */);\n conn.setConnectTimeout(150000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n return conn.getInputStream();\n\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n\t URL url = new URL(urlString);\n\t HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t conn.setReadTimeout(10000 /* milliseconds */);\n\t conn.setConnectTimeout(15000 /* milliseconds */);\n\t conn.setRequestMethod(\"GET\");\n\t conn.setDoInput(true);\n\t // Starts the query\n\t conn.connect();\n\t return conn.getInputStream();\n\t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n //Si la URL es null se devuelve inediatamente.\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(100000 /* Milisegundos.*/);\n urlConnection.setConnectTimeout(100000 /* Milisegundos.*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Si la request se realiza correctamente (código de respuesta 200) se lee el input\n // stream y se le hace parse a la respuesta.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error de conexión: \" + urlConnection.getResponseCode());\n }\n // Aquí simplemente hacemos catch a la IOException.\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problema obteniendo los datos en JSON del servidor\", e);\n // Independientemente de que se lance una exception o no en el bloque finally se realiza\n // una desconexión (o se \"cierra\" como en el caso del inputStream) para poder reusarlo.\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n // Se devuelve como resultado el JsonResponse que albergará la String inputStream.\n return jsonResponse;\n }", "private String getUrlContents(String theUrl) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(theUrl);\n URLConnection urlConnection = url.openConnection();\n //reads the response\n BufferedReader br = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()), 8);\n String line;\n while ((line = br.readLine()) != null) {\n content.append(line + \"\\n\");\n }\n br.close();\n }catch (Exception e) {\n //error occured, usually network related\n e.printStackTrace();\n }\n return content.toString();\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n \tSystem.out.println(\"Inside downloadURL\");\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n \n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n InputStream stream = conn.getInputStream();\n return stream;\n }", "public static String getContentFromUrl(URL url) throws Exception {\n HttpGet httpget = new HttpGet(url.toURI());\n DefaultHttpClient httpclient = new DefaultHttpClient();\n log.info(\"Executing request \" + httpget.getRequestLine());\n HttpResponse response = httpclient.execute(httpget);\n int statusCode = response.getStatusLine().getStatusCode();\n log.info(\"Response is with status code \" + statusCode);\n Header[] errorHeaders = response.getHeaders(\"X-Exception\");\n log.warning(\"Error headers are: \" + Arrays.toString(errorHeaders));\n String content = EntityUtils.toString(response.getEntity());\n log.info(\"Content is: \" + content);\n return content;\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n return conn.getInputStream();\n }", "public static void readFromUrl(URL url) {\n try {\n BufferedReader in = new BufferedReader(\n new InputStreamReader(\n url.openStream()));\n\n String inputLine;\n\n while ((inputLine = in.readLine()) != null) {\n System.out.println(inputLine);\n }\n\n in.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic InputStream doGet(String url) {\n\t\tInputStream in = null;\n\t\tHttpGet getRequest = new HttpGet(url);\n\t\tgetRequest.addHeader(\"charset\", HTTP.UTF_8);\n\t\tHttpClient client = new DefaultHttpClient();\n\t\tclient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 6000);\n\t\tclient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, 8000);\n\t\tHttpResponse response = null;\n\t\ttry {\n\t\t\tresponse = client.execute(getRequest);\n\t\t\tif(null != response && response.getStatusLine().getStatusCode() == HttpStatus.SC_OK){\n\t\t\t\tin = response.getEntity().getContent();\n\t\t\t}\n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn in;\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public UrlInfo(URL url) throws IOException {\n this.urlConnection = url.openConnection();\n }", "private String getRequest(String requestUrl) throws IOException {\n URL url = new URL(requestUrl);\n \n Log.d(TAG, \"Opening URL \" + url.toString());\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setDoInput(true);\n urlConnection.connect();\n String response = streamToString(urlConnection.getInputStream());\n \n return response;\n }", "public String connectAndGetPage(String url) throws IOException {\n URL page = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) page.openConnection();\n conn.connect();\n InputStreamReader in = new InputStreamReader((InputStream) conn.getContent());\n BufferedReader buff = new BufferedReader(in);\n String line;\n StringBuilder sb = new StringBuilder(\"\");\n while ((line = buff.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n return sb.toString();\n }", "private String readContents(final URL url) throws IOException {\n \t\tfinal BufferedReader in =\n \t\t\tnew BufferedReader(new InputStreamReader(url.openStream()));\n \t\tfinal StringBuilder sb = new StringBuilder();\n \t\twhile (true) {\n \t\t\tfinal String line = in.readLine();\n \t\t\tif (line == null) break; // eof\n \t\t\tsb.append(line);\n \t\t}\n \t\tin.close();\n \t\treturn sb.toString();\n \t}", "@Override\n protected URLConnection openConnection(URL jarUrl) throws IOException {\n JarURLConnection jarUrlConnection = (JarURLConnection) super.openConnection(jarUrl);\n // Ensures that when all connections have been closed the cached Zip file references will be\n // cleared.\n jarUrlConnection.setUseCaches(false);\n\n // Wrap the jar url connection in a way that will collect all created InputStreams so that they\n // can be closed.\n return new CloseableUrlConnection(jarUrl, jarUrlConnection);\n }", "public TriasConnection() throws IOException {\n URL url = new URL(urlString);\n URLConnection con = url.openConnection();\n http = (HttpURLConnection) con;\n }", "@Override\n\tprotected URLConnection openConnection(final URL u) throws IOException {\n\t\treturn null;\n\t}", "public HttpMessage parseHead(SessionInputBuffer sessionInputBuffer) throws IOException, HttpException, ParseException {\n this.lineBuf.clear();\n if (sessionInputBuffer.readLine(this.lineBuf) == -1) {\n throw new ConnectionClosedException(\"Client closed connection\");\n }\n return this.requestFactory.newHttpRequest(this.lineParser.parseRequestLine(this.lineBuf, new ParserCursor(0, this.lineBuf.length())));\n }", "public void httpclient(String url){\n\t\t\r\n\t\t\r\n\t\tString httpUrl =BASIC_URL+url;\r\n\t\t\r\n\t\tSystem.out.println(httpUrl);\r\n\t\t\r\n\t\tHttpGet method =new HttpGet(httpUrl);\r\n\t\t\r\n\t\tmethod.setHeader(\"Content-Type\",\"application/json\");\r\n\t\tmethod.setHeader(\"charset\",\"UTF-8\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tCloseableHttpResponse res =client.execute(method,context);\r\n\r\n\t\t AuthState targetAuthState = context.getTargetAuthState();\r\n\t\t System.out.println(\"Target auth state: \" + targetAuthState.getState());\r\n\t\t System.out.println(\"Target auth scheme: \" + targetAuthState.getAuthScheme());\r\n\t\t System.out.println(\"Target auth credentials: \" + targetAuthState.getCredentials());\r\n\t\t\t\r\n\t\t HttpEntity ent =res.getEntity();\r\n\t\t \r\n\t\t if (ent != null) { \r\n System.out.println(\"Response content length: \" + ent.getContentLength()); \r\n System.out.println(ent+\"3214242423\");\r\n \r\n System.out.println(EntityUtils.toString(ent));\r\n } \r\n\t\t \r\n\t\t} catch (IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "public HttpsConnection openConnection(final String url) throws BooruEngineConnectionException {\n try {\n return openConnection(new URL(url));\n } catch (MalformedURLException e) {\n throw new BooruEngineConnectionException(e);\n }\n }", "private HttpURLConnection commonConnectionSetup( String path ) throws IOException {\n URL fullPath = new URL( this.url + path );\n System.out.println(fullPath.toString());\n HttpURLConnection c = (HttpURLConnection) fullPath.openConnection();\n c.setRequestProperty(\"Content-Type\", \"application/json;charset=utf-8\");\n c.setRequestProperty(\"X-Okapi-Tenant\", this.tenant);\n c.setRequestProperty(\"X-Okapi-Token\", this.token);\n return c;\n \n }", "private String downloadUrl(String myUrl) throws IOException {\n InputStream is = null;\n\n try {\n URL url = new URL(myUrl);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the QUERY\n conn.connect();\n //int response = conn.getResponseCode();\n //Log.d(\"JSON\", \"The response is: \" + response);\n is = conn.getInputStream();\n\n // Convert the InputStream into a string\n return readIt(is);\n\n // Makes sure that the InputStream is closed after the app is\n // finished using it.\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "public void GetCall(String url) throws ClientProtocolException, IOException {\n\t\tCloseableHttpClient httpclient=HttpClients.createDefault();\n\t\tHttpGet httpget=new HttpGet(url);\n\t//lohith\n\t\tCloseableHttpResponse closeablehttpresponse=httpclient.execute(httpget);\n\t\tint responsestatuscode=closeablehttpresponse.getStatusLine().getStatusCode();\n\t\tSystem.out.println(\"responsestatuscode: \"+responsestatuscode);\n\t\t\n\t\tString response=EntityUtils.toString(closeablehttpresponse.getEntity(),\"UTF-8\");\n\t\tSystem.out.println(\"ClientResponse: \"+response);\n\t\tJSONObject jsonobject= new JSONObject(response);\n\t\t\n\t\tSystem.out.println(\"jsonobject: \"+jsonobject);\n\t\t\n\t\t\n\t}", "private HttpResponse httpRequest(URL url, List<Header> headers, String method, byte[] data) throws IOException {\n\n BufferedReader streamReader;\n\n HttpURLConnection connection = setupConnection(url,headers,method);\n connection.setDoOutput(true);\n connection.connect();\n\n OutputStream outputStream = connection.getOutputStream();\n outputStream.write(data);\n outputStream.flush();\n outputStream.close();\n\n final int httpResponseCode = connection.getResponseCode();\n final List<Header> responseHeaders = Header.getHeaders(connection.getHeaderFields());\n\n try {\n streamReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n }\n catch (IOException e) {\n streamReader = new BufferedReader(new InputStreamReader(connection.getErrorStream()));\n }\n\n StringBuilder sb = new StringBuilder();\n String currentLine;\n\n while((currentLine = streamReader.readLine()) != null) {\n sb.append(currentLine).append(\"\\n\");\n }\n\n connection.disconnect();\n\n try {\n Objects.requireNonNull(streamReader).close();\n }\n catch (IOException ignored){ }\n\n return new HttpResponse(responseHeaders,httpResponseCode,sb.toString().trim());\n }", "private void m43018h() throws IOException {\n this.f40240k = (HttpURLConnection) new URL(this.f40231b).openConnection();\n this.f40240k.setRequestMethod(\"GET\");\n this.f40240k.setReadTimeout(20000);\n this.f40240k.setConnectTimeout(15000);\n this.f40240k.setUseCaches(false);\n this.f40240k.setDefaultUseCaches(false);\n this.f40240k.setInstanceFollowRedirects(true);\n this.f40240k.setDoInput(true);\n for (C13157a header : this.f40233d) {\n this.f40240k.addRequestProperty(header.mo42192a(), header.mo42193b());\n }\n }", "private InputStream getHttpConnection(String urlString)\n throws IOException {\n InputStream stream = null;\n URL url = new URL(urlString);\n URLConnection connection = url.openConnection();\n\n try {\n HttpURLConnection httpConnection = (HttpURLConnection) connection;\n httpConnection.setDoInput(true);\n httpConnection.setRequestMethod(\"POST\");\n httpConnection.setDoOutput(true);\n httpConnection.setRequestProperty(\"Content-Type\", \"image/jpeg\");\n OutputStream outputStream = httpConnection.getOutputStream();\n outputStream.write(byteArray);\n outputStream.close();\n httpConnection.connect();\n\n if (httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n stream = httpConnection.getInputStream();\n }\n } catch (Exception ex) {\n didTaskFail = true;\n ex.printStackTrace();\n }\n return stream;\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the posts JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n\n\n return jsonResponse;\n }", "private Image establishConnection(String url) throws IOException {\n\n String imgUrl = url;\n URLConnection connection = new URL(imgUrl).openConnection();\n connection.addRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0\");\n Image image = new Image(connection.getInputStream());\n return image;\n }", "public HttpURLConnection openConnection(String path) throws IOException {\n\t\tHttpURLConnection co = (HttpURLConnection) getURL(path).openConnection();\n\t\tconfigureConnection(co);\n\t\tconfigureSession(co);\n\t\treturn co;\n\t}", "private boolean processRequest(Connection conn)\n {\n String line = null;\n URL url;\n String path;\n\n /*\n * Read the request line.\n */\n try {\n line = DataInputStreamUtil.readLineIntr(conn.getInputStream());\n }\n catch(InterruptedException e) {\n logError(\"Cannot read request line: connection timeout\");\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST, \"connection timeout\");\n return false;\n }\n catch(IOException e) {\n logError(\"Cannot read request line: I/O error\"\n + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.SRVCE_NOT_AVAILABLE,\n \"I/O error\" + getExceptionMessage(e));\n return false;\n }\n\n /*\n * Parse the request line, and read the request headers.\n */\n try {\n _req.read(line);\n }\n catch(MalformedURLException e) {\n logError(\"Malformed URI in HTTP request\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Invalid URI in HTTP request\"\n + getExceptionMessage(e));\n return false;\n }\n catch(MalformedHTTPReqException e) {\n logError(\"Malformed HTTP request\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Invalid HTTP request\" + getExceptionMessage(e));\n return false;\n }\n catch(InterruptedException e) {\n logError(\"Cannot read request: connection timeout\");\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST, \"connection timeout\");\n return false;\n }\n catch(IOException e) {\n logError(\"Cannot read request: I/O error\" + getExceptionMessage(e));\n _req.sendHtmlErrorPage(HTTPStatusCode.SRVCE_NOT_AVAILABLE,\n \"I/O error\" + getExceptionMessage(e));\n return false;\n }\n\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"Request: '\" + _req.getReqLine() + \"'\");\n }\n\n /*\n * Process the request based on the request-URI type. The asterisk\n * option (RFC2068, sec. 5.1.2) is not supported.\n */\n if ( (path = _req.getPath()) != null) {\n return redirectClient(path);\n }\n else {\n if ( (url = _req.getURL()) != null) {\n // The redirector is being accessed as a proxy.\n\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"Cannot retrieve URL \" + url\n + \"\\n<P>\\n\"\n + \"Invalid URL: unexpected access protocol \"\n + \"(e.g., `http://')\\n\");\n }\n else {\n logError(\"unsupported request-URI: \" + _req.getReqLine());\n _req.sendHtmlErrorPage(HTTPStatusCode.BAD_REQUEST,\n \"unsupported request-URI\");\n }\n return false;\n }\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\n\t\treturn stream;\n\t}", "public InputStream getEntityContent(String url) throws ClientProtocolException, IOException {\n HttpGet getMethod = new HttpGet(url);\n HttpResponse response = httpClient.execute(getMethod);\n HttpEntity entity = response.getEntity();\n return entity == null ? null : entity.getContent();\n }", "private void CreateConnection()\n throws IOException {\n URL url = new URL(requestURL);\n //creates connection\n httpConn = (HttpURLConnection) url.openConnection();\n //sets headers\n Set<Map.Entry<String, String>> set = headers.entrySet();\n for (Map.Entry<String, String> me : set) {\n httpConn.setRequestProperty(me.getKey(), me.getValue());\n }\n //sets method\n httpConn.setRequestMethod(method);\n httpConn.setUseCaches(false);\n if (method == \"POST\") {\n httpConn.setDoOutput(true);\n httpConn.setDoInput(true);\n }\n\n }", "public static Header[] getAllResponseHeaders(URL url) throws Exception {\n HttpClient httpClient = new DefaultHttpClient();\n HttpHead httpHead = new HttpHead(url.toString());\n HttpResponse response = httpClient.execute(httpHead);\n return response.getAllHeaders();\n }", "private void setupAndConnect() {\n URL url = getUrl(this.endpointUrl);\n connection = null;\n try {\n connection = (HttpURLConnection) url.openConnection();\n HttpURLConnection.setFollowRedirects(true);\n } catch (IOException e) {\n LOG.severe(\"Error connecting to Url : \" + url);\n LOG.severe(e.toString());\n }\n }", "private ArrayList<String> getHttpResponseString(String urlStr) {\n\t\ttry {\n\n\t\t\tURL url = new URL(urlStr);\n\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\tconn.setRequestMethod(\"GET\");\n\n\t\t\tconn.setRequestProperty(\"Accept\", \"application/json\");\n\t\t\t\n\t\t\tif (conn.getResponseCode() != 200) {\n\t\t\t\tSystem.out.println(\"Connection Failed with \" + urlStr + \" with HTTP error code: \" + conn.getResponseCode());\n\t\t\t\tif (conn.getResponseCode() == 401) {\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));\n\n\t\t\tArrayList<String> output = \"\";// br.readLine();\n\t\t\tString line = \"\";\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\toutput += line;\n\t\t\t}\n\n\t\t\tconn.disconnect();\n\t\t\treturn output;\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "private static String executeRequest(String url) throws IOException {\n\n\t\tLog.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t\n\t\tSocket s = new Socket(IP, PORT);\n\t\tPrintStream ps = new PrintStream(s.getOutputStream());\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"PS OPENED\");\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(\n\t\t\t\ts.getInputStream()));\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"BR OPENED\");\n\t\tps.println(url);\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"URL PRNTED\");\n\t\tString response = r.readLine();\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"RESPONSE: \" + response);\n\t\treturn response;\n\n\t\t// boolean unsuccessful = true;\n\t\t// int tries = 0;\n\t\t// String response = \"\";\n\t\t// while(unsuccessful && tries != 3){\n\t\t// unsuccessful = false;\n\t\t// URL requestUrl = new URL(url);\n\t\t// HttpsURLConnection connection = (HttpsURLConnection)\n\t\t// requestUrl.openConnection();\n\t\t// try{\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t// connection.setRequestMethod(\"GET\");\n\t\t// connection.getResponseCode();\n\t\t//\n\t\t// //connection.\n\t\t//\n\t\t// connection.connect();\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\t// //Needs error checking on connection\n\t\t//\n\t\t// InputStream in = new\n\t\t// BufferedInputStream(connection.getInputStream());\n\t\t// BufferedReader reader = new BufferedReader(new\n\t\t// InputStreamReader(in));\n\t\t// StringBuffer buffer = new StringBuffer();\n\t\t// String line;\n\t\t//\n\t\t// //reads response in and appends it to buffer\n\t\t// do{\n\t\t// line = reader.readLine();\n\t\t// buffer.append(line);\n\t\t// }while (line != null);\n\t\t//\n\t\t// //disconnects the HttpURLConnection so other requests can be made\n\t\t// connection.disconnect();\n\t\t// //Log.d(RiotJsonRequest.class.getSimpleName() , \"RECEIVED: \" +\n\t\t// buffer.toString());\n\t\t// response = buffer.toString();\n\t\t// }catch(Exception e){\n\t\t// String code = Integer.toString(connection.getResponseCode());\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , \"CODE: \" + code);\n\t\t// if(code.equals(\"404\")){\n\t\t// return code;\n\t\t// }\n\t\t// unsuccessful = true;\n\t\t// tries++;\n\t\t// connection.disconnect();\n\t\t// connection = null;\n\t\t// requestUrl = null;\n\t\t// try {\n\t\t// Thread.sleep(1000);\n\t\t// } catch (InterruptedException e1) {\n\t\t// e1.printStackTrace();\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t// return response;\n\t}", "@Override\n\tpublic URLConnection openConnection(URL url) throws IOException {\n\t\tif (url.getPath() == null || url.getPath().trim().length() == 0) {\n\t\t\tthrow new MalformedURLException(\"Path can not be null or empty. Syntax: \" + SYNTAX);\n\t\t}\n\t\treturn new MyURLConnection(url);\n\t}", "public static String getResponseContent(URL url) throws IOException {\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n String encoding = conn.getContentEncoding();\n if (encoding == null) {\n encoding = \"UTF-8\";\n }\n int responseCode = conn.getResponseCode();\n InputStream stream;\n if (responseCode != HttpURLConnection.HTTP_OK) {\n stream = conn.getErrorStream();\n } else {\n stream = conn.getInputStream();\n }\n try {\n return IOUtils.toString(stream, encoding);\n }\n finally {\n stream.close();\n }\n }", "protected BufferedReader sendRequest(String url, Charset encoding) throws IOException {\n var req = HttpRequest.newBuilder(URI.create(url))\n .timeout(Duration.ofSeconds(15))\n .header(\"Accept-Encoding\", \"gzip\")\n .header(\"User-Agent\", HTTP_USER_AGENT)\n .GET()\n .build();\n\n try {\n var httpClient = createHttpClient();\n var resp = httpClient.send(req, HttpResponse.BodyHandlers.ofInputStream());\n var inputStream = resp.body();\n\n if (Optional.of(\"gzip\").equals(resp.headers().firstValue(\"Content-Encoding\")))\n inputStream = new GZIPInputStream(inputStream);\n\n var reader = new InputStreamReader(inputStream, encoding);\n return new BufferedReader(reader);\n }\n catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new IOException(e);\n }\n }", "public static String getUrlContents(URL url) throws IOException {\n\t\tURLConnection cnx = url.openConnection();\n\t\tScanner s = new Scanner(cnx.getInputStream());\n\t\tString ret = s.useDelimiter(\"\\\\A\").next();\n\t\ts.close();\n\t\treturn ret;\n\t}", "public String sendGet(String url)\n\t{\n\t\t//Getting most relevant user-agent from robots.txt\n\t\tbest_match = findBestMatch();\n\t\t//Deicing whether or not to skip\n\t\tif (shouldSkip(url))\n\t\t{\n\t\t\treturn \"skipped\";\n\t\t}\n\t\tif (url.startsWith((\"https\")))\n\t\t{\n\t\t\treturn sendGetSecure(url);\n\t\t}\n\t\ttry \n\t\t{\n\t\t\t//Creating URL objects\n\t\t\tURL http_url = new URL(url);\n\t\t\t//Delaying visit if directed to by robots.txt\n\t\t\tcrawlDelay();\n\t\t\tHttpURLConnection secure_connection = (HttpURLConnection)http_url.openConnection();\n\t\t\t//Setting request method\n\t\t\tsecure_connection.setRequestMethod(\"GET\");\n\t\t\t//Sending all headers except for host (since URLConnection will take care of this)\n\t\t\tfor (String h: headers.keySet())\n\t\t\t{\n\t\t\t\tif (!h.equals(\"Host\"))\n\t\t\t\t{\n\t\t\t\t\tsecure_connection.setRequestProperty(h, headers.get(h));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Getting ResponseParser object to read in page content\n\t\t\tp = new ResponseParser(new BufferedReader(new InputStreamReader(secure_connection.getInputStream())));\n\t\t\t\n\t\t\t//Parsing all response headers from returned object\n\t\t\tMap<String,String> p_headers = p.getHeaders();\n\t\t\tMap<String, List<String>> response_headers = secure_connection.getHeaderFields();\n\t\t\tfor (Map.Entry<String, List<String>> entry : response_headers.entrySet()) \n\t\t\t{\n\t\t\t\tif (entry.getKey() == null)\n\t\t\t\t{\n\t\t\t\t\tp.setResponse(entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tp_headers.put(entry.getKey(),entry.getValue().get(0));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If we didn't get any headers in the response, the URL was invalid\n\t\t\tif (p.getHeaders().size() == 0)\n\t\t\t{\n\t\t\t\treturn (\"invalid url\");\n\t\t\t}\n\t\t\t\n\t\t\t//Otherwise return the contents of the returned document\n\t\t\treturn p.getData();\n\t\t\t\n\t\t} \n\t\tcatch (IOException | IllegalArgumentException e) \n\t\t{\n\t\t\treturn \"invalid url\";\n\t\t}\t\t\n//\t\ttry\n//\t\t{\n//\t\t\t//Deals with secure request\n//\t\t\tif (url.startsWith((\"https\")))\n//\t\t\t{\n//\t\t\t\treturn sendGetSecure(url);\n//\t\t\t}\n//\t\t\t//Parsing host and port from URL\n//\t\t\tURLInfo url_info = new URLInfo(url);\n//\t\t\thost = url_info.getHostName();\n//\t\t\tport = url_info.getPortNo();\n//\t\t\t\n//\t\t\t//Changing Host header if necessary\n//\t\t\theaders.put(\"Host\", host + \":\" + port);\n//\t\t\t\n//\t\t\t//Getting file path of URL\n//\t\t\tString file_path = url_info.getFilePath();\n//\t\t\t\n//\t\t\t//If we weren't able to find a host, URL is invalid\n//\t\t\tif (host == null)\n//\t\t\t{\n//\t\t\t\treturn \"invalid url\";\n//\t\t\t}\n//\t\t\t\n//\t\t\t//Delaying visits based on robots.txt crawl delay\n//\t\t\tcrawlDelay();\n//\t\t\t\n//\t\t\t//Otherwise, opening up socket and sending request with all headers\n//\t\t\tsocket = new Socket(host, port);\n//\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\n//\t\t\tString message = \"GET \" + file_path + \" HTTP/1.1\\r\\n\";\n//\t\t\tfor (String header: headers.keySet())\n//\t\t\t{\n//\t\t\t\tString head = header + \": \" + headers.get(header) + \"\\r\\n\";\n//\t\t\t\tmessage = message + head;\n//\t\t\t}\n//\t\t\tout.println(message);\n//\n//\t\t\t//Creating ResponseParser object to parse the Response\n//\t\t\tp = new ResponseParser(socket);\n//\t\t\t\n//\t\t\t//If we didn't get any headers in the response, the URL was invalid\n//\t\t\tif (p.getHeaders().size() == 0)\n//\t\t\t{\n//\t\t\t\treturn (\"invalid url\");\n//\t\t\t}\n//\t\t\t//Otherwise return the contents of the returned document\n//\t\t\treturn p.getData();\n//\t\t} \n//\t\tcatch (UnknownHostException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"Unknown Host Exception\");\n//\t\t\tSystem.err.println(\"Problem url is: http://www.youtube.com/motherboardtv?feature=watch&trk_source=motherboard\");\n//\t\t} \n//\t\tcatch (IOException | IllegalArgumentException e) \n//\t\t{\n//\t\t\tSystem.err.println(\"IO Exception\");;\n//\t\t}\n//\t\t//Return null for all caught exceptions (Servlet will deal with this)\n//\t\treturn null;\n\t}", "private String webFetch1(String aURL, String aEncoding) {\n String result = \"\";\n long start = System.currentTimeMillis();\n Scanner scanner = null;\n URLConnection connection = null;\n try {\n //Ref: http://stackoverflow.com/questions/86824/why-would-a-java-net-connectexception-connection-timed-out-exception-occur-wh\n URL url = new URL(aURL);\n connection = url.openConnection(); //this doesn't talk to the network yet\n connection.setConnectTimeout(TIMEOUT); \n connection.setReadTimeout(TIMEOUT);\n connection.connect(); //actually connects; this shouldn't be needed here, since getInputStream is supposed to do it in the background\n scanner = new Scanner(connection.getInputStream(), aEncoding); \n scanner.useDelimiter(END_OF_INPUT);\n result = scanner.next();\n }\n catch (IOException ex) {\n long end = System.currentTimeMillis();\n long time = end - start;\n fLogger.severe(\n \"Problem connecting to \" + aURL + \" Encoding:\" + aEncoding + \n \". Exception: \" + ex.getMessage() + \" \" + ex.toString() + \" Cause:\" + ex.getCause() + \n \" Connection Timeout: \" + connection.getConnectTimeout() + \"msecs. Read timeout:\" + connection.getReadTimeout() + \"msecs.\"\n + \" Time taken to fail: \" + time + \" msecs.\"\n );\n }\n finally {\n if (scanner != null) scanner.close();\n }\n return result;\n }", "public HttpsConnection openConnection(final URL url) throws BooruEngineConnectionException {\n switch (this.mRequestMethod) {\n case GET: {\n GET(url);\n break;\n }\n case POST:{\n POST(url);\n break;\n }\n default: {\n throw new BooruEngineConnectionException(new UnsupportedOperationException(\"Method \" + this.mRequestMethod + \"is not supported.\"));\n }\n }\n return this;\n }", "public static String getContentOfHttpsPage(URL url) throws IOException {\n\t\t\n\t\t//Create Content String Builder\n\t\tStringBuilder contentStringBuilder = new StringBuilder();\n\t\t\n\t\t//Create Connection\n\t\tHttpsURLConnection httpsURLConnection = (HttpsURLConnection) url.openConnection();\n\t\t\n\t\t\n\t\t//Initialize Readers\n\t\tBufferedReader inputStreamBufferedReader = new BufferedReader(new InputStreamReader(httpsURLConnection.getInputStream(), \"UTF-8\"));\n\t\t\n\t\tString lineOfInputStream; \n\t\t\n\t\t/*\n\t\t * Read Content of Page\n\t\t */\n\t\twhile((lineOfInputStream=inputStreamBufferedReader.readLine())!=null) {\n\t\t\tcontentStringBuilder.append(lineOfInputStream);\n\t\t}\n\t\t\n\t\treturn contentStringBuilder.toString();\t\t\n\t}", "private InputStream downloadStream(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\t\treturn stream;\n\t}", "public void doHead() throws IOException {\n\n // search ressource\n\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n }" ]
[ "0.65000963", "0.6437432", "0.63862616", "0.62967247", "0.6198774", "0.6136606", "0.6084648", "0.6041119", "0.6040784", "0.6022785", "0.599538", "0.59374857", "0.5903438", "0.5902657", "0.5902657", "0.5902657", "0.5902657", "0.5900889", "0.5888267", "0.5855528", "0.58297604", "0.58167595", "0.58078265", "0.5798417", "0.5716895", "0.5653177", "0.56439924", "0.56373405", "0.5633047", "0.56315744", "0.56200355", "0.56040585", "0.55904466", "0.5577941", "0.55723864", "0.55526423", "0.5546099", "0.55199677", "0.5517814", "0.55053663", "0.54905075", "0.54899234", "0.54723126", "0.5467773", "0.54664946", "0.54569817", "0.5438955", "0.5419453", "0.54146", "0.5412394", "0.53863424", "0.53839934", "0.53461796", "0.5340558", "0.53328305", "0.5326883", "0.5320851", "0.53120977", "0.5311907", "0.5303457", "0.5279221", "0.5276964", "0.5269742", "0.52581125", "0.52565163", "0.5252537", "0.52461725", "0.5239412", "0.5236648", "0.5230464", "0.5228574", "0.5218188", "0.52160066", "0.52067995", "0.5205913", "0.52040684", "0.52036846", "0.51969653", "0.51913315", "0.51910627", "0.5184794", "0.51750225", "0.5174089", "0.5171018", "0.5168482", "0.51675546", "0.5161798", "0.5143158", "0.5135178", "0.51294076", "0.5124153", "0.5121507", "0.5121235", "0.51179963", "0.51141346", "0.5112751", "0.51114243", "0.5110652", "0.5108216", "0.50939703" ]
0.6935981
0
Returns true if more elements exist in enumeration.
public boolean hasNextElement() { return resultsEnumeration.hasMoreElements(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean hasMoreElements() {\n\t\treturn it.hasNext();\r\n\t}", "public boolean hasMoreElements() {\n/* 64 */ return this.iterator.hasNext();\n/* */ }", "public boolean hasNext() {\n\t\t\treturn !elements.isEmpty();\n\t\t}", "public boolean hasMoreElements() {\n\t return hasMoreTokens();\n\t}", "public boolean hasMoreElements() {\r\n \t\tif(numItems == 0 || currentObject == numItems) {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n \t}", "@Override\n\t\tpublic boolean hasMoreElements() {\n\t\t\treturn cursor != size();\n\t\t}", "@Override\n public boolean hasNext() {\n return nextElementSet || setNextElement();\n }", "public boolean hasNext() {\n\t\t\tif (index < numberOfElements)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "public boolean hasNext() {\n\t if(nextCount>=size) {\n\t \treturn false;\n\t }\n\t return true;\n\t }", "public boolean hasNext() {\n\t if(nextCount>=size) {\n\t \treturn false;\n\t }\n\t return true;\n\t }", "public boolean hasNext() {\n return (itrCounter < size());\n }", "public boolean hasNextInSet() {\n return (hasNext() &&\n (indexOfCurrentElement + 1 < firstIndexOfCurrentSet + quantity) &&\n (indexOfCurrentElement + 1 >= firstIndexOfCurrentSet)); \n }", "public boolean moreToIterate() {\r\n\t\treturn curr != null;\r\n\t}", "public boolean hasNext() {\n\t\t\treturn index < size;\n\t\t}", "public boolean hasNextElement();", "public boolean hasNext()\n {\n return (count > 0);\n }", "public boolean hasNext(){\n return (index < nElem);\n }", "public boolean hasNext() {\n return nextIndex < size;\n }", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn nextIndex() >= 0;\n\t\t}", "public boolean hasNext() {\n\t\tif((++index)>=size)\n\t\t\treturn false;\t\n\t\telse\n\t\t\treturn true;\n\t}", "boolean hasNextElement();", "public boolean hasNext(){\n return ci < size;\n }", "public boolean hasNext() {\n\t\t\treturn mCurrentIndex < mSize;\n\t\t}", "@Override\n public boolean hasNext() {\n return j < size; // size is field of outer instance\n }", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn i > 0;\n\t\t}", "public boolean hasNext() {\r\n return (length > 0);\r\n }", "public boolean hasNext() {\r\n if (current + 1 >= elem.length) {\r\n current = 0;\r\n }\r\n return elem[current + 1] != null;\r\n }", "public boolean hasNext() {\n return fakeSize > 0;\n }", "public boolean isFull()\n { \n return count == elements.length; \n }", "@Override\n\tpublic boolean hasMore() {\n\t\treturn false;\n\t}", "boolean hasTotalElements();", "public boolean hasNext() \n {\n return next < size;\n }", "public boolean hasNext() {\r\n\r\n\t\treturn counter < links.size();\r\n\t}", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn (this.next != null);\n\t\t}", "public boolean hasMoreItems();", "public boolean hasNext(){\n if(index < size && listI.get(index) != null){\n return true;\n }\n return false;\n }", "public boolean hasNext() {\n return index < results.size();\n }", "@Override\r\n\t\tpublic boolean hasNext() {\r\n\t\t\treturn i < n;\r\n\t\t}", "boolean hasMore();", "public boolean hasNext()\n\t\t{\n\t\treturn i < N;\n\t\t}", "public boolean hasNext()\n\t{\n\t\treturn (curr<vector.size());\n\t}", "public boolean hasNext() {\n return current < len;\n }", "@Override\r\n public boolean hasNext() {\r\n // Time complexity: O(1), where the problem size N \r\n // represents the size of the sequence to generate.\r\n return generatedCount < SIZE; // the count must be strictly less than the SIZE\r\n }", "public boolean hasMoreData() {\n return iterator.hasNext();\n }", "public boolean hasNext() {\n for (; pos < elem.length; pos++) {\n if (merges(elem[pos])) {\n elem[pos].setUsed();\n continue;\n }\n\n return true;\n }\n\n return false;\n }", "private boolean hasNext() {\n\t\treturn iterator != null;\n\t}", "public boolean hasNext() {\n\t\treturn actual!=null;\t\t\n\t}", "public boolean hasNext() {\n\t\t\treturn globalIndex < hashTableSize;\n\t\t}", "@Override\n public boolean hasNext() {\n return (arreglo[i] != null) & arreglo.length > i ;\n }", "@Override\r\n\tpublic boolean hasNext() {\n\t\treturn currentIndex < head.size();\r\n\t}", "public boolean hasNext() {\n return getPage() + 1 < getTotalPage();\n }", "public boolean hasNext()\n {\n return (!isEmpty() && (cursor < numberOfEntries));\n }", "public boolean hasNext()\n {\n return (!isEmpty() && (cursor < numberOfEntries));\n }", "public boolean hasNext() {\r\n\t\t\trequireModificationCountUnchanged();\r\n\r\n\t\t\treturn nextEntry != null;\r\n\t\t}", "public boolean hasNext() {\r\n\t\treturn hasNext;\r\n\t}", "public boolean hasNext()\r\n {\r\n if(e.get(index+1) == null)\r\n return false;\r\n else\r\n return true;\r\n }", "public boolean hasNext(){\n if(index < size && listR.get(index) != null){\n return true;\n }\n return false;\n }", "@Override\n public boolean hasNext() {\n return numeroDiNodiAncoraVisitabili>0;\n }", "public boolean hasNext() {\n if (entries != null && \n size > 0 &&\n position > 0 &&\n position < size) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n\t\tpublic boolean hasNext() {\t\t\t\n\t\t\treturn current != null;\n\t\t}", "public boolean hasNext() {\n return nodeIndex != iterN;\n }", "public boolean hasNext() {\r\n \treturn index < n; \r\n }", "@Override\n\tpublic boolean hasNext() throws IOException, CollectionException {\n\t\treturn idx < docElements.size();\n\t}", "public boolean hasNext() {\n\t\t\t\t\treturn !record.isEmpty();\n\t\t\t\t}", "public boolean hasMore(){\r\n return curr != null;\r\n }", "public boolean hasNext() {\n\t\t\treturn nextPosition > -1;\n\t\t\t\n\t\t}", "public boolean hasNextSet() {\n return (firstIndexOfCurrentSet + increment <= lastIndex);\n }", "public boolean hasNext() {\n\t\t\treturn current != null;\n\t\t}", "@Override\n public boolean hasNext() {\n return (this.index != values.length) && (values[index] != null);\n }", "public boolean hasNext() {\n if (this.index < nElem)\n return true;\n else{\n this.index--;\n return false;\n }\n }", "public boolean hasNext()\n {\n \n if(index < size() && arrayList.get(index) != null)\n return true;\n else\n return false; \n }", "@Override\n public boolean hasNext() {\n return iter.hasNext();\n }", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn _current < (_items.length -1);\n\t\t}", "public boolean hasNext() {\n return this.next != null;\n }", "@Override\n public boolean hasNext() {\n return (nextItem != null);\n }", "public boolean hasNext() {\n\t\t\treturn current != null;\r\n\t\t}", "public boolean hasNext()\n {\n return _iterator.hasNext();\n }", "public static boolean hasElements() {\n return content.size() > 0;\n }", "public boolean hasNext() {\r\n return true;\r\n }", "@Override\n public boolean hasNext() {\n return(it.hasNext());\n }", "public boolean hasNext()\r\n {\r\n return (next != null);\r\n }", "@Override\n public boolean hasNext() {\n return currentPosition < list.size();\n }", "public boolean hasNext() {\n return true;\n }", "@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn (this.current<StringArray.this.max);\n\t\t\t}", "public boolean hasNext(){\n\t\treturn hasNext;\n\t}", "@Override\r\n\t\tpublic boolean hasNext() {\n\t\t\treturn current!=null;\r\n\t\t}", "@Override\r\n\t\tpublic boolean hasNext() {\r\n\t\t\treturn arr[index] != null && index < arr.length;\r\n\t\t}", "@Override\r\n\t\tpublic boolean hasNext() {\n\t\t\treturn itemsViewed < HashMap.this.size();\r\n\t\t}", "@Override\n public boolean hasNext() {\n return this.index < this.endIndex;\n }", "@Override\n public boolean hasNext() {\n return this.position != values.length && values[this.position] != null;\n }", "public boolean hasNext()\n {\n return current != null;\n }", "public boolean hasNext() {\n return true;\n }", "public boolean hasNext() {\n return current != null;\n }", "public boolean hasNext() {\n return current != null;\n }", "@Override\n @CheckReturnValue\n public boolean hasNext() {\n return offset < array.length;\n }", "public boolean hasNext() {\n\t\t\treturn ! this.isDone();\n\t\t}", "@Override\n\tpublic boolean hasNext() {\n\t\treturn false;\n\t}", "public boolean hasNext() {\n\t\t\n\t\treturn order.hasNext() || !candidates.isEmpty()\n\t\t\t\t|| !firstOrderCandidates.isEmpty();\n\t}", "@Override\n public boolean hasNext() {\n return next != null;\n }", "@Override\n\tpublic boolean hasNext() {\n\t return current != null;\n\t}" ]
[ "0.82448095", "0.81077147", "0.77228725", "0.7604373", "0.7586643", "0.7496162", "0.7451097", "0.7432613", "0.7429068", "0.7429068", "0.7330841", "0.72603965", "0.7240119", "0.7218099", "0.719924", "0.71841395", "0.7164573", "0.7157108", "0.71318114", "0.7117245", "0.7110726", "0.7096789", "0.7095923", "0.70953953", "0.70794284", "0.70632523", "0.7046417", "0.70371777", "0.7034506", "0.7028507", "0.7020863", "0.69504404", "0.69359297", "0.69212234", "0.691489", "0.6913201", "0.6909542", "0.69080037", "0.6906127", "0.6905849", "0.68957037", "0.6893832", "0.68922836", "0.6863393", "0.6856882", "0.684924", "0.68356943", "0.6827936", "0.68272686", "0.6825454", "0.6814152", "0.67964876", "0.67964876", "0.67898566", "0.67863494", "0.678438", "0.67838323", "0.6770207", "0.67635924", "0.6762461", "0.675808", "0.675044", "0.67465144", "0.6738509", "0.6737002", "0.6729548", "0.67295015", "0.6725717", "0.6724328", "0.67181385", "0.67169774", "0.67101145", "0.67060405", "0.67018664", "0.67014086", "0.669193", "0.66894495", "0.6687451", "0.66874313", "0.66781986", "0.6674545", "0.6673306", "0.66673213", "0.66658", "0.6661125", "0.66603935", "0.66485924", "0.66465104", "0.6633463", "0.66311264", "0.6630386", "0.6629369", "0.66202253", "0.66202253", "0.6613916", "0.6608879", "0.66052", "0.66040117", "0.6591523", "0.6580483" ]
0.7429905
8
Returns a copy of the next record in this enumeration,
public byte[] nextRecord() { return (byte[]) resultsEnumeration.nextElement(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Record next() {\n if (hasNext()) {\n if (nextRecord != null) {\n Record out = nextRecord;\n nextRecord = null;\n return out;\n }\n }\n throw new NoSuchElementException();\n //throw new UnsupportedOperationException(\"hw3: TODO\");\n }", "public Record next() {\n throw new UnsupportedOperationException(\"hw3: TODO\");\n }", "public IndexRecord getIteratorNext() {\n iter = (iter == next - 1 ? -1: iter + 1);\n return (iter == -1 ? null : data[iter]);\n }", "@Override\r\n\tpublic Record getNextSnapShotRecord() {\n\t\tif (iterSnapshot == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (iterSnapshot.hasNext())\r\n\t\t\treturn iterSnapshot.next();\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "public Object getNext() { \t\n\t\t\tcurrIndex++;\t \n\t\t\treturn collection.elementAt(currIndex);\n\t\t}", "public Item next() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n lastAccessed = current;\n Item item = current.item;\n current = current.next; \n index++;\n return item;\n\t\t}", "@Override\n public Object next() {\n Object retval = this.nextObject;\n advance();\n return retval;\n }", "public TableGenRow nextRow() {\n try {\n if(DBMacros.next(rs)) {\n return this;\n }\n } catch (Exception t) {\n dbg.ERROR(\"nextRow() Exception skipping to the next record!\");\n dbg.Caught(t);\n }\n return null;\n }", "public Data nextData()\r\n\t\t{\r\n\t\t\treturn this.nextData;\r\n\t\t}", "public T next()\n {\n T data = current.item;\n current = current.next;\n return data;\n }", "public T next() {\n T temp = this.curr.next.getData();\n this.curr = this.curr.next;\n return temp;\n }", "public R next(){\n return (R) newList.get(index++);\n }", "@Override\n\t\tpublic Item next() {\n\t\t\tItem item=current.item;\n\t\t\tcurrent=current.next;\n\t\t\treturn item;\n\t\t}", "public T next() {\n T temp = this.curr.getData();\n this.curr = this.curr.getNext();\n return temp;\n }", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "@Override\n public Integer next() {\n Integer res = next;\n advanceIter();\n return res;\n }", "public MoviePlotRecord next() {\n\t\t\t\t\tString title = null;\n\t\t\t\t\tStringBuilder plots = new StringBuilder();\n\t\t\t\t\tStringBuilder authors = new StringBuilder();\n\t\t\t\t\t\n\t\t\t\t\tfor (String line : record) {\n\t\t\t\t\t\tif (line.startsWith(\"MV: \")) {\n\t\t\t\t\t\t\tif (title != null) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(\"IMDB parse error: two plot titles\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttitle = line.substring(4);\n\t\t\t\t\t\t} else if (line.startsWith(\"PL: \")) {\n\t\t\t\t\t\t\tplots.append(line.substring(4)).append(\" \");\n\t\t\t\t\t\t} else if (line.startsWith(\"BY: \")) {\n\t\t\t\t\t\t\tauthors.append(line.substring(4)).append(\" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// read next record\n\t\t\t\t\trecord = nextRecord();\n\t\t\t\t\t\n\t\t\t\t\treturn new MoviePlotRecord(title, plots.toString(), authors.toString());\n\t\t\t\t}", "@Override\n public T next() {\n current = current.next;\n return current.data;\n }", "@Override\n public Integer next() {\n if (next != null) {\n Integer next = this.next;\n this.next = null;\n return next;\n\n }\n\n return iterator.next();\n }", "public T next(){\n return (T)data[ci++];\n }", "public R next(){\n return (R) listR.get(index++);\n }", "@Override\n\tpublic Row next(){\n\t\treturn res;\n\t}", "private E next() {\n\t\tif (hasNext()) {\n\t\t\tE temp = iterator.data;\n\t\t\titerator = iterator.next;\n\t\t\treturn temp;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public Object next()\n {\n return _iterator.next();\n }", "@Override\n\t\tpublic T next() {\n\t\t\tmoveToNextIndex();\n\t\t\treturn objectAtIndex(_indicesByInsertOrder[_index]);\n\t\t}", "public void getNextRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.getNextRecord(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "public T next(){\r\n return itrArr[position++];\r\n }", "public T getNextItem();", "public VcfRecord peek() {\n if (mCurrent == null) {\n throw new IllegalStateException(\"No more records\");\n }\n return mCurrent;\n }", "public I next(){\n return (I) listI.get(index++);\n }", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "Entry getNext()\n {\n return (Entry) m_eNext;\n }", "public T nextElement() {\r\n\t\treturn items[currentObject++];\r\n \t}", "@Override\r\n\t\tpublic Key next() {\n\t\t\tKey i=current.item;\r\n\t\t\tcurrent=current.next;\r\n\t\t\treturn i;\r\n\t\t}", "@Nonnull\n public Optional<ENTITY> next()\n {\n currentItem = Optional.of(items.get(++index));\n update();\n return currentItem;\n }", "public emxPDFDocument_mxJPO getNext()\r\n {\r\n /*\r\n * Author : DJ\r\n * Date : 02/04/2003\r\n * Notes :\r\n * History :\r\n */\r\n return (emxPDFDocument_mxJPO)super.removeFirst();\r\n }", "public WALRecord next() throws IgniteCheckedException {\n try {\n for (;;) {\n if (!iterator.hasNextX())\n return null;\n\n IgniteBiTuple<WALPointer, WALRecord> tup = iterator.nextX();\n\n if (tup == null)\n return null;\n\n WALRecord rec = tup.get2();\n\n WALPointer ptr = tup.get1();\n\n rec.position(ptr);\n\n // Filter out records by group id.\n if (rec instanceof WalRecordCacheGroupAware) {\n WalRecordCacheGroupAware grpAwareRecord = (WalRecordCacheGroupAware) rec;\n\n if (!cacheGroupPredicate.apply(grpAwareRecord.groupId()))\n continue;\n }\n\n // Filter out data entries by group id.\n if (rec instanceof DataRecord)\n rec = filterEntriesByGroupId((DataRecord) rec);\n\n return rec;\n }\n }\n catch (IgniteCheckedException e) {\n boolean throwsCRCError = throwsCRCError();\n\n if (X.hasCause(e, IgniteDataIntegrityViolationException.class)) {\n if (throwsCRCError)\n throw e;\n else\n return null;\n }\n\n log.error(\"There is an error during restore state [throwsCRCError=\" + throwsCRCError + ']', e);\n\n throw e;\n }\n }", "@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }", "public T next() {\n return cur.next();\n }", "public String getNextField () {\n return nextField.toString();\n }", "public void _next() {\n Object o;\n try {\n o = iter.next();\n } catch (NoSuchElementException e) {\n has_next = 0;\n return;\n }\n // resolve object\n if (o == null) {\n has_next = 1;\n next = null;\n } else if (o instanceof IdentityIF) {\n try {\n o = txn.getObject((IdentityIF)o, true);\n if (o == null) {\n _next();\n } else {\n has_next = 1;\n next = (F) o;\n }\n } catch (Throwable t) {\n has_next = -1;\n next = null;\n }\n } else {\n has_next = 1;\n next = (F) o;\n }\n }", "public SAMRecord next() {\n SAMRecord rec = wrappedIterator.next();\n\n // Always consolidate the cigar string into canonical form, collapsing zero-length / repeated cigar elements.\n // Downstream code (like LocusIteratorByState) cannot necessarily handle non-consolidated cigar strings.\n rec.setCigar(AlignmentUtils.consolidateCigar(rec.getCigar()));\n\n // if we are using default quals, check if we need them, and add if necessary.\n // 1. we need if reads are lacking or have incomplete quality scores\n // 2. we add if defaultBaseQualities has a positive value\n if (defaultBaseQualities >= 0) {\n byte reads [] = rec.getReadBases();\n byte quals [] = rec.getBaseQualities();\n if (quals == null || quals.length < reads.length) {\n byte new_quals [] = new byte [reads.length];\n for (int i=0; i<reads.length; i++)\n new_quals[i] = defaultBaseQualities;\n rec.setBaseQualities(new_quals);\n }\n }\n\n // if we are using original quals, set them now if they are present in the record\n if ( useOriginalBaseQualities ) {\n byte[] originalQuals = rec.getOriginalBaseQualities();\n if ( originalQuals != null )\n rec.setBaseQualities(originalQuals);\n }\n\n return rec;\n }", "public Item next() {\r\n if (!hasNext()) throw new NoSuchElementException();\r\n lastAccessed = current;\r\n Item item = current.item;\r\n current = current.next;\r\n index++;\r\n return item;\r\n }", "public Cell getNext()\n { return next; }", "public void next() {\n\t\titerator.next();\n\t}", "public T getNext() {\n\n // Create a new item to return\n T nextElement = getInstance();\n\n // Check if there are any more items from the list\n if (cursor <= arrayLimit) {\n nextElement = collection.get(cursor);\n cursor++;\n } else {\n // There are no more items - set to null\n nextElement = null;\n }\n\n // Return the derived item (will be null if not found)\n return nextElement;\n }", "public MapElement getNext() {\n return next;\n }", "Element nextElement () {\n\t\treturn stream.next();\n\t}", "private PlayState getNext(){\n return values()[(this.ordinal() + 1) % PlayState.values().length];\n }", "@Override\n\tpublic Integer next() {\n\t return iterator.next();\n\t}", "@Override\r\n\t\tpublic Item next() {\r\n\t\t\treturn arr[index++];\r\n\t\t}", "private List<String> nextRecord() {\n\t\t\t\t\tList<String> record = new LinkedList<String>();\n\t\t\t\t\twhile (lines.hasNext()) {\n\t\t\t\t\t\tString line = lines.next();\n\t\t\t\t\t\tif (line.startsWith(\"---\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\trecord.add(line);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn record;\n\t\t\t\t}", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n\t\treturn null;\n\t}", "public E next() {\r\n current++;\r\n return elem[current];\r\n }", "public Object getNext() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.next; // Get the reference to the next item\n\t\t}\n\t\treturn current == null ? null : current.item;\n\t}", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}", "public HL7DataTree next() {\n final int size = Util.size(this.list), i = this.next == null ? size : this.list.indexOf(this.next) + 1;\n final HL7DataTree curr = this.next;\n \n this.next = i == size ? more() : this.list.get(i);\n \n return curr;\n }", "@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}", "@Override\n\tpublic Capture next() {\n\t\treturn getCapture();\n\t}", "@Override\n public RadarContent next() {\n RadarContent p = pq.arrProfiles[iCursor];\n iCursor++;\n return p;\n }", "public IR\n next();", "@Field(1) \n\tpublic Pointer<uvc_processing_unit > next() {\n\t\treturn this.io.getPointerField(this, 1);\n\t}", "public byte NEXT() {\r\n\t\t//log(\"Frame.NEXT mp=\"+mp);\r\n\t\tint addr=base+(mp++);\r\n\t\tbyte b=heap.readByte(addr);\r\n\t\t//log(\"Frame.NEXT addr=\"+addr+\"; byte=\"+b+\" \"+hexByte(b));\r\n\t\treturn b;\r\n\t}", "public void next() {\n if (hasNext()) {\n setPosition(position + 1);\n }\n }", "public Index next() {\n return Index.valueOf(value + 1);\n }", "public C getNext();", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "@Override\r\n public Object next() {\r\n V value = (V) currentCell.value;\r\n currentCell = currentCell.next;\r\n return value;\r\n }", "public Event getNextEvent() {\n \treturn next;\n }", "@Override\n\tpublic Tuple next(){\n currTupleInd++;\n if (currTupleInd >= numOfTuples) return null;\n return tuples.get(currTupleInd);\n\t}", "public Variable getNext(){\n\t\treturn this.next;\n\t}", "private ReportProcessor getNext() {\n return next;\n }", "public Object nextElement() {\n/* 75 */ return this.iterator.next();\n/* */ }", "public synchronized Pair<K, V> next() throws IOException {\n\t\t\treturn data.next();\n\t\t}", "public Record copy() {\n\t\treturn new Record(video, numOwned, numOut, numRentals);\n\t}", "@ActionTrigger(action=\"KEY-NXTREC\", function=KeyFunction.NEXT_RECORD)\n\t\tpublic void spriden_NextRecord()\n\t\t{\n\t\t\t\n\t\t\t\tif ( !isInLastRecord(true) )\n\t\t\t\t{\n\t\t\t\t\tnextRecord();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinfoMessage(GNls.Fget(toStr(\"SOAIDNS-0001\"), toStr(\"FORM\"), toStr(\"At last record.\")));\n\t\t\t\t}\n\t\t\t}", "public T next() {\n return array[current++];\n }", "public Object next();", "public Object next();", "public ListElement getNext()\n\t {\n\t return this.next;\n\t }", "@Override\n public Integer next() {\n if (cur != null) {\n int temp = cur.intValue();\n cur = null;\n return temp;\n }\n\n if (iter.hasNext()) {\n return iter.next();\n }\n\n return null;\n }", "public Tile getNext(){\n\t\treturn this.next;\n\t}", "public BSCObject next()\n {\n if (ready_for_fetch)\n {\n // the next sibling is waiting to be returned, so just return it\n ready_for_fetch = false;\n return sibling;\n }\n else if (hasNext())\n {\n // make sure there is a next sibling; if so, return it\n ready_for_fetch = false;\n return sibling;\n }\n else\n throw new NoSuchElementException();\n }", "public PlayerId next() {\n return (this.ordinal() == (ALL.size() - 1)) ? ALL.get(0) : ALL.get(this.ordinal() + 1);\n }", "public E next()\n\t{\n\t\treturn (vector.get(curr++));\n\t}", "public final T next()\n {\n return skip(1);\n }", "public T next()\r\n { \r\n if (next == null)\r\n throw new NoSuchElementException(\"Attempt to\" +\r\n \" call next when there's no next element.\");\r\n\r\n prev = next;\r\n next = next.next;\r\n return prev.data;\r\n }", "public Player getNext(){\n\t\treturn this.players.get(this.nextElem);\n\t}", "public MapElement next() {\n return findNext(true);\n }", "public Vertex getNext() {\n\t\treturn next;\n\t}", "public ObjectListNode getNext() {\n return next;\n }", "public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}", "public void next() {\n\t\t}", "@Override\n\t\tpublic T1 next() {\n\t\t\treturn (T1)_items[getindex(++_current)];\n\t\t}", "public T getNextElement();", "protected long getRecordNumber() {\n\t\treturn _nextRecordNumber.getAndIncrement();\n\t}", "public E next(){\r\n E data = node.getData();\r\n node = node.getNext();\r\n return data;\r\n }", "public K next()\n {\n\tif (hasNext()) {\n\t K element = current.data();\n\t current = current.next(0);\n\t return element; \n\t} else {\n\t return null; \n\t}\n }", "@Override\n\t\t\tpublic FplValue next() {\n\t\t\t\treturn subListIter.next();\n\t\t\t}" ]
[ "0.7435992", "0.7188027", "0.7177021", "0.6829121", "0.6765166", "0.6745856", "0.6732576", "0.6710568", "0.6658824", "0.653738", "0.6507785", "0.64986414", "0.6497286", "0.6466516", "0.6463512", "0.64603037", "0.64034915", "0.64012253", "0.63968897", "0.63893336", "0.63870543", "0.6356829", "0.6353335", "0.63413006", "0.6340565", "0.6328345", "0.6326717", "0.6323764", "0.63180304", "0.6301949", "0.6300765", "0.62974936", "0.6260769", "0.6250884", "0.62413937", "0.6238571", "0.6233205", "0.62329334", "0.62242496", "0.6215599", "0.6190507", "0.6184626", "0.61817914", "0.618069", "0.617799", "0.6175764", "0.6173741", "0.6159897", "0.61575556", "0.6153125", "0.6146747", "0.6139573", "0.61359215", "0.61352277", "0.61336726", "0.6131233", "0.6127211", "0.6121557", "0.6116138", "0.6100456", "0.60909694", "0.6089775", "0.608232", "0.60791147", "0.60675025", "0.60662115", "0.6063016", "0.60534436", "0.6049227", "0.60421336", "0.6033549", "0.60090506", "0.60085654", "0.60005176", "0.59993386", "0.5974547", "0.59734476", "0.59728456", "0.59723455", "0.59723455", "0.59638536", "0.5956489", "0.59508723", "0.59488386", "0.5946355", "0.59335274", "0.5928272", "0.5922246", "0.5917528", "0.59165424", "0.59163153", "0.59159994", "0.59115964", "0.59071934", "0.59021425", "0.5899902", "0.58979565", "0.5894254", "0.5882107", "0.5882012" ]
0.74306476
1
The following are simply stubs that we don't implement...
public boolean hasPreviousElement() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "public interface IOngoingStubbing {}", "private Mocks() { }", "public abstract void mo70713b();", "public abstract void mo56925d();", "zzafe mo29840Y() throws RemoteException;", "public abstract void mo6549b();", "public abstract void mo42329d();", "public abstract Object mo26777y();", "public abstract void mo42331g();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private OpenAll() {\n throw new RuntimeException(\"Stub!\");\n }", "public abstract void mo27386d();", "private CommonMethods() {\n }", "public abstract void mo30696a();", "public int getObjectHandle() {\n/* 72 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public abstract void mo35054b();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "public int describeContents() {\n/* 1781 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "public void method_4270() {}", "public abstract void mo27385c();", "@Override\n public void perish() {\n \n }", "public abstract void mo42330e();", "public abstract Object mo1185b();", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public abstract String mo9752q();", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public abstract void mo102899a();", "public ULocale(String a, String b, String c) {\n/* 125 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public ULocale(String a, String b) {\n/* 103 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String getName() {\n/* 341 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "Stub createStub();", "private NativeSupport() {\n\t}", "public abstract void mo27464a();", "public abstract void mo45765b();", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public abstract void mo957b();", "@Override\n\tpublic void some() {\n\t\t\n\t}", "public abstract Object mo1771a();", "public boolean isImportantForAccessibility() {\n/* 1302 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void test() {\n \n }", "public int describeContents() {\n/* 48 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void m23075a() {\n }", "public void selectAll() {\n/* 101 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public UUID getUuid() {\n/* 78 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public abstract void m15813a();", "public final void mo51373a() {\n }", "@Override\n\tpublic void call() {\n\t\t\n\t}", "public abstract void mo3994a();", "public void mo21825b() {\n }", "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "public int getEventCode() {\n/* 41 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int getObjectPropCode() {\n/* 108 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void mo115190b() {\n }", "void mo57277b();", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public static void dummyTest(){}", "public static void dummyTest(){}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "zzang mo29839S() throws RemoteException;", "abstract int pregnancy();", "public int getObjectFormatCode() {\n/* 116 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private static interface WithoutObjectOverrides {\n\n public boolean equals();\n\n public long hashCode(Object obj);\n\n public void toString(long foo);\n }", "private void m50366E() {\n }", "protected abstract Set method_1559();", "private DataClayMockObject() {\n\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public ULocale getFallback() {\n/* 314 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public abstract String mo13682d();", "public int getId() {\n/* 2402 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected int handleNext(int position) {\n/* 283 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public abstract String mo118046b();", "public interface AbstractC1953c50 {\n}", "public int getParameter1() {\n/* 47 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test public void singletonResolutionInFunctions() {\n fail( \"Not yet implemented\" );\n }", "@Override\n\tprotected void interr() {\n\t}", "interface C0868a {\n /* renamed from: a */\n void mo3207a(Object obj);\n\n /* renamed from: a */\n void mo3208a(String str, Bundle bundle);\n\n /* renamed from: a */\n void mo3209a(String str, Bundle bundle, ResultReceiver resultReceiver);\n\n /* renamed from: a */\n boolean mo3210a(Intent intent);\n }", "private ChainingMethods() {\n // private constructor\n\n }", "protected void h() {}", "public int getParameter2() {\n/* 53 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public _CodeBaseStub ()\n {\n super ();\n }", "private void test() {\n\n\t}", "public String getVariant() {\n/* 292 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public ListAdapter getAdapter() {\n/* 431 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }" ]
[ "0.6672592", "0.653659", "0.64474577", "0.63893557", "0.63021857", "0.6301358", "0.6263895", "0.62220293", "0.62115717", "0.61894816", "0.6166082", "0.6145787", "0.6117087", "0.6106927", "0.6103688", "0.6099046", "0.6097294", "0.60853755", "0.60853755", "0.608068", "0.60693604", "0.60663927", "0.6032917", "0.6020664", "0.6009013", "0.6004803", "0.5993437", "0.5987912", "0.5983634", "0.59817535", "0.5977422", "0.5972842", "0.5963107", "0.5962842", "0.59604424", "0.5956411", "0.5949053", "0.5945941", "0.59402835", "0.5929876", "0.5925538", "0.59115833", "0.5904046", "0.5900564", "0.58894193", "0.58795255", "0.58764964", "0.58582884", "0.5853432", "0.5842731", "0.5839578", "0.5831882", "0.58309835", "0.5828142", "0.58237714", "0.58207315", "0.58157676", "0.58156943", "0.58107275", "0.5808408", "0.58062595", "0.57994795", "0.5794108", "0.5794108", "0.5794108", "0.5794108", "0.5794108", "0.5794108", "0.5790738", "0.5790738", "0.5790478", "0.5785008", "0.57838786", "0.57783735", "0.5774462", "0.57736003", "0.57710683", "0.5767704", "0.5765212", "0.5761888", "0.5757994", "0.57542235", "0.5750513", "0.57461166", "0.57446617", "0.5743399", "0.5740772", "0.5739179", "0.573855", "0.5735264", "0.5725781", "0.57180405", "0.5714622", "0.5712148", "0.57090485", "0.5706859", "0.5702344", "0.5700216", "0.56964535", "0.56964177", "0.5696142" ]
0.0
-1
Clicks on the big Sign Up button
public void clickSignUpButton(WebDriver browser) throws Exception { String path = getUIMapValue("home", "signup"); WebElement button = browser.findElement(By.xpath(path)); Assert .assertEquals(button.getAttribute("href"), getUrl("signup"), String.format("Element [%s] does not point to expected URL", button.getText())); button.click(); waitForPageToLoad(browser, getDefaultTimeout()); SignupPageHelper signupPageHelper = new SignupPageHelper(); Assert.assertEquals(signupPageHelper.isSignupPageDisplayedCorrectly(browser), true, "Opened page is not displayed correctly."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^Click on signup button$\")\t\t\t\t\t\n public void Click_on_signup_button() throws Throwable \t\t\t\t\t\t\t\n { \n \tdriver.findElement(By.xpath(\"//*[@id='accountDetailsNext']/content/span\")).click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\t\t\n }", "public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}", "public void clickSignUpFromATemplate() {\n\t\tselenium.clickByXpath(signUp);\n\t}", "public void clickOnEasyPeasyFormsLogoOnSignUpPage() throws Exception {\n\t\tsuper.waitAndClickElement(Logo_EasyPeasyForms_SignUp_Page);\n\t}", "private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}", "public void onSignupClick(MouseEvent e){signup();}", "@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}", "public void clickOnFirstSignupButton() throws Exception {\n\t\tsuper.waitAndClickElement(button_signup_body_first);\n\t}", "public void onSignUpClicked() {\n loginView.startSignUpActivity();\n loginView.finishActivity();\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tlaunchSignUpDialog();\n\t\t}", "public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}", "@Override\n public void onClick(View v) {\n signUp();\n }", "public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals(\"\") || pw.equals(\"\") || na.equals(\"\")|| em.equals(\"\")){\n\t\t\ttext = \"Please fill out all fields!\";\n\t\t} else if(regview.findUser(uid)!=User.NULL_USER){\n\t\t\ttext = \"The username already exsit, please try another one!\";\n\t\t} else {\n\t\t\tregview.addUser(new User(uid,pw,na,em));\n\t\t\tregview.goLoginPage();\n\t\t}\n\t\tregview.setRegisterText(text);\n\t}", "public void clickSignInButton() {\r\n\t\tdriver.findElement(signInButton).click();\r\n\t}", "@Override\n public void onSignUpBtnClick() {\n }", "public void clickSignInButton() {\r\n\t\tsignInButton = driver.findElement(signInButtonSelector);\r\n\t\tsignInButton.click();\r\n\t\t\r\n\t}", "public AccountPage Signup_through_loginpage() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", SignUpButton );\n\tsignupPage.SignUp_Form();\n\treturn new AccountPage();\n\t}", "public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}", "public void clickOnRegisterButton() {\n Reporter.addStepLog(\" Click on register button \" + _registerBtn.toString());\n clickOnElement(_registerBtn);\n log.info(\" Click on register button \" + _registerBtn.toString());\n }", "public void signUpClicked(View view) {\n setContentView(R.layout.activity_register);\n System.out.println(\"sign up clicked\");\n }", "@Step\n public void clickRegistrationButton(){\n actionWithWebElements.clickOnElement(registrationButton);\n }", "@OnClick(R.id.buttonSignUp)\n void signUp()\n {\n if (from.equals(Keys.FROM_FIND_JOB)) {\n Intent intent = new Intent(this, LoginSignUpSeekerActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_SIGNUP);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n } else {\n Intent intent = new Intent(this, LoginSignUpRecruiterActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_SIGNUP);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }", "public void clickToRegisterButton() {\n\t\twaitToElementClickable(driver,RegisterPageUI.REGISTER_BUTTON);\n\t\tclickToElement(driver,RegisterPageUI.REGISTER_BUTTON);\n\t}", "@Override\n public void getStartedSignUpClicked() {\n\n }", "private void onSignUpPressed(View view) {\n Intent intent = new Intent(LoginActivity.this, CreateAccountActivity.class);\n startActivity(intent);\n }", "public void signupPressed(View view) {\n startActivity(new Intent(this, Signup.class));\n }", "public void clickRegisterLink() {\n $(registerLink).click();\n }", "public void signup(){\n\t\tboolean result = SignUpForm.display(\"Chocolate Chiptunes - Sign Up\", \"Sign-Up Form\");\n\t\tSystem.out.println(result);\n\t}", "public void onClickSignUp(View view) {\r\n\t\tcheckRegistationValidation();\r\n\t}", "@Then(\"^click on the Register button$\")\r\n\tpublic void click_on_the_Register_button() throws Throwable {\n\t register.submitRegistration();\r\n\t}", "public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getApplicationContext(), Signup.class);\n\t\t\t\tstartActivity(i);\n\n\n\t\t\t}", "@Override\n public void onClick(View view) {\n loadSignUpView();\n }", "@Override\r\n public void onClick(View view) {\r\n switch (view.getId()){\r\n case R.id.Signup:\r\n\r\n registerUser();\r\n\r\n break;\r\n }\r\n }", "public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }", "@Override\n public void onSignUpClicked()\n {\n startActivity(new Intent(context, SignUpActivity.class));\n }", "public void launchSignUpPage() {\n Intent intent = new Intent(LoginActivity.this, SignupActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n final String username = usernameInput.getText().toString();\n final String password = passwordInput.getText().toString();\n final String email = emailInput.getText().toString();\n final String handle = handleInput.getText().toString();\n signup(username, password, email, handle);\n }", "@Override\n\tpublic void gotoSignUp() {\n\t\tgetFragmentManager().beginTransaction()\n\t\t\t\t.replace(R.id.container, new SignUpFragment(), \"signup\")\n\t\t\t\t.commit();\n\n\t}", "public void signUp() {\n presenter.signup(username.getText().toString(), password.getText().toString());\n }", "private void signupOnClickFunctionality(){\n final TextView tvSign = findViewById(R.id.sign);\n tvSign.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Intent intent2 = new Intent(getApplicationContext(), signUp.class);\n startActivity(intent2);\n finish();\n }\n });\n }", "public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}", "public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}", "public void signUp(View view) {\r\n\t\tIntent intent = new Intent(this, SignupActivity.class);\r\n\t\tstartActivity(intent);\r\n\t}", "public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}", "public void clickLogin() {\n\t\tcontinueButton.click();\n\t}", "public void onSignupClickedListener(View view) {\n\n Intent intent = new Intent(this, PersonalAccountActivity.class);\n startActivity(intent);\n }", "public void clickSignInLink()\n\t{\n \telementUtils.performElementClick(wbSignInLink);\n\t}", "public void signup(View view) {\n Intent intent = new Intent(this, SignupActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Log.d(TAG, new Date().toString());\n mONIDSignupWV.setVisibility(View.VISIBLE);\n mONIDSignupWV.loadUrl(\"https://login.oregonstate.edu/idp/profile/cas/login?service=http://web.engr.oregonstate.edu/~habibelo/ihc_server/appscripts/studentsignup.php\");\n getSupportLoaderManager().initLoader(IHC_STUDENT_SIGNUP_LOADER_ID, null, SignupPageActivity.this);\n }", "public void signUP(View view) {\n // Do something in response to button\n Intent intent = new Intent(MainActivity.this, SignUpActivity.class);\n startActivity(intent);\n }", "@When(\"^Click on Register Button$\")\npublic void click_on_Register_Button() throws Throwable {\n\tdriver.findElement(By.id(\"registration_submit\")).click();\n\tSystem.out.println(\"Successfuly completed the regitration process\");\n \n}", "public HomePage clickOnSignInButton() {\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination. Should the login page\n // ever\n // go somewhere else (for example, a legal disclaimer) then changing the method\n // signature\n // for this method will mean that all tests that rely on this behaviour won't\n // compile.\n return new HomePage(driver);\n }", "public void signUp(View v) {\n attemptRegistration();\n }", "@Test(priority=3)\n\tpublic void verifySignUpBtn() {\n\t\tboolean signUpBtn = driver.findElement(By.name(\"websubmit\")).isEnabled();\n\t\tAssert.assertTrue(signUpBtn);\n\t}", "@When(\"^the user opens linked sigup page$\")\r\n\tpublic void the_user_opens_linked_sigup_page() throws Throwable {\n\tsign.linkedin_signup();\r\n\t\t\r\n\t}", "private void checkToSignup() {\n toolbar.setTitle(R.string.about);\n Intent intent = new Intent(this, SigninActivity.class);\n startActivityForResult(intent, ConstantValue.SIGN_UP_CODE);\n }", "public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}", "private void signUpEvt() {\n String emailRegex = \"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])\";\n // Get User Details\n String fullname = this.view.getWelcomePanel().getSignUpPanel().getFullnameText().getText().trim();\n String email = this.view.getWelcomePanel().getSignUpPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignUpPanel().getPasswordText().getPassword()).trim();\n\n if (!fullname.equals(\"\") && !email.equals(\"\") && !password.equals(\"\")) {\n if (email.matches(emailRegex)) {\n if (model.getSudokuDB().registerUser(fullname, email, password)) {\n view.getWelcomePanel().getCardLayoutManager().next(view.getWelcomePanel().getSlider());\n // Clear Fields\n view.getWelcomePanel().getSignUpPanel().clear();\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"Your registration was successful!\\n You can now sign in to your account.\", \"Successful Registration\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"Your registration was unsuccessful!\\nBe sure not to create a duplicate account.\", \"Unsuccessful Registration\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n // Email doesn't meet requirement\n Object[] options = {\"I will correct that\"};\n JOptionPane.showOptionDialog(this, \"You must provide a valid email address.\", \"Invalid Email Address\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n // Empty Fields\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to register, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "private void initSignUpButton() {\n TextButton signUpButton = new TextButton(\"Sign up\", skin);\n signUpButton.setPosition(320, 125);\n signUpButton.addListener(new InputListener() {\n @Override\n public void touchUp(InputEvent event, float x, float y, int pointer, int button) {\n AuthService authService = new AuthService();\n RegistrationResponse response\n = authService.register(usernameField.getText(), passwordField.getText());\n switch (response) {\n case OCCUPIED_NAME:\n usernameTakenDialog();\n break;\n case SHORT_PASSWORD:\n passwordTooShortDialog();\n break;\n case SUCCESS:\n stateManager.setState(new LoginState(stateManager));\n break;\n default:\n }\n }\n\n @Override\n public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\n System.out.println(\"pressed sign up\");\n return true;\n }\n });\n stage.addActor(signUpButton);\n }", "@Override\n public void loginClickedSignUp() {\n startSignInFragment();\n }", "public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}", "public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n registerUser();\n }", "public void getSignUpButton() {\n mSignUpButton = (Button) mView.findViewById(R.id.accounts_sign_up_btn);\n mSignUpButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n createFirebaseAccountsUI();\n }\n });\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), signup.class);\n startActivityForResult(intent, REQUEST_SIGNUP);\n }", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "private void clickInvite(){\n WebDriverHelper.clickElement(inviteButton);\n }", "public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }", "void onSignInButtonClicked();", "public void clickRegister(View view) {\n \t\tIntent i = new Intent(this, Register.class);\n \t\tstartActivity(i);\n \t}", "@And(\"click on login button\")\n\tpublic void click_on_login_button() {\n\t\tSystem.out.println(\"click on login button\");\n\t\tdriver.findElement(By.name(\"Submit\")).click();\n\t \n\t}", "@Then(\"user clicks submit button\")\n\tpublic void user_clicks_submit_button(){\n\t\t driver.findElement(By.name(\"sub\")).click();\n\t\t driver.findElement(By.xpath(\"//a[@href='addcustomerpage.php']\")).click();\n\t}", "public void clickHomeProfilePage() {\n wait.until(CustomWait.visibilityOfElement(profileHomePageButton));\n profileHomePageButton.click();\n }", "@Override\n public void getStartedClicked() {\n startSignUpFragment();\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!(API.isInternetOn(Register.this))) {\r\n\t\t\t\t\tshowAlert(\"Internet not avialble.\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprogressdialog.setMessage(\"Please wait...\");\r\n\t\t\t\t\tprogressdialog.show();\r\n\t\t\t\t\t// Force user to fill up the form\r\n\t\t\t\t\tif (username.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| email.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| password.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| verifyPassword.getText().toString().equals(\"\")) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please complete the sign up form.\");\r\n\t\t\t\t\t} else if (!(isValidEmail(email.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please enter valid email id.\");\r\n\t\t\t\t\t} else if (!(password.getText().toString()\r\n\t\t\t\t\t\t\t.equals(verifyPassword.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Password did not matched\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Save new user data into Parse.com Data Storage\r\n\t\t\t\t\t\tParseUser user = new ParseUser();\r\n\t\t\t\t\t\tuser.setUsername(username.getText().toString());\r\n\t\t\t\t\t\tuser.setPassword(password.getText().toString());\r\n\t\t\t\t\t\tuser.setEmail(email.getText().toString());\r\n\t\t\t\t\t\tuser.signUpInBackground(new SignUpCallback() {\r\n\t\t\t\t\t\t\tpublic void done(ParseException e) {\r\n\t\t\t\t\t\t\t\tif (e == null) {\r\n\t\t\t\t\t\t\t\t\tAllowUserToLogin(username.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString(), password.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString());\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\t\t\t\t\t\"Sign up Error\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t\t\t\t\t\t\t.show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "public void clickIconSignin()\n\t{\n \telementUtils.performElementClick(wbIconSignin); //wbIconSignin.click();\n\t}", "public void newUserClicked(View view) {\r\n Intent intent = new Intent(this, SignUpActivity.class);\r\n startActivity(intent);\r\n }", "@Test(enabled = true, priority = 8)\n\tpublic void loginButtonTest03() {\n\t\tdriver.findElement(By.cssSelector(\"#cms-login-submit\")).click();\n\n\t}", "public void onSignInClick(MouseEvent e) {\n\t\tsignin();\n\t}", "public RegistrationRutPage clickOnAddUserButton() {\n Log.info(\"Clicking on Add user button\");\n clickElement(addUserButton);\n return this;\n }", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}", "public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}", "public void signUp(View v){\n Toast.makeText(this,\"Signing up\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(MainActivity.this, SignUpActivity.class);\n startActivity(intent);\n }", "@Test(enabled = false, priority = 6)\n\tpublic void newUserRegistrationTest04() {\n\t\tdriver.findElement(By.cssSelector(\".cms-newuser-reg\")).click();\n\n\t}", "@Test\r\n\tpublic void test_2_SignIn() {\n\t\tdriver.findElement(By.cssSelector(\"#nav-link-accountList > span.nav-line-2\")).click();\r\n\t\tString signIn = driver.getTitle();\r\n\t\tAssert.assertEquals(signIn, \"Amazon Sign In\");\r\n\t\t// enter email\r\n\t\tdriver.findElement(By.id(\"ap_email\")).sendKeys(email);\r\n\t\t// enter password\r\n\t\tdriver.findElement(By.id(\"ap_password\")).sendKeys(password);\r\n\t\t// click on submit\r\n\t\tdriver.findElement(By.id(\"signInSubmit\")).click();\r\n\t\tSystem.out.println(\"Sign in is successful\");\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tattempt_register();\n\t\t\t}", "@When(\"^user clicks on Register button$\")\r\n public void user_clicks_on_Register_button() throws Throwable {\n throw new PendingException();\r\n }", "public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }", "public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}", "@Override\n public void onClick(View v) {\n setFragment(new SignUpFragment());\n }", "public void test_SignUp() throws Exception {\n\t\t\n//\t\tSystem.setProperty(BrowType, BrowPath);\n//\t\tWebDriver driver = new ChromeDriver();\n\t\t\n\t\tdriver.get(url);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(EmailAddress);\n\t\tdriver.findElement(By.id(\"password1\")).sendKeys(Password);\n\t\tdriver.findElement(By.id(\"password2\")).sendKeys(VerifyPassword);\n\t\tdriver.findElement(By.id(\"displayName\")).sendKeys(DisplayName);\n\t\tnew Select(driver.findElement(By.id(\"countrySelect\"))).selectByVisibleText(Country);\n\t\tdriver.findElement(By.id(\"signUpButton\")).click();\n\t\t\n\t\tString ExpConfMsg1 = \"Thank you for creating a Screencast.com account!\";\n\t\tString ConfMsg1 = driver.findElement(By.xpath(\"//*[@id='container']/div[3]/h3\")).getText();\n\t\tif(ConfMsg1.equals(ExpConfMsg1)){\n\t\t\tSystem.out.println(\"SignUp functionality Passed. Confirmation Message that appeared is : \" + ConfMsg1);\n\t\t} else {\n\t\t\tSystem.out.println(\"SignUp functionality Failed. Confirmation Message that appeared is : \" + ConfMsg1);\n\t\t} //end of if statement\n\t\t\n\t\tdriver.findElement(By.xpath(\"//*[@id='signedInAs']/a\")).click();\n\t\tThread.sleep(5000);\n\t\t\n\n\t}", "private void signUpLblMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_signUpLblMouseClicked\n String[] options = {\n \"Trainer\", \"Member\"\n };\n userNameTF.setText(\"\");\n passwordTF.setText(\"\");\n int opt = JOptionPane.showOptionDialog(this,\n \"What would you wish to sign up as? \",\n \"Trainer or Member?\",\n JOptionPane.DEFAULT_OPTION,\n JOptionPane.QUESTION_MESSAGE,\n null,\n options,\n options[1]);\n this.setVisible(false);\n if(opt == 0){\n SignUpDialogTrainer tDialog = new SignUpDialogTrainer(this, true);\n tDialog.setVisible(true);\n }\n else if(opt == 1){\n SignUpDialogMember mDialog = new SignUpDialogMember(this, true);\n mDialog.setVisible(true);\n }\n this.setVisible(true);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(SignUpActivity.this, SignInActivity.class);\n startActivity(intent);\n }", "public static void signUp(String username, String password, String alternativeEmail, String firstName, String lastName) {\n click(REGISTRATION_LINK);\n type(REG_FLOW_USERNAME_FIELD, username);\n click(REG_FLOW_CHECK_BUTTON);\n// if (!REG_FLOW_USERNAME_FREE_MESSAGE.toString().contains(\"Потребителското име е свободно\")) {\n// System.out.println(\"Try another username - the entered one is already in use\");\n// }\n type(REG_FLOW_PASSWORD_FIELD, password);\n type(REG_FLOW_PASSWORD_REENTER_FIELD, password);\n WebElement phoneCheckbox = Browser.driver.findElement(REG_FLOW_PHONE_CHECKBOX);\n if (phoneCheckbox.isEnabled()) {\n phoneCheckbox.click(); //that's how we disable it\n }\n type(REG_FLOW_ALTERNATIVE_EMAIL_FIELD, alternativeEmail);\n type(REG_FLOW_QUESTION_FIELD, \"To be or not to be?\");\n type(REG_FLOW_ANSWER_FIELD, \"To beeee.\");\n type(REG_FLOW_FNAME_FIELD, firstName);\n type(REG_FLOW_LNAME_FIELD, lastName);\n Browser.driver.switchTo().frame(\"abv-GDPR-frame\").manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n // Manually to tap ACCEPT on the GDPR window\n Browser.driver.switchTo().defaultContent();\n click(REG_FLOW_GENDER_RADIOBUTTON); //to choose male\n click(REG_FLOW_DAY_DROPDOWN);\n click(REG_FLOW_DAY_3); // to choose 3th\n click(REG_FLOW_MONTH_DROPDOWN);\n click(REG_FLOW_MONTH_5); // to choose May\n click(REG_FLOW_YEAR_DROPDOWN);\n click(REG_FLOW_YEAR_1998); // to choose 1998\n\n findElement(REG_FLOW_CAPTCHA_FIELD);\n click(REG_FLOW_CAPTCHA_FIELD);\n // Timeout to enter the CAPTCHA manually\n // EXPLICIT WAIT DA MU TURYA\n click(REG_FLOW_CREATE_BUTTON);\n String successfulRegMessage = Browser.driver.findElement(REG_SUCCESS_MESSAGE).getText().trim();\n assertTrue(successfulRegMessage.contains(\"Успешна регистрация.\"), \"No SUCCESS message\");\n click(LOGIN_TO_YOUR_EMAIL_BUTTON);\n }", "public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}", "public void clickLogin(){\n\t\t\tdriver.findElement(login).click();\n\t}", "@And(\"^I click the signin button$\")\n public void iClickTheSigninButton() throws Throwable {\n }", "public void GoToSignup(View v)\n\t\t {\n \t\t\tIntent intent = new Intent();\n\t\t\tintent.setClassName(this, FreewayCoffeeSignupActivity.class.getName());\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t }" ]
[ "0.80354464", "0.7810494", "0.7808576", "0.7652708", "0.7613976", "0.7539174", "0.7536211", "0.7532271", "0.7517236", "0.7488757", "0.74658173", "0.7426564", "0.7425834", "0.7424148", "0.74108493", "0.7406982", "0.74067336", "0.73138803", "0.72756207", "0.7245064", "0.71685636", "0.71235204", "0.7078194", "0.706613", "0.7047216", "0.70261693", "0.70059264", "0.6997409", "0.6992067", "0.6981296", "0.6972691", "0.69315296", "0.6923277", "0.69226855", "0.6873544", "0.6858665", "0.6848081", "0.6838653", "0.6834298", "0.6829843", "0.6804482", "0.6800033", "0.67944455", "0.6791569", "0.6780159", "0.67350894", "0.6728437", "0.67202497", "0.67202127", "0.670921", "0.6707983", "0.6689074", "0.6681397", "0.66724014", "0.66547894", "0.6630473", "0.66266036", "0.6601414", "0.65896475", "0.65738475", "0.65704256", "0.6531589", "0.651705", "0.6516252", "0.65134007", "0.6492535", "0.64855886", "0.64848137", "0.6484273", "0.64761126", "0.64700264", "0.646909", "0.64690506", "0.6461213", "0.6454287", "0.64457804", "0.64421386", "0.6440213", "0.64395684", "0.6439226", "0.6437886", "0.6436177", "0.64214593", "0.6414472", "0.6408367", "0.64039755", "0.6384664", "0.63822156", "0.63819593", "0.63796073", "0.6378897", "0.6366756", "0.6362361", "0.63601124", "0.6353115", "0.63423795", "0.6339343", "0.63355416", "0.6329315", "0.6319065" ]
0.7552322
5
Alice is just an employee
@Override public void run(ApplicationArguments args) throws Exception { User alice = new User(); alice.firstName("Alice"); alice.lastName("Alixon"); alice.emailAddress("alice@example.com"); alice.addRoleItem(UserRole.EMPLOYEE); alice.phone("+31 6 12345678"); alice.transactionLimit(BigDecimal.valueOf(100f)); alice.dayLimit(1000f); alice.birthDate(LocalDate.of(2010, 10, 10)); alice.password("idk"); userService.add(alice); // Charlie is just a customer User bob = new User(); bob.firstName("Bob"); bob.lastName("Bobson"); bob.emailAddress("bob@example.com"); bob.addRoleItem(UserRole.CUSTOMER); bob.phone("+31 6 87654321"); bob.transactionLimit(BigDecimal.valueOf(50f)); bob.dayLimit(2000f); bob.birthDate(LocalDate.of(2012, 12, 12)); bob.password("idk"); userService.add(bob); // Charlie has both the customer and employee role User charlie = new User(); charlie.firstName("Charlie"); charlie.lastName("Charhan"); charlie.emailAddress("charlie@example.com"); charlie.addRoleItem(UserRole.CUSTOMER); charlie.addRoleItem(UserRole.EMPLOYEE); charlie.phone("+31 6 12348765"); charlie.transactionLimit(BigDecimal.valueOf(200f)); charlie.dayLimit(500f); charlie.birthDate(LocalDate.of(1980, 8, 18)); charlie.password("idk"); userService.add(charlie); // Add account for // Bank Account bank = new Account(); bank.setBalance(0f); bank.setAccountType(AccountType.CURRENT); bank.setIBAN("NL01INHO0000000001"); bank.setMinimumLimit(0f); bank.setUserId(null); accountRepository.save(bank); Account account = new Account(); account.setBalance(1000f); account.setAccountType(AccountType.CURRENT); account.setIBAN("NL01INHO0000000002"); account.setMinimumLimit(50f); account.setUserId(2); accountRepository.save(account); Account accountBobSave = new Account(); accountBobSave.setBalance(1000f); accountBobSave.setAccountType(AccountType.CURRENT); accountBobSave.setIBAN("NL01INHO0000000003"); accountBobSave.setMinimumLimit(50f); accountBobSave.setUserId(2); accountRepository.save(accountBobSave); Account accountSave = new Account(); accountSave.setBalance(1000f); accountSave.setAccountType(AccountType.SAVING); accountSave.setIBAN("NL01INHO0000000004"); accountSave.setMinimumLimit(50f); accountSave.setUserId(3); accountRepository.save(accountSave); PostTransBody postTran = new PostTransBody(); postTran.setAmount(50f); postTran.setTransactionType(TransactionType.TRANSFER); postTran.setTransferFrom("NL01INHO0000000002"); postTran.setTransferTo("NL01INHO0000000003"); PostTransBody postWith = new PostTransBody(); postWith.setAmount(50f); postWith.setTransactionType(TransactionType.WITHDRAW); postWith.setTransferFrom("NL01INHO0000000002"); postWith.setTransferTo(""); PostTransBody postDrop = new PostTransBody(); postDrop.setAmount(50f); postDrop.setTransactionType(TransactionType.DEPOSIT); postDrop.setTransferFrom(""); postDrop.setTransferTo("NL01INHO0000000002"); transactionService.createTransaction(bob.getEmailAddress(), postTran); transactionService.createTransaction(bob.getEmailAddress(), postWith); transactionService.createTransaction(charlie.getEmailAddress(), postDrop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getEmployeeName();", "public String getEmployeeName();", "boolean hasEmployee();", "boolean hasEmployee();", "public Employee getEmployee() {\n return employee;\n }", "public void sauverEmploye(Employe employe) {\n\n\t}", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "public void getEmployee() {\r\n //what needs to be returned?\r\n }", "public Employee getHRhead();", "public String getEmployeeName() {\n return employeeName;\n }", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "@Test\n public void whenValidName_thenEmployeeShouldBeFound() {\n String name = \"alex\";\n Employee found = employeeService.getEmployeeByName(name);\n\n assertThat(found.getName())\n .isEqualTo(name);\n }", "public void isEmployee(String username) throws ValidationException {\n\t\ttry {\n\t\t\temployeeService.getEmployeeId(username);\n\t\t} catch (ServiceException e) {\n\t\t\tthrow new ValidationException(INVALIDEMPLOYEE);\n\t\t}\n\t}", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "public Employee getStudentOnId(int id);", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"Lucas_Smith@TechCompany.org\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"Jane_Charlotte@TechCompany.org\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "public Employee myInfo(String username) {\r\n\t\tEmployee e = SQLUtilityEmployees.getEmployeeByUsername(username);\r\n\t\tSystem.out.println(e);\r\n\t\treturn e;\r\n\t}", "Employee findById(int id);", "int getEmployeeId();", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "public interface Employees {\n public Employees work();\n}", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "Employee() {\n\t}", "public void saveEmployee(Employe employee) {\n\t\t\n\t}", "public int getEmployeeId();", "@Override\n\tpublic void ModifyEmployee() {\n\t\t\n\t}", "public Employee getEmployeeById(Long custId)throws EmployeeException;", "@Ignore\n @Test\n public void testEmployees() {\n Map<String, Object> map = new HashMap<>();\n map.put(\"uid\", \"jjcale\");\n map.put(\"uhUuid\", \"10000004\");\n\n AttributePrincipal principal = new AttributePrincipalImpl(\"jjcale\", map);\n Assertion assertion = new AssertionImpl(principal);\n CasUserDetailsServiceImplj userDetailsService = new CasUserDetailsServiceImplj(userBuilder);\n User user = (User) userDetailsService.loadUserDetails(assertion);\n\n // Basics.\n assertThat(user.getUsername(), is(\"jjcale\"));\n assertThat(user.getUid(), is(\"jjcale\"));\n assertThat(user.getUhUuid(), is(\"10000004\"));\n\n // Granted Authorities.\n assertThat(user.getAuthorities().size(), is(3));\n assertTrue(user.hasRole(Role.ANONYMOUS));\n assertTrue(user.hasRole(Role.UH));\n assertTrue(user.hasRole(Role.EMPLOYEE));\n\n assertFalse(user.hasRole(Role.ADMIN));\n }", "public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}", "public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }", "public Employee(String Name) {\r\n this.Name = Name;\r\n }", "public Employee findEmployee(Long id);", "public long getEmployeeId();", "List<Employee> findByName(String name);", "public Employee findEmployee(IncomingReport incoming_report) throws IllegalArgumentException, DAOException;", "boolean hasEmployeelist();", "@Test\n\tvoid getEmployes() throws SQLException {\n\t\tLigue ligue = new Ligue(\"Fléchettes\");\n\t\tEmploye employe = ligue.addEmploye(\"Bouchard\", \"Gérard\", \"g.bouchard@gmail.com\", \"azerty\", LocalDate.now()); \n\t\tassertEquals(employe, ligue.getEmployes().first());\n\t\t//Vérifier qu'il n'est pas ajouté 2 fois\n\t}", "public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}", "public int getEmployeeID() { return employeeID; }", "@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }", "@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }", "public static void main(String[] args) {\n\t\t\n\t\tEmployee theEmployee = new Employee();\n\t\t\n//\t\twhat does it mean below setter? by this section we assign value to variables.\n\t\ttheEmployee.setId(1000);\n\t\ttheEmployee.setName(\"Ramesh\");\n\t\ttheEmployee.setPosition(\"Mangaer\");\n\t\ttheEmployee.setSalary(10000.88);\n//\t\tby thes getters we print the data.\n\t\tSystem.out.println(theEmployee.getId());\n\t\tSystem.out.println(theEmployee.getName());\n\t\tSystem.out.println(theEmployee.getPosition());\n\t\tSystem.out.println(theEmployee.getSalary());\n\t\tSystem.out.println(theEmployee.getClass());\n\t\n\t\tSystem.out.println(\"====================================\");\n\t\t\n\t\tEmployee theEmployee1 = new Employee();\n\t\t\n\t\ttheEmployee1.setId(2);\n\t\ttheEmployee1.setName(\"Rahim\");\n\t\ttheEmployee1.setPosition(\"Team leader\");\n\t\ttheEmployee1.setSalary(22.88);\n\t\t\n\t\tSystem.out.println(theEmployee1.getId());\n\t\tSystem.out.println(theEmployee1.getName());\n\t\tSystem.out.println(theEmployee1.getPosition());\n\t\tSystem.out.println(theEmployee1.getSalary());\n\t\tSystem.out.println(theEmployee1.getClass());\n\t\t\n\t\t\n\tSystem.out.println(\"============================\");\n\t\n\tEmployee theEmployee2 = new Employee();\n\t\n\ttheEmployee2.setId(9);\n\ttheEmployee2.setName(\"Ramin\");\n\ttheEmployee2.setPosition(\"Superwiser\");\n\ttheEmployee2.setSalary(15000.00);\n\t\n\tSystem.out.println(theEmployee2.getId());\n\tSystem.out.println(theEmployee2.getName());\n\tSystem.out.println(theEmployee2.getPosition());\n\tSystem.out.println(theEmployee2.getSalary());\n\tSystem.out.println(theEmployee2.getClass());\n\t\n\t\t\n\t}", "Employee(String name, String password, String username, String email) {\n this.name = name;\n this.username = username;\n this.email = email;\n this.password = password;\n\n }", "public abstract String printEmployeeInformation();", "public static void main(String[] args) {\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"pu\");\n EntityManager em = emf.createEntityManager();\n EmployeeFacade facade = new EmployeeFacade(emf);\n\n try {\n em.getTransaction().begin();\n Employee employee1 = new Employee(\"Aske\", \"Sydhavn\", 2000);\n Employee employee2 = new Employee(\"Jens\", \"Skoven\", 10);\n em.persist(employee1);\n em.persist(employee2);\n em.getTransaction().commit();\n System.out.println(\"Customer: \" + facade.findEmployeeByName(\"Aske\"));\n // System.out.println(facade.getNumberOfCustomers());\n System.out.println(facade.getAllEmployees().size());\n // System.out.println(facade.findCustomer(1));\n\n } finally {\n em.close();\n }\n\n }", "List<Employee> allEmpInfo();", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public boolean addEmp(Employee e) {\n\t\treturn edao.create(e);\n\t\t\n\t}", "public static void main(String[] args) {\nEmployee emp1 =new Employee();\n\nemp1.name=\"MarufJon\";\nemp1.jobTitle=\"Teacher\";\nemp1.gender='m';\nemp1.age=22;\n\n\n\nEmployee emp2= new Employee() ;\nemp2.name=\"kiki\";\nemp2.jobTitle=\"HR\";\nemp2.age=26;\nemp2.gender='f';\n\n\nemp1.work();\nemp2.work();\n\t\n\nemp1.eat(\"chicken kesadia\");\nemp2.eat(\"salad\");\nemp1.walk();\nemp1.sleep(5);\nemp2.sleep(8);\n\t}", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "@Override\r\n\tpublic <S extends Employee> S findOne(Example<S> arg0) {\n\t\treturn null;\r\n\t}", "void work(){\n System.out.println(\"Emploee \"+ empID+\" is \"+age+\" years old\");\n }", "public Employeedetails getEmployeeDetailByName(String employeeId);", "Employee getOldestEmployee() {\n\t}", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public Employee(String name){\r\n\t\tthis.employeeName = name;\r\n\t\tthis.salary = 0;\r\n\t}", "interface Employee {\n\tpublic void showEmployeeDetails();\n}", "public static void addEmployee(Employee employee) {\n try {\n if (employeeRepository.insert(dataSource, employee) == 1) {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" is already in the list\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"in-list\") + \"\\n\");\n } else {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" was successfully added to the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.add\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }", "@Test\r\n\tpublic void addEmployeeTestCase3() {\n\t\tEmployee employee3 = new Employee();\r\n\t\temployee3.name = \"Lingtan\";\r\n\t\temployee3.role = \"Ui designer\";\r\n\t\temployee3.email = \"lingtan@chainsys.com\";\r\n\t\temployee3.employeeID = \"Ling2655\";\r\n\t\temployee3.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee3.gender = \"Male\";\r\n\t\temployee3.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee3.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee3);\t\r\n\t}", "public static void main(String[] args) {\n Employee employee = getEmployee(Identity.Code.TEST_CODE);\n for (Identity identity : employee.getIdentities()) {\n System.out.println(identity.getCode());\n }\n\n // This method doesn't give any exception, we need to figure out in next method what is breaking\n Employee employee2 = getEmployeeByIdentity1(Identity.Code.TEST_CODE);\n for (Identity identity : employee2.getIdentities()) {\n System.out.println(identity.getCode());\n }\n Identity identity1 = employee2.getIdentities().first();\n System.out.println(identity1.getCode());\n\n // This method gives the Exception :\n /**\n * Exception in thread \"main\" java.lang.ClassCastException: com.example.core.comparable.employeeidentity cannot\n * be cast to java.lang.Comparable\n */\n /*Employee employee1 = getEmployeeByIdentity(Identity.Code.TEST_CODE);\n for (Identity identity : employee1.getIdentities()) {\n System.out.println(identity.getCode());\n }*/\n\n\n\n }", "public Employe(String nomEmploye) {\r\n\t\tsuper();\r\n\t\tthis.nomEmploye = nomEmploye;\r\n\t}", "public boolean createEmployeeInfo(Employee employee) {\n\t\treturn dao.createEmployeeInfo(employee);\n\t}", "public static void main(String[] args) {\nEmployee emp = new Employee();\r\nemp.setId(101);\r\n\t\temp.setName(\"Mrunal\");\r\n\t\tSystem.out.println(\"Id:\"+emp.getId()+\"EmpName:\"+emp.getName());;\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public Class<Employee> getType() {\n return Employee.class;\n }", "public int getEmployeeID() {\r\n return employeeID;\r\n }", "private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n newEmployee.setFirstName(sc.nextLine().trim());\n System.out.print(\"Enter Last name>\");\n newEmployee.setLastName(sc.nextLine().trim());\n\n while (true) {\n System.out.println(\"Select Job Role:\");\n System.out.println(\"1. System Administrator\");\n System.out.println(\"2. Operation Manager\");\n System.out.println(\"3. Sales Manager\");\n System.out.println(\"4. Guest Officer\\n\");\n\n response = sc.nextInt();\n\n //set job role\n if (response >= 1 && response <= 4) {\n newEmployee.setJobRole(JobRoleEnum.values()[response - 1]);\n break;\n } else {\n System.out.println(\"Invalid option, please try again \\n\");\n }\n }\n sc.nextLine();\n System.out.print(\"Enter Username\");\n newEmployee.setUserName(sc.nextLine().trim());\n System.out.println(\"Enter Password\");\n newEmployee.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Employee>> constraintViolations = validator.validate(newEmployee);\n\n if (constraintViolations.isEmpty()) {\n newEmployee = employeeControllerRemote.createNewEmployee(newEmployee);\n System.out.println(\"New Staff created successfully, employee ID is: \"+newEmployee.getEmployeeId());\n }else{\n showInputDataValidationErrorsForEmployee(constraintViolations);\n }\n\n }", "Employee(String employeeName, double employeeSalary, int employeeAge) {\n\t\tthis.employeeName = employeeName;\n\t\tthis.employeeSalary = employeeSalary;\n\t\tthis.employeeAge = employeeAge;\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// Employers DATA BASE ----------------------------\n\t\t\n\t\temployee emp1 = new employee();\n\t\temp1.Name = \"John Billa\";\n\t\temp1.employeeCode = 001;\n\t\t\n\t\temployee emp2 = new employee();\n\t\temp2.Name = \"Anthony Woods\";\n\t\temp2.employeeCode = 002;\n\t\t\n\t\temployee emp3 = new employee();\n\t\temp3.Name = \"Jessica Underwood\";\n\t\temp3.employeeCode = 003;\n\t\t\t\t\n\t\t// End of Employers DATA BASE ---------------------\n\t\t\n\t\tSystem.out.println(\"Welcome! Please insert your EmployeeCode:\");\n\t\tint codeEnter = sc.nextInt();\n\t\t\n\t\tif(codeEnter == 001) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 002) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 003) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR!!! ERROR!!!\");\n\t\t\twhile (codeEnter > 003) {\n\t\t\t\tSystem.out.println(\"=====================================\");\n\t\t\t\tSystem.out.println(\"Insert Again your EmployeeCode\");\n\t\t\t\tcodeEnter = sc.nextInt();\n\t\t\t\t\n\t\t\t\tif(codeEnter == 001) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 002) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 003) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"======================================================= \");\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tif (codeEnter == 001) {\n\t\t\tSystem.out.println(emp1.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse if (codeEnter == 002) {\n\t\t\tSystem.out.println(emp2.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(emp3.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1. New Delivery\");\n\t\tSystem.out.println(\"2. New Client\");\n\t\tSystem.out.println(\"3. Exit System\");\n\t\t\n\t\tint employeeChoice = sc.nextInt();\n\t\t\n\t\tswitch(employeeChoice){\n\t\t\tcase 1: \n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"3\");\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsc.close();\n\t}", "@Override\n\tpublic Employee findPartner(String name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Employee createEmployee() {\n\t\treturn new Manager(name, age);\n\t}", "public Employeedetails checkEmployee(String uid);", "public void extensionEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name of the employee:\");\n\t\t\tString nameEmployee = reader.nextLine();\n\t\t\tSystem.out.println(\"How do you want to perform the search:\");\n\t\t\tSystem.out.println(\"L\");\n\t\t\tSystem.out.println(\"Z\");\n\t\t\tSystem.out.println(\"X\");\n\t\t\tSystem.out.println(\"O\");\n\t\t\tSystem.out.println(\"R. spiral by row\");\n\t\t\tchar travel = reader.nextLine().charAt(0);\n\t\t\tSystem.out.println(\"The extension of the cubicle of the employee is \"+theHolding.extensionEmployee(selected, nameEmployee, travel));\n\t\t}\n\t}", "public String getEmployeeId() {\n return employeeId;\n }", "public String getEmployeeId() {\n return employeeId;\n }", "public String getEmployees(){\n return employees;\n }", "public static void main(String[] args) {\n\t\t\n\t\tEmployee e1 = new Professor(\"Ami\",300.0,LocalDate.of(2019, 8, 3),2);\n\t\tEmployee s1 = new Secretary(\"Jim\",400.0,LocalDate.of(2019, 2, 10),10);\n\t\t\n\n\t\t\n\t\tArrayList<Employee> list = new ArrayList<Employee>();\n\t\tlist.add(e1);\n\t\tlist.add(s1);\n\t\t\n\t\tSystem.out.println(s1);\n\t\t\n\t\tlist.forEach((e) -> {\n\t\t\t\n\t\t\tif (e instanceof Secretary)\n\t\t\t{\n\t\t\t\tSecretary s = (Secretary)e;\n\t\t\t\tSystem.out.println(s);\n\t\t\t\ts.setOverTimeHour(50);\n\t\t\t}\n\t\t\n\t\t\tSystem.out.println(String.format(\"Name : %s \\nSalary : %.2f\",e.getName(), e.computeSalary()));\n\t\t});\n\t\t\n\n\t}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public Employee(){\n\t\t\n\t}", "public Employee(){\n\t\t\n\t}", "public void saveEmployee(Employee emp){\n System.out.println(\"saved\" + emp);\n\n }", "@Test\r\n\tpublic void addEmployeeTestCase2() {\n\t\tEmployee employee2 = new Employee();\r\n\t\temployee2.name = \"JD\";\r\n\t\temployee2.role = \"Technical Consultant\";\r\n\t\temployee2.email = \"jd@chainsys.com\";\r\n\t\temployee2.employeeID = \"Jd2655\";\r\n\t\temployee2.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee2.gender = \"Male\";\r\n\t\temployee2.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee2.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee2);\r\n\t}", "public abstract long countByEmployee(Employee employee);", "public List<Employee> getEmployees();", "private Employee findEmployee(String employeeName)\n {\n int index = -1;\n //nameJRadioButtonMenuItem.doClick();\n for(int i = 0; i < employees.size(); i++)\n {\n if(employeeName.equals(employees.get(i).getName()))\n index = i;\n }\n if(index >= 0)\n return employees.get(index);\n else\n return null;\n }", "public static void main(String[] args) {\n\t\t\n\n\t\tEmployee sureshEmployee=new Employee();\n\t\tEmployee rameshEmployee=new Employee();\n\t\tEmployee dhineshEmployee=new Employee();\n\t\t\n\t\tList <Employee>employeeList=new ArrayList<Employee>();\n\t\tdhineshEmployee=rameshEmployee;\n\t\t\n\t\t\n\t\t\n\t\trameshEmployee.setDepartment(\"developer\");\n\t\trameshEmployee.setName(\"ramesh kumar\");\n\t\trameshEmployee.setEmployeeId(1001);\n\t\t\n\t\tsureshEmployee.setEmployeeId(1002);\n\t\tsureshEmployee.setName(\"suresh kumar\");\n\t\t\n\t\temployeeList.add(sureshEmployee);\n\t\temployeeList.add(dhineshEmployee);\n\t\temployeeList.add(rameshEmployee);\n\t\tSystem.out.println(employeeList);\n\t\t\n\t\tfor(int i=0;i<employeeList.size();i++){\n\t\t\tSystem.out.println(employeeList.get(i).getEmployeeId());\n\t\t}\n\t\n\t\tIterator iterator=employeeList.iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\t\n\t\tfor(Employee e:employeeList){\n\t\t\tSystem.out.println(e.getEmployeeId());\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// structure /skelton/ frame + work\n\t\t// \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//System.out.println(Integer.toHexString(rameshEmployee.hashCode()));\n\t\t//System.out.println(rameshEmployee == sureshEmployee);\n\t\t//System.out.println(rameshEmployee == dhineshEmployee);\n\t\tSystem.out.println(rameshEmployee.equals(sureshEmployee));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// content \n\t\t\n\t//\tSystem.out.println(rameshEmployee.toString().hashCode());\n\t\t//System.out.println(sureshEmployee.hashCode());\n\t\t//System.out.println(dhineshEmployee.hashCode());\n\t\t\n\t\t\n\n\t}", "Employee(String id, Kitchen kitchen) {\r\n this.id = id;\r\n this.kitchen = kitchen;\r\n this.attendance = \"Present\";\r\n this.password = \"password\";\r\n }", "public int getEmployeeId() {\n return employeeId_;\n }", "@Override\r\n\tpublic void addEmployee(Employee employee) {\n\t\temployees.add(employee);\r\n\t\t\r\n\t}", "@Override\n\tpublic int saveEmployee() {\n\t\tEmployeeDao dao= new EmployeeDao();\n\t\tint result=dao.saveEmployee(new Employee(101349, \"Deevanshu\", 50000));\n\t\treturn result;\n\t}", "private Employee searchEmployee(String empName)\n {\n empName = empName.toLowerCase();\n Employee found = null;\n // Find the employee in the array list\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext() && found == null)\n {\n myEmployee = emp.next(); //get employee from array list\n String fullName = myEmployee.getName().toLowerCase();\n String[] FirstLast = fullName.split(\" \");\n \n if (\n matchString(fullName,empName) ||\n matchString(FirstLast[0],empName) ||\n matchString(FirstLast[1],empName)\n )\n found = myEmployee;\n } \n return found;\n }", "List<Employee> findAllByName(String name);", "@Test\r\n\tpublic void testGetEmployee() {\n\t\tTransaction test=new Transaction(null, null, 0, null, null, null, null, null);\r\n\t\t\r\n\t\tassertEquals(test.getID(),null); \r\n\t\t\r\n\t}", "public List<EmployeeEntity> getEmployeeDataByName(String name, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\t\tList<EmployeeEntity> result = null;\n\t\ttry {\n\t\t\tSession hibernateSeesion = context.getHibernateSession();\n\t\t\tString retrieveEmployeebyNameQuery = \"FROM EmployeeEntity e WHERE e.fname LIKE :fname or e.lname LIKE :lname\";\n\t\t\tQuery query = hibernateSeesion.createQuery(retrieveEmployeebyNameQuery);\n\t\t\tquery.setParameter(\"fname\", name);\n\t\t\tquery.setParameter(\"lname\", name);\n\t\t\tresult = (List<EmployeeEntity>) query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn result;\n\t}", "public static void main(String[] args) \n {Employee nv1 = new Employee();\n// Employee nv2 = new Employee(2, \"Vo Le Khanh Duy\", 3600, \"123@gmail.com\", \"0123456789\");\n// \n// System.out.println(\"\\nNhap thong tin nhan vien 1:\");\n// nv1.nhapEmployee();\n// \n// nv1.xuatEmployee(nv1);\n// System.out.println(\" \\\"Tong Luong\\\": \" + nv1.Sum_of_sal(50)); \n// \n// nv1.xuatEmployee(nv2);\n// System.out.println(\" \\\"Tong Luong\\\": \" + nv2.Sum_of_sal(50));\n// \n EmployeeService employ = new EmployeeService();\n employ.nhapMangNhanVien();\n Employee kq = new Employee();\n kq = employ.timKiemNhanVien(employ.getArrEmployee(), 2);\n System.out.println(\"\\nThông tin nhân viên có id = 2\");\n kq.xuatEmployee(kq);\n System.out.println(\"\\nSắp xếp theo id tăng dần\");\n employ.sapXepMang(employ.getArrEmployee());\n employ.xuatMangNhanVien();\n }", "public Employee(String employeeId, String name) {\n this.employeeId = employeeId;\n this.name = name; // TODO fill in code here\n }", "@Transactional(readOnly = true)\r\n\tpublic Employee getEmployee(String dniEmployee) {\r\n\t\tdniEmployee = dniEmployee.trim();\r\n\t\treturn (Employee) em.createQuery(\"select e from Employee e where e.idemployee='\"+dniEmployee+\"'\").getResultList().get(0);\r\n\t}", "private Employe getEmployeFromUser(User user)\n {\n Employe employe = new Employe();\n employe.nom = \"Nom Dummy\";\n employe.prenom = \"Surnom Dummy\";\n employe.matricul = \"userEmploy id\";\n return employe;\n }", "public jkt.hms.masters.business.MasEmployee getEmployee () {\n\t\treturn employee;\n\t}", "public long getEmployeeId() {\n return employeeId;\n }" ]
[ "0.67688406", "0.6733524", "0.66897696", "0.66897696", "0.6439111", "0.6437928", "0.64154", "0.6379038", "0.6325099", "0.6298555", "0.6290173", "0.62572384", "0.6221329", "0.6191616", "0.6185342", "0.6163035", "0.61418843", "0.6131011", "0.6129157", "0.6127848", "0.6124684", "0.61211836", "0.61211836", "0.61160165", "0.611164", "0.61051273", "0.60987306", "0.6094831", "0.6089109", "0.60797197", "0.6063765", "0.606374", "0.605886", "0.60497934", "0.60408485", "0.60402715", "0.60307884", "0.6026731", "0.6018174", "0.60072285", "0.6002234", "0.6002234", "0.59952897", "0.5983221", "0.5980602", "0.59665287", "0.59463453", "0.59294903", "0.592397", "0.59216523", "0.59135884", "0.59051764", "0.5899198", "0.58948886", "0.58919597", "0.58911586", "0.58911586", "0.5882628", "0.5879884", "0.5879537", "0.58780795", "0.5841603", "0.58414984", "0.5838677", "0.58376634", "0.5835098", "0.5834837", "0.5832574", "0.582828", "0.5818205", "0.5812681", "0.5803735", "0.5796027", "0.57949984", "0.579365", "0.579365", "0.5782706", "0.5782469", "0.57796896", "0.5768889", "0.5768889", "0.5762563", "0.57582194", "0.5756314", "0.5752609", "0.575228", "0.57520616", "0.57511103", "0.5749172", "0.5746002", "0.5745378", "0.57452583", "0.57447135", "0.5740917", "0.5740714", "0.57373065", "0.57270455", "0.5723742", "0.5720894", "0.5716644", "0.5712285" ]
0.0
-1
Create a new RandomCutForest with optional arguments set to default values.
public static RandomCutForest defaultForest(int dimensions, long randomSeed) { return builder().dimensions(dimensions).randomSeed(randomSeed).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static RandomCutForest defaultForest(int dimensions) {\n return builder().dimensions(dimensions).build();\n }", "public void setForest(UUID forest) {\n this.forest = forest;\n }", "public static Classifier classify(List<List<Double>> features,List<Double> labels) throws Exception\n\t {\n\t\t\n\t\t String RF_CSV = \"res/diabetic_data_rf.csv\";\n\t\t String RF_Arff = \"res/rf_output.arff\";\n\t\t Helper.createCSV(RF_CSV,features,labels);\n\t\t Instances data_rf = Helper.createARFF(RF_CSV, RF_Arff);\n\t\t RandomForest rf = new RandomForest();\n\t\t System.out.println(\"Random Forest...\");\n\t\t rf.setNumTrees(100);\n\t\t rf.setMaxDepth(8);\n\t\t rf.buildClassifier(data_rf);\n\t\t \n\t\t Evaluation eval = new Evaluation(data_rf);\n\t\t Random rand = new Random(1); // using seed = 1\n\t\t int folds = 4;\n\t\t eval.crossValidateModel(rf, data_rf, folds, rand);\n\t\t System.out.println(eval.toSummaryString());\n\t\t \n\t\t return rf;\n\t }", "public TimeSeriesForestAlgorithm(final int numTrees, final int maxDepth, final int seed,\n\t\t\tfinal boolean useFeatureCaching) {\n\t\tthis.numTrees = numTrees;\n\t\tthis.maxDepth = maxDepth;\n\t\tthis.seed = seed;\n\t\tthis.useFeatureCaching = useFeatureCaching;\n\t}", "public void setForest(int value)\n {\n if (value == 1)\n {\n \n this.forests = (grid/3000)+1;\n }\n \n if (value == 2)\n {\n this.forests = (grid/1200)+2;\n }\n \n if (value == 3)\n {\n this.forests = (grid/800)+2;\n }\n }", "public TimeSeriesForestAlgorithm(final int numTrees, final int maxDepth, final int seed) {\n\t\tthis.numTrees = numTrees;\n\t\tthis.maxDepth = maxDepth;\n\t\tthis.seed = seed;\n\t}", "@Test\n public void testCreateCategorizationLearner()\n {\n int ensembleSize = 3 + random.nextInt(1000);\n double baggingFraction = random.nextDouble();\n double dimensionsFraction = random.nextDouble();\n int maxTreeDepth = 3 + random.nextInt(10);\n int minLeafSize = 4 + random.nextInt(10);\n Random random = new Random();\n BaggingCategorizerLearner<Vector, String> result\n = RandomForestFactory.createCategorizationLearner(ensembleSize,\n baggingFraction, dimensionsFraction, maxTreeDepth, minLeafSize,\n random);\n assertEquals(ensembleSize, result.getMaxIterations());\n assertEquals(baggingFraction, result.getPercentToSample(), 0.0);\n assertSame(random, result.getRandom());\n @SuppressWarnings(\"rawtypes\")\n CategorizationTreeLearner treeLearner = \n (CategorizationTreeLearner) result.getLearner();\n assertEquals(maxTreeDepth, treeLearner.getMaxDepth());\n assertTrue(treeLearner.getLeafCountThreshold() >= 2 * minLeafSize);\n RandomSubVectorThresholdLearner<?> randomSubspace = (RandomSubVectorThresholdLearner<?>)\n treeLearner.getDeciderLearner();\n assertEquals(dimensionsFraction, randomSubspace.getPercentToSample(), 0.0);\n assertSame(random, randomSubspace.getRandom());\n VectorThresholdInformationGainLearner<?> splitLearner = (VectorThresholdInformationGainLearner<?>)\n randomSubspace.getSubLearner();\n assertEquals(minLeafSize, splitLearner.getMinSplitSize());\n }", "private void buildTree(int random_attr){\n String[] schema = new String[]{\"min, max, avg, label\"};\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<int[]> train = driver.queryData(\"data\", schema);\n RandomForest forest = new RandomForest();\n forest.numAttr = RandomForestTrainingMapReduce.N;\n forest.numAttrRandom = random_attr;\n RealDecisionTree tree = new RealDecisionTree(train, forest, RandomForestTrainingMapReduce.N);\n\n // serialize this tree and write to Cassandra.\n byte[] t = serialize(tree);\n try {\n driver.insertData(t, \"Forest\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ForestBuilder(Configuration conf, Path outputPath) {\n this.conf = conf;\n this.outputPath = outputPath;\n this.modelPath = new Path(outputPath, \"model\");\n this.datasetPath = new Path(outputPath, \"dataset\");\n this.datasetPath = new Path(datasetPath+\"/\"+datasetName);\n }", "public static ForestModel createForest(Tree tree, String name) {\r\n try {\r\n // Create an ur-root node to be the parent for all the trees in the\r\n\t\t\t// forest\r\n final IRNode n = new PlainIRNode();\r\n tree.initNode(n, -1);\r\n\r\n// final SlotFactory sf = JJNode.treeSlotFactory;\r\n final SlotFactory sf = SimpleSlotFactory.prototype; \r\n final IRSequence<IRNode> roots = sf.newSequence(1);\r\n roots.setElementAt(n, 0);\r\n\r\n return (new DelegatingPureForestFactory(tree, roots, true)).create(\r\n name,\r\n sf);\r\n } catch (SlotAlreadyRegisteredException e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "@BeforeAll\n public static void oneTimeSetUp() {\n numberOfTrees = 100;\n sampleSize = 256;\n dimensions = 3;\n randomSeed = 123;\n\n parallelExecutionForest = RandomCutForest.builder()\n .numberOfTrees(numberOfTrees)\n .sampleSize(sampleSize)\n .dimensions(dimensions)\n .randomSeed(randomSeed)\n .centerOfMassEnabled(true)\n .storeSequenceIndexesEnabled(true)\n .build();\n\n singleThreadedForest = RandomCutForest.builder()\n .numberOfTrees(numberOfTrees)\n .sampleSize(sampleSize)\n .dimensions(dimensions)\n .randomSeed(randomSeed)\n .centerOfMassEnabled(true)\n .storeSequenceIndexesEnabled(true)\n .parallelExecutionEnabled(false)\n .build();\n\n dataSize = 10_000;\n\n baseMu = 0.0;\n baseSigma = 1.0;\n anomalyMu = 5.0;\n anomalySigma = 1.5;\n transitionToAnomalyProbability = 0.01;\n transitionToBaseProbability = 0.4;\n\n NormalMixtureTestData generator = new NormalMixtureTestData(baseMu, baseSigma, anomalyMu, anomalySigma,\n transitionToAnomalyProbability, transitionToBaseProbability);\n double[][] data = generator.generateTestData(dataSize, dimensions);\n\n for (int i = 0; i < dataSize; i++) {\n parallelExecutionForest.update(data[i]);\n singleThreadedForest.update(data[i]);\n }\n }", "public void setup(){\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<byte[]> arr = driver.queryData(\"Forest\", \"tree\");\n\n ArrayList<RealDecisionTree> trees = new ArrayList<RealDecisionTree>();\n for (byte[] b : arr){\n trees.add(deserialize(b));\n }\n RandomForest forest = new RandomForest(trees, \"test\", new String[]{\"min, mav, avg, label\"});\n forest.TestForest(trees, forest.testdata);\n }", "public CutAndChooseSelection build(int numCircuits);", "public static void main(String[] args) {\n\t\tGraph<String, DefaultEdge> tree = new SimpleGraph<>(SupplierUtil.createStringSupplier(), \n\t\t SupplierUtil.createDefaultEdgeSupplier(), false);\n\t\tBarabasiAlbertForestGenerator <String, DefaultEdge> treeGen = new BarabasiAlbertForestGenerator <> (1,20);\n\t\ttreeGen.generateGraph(tree,null);\n\t\tDrawUtil.createAndShowGui(tree, \"Tree\", false, false, true, true, DrawUtil.layout_type.HIERARCHICAL);\n\t\t\n\t\t// Generating 1 forest with 5 tree\n\t\tGraph<String, DefaultEdge> forest = new SimpleGraph<>(SupplierUtil.createStringSupplier(), \n\t\t SupplierUtil.createDefaultEdgeSupplier(), false);\n\t\tBarabasiAlbertForestGenerator <String, DefaultEdge> forestGen = new BarabasiAlbertForestGenerator <> (5,30);\n\t\tforestGen.generateGraph(forest,null);\n\t\tDrawUtil.createAndShowGui(forest, \"Forest\", false, false, true, true, DrawUtil.layout_type.HIERARCHICAL);\n\n\t}", "public Cucumber(float weight) {\n\t\tthis(DEFAULT_CALORIES, weight);\n\t}", "public DriveTrain(int lf, int lr, int rf, int rr){\n this.left = new side(lf, lr);\n this.right = new side(rf, rr);\n }", "@Override\n\tpublic TimeSeriesForestClassifier call()\n\t\t\tthrows InterruptedException, AlgorithmExecutionCanceledException, TimeoutException, AlgorithmException {\n\t\t\n\t\tTimeSeriesDataset dataset = this.getInput();\n\t\t\n\t\t// Perform Training\n\t\tfinal TimeSeriesTree[] trees = new TimeSeriesTree[this.numTrees];\n\t\tExecutorService execService = Executors.newFixedThreadPool(this.cpus);\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tFuture<TimeSeriesTree>[] futures = new Future[this.numTrees];\n\t\tfor (int i = 0; i < this.numTrees; i++) {\n\t\t\tTimeSeriesTree tst = new TimeSeriesTree(this.maxDepth, this.seed + i, this.useFeatureCaching);\n\t\t\tfutures[i] = execService.submit(new Callable<TimeSeriesTree>() {\n\t\t\t\t@Override\n\t\t\t\tpublic TimeSeriesTree call() throws Exception {\n\n\t\t\t\t\ttst.train(dataset);\n\t\t\t\t\ttst.setTrained(true);\n\t\t\t\t\treturn tst;\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Wait for completion\n\t\texecService.shutdown();\n\t\texecService.awaitTermination(this.timeout.seconds(), TimeUnit.SECONDS);\n\t\tfor (int i = 0; i < this.numTrees; i++) {\n\t\t\ttry {\n\t\t\t\tTimeSeriesTree tst = futures[i].get();\n\t\t\t\ttrees[i] = tst;\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\tthrow new AlgorithmException(\n\t\t\t\t\t\t\"Could not train time series tree due to training exception: \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\tthis.model.setTrees(trees);\n\t\tthis.model.setTrained(true);\n\n\t\treturn this.model;\n\t}", "public static SyntaxForestModel createSyntaxForest(\r\n SyntaxTreeInterface tree,\r\n String name) {\r\n try {\r\n // Create an ur-root node to be the parent for all the trees in the\r\n\t\t\t// forest\r\n IRNode n = new MarkedIRNode(\"Root for forest: \"+name);\r\n tree.initNode(n, Ellipsis.prototype, -1);\r\n // tree.initNode(n, -1);\r\n\r\n// final SlotFactory sf = JJNode.treeSlotFactory;\r\n final SlotFactory sf = SimpleSlotFactory.prototype;\r\n final IRSequence<IRNode> roots = sf.newSequence(~1);\r\n roots.setElementAt(n, 0);\r\n System.err.println(\"Finished init of pure forest at \"+Version.getVersion());\r\n \r\n return (new DelegatingPureSyntaxForestFactory(tree, roots, true)).create(\r\n name,\r\n sf);\r\n } catch (SlotAlreadyRegisteredException e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "private void randForest(int x, int y) {\n\t\tint rand = random.nextInt(10);\n\t\tif (rand == 1) {\n\t\t\tentities.add(new Tree(x << 4, y << 4));\n\t\t\tgetTile(x, y).setSolid(true);\n\t\t}\n\n\t}", "public Troop() //make a overloaded constructor \n\t{\n\t\ttroopType = \"light\"; \n\t\tname = \"Default\";\n\t\thp = 50;\n\t\tatt = 20;\n\t}", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testSideEffectsB(RandomCutForest forest){\n DiVector initial=forest.getAnomalyAttribution(new double[] {0.0, 0.0 ,0.0});\n NormalMixtureTestData generator2=new NormalMixtureTestData(baseMu, baseSigma, anomalyMu, anomalySigma,\n transitionToAnomalyProbability, transitionToBaseProbability);\n double[][] newData = generator2.generateTestData(dataSize, dimensions);\n for (int i = 0; i < dataSize; i++) {\n forest.getAnomalyAttribution(newData[i]);\n }\n double newScore=forest.getAnomalyScore(new double[] {0.0,0.0,0.0});\n DiVector newVector = forest.getAnomalyAttribution(new double[] {0.0, 0.0 ,0.0});\n assertEquals(initial.getHighLowSum(),newVector.getHighLowSum(),10E-10);\n assertEquals(initial.getHighLowSum(),newScore,1E-10);\n assertArrayEquals(initial.high,newVector.high,1E-10);\n assertArrayEquals(initial.low,newVector.low,1E-10);\n }", "public Heuristic() {\n this(HeuristicUtils.defaultValues);\n }", "@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"&nu;-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"&gamma; in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter &nu;\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight &times; C)\", Parameter.TYPE.STRING, \"-W\");\n\t}", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test\n public void testShadowBuffer(){\n numberOfTrees = 100;\n sampleSize = 256;\n dimensions = 3;\n randomSeed = 123;\n\n RandomCutForest newForest = RandomCutForest.builder()\n .numberOfTrees(numberOfTrees)\n .sampleSize(sampleSize)\n .dimensions(dimensions)\n .randomSeed(randomSeed)\n .centerOfMassEnabled(true)\n .storeSequenceIndexesEnabled(true)\n .build();\n\n dataSize = 10_000;\n\n baseMu = 0.0;\n baseSigma = 1.0;\n anomalyMu = 5.0;\n anomalySigma = 1.5;\n transitionToAnomalyProbability = 0.01;\n transitionToBaseProbability = 0.4;\n\n NormalMixtureTestData generator = new NormalMixtureTestData(baseMu, baseSigma, anomalyMu, anomalySigma,\n transitionToAnomalyProbability, transitionToBaseProbability);\n double[][] data = generator.generateTestData(dataSize, dimensions);\n\n for (int i = 0; i < dataSize; i++) {\n newForest.update(data[i]);\n }\n\n double [] point = new double [] {-8.0,-8.0,0.0};\n DiVector result=newForest.getAnomalyAttribution(point);\n double score=newForest.getAnomalyScore(point);\n assertEquals(score,result.getHighLowSum(),1E-10);\n assertTrue(score>2);\n assertTrue(result.getHighLowSum(2)<0.2);\n // the third dimension has little influence in classification\n\n // this is going to add {8,8,0} into the forest\n // but not enough to cause large scale changes\n // note the probability of a tree seeing a change is\n // 256/10_000\n for (int i = 0; i < 5; i++) {\n newForest.update(point);\n }\n\n DiVector newResult=newForest.getAnomalyAttribution(point);\n double newScore=newForest.getAnomalyScore(point);\n\n assertEquals(newScore,newResult.getHighLowSum(),1E-10);\n assertTrue(newScore<score);\n for(int j=0;j<3;j++){\n // relationship holds at larger values\n if (result.high[j]>0.2) {\n assertEquals(score * newResult.high[j], newScore * result.high[j], 0.1*score);\n } else {\n assertTrue(newResult.high[j]<0.2);\n }\n\n if (result.low[j]>0.2) {\n assertEquals(score * newResult.low[j], newScore * result.low[j], 0.1*score);\n } else {\n assertTrue(newResult.low[j]<0.2);\n }\n }\n\n // this will make the point an inlier\n for (int i = 0; i < 5000; i++) {\n newForest.update(point);\n }\n\n DiVector finalResult=newForest.getAnomalyAttribution(point);\n double finalScore=newForest.getAnomalyScore(point);\n assertTrue(finalScore<1);\n assertEquals(finalScore,finalResult.getHighLowSum(),1E-10);\n\n for(int j=0;j<3;j++){\n // relationship holds at larger values\n if (finalResult.high[j]>0.2) {\n assertEquals(score * finalResult.high[j], finalScore * result.high[j], 0.1*score);\n } else {\n assertTrue(newResult.high[j]<0.2);\n }\n\n if (finalResult.low[j]>0.2) {\n assertEquals(score * finalResult.low[j], finalScore * result.low[j], 0.1*score);\n } else {\n assertTrue(finalResult.low[j]<0.2);\n }\n }\n\n }", "public RealConjunctiveFeature() { }", "public interface CutAndChooseSelectionBuilder {\n\t\n\t/**\n\t * Selects the circuits to be checked or evaluated.\n\t * @param numCircuits The total circuits number.\n\t * @return The selection.\n\t */\n\tpublic CutAndChooseSelection build(int numCircuits);\n}", "public static void main(String[] args) {\n int n = 9;\n Graph graph = new Graph(n);\n graph.addEdge(0, 1);\n graph.addEdge(0, 2);\n graph.addEdge(1, 2);\n graph.addEdge(2, 3);\n graph.addEdge(2, 5);\n graph.addEdge(3, 4);\n graph.addEdge(5, 6);\n graph.addEdge(5, 8);\n graph.addEdge(6, 7);\n graph.addEdge(7, 8);\n \n CutEdge cutEdge = new CutEdge();\n cutEdge.doCutEdgeAlgorithm(graph, n);\n }", "@Override\n\tpublic boolean isForest()\n\t{\n\t\treturn true;\n\t}", "private Pool setUpRutherford() {\n final int rutherfordVolume = 5000;\n final int rutherfordTemperature = 39;\n final double rutherfordPH = 7.7;\n final double rutherfordNutrientCoefficient = 0.85;\n final int rutherfordNumberOfGuppies = 100;\n final int rutherfordMinAge = 10;\n final int rutherfordMaxAge = 15;\n final double rutherfordMinHealthCoefficient = 0.8;\n final double rutherfordMaxHealthCoefficient = 1.0;\n\n GuppySet rutherfordGuppies = new GuppySet(rutherfordNumberOfGuppies,\n rutherfordMinAge, rutherfordMaxAge,\n rutherfordMinHealthCoefficient, rutherfordMaxHealthCoefficient);\n\n Pool rutherford = setUpPool(\"Rutherford\", rutherfordVolume,\n rutherfordTemperature, rutherfordPH,\n rutherfordNutrientCoefficient, rutherfordGuppies);\n\n return rutherford;\n }", "protected BaseFeat()\n {\n super(TYPE);\n }", "@Override\n\t\t\tpublic IFuzzySet cut(double minValue) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic IFuzzySet cut(double minValue) {\n\t\t\t\treturn null;\n\t\t\t}", "private void setDefaultNode() {\n\t\tint[] classes = new int[classifierNames.size()];\n\t\tfor (Instance i : instances) {\n\t\t\tclasses[i.getCategory()]++;\n\t\t}\n\t\tint mostCommonClassIdx = 0;\n\t\tfor (int i = 0; i < classes.length; i++) {\n\t\t\tif (classes[i] > classes[mostCommonClassIdx]) {\n\t\t\t\tmostCommonClassIdx = i;\n\t\t\t} else if (classes[i] == classes[mostCommonClassIdx]) {\n\t\t\t\tmostCommonClassIdx = (Math.random() > 0.5?mostCommonClassIdx:i); // I hope this is an OK implementation of the randomness\n\t\t\t}\n\t\t}\n\t\tbaselineNode = new LeafNode((double)classes[mostCommonClassIdx]/(double)instances.size(), classifierNames.get(mostCommonClassIdx));\n\t}", "public UUID getForest() {\n return forest;\n }", "CrawlController build(CrawlParameters parameters) throws Exception;", "public ParametersBuilder() {\n this(Parameters.DEFAULT);\n }", "public static void main(String[] args) {\n\t\tif (args.length != 2) {\n\t\t\tSystem.err.println(\"This program requires two parameters, not \"+args.length+\". The first is a training file and the second is a data file.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tDecisionLearningTree dt = new DecisionLearningTree(args[0],args[1]);\n\t\tList<String> rs = dt.useBaselineClassifierOnData(); //dt.useTreeOnData();\n\t\tfor (String r : rs) {\n\t\t\tSystem.out.println(r);\n\t\t}\n\t\tSystem.out.println(\"==========================================================\");\n\t\tSystem.out.println(\"Reporting tree:\");\n\t\tdt.report();\t\t\n\t}", "public static QuadricRobustEstimator create() {\n return create(DEFAULT_ROBUST_METHOD);\n }", "private Classifier createDummyClassifier(String action, String con, Classifier[] parent_classifier ){\n String cName = \"DUMMY\";\n Classifier father = parent_classifier[0];\n Classifier mother = parent_classifier[1];\n double newPred = (father.getPrediction() + mother.getPrediction()) / 2;\n double newPreErr = (father.getPredictionError() + mother.getPredictionError()) / 2;\n double newFit = (father.getFitness() + mother.getFitness()) / 2;\n Classifier classifier_Child = new Classifier(\n cName,\n newPred,\n newPreErr,\n newFit,\n con,\n action);\n return classifier_Child;\n }", "public myC45PruneableClassifierTree(ModelSelection toSelectLocModel,\n boolean pruneTree,float cf,\n boolean raiseTree,\n boolean cleanup)\n throws Exception {\n\n super(toSelectLocModel);\n\n m_pruneTheTree = pruneTree;\n m_CF = cf;\n m_subtreeRaising = raiseTree;\n m_cleanup = cleanup;\n }", "public abstract Cut<C> a(BoundType boundType, DiscreteDomain<C> discreteDomain);", "public abstract Cut<C> b(BoundType boundType, DiscreteDomain<C> discreteDomain);", "public Stack() {\r\n this(20);\r\n }", "public RandomSubVectorThresholdLearnerTest(\n String testName)\n {\n super(testName);\n\n this.random = new Random();\n }", "public void testConstructors()\n {\n VectorThresholdInformationGainLearner<String> subLearner = null;\n double percentToSample = RandomSubVectorThresholdLearner.DEFAULT_PERCENT_TO_SAMPLE;\n VectorFactory<?> vectorFactory = VectorFactory.getDefault();\n int[] dimensionsToConsider = null;\n RandomSubVectorThresholdLearner<String> instance = new RandomSubVectorThresholdLearner<String>();\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertNotNull(instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n\n subLearner = new VectorThresholdInformationGainLearner<String>();\n percentToSample = percentToSample / 2.0;\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, random);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n\n vectorFactory = VectorFactory.getSparseDefault();\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, random, vectorFactory);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n \n dimensionsToConsider = new int[] {5, 12};\n vectorFactory = VectorFactory.getSparseDefault();\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, dimensionsToConsider, random, vectorFactory);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n }", "public Knights()\r\n\t{\r\n\t\tsuper(Settings.COST_PRODUCTION_KNIGHT, Settings.TIME_COST_KNIGHT, \r\n\t\t\t\tSettings.SPEED_KNIGHT, Settings.DAMMAGES_KNIGHT, Settings.DAMMAGES_KNIGHT);\r\n\t}", "public Taste() {\n }", "protected ForrestRunner(String workingDir) {\n super(\"Forrest Runner\");\n\n this.workingDir = workingDir;\n }", "void setFeatures(Features f) throws Exception;", "@Override\n public void buildClassifier(Instances trainingData) throws Exception {\n // can classifier handle the data?\n getCapabilities().testWithFail(trainingData);\n\n tree = new MultiInstanceDecisionTree(trainingData);\n }", "public TopicsTreeModel()\r\n\t{\r\n\t\tthis(new LinkedHashMap<ITreeNode<Topics>, Boolean>());\r\n\t}", "public BinTree induceTree(int[] partition, int[] features) {\r\n\t\t// if the partition is empty, we can not return a tree\r\n\t\tif (partition.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// check if all entries in partition belong to the same class. If so,\r\n\t\t// return node, labeled with class value\r\n\t\t// you may want to check if pruning is applicable here (and then just\r\n\t\t// return the majority class).\r\n\t\tint[] classCnt = new int[classes.length];\r\n\t\tString sameValue = null;\r\n\t\tboolean sameClass = true;\r\n\t\tfor (int p = 0; p < partition.length; p++) {\r\n\t\t\tString targetValue = output[partition[p]];\r\n\t\t\tfor (int n = 0; n < classes.length; n++) {\r\n\t\t\t\tif (targetValue.equals(classes[n])) {\r\n\t\t\t\t\tclassCnt[n]++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (p == 0)\r\n\t\t\t\tsameValue = targetValue;\r\n\t\t\telse {\r\n\t\t\t\tif (!sameValue.equalsIgnoreCase(targetValue)) {\r\n\t\t\t\t\tsameClass = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (sameClass) {\r\n\t\t\treturn new BinTree(sameValue);\r\n\t\t} else {\r\n\t\t\tint max = 0;\r\n\t\t\tfor (int n = 1; n < classes.length; n++)\r\n\t\t\t\tif (classCnt[max] < classCnt[n])\r\n\t\t\t\t\tmax = n;\r\n\t\t\tif ((double) classCnt[max] / (double) partition.length > 0.50\r\n\t\t\t\t\t|| partition.length < 5) { // if more than 50% of samples\r\n\t\t\t\t\t\t\t\t\t\t\t\t// in partition are of the same\r\n\t\t\t\t\t\t\t\t\t\t\t\t// class OR fewer than 5 samples\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t\treturn new BinTree(classes[max]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if no features are available, we can not return a tree\r\n\t\tif (features.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// class values are not equal so we select a particular feature to split\r\n\t\t// the partition\r\n\t\tint selectedFeature = selectFeature(partition, features);\r\n\r\n\t\t// create new partition of samples\r\n\t\t// use only corresponding subset of full partition\r\n\t\tint[] partTrue = matches(partition, selectedFeature, true);\r\n\t\tint[] partFalse = matches(partition, selectedFeature, false);\r\n\t\t// remove the feature from the new set (to be sent to subtrees)\r\n\t\tint[] nextFeatures = new int[features.length - 1];\r\n\t\tint cnt = 0;\r\n\t\tfor (int f = 0; f < features.length; f++) {\r\n\t\t\tif (features[f] != selectedFeature)\r\n\t\t\t\tnextFeatures[cnt++] = features[f];\r\n\t\t}\r\n\t\t// construct the subtrees using the new partitions and reduced set of\r\n\t\t// features\r\n\t\tBinTree branchTrue = induceTree(partTrue, nextFeatures);\r\n\t\tBinTree branchFalse = induceTree(partFalse, nextFeatures);\r\n\r\n\t\t// if either of the subtrees failed, we have confronted a problem, use\r\n\t\t// the most likely class value of the current partition\r\n\t\tBinTree defaultTree = null;\r\n\t\tif (branchTrue == null || branchFalse == null) {\r\n\t\t\t// indicate a majority vote\r\n\t\t\tint[] freq = new int[classes.length];\r\n\t\t\tint most = 0;\r\n\t\t\tfor (int c = 0; c < classes.length; c++) {\r\n\t\t\t\tint[] pos = matches(partition, classes[c]);\r\n\t\t\t\tfreq[c] = pos.length;\r\n\t\t\t\tif (freq[c] >= freq[most])\r\n\t\t\t\t\tmost = c;\r\n\t\t\t}\r\n\t\t\t// the majority class value can replace any null trees...\r\n\t\t\tdefaultTree = new BinTree(classes[most]);\r\n\t\t\tif (branchTrue == null && branchFalse == null)\r\n\t\t\t\treturn defaultTree;\r\n\t\t\telse\r\n\t\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\t\treturn new BinTree(labelFeature(selectedFeature),\r\n\t\t\t\t\t\t(branchTrue == null ? defaultTree : branchTrue),\r\n\t\t\t\t\t\t(branchFalse == null ? defaultTree : branchFalse));\r\n\t\t} else { // if both subtrees were successfully created we can either\r\n\t\t\tif (branchTrue.classValue != null && branchFalse.classValue != null) {\r\n\t\t\t\tif (branchTrue.classValue.equals(branchFalse.classValue)) {\r\n\t\t\t\t\t// return the the current node with the classlabel common to\r\n\t\t\t\t\t// both subtrees, or\r\n\t\t\t\t\treturn new BinTree(branchTrue.classValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\treturn new BinTree(labelFeature(selectedFeature), branchTrue,\r\n\t\t\t\t\tbranchFalse);\r\n\t\t}\r\n\t}", "public ScribbleFactoryImpl()\n {\n\t\tsuper();\n\t}", "private GridCoverageRequest setStandardReaderDefaults(GridCoverageRequest subsettingRequest) throws IOException {\n DateRange temporalSubset = subsettingRequest.getTemporalSubset();\n NumberRange<?> elevationSubset = subsettingRequest.getElevationSubset();\n Map<String, List<Object>> dimensionSubset = subsettingRequest.getDimensionsSubset();\n\n // Reader is not a StructuredGridCoverage2DReader instance. Set default ones with policy \"time = max, elevation = min\".\n\n // Setting default time\n if (temporalSubset == null) {\n // use \"max\" as the default\n Date maxTime = accessor.getMaxTime();\n if (maxTime != null) {\n temporalSubset = new DateRange(maxTime, maxTime);\n }\n }\n\n // Setting default elevation\n if (elevationSubset == null) {\n // use \"min\" as the default\n Number minElevation = accessor.getMinElevation();\n if (minElevation != null) {\n elevationSubset = new NumberRange(minElevation.getClass(), minElevation, minElevation);\n }\n }\n\n // Setting default custom dimensions\n final List<String> customDomains = accessor.getCustomDomains();\n int availableCustomDimensions = 0; \n int specifiedCustomDimensions = 0;\n if (customDomains != null && !customDomains.isEmpty()) {\n availableCustomDimensions = customDomains.size();\n specifiedCustomDimensions = dimensionSubset != null ? dimensionSubset.size() : 0; \n if (dimensionSubset == null) {\n dimensionSubset = new HashMap<String, List<Object>>();\n }\n }\n if (availableCustomDimensions != specifiedCustomDimensions) {\n setDefaultCustomDimensions(customDomains, dimensionSubset);\n }\n\n subsettingRequest.setDimensionsSubset(dimensionSubset);\n subsettingRequest.setTemporalSubset(temporalSubset);\n subsettingRequest.setElevationSubset(elevationSubset);\n return subsettingRequest;\n }", "public Features() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public PointCutASTNode(PointCutASTNode self) {\n\t\tsuper(self);\n\t}", "public Cut<C> c(DiscreteDomain<C> discreteDomain) {\n return this;\n }", "public CvBoostParams()\r\n {\r\n\r\n super( CvBoostParams_0() );\r\n\r\n return;\r\n }", "public Builder defaultArgs(String args) {\n defaultArgs(toList(args));\n return this;\n }", "public MdnFeatures()\n {\n }", "Classifier getBase_Classifier();", "public CSGEnvironmentBSP(\r\n\t) {\r\n\t\tthis( false );\r\n\t}", "public DecisionLearningTree(String training, String test) {\n\t\ttrainingFile = training;\n\t\ttestFile = test;\n\t\treadTrainingFile();\n\t\troot = readDataFile();\n\t}", "public Fox() {\n super(randomAge(MAX_AGE), randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }", "public static void main(String[] args) {\n\t\tCreateClassificationData test = new CreateClassificationData(\"originalData/Data.txt\");\n\t}", "public Cut<C> c(DiscreteDomain<C> discreteDomain) {\n Comparable a = a(discreteDomain);\n return a != null ? b(a) : Cut.e();\n }", "public Train(){\n}", "public DecisionTrace() {\r\n\r\n\t}", "public TreeNode(){ this(null, null, 0);}", "public FeatureExtraction() {\n\t}", "public Factory() {\n\t\tnb_rounds = 0; \n\t\tnb_to_train = 0; \n\t\ttraining_queue = new LinkedList<Pair<Soldier, Integer>>(); \n\t\tcurrent = null;\n\t}", "public AdvancedTreeFeatureConfig(Species speciesIn, List<TreeDecorator> decoratorsIn, int ageIn, int maxWaterDepthIn, boolean ignoreVinesIn, int heightIn, int heightRandomIn, int extraHeightIn ,int extraBranchLengthIn, int branchYPosRandomIn) {\n super(speciesIn, decoratorsIn, ageIn);\n this.maxWaterDepth = maxWaterDepthIn;\n this.ignoreVines = ignoreVinesIn;\n this.height = heightIn;\n this.heightRandom = heightRandomIn;\n this.extraHeight = extraHeightIn;\n this.extraBranchLength = extraBranchLengthIn;\n this.branchYPosRandom = branchYPosRandomIn;\n }", "public RandomNeighborhoodOperator(int nbRelaxedVars)\n{\n\tthis(nbRelaxedVars, 0);\n}", "static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t AttributeSet testAttributes, \n\t\t\t\t\t SymbolicAttribute goalAttribute) {\n\tDecisionTreeBuilder builder = \n\t new DecisionTreeBuilder(learningSet, testAttributes,\n\t\t\t\t goalAttribute);\n\t\n\treturn builder.build();\n }", "public RandomizedRunner(Class<?> testClass) throws InitializationError {\n if (RandomizedTest.systemPropertyAsBoolean(SYSPROP_STACKFILTERING, true)) {\n this.traces = new TraceFormatting(DEFAULT_STACK_FILTERS);\n } else {\n this.traces = new TraceFormatting();\n }\n \n this.suiteClass = testClass;\n this.allTargetMethods = immutableCopy(sort(allDeclaredMethods(suiteClass)));\n \n // Initialize the runner's master seed/ randomness source.\n final long randomSeed = MurmurHash3.hash(sequencer.getAndIncrement() + System.nanoTime());\n final String globalSeed = System.getProperty(SYSPROP_RANDOM_SEED);\n if (globalSeed != null) {\n final long[] seedChain = SeedUtils.parseSeedChain(globalSeed);\n if (seedChain.length == 0 || seedChain.length > 2) {\n throw new IllegalArgumentException(\"Invalid system property \" \n + SYSPROP_RANDOM_SEED + \" specification: \" + globalSeed);\n }\n \n if (seedChain.length > 1)\n testCaseRandomnessOverride = new Randomness(seedChain[1]);\n runnerRandomness = new Randomness(seedChain[0]);\n } else if (suiteClass.isAnnotationPresent(Seed.class)) {\n runnerRandomness = new Randomness(seedFromAnnot(suiteClass, randomSeed)[0]);\n } else {\n runnerRandomness = new Randomness(randomSeed);\n }\n \n // Iterations property is primary wrt to annotations, so we leave an \"undefined\" value as null.\n if (System.getProperty(SYSPROP_ITERATIONS) != null) {\n this.iterationsOverride = RandomizedTest.systemPropertyAsInt(SYSPROP_ITERATIONS, 0);\n if (iterationsOverride < 1)\n throw new IllegalArgumentException(\n \"System property \" + SYSPROP_ITERATIONS + \" must be >= 1: \" + iterationsOverride);\n } else {\n this.iterationsOverride = null;\n }\n \n this.killAttempts = RandomizedTest.systemPropertyAsInt(SYSPROP_KILLATTEMPTS, DEFAULT_KILLATTEMPTS);\n this.killWait = RandomizedTest.systemPropertyAsInt(SYSPROP_KILLWAIT, DEFAULT_KILLWAIT);\n this.timeoutOverride = RandomizedTest.systemPropertyAsInt(SYSPROP_TIMEOUT, DEFAULT_TIMEOUT);\n \n // TODO: should validation and everything else be done lazily after RunNotifier is available?\n \n // Fail fast if suiteClass is inconsistent or selected \"standard\" JUnit rules are somehow broken.\n validateTarget();\n \n // Collect all test candidates, regardless if they will be executed or not.\n suiteDescription = Description.createSuiteDescription(suiteClass);\n testCandidates = collectTestCandidates(suiteDescription);\n testGroups = collectGroups(testCandidates);\n }", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "public static void main(String[] args) {\n\t\tint[] prices = {1, 5, 8, 9, 10, 17, 17, 20, 24, 30};\n\t\t\n\t\tRod r = new Rod(10);\n\t\tdouble revenue = r.RecursiveCutRod(prices, 10);\n\t\tSystem.out.println(\"Revenue: \" + revenue);\n\t\t\n\t\tRod r2 = new Rod(10);\n\t\tdouble revenue2 = r2.MemoizedCutRod(prices, 4);\n\t\tSystem.out.println(\"Revenue: \" + revenue2);\n\t\t\n\t\tRod r3 = new Rod(10);\n\t\tdouble revenue3 = r3.BottomUpCutRod(prices, 10);\n\t\tSystem.out.println(\"Revenue: \" + revenue3);\n\t}", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "public TaxoNode(\r\n\t\t\tString\t\tname,\r\n\t\t\tString\t\tdisplayName,\r\n\t\t\tString\t\tcontrolName,\r\n\t\t\tint\t\t\t\tid,\r\n\t\t\tint\t\t\t\ttermID,\r\n\t\t\tint\t\t\t\tfacetid,\r\n\t\t\tTaxoNode\tparent,\r\n\t\t\tString\t\tsort,\r\n\t\t\tboolean\t\tisGuide,\r\n\t\t\tboolean\t\tinferredByChildren,\r\n\t\t\tboolean\t\tselectSingle ) {\r\n\t\tthis.name = name;\r\n\t\tthis.displayName = displayName;\r\n\t\tthis.controlName = controlName;\r\n\t\tif( id < 0 )\r\n\t\t\tid = nextID++;\r\n\t\tthis.id= id;\r\n\t\tthis.termID= termID;\r\n\t\tthis.facetid= facetid;\t\t// Only applies to categories\r\n\t\tthis.parent = parent;\r\n\t\tthis.sort = sort;\r\n\t\tthis.isGuideTerm = isGuide;\r\n\t\tthis.inferredByChildren = inferredByChildren;\r\n\t\tthis.selectSingle = selectSingle;\r\n\t\tchildren = null;\r\n\t\tsynset = null; \t\t// No syns unless specified\r\n\t\texclset = null; \t// No exclusions unless specified\r\n\t\timpliedNodes = null; \t// No implied (other than parent) unless specified\r\n\t\tiMaskBase = -1;\r\n\t\tnMasks = 0;\r\n\t\tiBitInMask = -1;\r\n\t}", "public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;", "private HierarchyFactory ()\n {\n }", "private void initCutContext (SessionState state)\n\t{\n\t\tstate.setAttribute (STATE_CUT_IDS, new Vector ());\n\n\t\tstate.setAttribute (STATE_CUT_FLAG, Boolean.FALSE.toString());\n\n\t}", "public DebrisField(boolean forest, int pos)\n {\n if(forest)\n {\n this.value = F_DEFAULT;\n state = new forestState();\n }\n else {\n this.value = DF_DEFAULT;\n state = new debrisFieldState();\n }\n this.pos = pos;\n }", "private void createFeatures() {\n\t\tfeatures = new Feature[NUM_FEATURES];\n\n\t\t// Create dummy feature\n\t\tfeatures[0] = new DummyFeature(width, height, 0, 0 - THRESHOLD);\n\n\t\t// Create the rest of the features\n\t\tfor (int i = 1; i < NUM_FEATURES; i++) {\n\t\t\tfeatures[i] = new Feature(width, height, i);\n\t\t}\n\t}", "public Builder defaultArgs(List<String> args) {\n if (isValid(args)) {\n this.defaultArgs = split(args);\n }\n return this;\n }", "public static FeatureSet of(final Feature... features) {\n return new FeatureSet(ImmutableSet.copyOf(features), ImmutableSet.of());\n }", "public WekaLogitLearner() { super(new Logistic2()); }", "public void createBase(SpanningTree sptree_base) {\n int initLevel = 0;\n SpanningForests sp = new SpanningForests(initLevel);\n sp.trees.add(sptree_base);\n dforests.put(initLevel, sp);\n }", "@JsonCreator\n public DefaultCrif(@JsonProperty(\"trade_id\") String tradeId, //\n @JsonProperty(\"valuation_date\") String valuationDate, //\n @JsonProperty(\"end_date\") String endDate, //\n @JsonProperty(\"notional\") String notional, //\n @JsonProperty(\"trade_currency\") String notionalCurrency, //\n @JsonProperty(\"im_model\") String imModel, //\n @JsonProperty(\"product_class\") String productClass, //\n @JsonProperty(\"risk_type\") String riskType, //\n @JsonProperty(\"qualifier\") String qualifier, //\n @JsonProperty(\"bucket\") String bucket, //\n @JsonProperty(\"label1\") String label1, //\n @JsonProperty(\"label2\") String label2, //\n @JsonProperty(\"amount\") String amount, //\n @JsonProperty(\"amount_currency\") String amountCurrency, //\n @JsonProperty(\"amount_usd\") String amountUSD, //\n @JsonProperty(\"post_regulation\") String postRegulation, //\n @JsonProperty(\"collect_regulation\") String collectRegulation) {\n this.valuationDate = valuationDate;\n this.endDate = endDate;\n this.tradeId = tradeId;\n this.imModel = imModel;\n this.productClass = productClass;\n this.riskType = riskType;\n this.qualifier = qualifier;\n this.bucket = bucket;\n this.label1 = label1;\n this.label2 = label2;\n this.amount = amount;\n this.amountCurrency = amountCurrency;\n this.amountUSD = amountUSD;\n this.postRegulation = postRegulation;\n this.collectRegulation = collectRegulation;\n this.notional = notional;\n this.notionalCurrency = notionalCurrency;\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public Doolhof()\n {\n this(255, 255, new RechtKaart(1, false));\n }", "abstract Feature createFeature(boolean enabled, int count);", "public ArcherTower() {\n\t\tsuper(defaultAttack, defaultRange, defaultAttackSpeed, name);\n\t}", "@SuppressWarnings(\"unused\")\n private Flight() {\n this(null, null, null, null, null, null, null, null, null, null, null);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tdefaultconstructor d = new defaultconstructor();\r\n\tSystem.out.println(d.Age);\t\r\n\tSystem.out.println(d.Name);\r\n\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static CRF getSupervisedCRF(InstanceList train, ModelConfig config, Corpus dev, String geneFile, Performance per) throws GimliException, FileNotFoundException {\n int order = config.getOrder() + 1;\n int[] orders = new int[order];\n for (int j = 0; j < order; j++) {\n orders[j] = j;\n }\n\n CRF crf = new CRF(train.getPipe(), (Pipe) null);\n String startStateName = crf.addOrderNStates(\n train,\n orders,\n null, // \"defaults\" parameter; see mallet javadoc\n \"O\",\n forbiddenPattern,\n null,\n true); // true for a fully connected CRF\n\n for (int j = 0; j < crf.numStates(); j++) {\n crf.getState(j).setInitialWeight(Transducer.IMPOSSIBLE_WEIGHT);\n }\n crf.getState(startStateName).setInitialWeight(0.0);\n crf.setWeightsDimensionAsIn(train, false);\n\n\n\n\n CRFTrainerByThreadedLabelLikelihood trainer = new CRFTrainerByThreadedLabelLikelihood(crf, 8);\n trainer.setAddNoFactors(true);\n trainer.setGaussianPriorVariance(1.0);\n StopWatch time = new StopWatch();\n time.start();\n trainer.train(train, Integer.MAX_VALUE);\n time.stop();\n trainer.shutdown();\n\n CRFModel model = new CRFModel(config, Constants.Parsing.FW);\n model.setCRF(trainer.getCRF());\n\n Annotator an = new Annotator(dev);\n an.annotate(model);\n\n // Pre-process annotated corpus\n Parentheses.processRemoving(dev);\n Abbreviation.process(dev);\n\n String annotations = \"resources/silver/bc2gm_dev_o1_fw\";\n BCWriter bw = new BCWriter();\n bw.write(dev, new FileOutputStream(annotations));\n\n BC2Evaluator eval = new BC2Evaluator(geneFile, geneFile, annotations);\n\n Performance pe = eval.getPerformance();\n\n per.setPrecision(pe.getPrecision());\n per.setRecall(pe.getRecall());\n per.setF1(pe.getF1());\n per.setNumIterations(trainer.getIteration() - 1);\n per.setTime(time);\n\n return trainer.getCRF();\n }", "public SegmentTree() {}", "public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Horse> trainingSet = utility.readHorseColicfile(\"horseTrain.txt\");\n\t\tArrayList<Variable> variableSets = Horse.getAllVar();\n\t\tTree tree = new Tree();\n\t\t\n\t\tNode decisionTree = tree.buildTree(trainingSet, variableSets);\n\t\tutility.printNode(decisionTree);\n\t\t\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Horse> testSet = utility.readHorseColicfile(\"horseTest.txt\");\n\t\tutility.testTree(testSet, decisionTree);\n\t\t\n\n\t}", "public int getCutPoint(){\n \tint cut = random.nextInt((NODELENGTH * 3));\n \tif (cut % 3 == 1){\n \t\treturn cut + 2;\n \t}\n \telse if (cut % 3 == 2){\n \t\treturn cut + 1;\n \t}\n \telse {\n \t\treturn cut;\n \t}\n \t\n }" ]
[ "0.706473", "0.5124239", "0.50250036", "0.4931715", "0.47668046", "0.47639954", "0.4615896", "0.46139744", "0.45360962", "0.4533335", "0.4525499", "0.44639212", "0.44388002", "0.44184354", "0.44153434", "0.44061694", "0.43568859", "0.4353804", "0.43522575", "0.43352583", "0.4295447", "0.42942083", "0.42654803", "0.4250712", "0.42193758", "0.4214839", "0.42068774", "0.41945845", "0.417288", "0.4171364", "0.41664037", "0.41605648", "0.41605648", "0.415849", "0.41514367", "0.41476792", "0.4123787", "0.41229272", "0.40983102", "0.4094028", "0.40920502", "0.40885252", "0.4078765", "0.4076376", "0.4069317", "0.406493", "0.4064093", "0.40593994", "0.40557587", "0.40509194", "0.40489626", "0.40476134", "0.4044574", "0.40298218", "0.4023336", "0.401651", "0.40129256", "0.40125218", "0.399572", "0.3987072", "0.398174", "0.3977486", "0.39717323", "0.3968014", "0.3961917", "0.39616552", "0.39512426", "0.3946523", "0.3946261", "0.39450997", "0.39450553", "0.39436352", "0.3935209", "0.39350852", "0.39339143", "0.3928416", "0.3925081", "0.3924975", "0.3924488", "0.39244208", "0.39208376", "0.3902041", "0.38972083", "0.38939923", "0.3883296", "0.38825262", "0.38764867", "0.38732734", "0.3872679", "0.38710633", "0.38692468", "0.38664716", "0.38658533", "0.38609353", "0.3860833", "0.38586646", "0.38546765", "0.38540772", "0.38467357", "0.38453355" ]
0.6602516
1
Create a new RandomCutForest with optional arguments set to default values.
public static RandomCutForest defaultForest(int dimensions) { return builder().dimensions(dimensions).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static RandomCutForest defaultForest(int dimensions, long randomSeed) {\n return builder().dimensions(dimensions).randomSeed(randomSeed).build();\n }", "public void setForest(UUID forest) {\n this.forest = forest;\n }", "public static Classifier classify(List<List<Double>> features,List<Double> labels) throws Exception\n\t {\n\t\t\n\t\t String RF_CSV = \"res/diabetic_data_rf.csv\";\n\t\t String RF_Arff = \"res/rf_output.arff\";\n\t\t Helper.createCSV(RF_CSV,features,labels);\n\t\t Instances data_rf = Helper.createARFF(RF_CSV, RF_Arff);\n\t\t RandomForest rf = new RandomForest();\n\t\t System.out.println(\"Random Forest...\");\n\t\t rf.setNumTrees(100);\n\t\t rf.setMaxDepth(8);\n\t\t rf.buildClassifier(data_rf);\n\t\t \n\t\t Evaluation eval = new Evaluation(data_rf);\n\t\t Random rand = new Random(1); // using seed = 1\n\t\t int folds = 4;\n\t\t eval.crossValidateModel(rf, data_rf, folds, rand);\n\t\t System.out.println(eval.toSummaryString());\n\t\t \n\t\t return rf;\n\t }", "public TimeSeriesForestAlgorithm(final int numTrees, final int maxDepth, final int seed,\n\t\t\tfinal boolean useFeatureCaching) {\n\t\tthis.numTrees = numTrees;\n\t\tthis.maxDepth = maxDepth;\n\t\tthis.seed = seed;\n\t\tthis.useFeatureCaching = useFeatureCaching;\n\t}", "public void setForest(int value)\n {\n if (value == 1)\n {\n \n this.forests = (grid/3000)+1;\n }\n \n if (value == 2)\n {\n this.forests = (grid/1200)+2;\n }\n \n if (value == 3)\n {\n this.forests = (grid/800)+2;\n }\n }", "public TimeSeriesForestAlgorithm(final int numTrees, final int maxDepth, final int seed) {\n\t\tthis.numTrees = numTrees;\n\t\tthis.maxDepth = maxDepth;\n\t\tthis.seed = seed;\n\t}", "@Test\n public void testCreateCategorizationLearner()\n {\n int ensembleSize = 3 + random.nextInt(1000);\n double baggingFraction = random.nextDouble();\n double dimensionsFraction = random.nextDouble();\n int maxTreeDepth = 3 + random.nextInt(10);\n int minLeafSize = 4 + random.nextInt(10);\n Random random = new Random();\n BaggingCategorizerLearner<Vector, String> result\n = RandomForestFactory.createCategorizationLearner(ensembleSize,\n baggingFraction, dimensionsFraction, maxTreeDepth, minLeafSize,\n random);\n assertEquals(ensembleSize, result.getMaxIterations());\n assertEquals(baggingFraction, result.getPercentToSample(), 0.0);\n assertSame(random, result.getRandom());\n @SuppressWarnings(\"rawtypes\")\n CategorizationTreeLearner treeLearner = \n (CategorizationTreeLearner) result.getLearner();\n assertEquals(maxTreeDepth, treeLearner.getMaxDepth());\n assertTrue(treeLearner.getLeafCountThreshold() >= 2 * minLeafSize);\n RandomSubVectorThresholdLearner<?> randomSubspace = (RandomSubVectorThresholdLearner<?>)\n treeLearner.getDeciderLearner();\n assertEquals(dimensionsFraction, randomSubspace.getPercentToSample(), 0.0);\n assertSame(random, randomSubspace.getRandom());\n VectorThresholdInformationGainLearner<?> splitLearner = (VectorThresholdInformationGainLearner<?>)\n randomSubspace.getSubLearner();\n assertEquals(minLeafSize, splitLearner.getMinSplitSize());\n }", "private void buildTree(int random_attr){\n String[] schema = new String[]{\"min, max, avg, label\"};\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<int[]> train = driver.queryData(\"data\", schema);\n RandomForest forest = new RandomForest();\n forest.numAttr = RandomForestTrainingMapReduce.N;\n forest.numAttrRandom = random_attr;\n RealDecisionTree tree = new RealDecisionTree(train, forest, RandomForestTrainingMapReduce.N);\n\n // serialize this tree and write to Cassandra.\n byte[] t = serialize(tree);\n try {\n driver.insertData(t, \"Forest\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ForestBuilder(Configuration conf, Path outputPath) {\n this.conf = conf;\n this.outputPath = outputPath;\n this.modelPath = new Path(outputPath, \"model\");\n this.datasetPath = new Path(outputPath, \"dataset\");\n this.datasetPath = new Path(datasetPath+\"/\"+datasetName);\n }", "public static ForestModel createForest(Tree tree, String name) {\r\n try {\r\n // Create an ur-root node to be the parent for all the trees in the\r\n\t\t\t// forest\r\n final IRNode n = new PlainIRNode();\r\n tree.initNode(n, -1);\r\n\r\n// final SlotFactory sf = JJNode.treeSlotFactory;\r\n final SlotFactory sf = SimpleSlotFactory.prototype; \r\n final IRSequence<IRNode> roots = sf.newSequence(1);\r\n roots.setElementAt(n, 0);\r\n\r\n return (new DelegatingPureForestFactory(tree, roots, true)).create(\r\n name,\r\n sf);\r\n } catch (SlotAlreadyRegisteredException e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "@BeforeAll\n public static void oneTimeSetUp() {\n numberOfTrees = 100;\n sampleSize = 256;\n dimensions = 3;\n randomSeed = 123;\n\n parallelExecutionForest = RandomCutForest.builder()\n .numberOfTrees(numberOfTrees)\n .sampleSize(sampleSize)\n .dimensions(dimensions)\n .randomSeed(randomSeed)\n .centerOfMassEnabled(true)\n .storeSequenceIndexesEnabled(true)\n .build();\n\n singleThreadedForest = RandomCutForest.builder()\n .numberOfTrees(numberOfTrees)\n .sampleSize(sampleSize)\n .dimensions(dimensions)\n .randomSeed(randomSeed)\n .centerOfMassEnabled(true)\n .storeSequenceIndexesEnabled(true)\n .parallelExecutionEnabled(false)\n .build();\n\n dataSize = 10_000;\n\n baseMu = 0.0;\n baseSigma = 1.0;\n anomalyMu = 5.0;\n anomalySigma = 1.5;\n transitionToAnomalyProbability = 0.01;\n transitionToBaseProbability = 0.4;\n\n NormalMixtureTestData generator = new NormalMixtureTestData(baseMu, baseSigma, anomalyMu, anomalySigma,\n transitionToAnomalyProbability, transitionToBaseProbability);\n double[][] data = generator.generateTestData(dataSize, dimensions);\n\n for (int i = 0; i < dataSize; i++) {\n parallelExecutionForest.update(data[i]);\n singleThreadedForest.update(data[i]);\n }\n }", "public void setup(){\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<byte[]> arr = driver.queryData(\"Forest\", \"tree\");\n\n ArrayList<RealDecisionTree> trees = new ArrayList<RealDecisionTree>();\n for (byte[] b : arr){\n trees.add(deserialize(b));\n }\n RandomForest forest = new RandomForest(trees, \"test\", new String[]{\"min, mav, avg, label\"});\n forest.TestForest(trees, forest.testdata);\n }", "public CutAndChooseSelection build(int numCircuits);", "public static void main(String[] args) {\n\t\tGraph<String, DefaultEdge> tree = new SimpleGraph<>(SupplierUtil.createStringSupplier(), \n\t\t SupplierUtil.createDefaultEdgeSupplier(), false);\n\t\tBarabasiAlbertForestGenerator <String, DefaultEdge> treeGen = new BarabasiAlbertForestGenerator <> (1,20);\n\t\ttreeGen.generateGraph(tree,null);\n\t\tDrawUtil.createAndShowGui(tree, \"Tree\", false, false, true, true, DrawUtil.layout_type.HIERARCHICAL);\n\t\t\n\t\t// Generating 1 forest with 5 tree\n\t\tGraph<String, DefaultEdge> forest = new SimpleGraph<>(SupplierUtil.createStringSupplier(), \n\t\t SupplierUtil.createDefaultEdgeSupplier(), false);\n\t\tBarabasiAlbertForestGenerator <String, DefaultEdge> forestGen = new BarabasiAlbertForestGenerator <> (5,30);\n\t\tforestGen.generateGraph(forest,null);\n\t\tDrawUtil.createAndShowGui(forest, \"Forest\", false, false, true, true, DrawUtil.layout_type.HIERARCHICAL);\n\n\t}", "public Cucumber(float weight) {\n\t\tthis(DEFAULT_CALORIES, weight);\n\t}", "public DriveTrain(int lf, int lr, int rf, int rr){\n this.left = new side(lf, lr);\n this.right = new side(rf, rr);\n }", "@Override\n\tpublic TimeSeriesForestClassifier call()\n\t\t\tthrows InterruptedException, AlgorithmExecutionCanceledException, TimeoutException, AlgorithmException {\n\t\t\n\t\tTimeSeriesDataset dataset = this.getInput();\n\t\t\n\t\t// Perform Training\n\t\tfinal TimeSeriesTree[] trees = new TimeSeriesTree[this.numTrees];\n\t\tExecutorService execService = Executors.newFixedThreadPool(this.cpus);\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tFuture<TimeSeriesTree>[] futures = new Future[this.numTrees];\n\t\tfor (int i = 0; i < this.numTrees; i++) {\n\t\t\tTimeSeriesTree tst = new TimeSeriesTree(this.maxDepth, this.seed + i, this.useFeatureCaching);\n\t\t\tfutures[i] = execService.submit(new Callable<TimeSeriesTree>() {\n\t\t\t\t@Override\n\t\t\t\tpublic TimeSeriesTree call() throws Exception {\n\n\t\t\t\t\ttst.train(dataset);\n\t\t\t\t\ttst.setTrained(true);\n\t\t\t\t\treturn tst;\n\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Wait for completion\n\t\texecService.shutdown();\n\t\texecService.awaitTermination(this.timeout.seconds(), TimeUnit.SECONDS);\n\t\tfor (int i = 0; i < this.numTrees; i++) {\n\t\t\ttry {\n\t\t\t\tTimeSeriesTree tst = futures[i].get();\n\t\t\t\ttrees[i] = tst;\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\tthrow new AlgorithmException(\n\t\t\t\t\t\t\"Could not train time series tree due to training exception: \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\tthis.model.setTrees(trees);\n\t\tthis.model.setTrained(true);\n\n\t\treturn this.model;\n\t}", "public static SyntaxForestModel createSyntaxForest(\r\n SyntaxTreeInterface tree,\r\n String name) {\r\n try {\r\n // Create an ur-root node to be the parent for all the trees in the\r\n\t\t\t// forest\r\n IRNode n = new MarkedIRNode(\"Root for forest: \"+name);\r\n tree.initNode(n, Ellipsis.prototype, -1);\r\n // tree.initNode(n, -1);\r\n\r\n// final SlotFactory sf = JJNode.treeSlotFactory;\r\n final SlotFactory sf = SimpleSlotFactory.prototype;\r\n final IRSequence<IRNode> roots = sf.newSequence(~1);\r\n roots.setElementAt(n, 0);\r\n System.err.println(\"Finished init of pure forest at \"+Version.getVersion());\r\n \r\n return (new DelegatingPureSyntaxForestFactory(tree, roots, true)).create(\r\n name,\r\n sf);\r\n } catch (SlotAlreadyRegisteredException e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "private void randForest(int x, int y) {\n\t\tint rand = random.nextInt(10);\n\t\tif (rand == 1) {\n\t\t\tentities.add(new Tree(x << 4, y << 4));\n\t\t\tgetTile(x, y).setSolid(true);\n\t\t}\n\n\t}", "public Troop() //make a overloaded constructor \n\t{\n\t\ttroopType = \"light\"; \n\t\tname = \"Default\";\n\t\thp = 50;\n\t\tatt = 20;\n\t}", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testSideEffectsB(RandomCutForest forest){\n DiVector initial=forest.getAnomalyAttribution(new double[] {0.0, 0.0 ,0.0});\n NormalMixtureTestData generator2=new NormalMixtureTestData(baseMu, baseSigma, anomalyMu, anomalySigma,\n transitionToAnomalyProbability, transitionToBaseProbability);\n double[][] newData = generator2.generateTestData(dataSize, dimensions);\n for (int i = 0; i < dataSize; i++) {\n forest.getAnomalyAttribution(newData[i]);\n }\n double newScore=forest.getAnomalyScore(new double[] {0.0,0.0,0.0});\n DiVector newVector = forest.getAnomalyAttribution(new double[] {0.0, 0.0 ,0.0});\n assertEquals(initial.getHighLowSum(),newVector.getHighLowSum(),10E-10);\n assertEquals(initial.getHighLowSum(),newScore,1E-10);\n assertArrayEquals(initial.high,newVector.high,1E-10);\n assertArrayEquals(initial.low,newVector.low,1E-10);\n }", "public Heuristic() {\n this(HeuristicUtils.defaultValues);\n }", "@Override\n\tprotected void initClassifierParameters() {\n\t\tlinearKernel = new SelectedParameterItem(\"Linear kernel\", \"-K 0\");\n\t\tpolynomialKernel = new SelectedParameterItem(\"Polynomial kernel\", \"-K 1\");\n\t\tradialBasisKernel = new SelectedParameterItem(\"Radial basis kernel\", \"-K 2\");\n\t\tsigmoidKernel = new SelectedParameterItem(\"Sigmoid kernel\", \"-K 3\");\n\t\tcSVC = new SelectedParameterItem(\"C-SVC\", \"-S 0\");\n\t\tnuSVC = new SelectedParameterItem(\"&nu;-SVC\", \"-S 1\");\n\t\tsvmType = ParameterUtilities.createSelectedParameter(\"SVM type\", cSVC, nuSVC);\n\t\tkernelType = ParameterUtilities.createSelectedParameter(\"Kernel type\", linearKernel, polynomialKernel, radialBasisKernel,\n\t\t\t\tsigmoidKernel);\n\t\tkernelDegree = new Parameter(3, \"Degree in kernel function\", Parameter.TYPE.INTEGER, \"-D\", \"classifier.degree\");\n\t\tkernelGamma = new Parameter(0.5, \"&gamma; in kernel function\", Parameter.TYPE.DOUBLE, \"-G\", \"classifier.gamma\");\n\t\tkernelCoefficient = new Parameter(0.0, \"Coefficient in kernel function\", Parameter.TYPE.DOUBLE, \"-R\", \"classifier.coef0\");\n\t\tparameterC = new Parameter(1.0, \"Parameter C\", Parameter.TYPE.DOUBLE, \"-C\", \"classifier.cost\");\n\t\tparameterNu = new Parameter(0.5, \"Parameter &nu;\", Parameter.TYPE.DOUBLE, \"-N\", \"classifier.nu\");\n\t\ttolerance = new Parameter(0.001, \"Tolerance of termination criterion\", Parameter.TYPE.DOUBLE, \"-E\");\n\t\tweight = new Parameter(null, \"Weight, set C of class i to (weight &times; C)\", Parameter.TYPE.STRING, \"-W\");\n\t}", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "@Test\n public void testShadowBuffer(){\n numberOfTrees = 100;\n sampleSize = 256;\n dimensions = 3;\n randomSeed = 123;\n\n RandomCutForest newForest = RandomCutForest.builder()\n .numberOfTrees(numberOfTrees)\n .sampleSize(sampleSize)\n .dimensions(dimensions)\n .randomSeed(randomSeed)\n .centerOfMassEnabled(true)\n .storeSequenceIndexesEnabled(true)\n .build();\n\n dataSize = 10_000;\n\n baseMu = 0.0;\n baseSigma = 1.0;\n anomalyMu = 5.0;\n anomalySigma = 1.5;\n transitionToAnomalyProbability = 0.01;\n transitionToBaseProbability = 0.4;\n\n NormalMixtureTestData generator = new NormalMixtureTestData(baseMu, baseSigma, anomalyMu, anomalySigma,\n transitionToAnomalyProbability, transitionToBaseProbability);\n double[][] data = generator.generateTestData(dataSize, dimensions);\n\n for (int i = 0; i < dataSize; i++) {\n newForest.update(data[i]);\n }\n\n double [] point = new double [] {-8.0,-8.0,0.0};\n DiVector result=newForest.getAnomalyAttribution(point);\n double score=newForest.getAnomalyScore(point);\n assertEquals(score,result.getHighLowSum(),1E-10);\n assertTrue(score>2);\n assertTrue(result.getHighLowSum(2)<0.2);\n // the third dimension has little influence in classification\n\n // this is going to add {8,8,0} into the forest\n // but not enough to cause large scale changes\n // note the probability of a tree seeing a change is\n // 256/10_000\n for (int i = 0; i < 5; i++) {\n newForest.update(point);\n }\n\n DiVector newResult=newForest.getAnomalyAttribution(point);\n double newScore=newForest.getAnomalyScore(point);\n\n assertEquals(newScore,newResult.getHighLowSum(),1E-10);\n assertTrue(newScore<score);\n for(int j=0;j<3;j++){\n // relationship holds at larger values\n if (result.high[j]>0.2) {\n assertEquals(score * newResult.high[j], newScore * result.high[j], 0.1*score);\n } else {\n assertTrue(newResult.high[j]<0.2);\n }\n\n if (result.low[j]>0.2) {\n assertEquals(score * newResult.low[j], newScore * result.low[j], 0.1*score);\n } else {\n assertTrue(newResult.low[j]<0.2);\n }\n }\n\n // this will make the point an inlier\n for (int i = 0; i < 5000; i++) {\n newForest.update(point);\n }\n\n DiVector finalResult=newForest.getAnomalyAttribution(point);\n double finalScore=newForest.getAnomalyScore(point);\n assertTrue(finalScore<1);\n assertEquals(finalScore,finalResult.getHighLowSum(),1E-10);\n\n for(int j=0;j<3;j++){\n // relationship holds at larger values\n if (finalResult.high[j]>0.2) {\n assertEquals(score * finalResult.high[j], finalScore * result.high[j], 0.1*score);\n } else {\n assertTrue(newResult.high[j]<0.2);\n }\n\n if (finalResult.low[j]>0.2) {\n assertEquals(score * finalResult.low[j], finalScore * result.low[j], 0.1*score);\n } else {\n assertTrue(finalResult.low[j]<0.2);\n }\n }\n\n }", "public RealConjunctiveFeature() { }", "public interface CutAndChooseSelectionBuilder {\n\t\n\t/**\n\t * Selects the circuits to be checked or evaluated.\n\t * @param numCircuits The total circuits number.\n\t * @return The selection.\n\t */\n\tpublic CutAndChooseSelection build(int numCircuits);\n}", "public static void main(String[] args) {\n int n = 9;\n Graph graph = new Graph(n);\n graph.addEdge(0, 1);\n graph.addEdge(0, 2);\n graph.addEdge(1, 2);\n graph.addEdge(2, 3);\n graph.addEdge(2, 5);\n graph.addEdge(3, 4);\n graph.addEdge(5, 6);\n graph.addEdge(5, 8);\n graph.addEdge(6, 7);\n graph.addEdge(7, 8);\n \n CutEdge cutEdge = new CutEdge();\n cutEdge.doCutEdgeAlgorithm(graph, n);\n }", "private Pool setUpRutherford() {\n final int rutherfordVolume = 5000;\n final int rutherfordTemperature = 39;\n final double rutherfordPH = 7.7;\n final double rutherfordNutrientCoefficient = 0.85;\n final int rutherfordNumberOfGuppies = 100;\n final int rutherfordMinAge = 10;\n final int rutherfordMaxAge = 15;\n final double rutherfordMinHealthCoefficient = 0.8;\n final double rutherfordMaxHealthCoefficient = 1.0;\n\n GuppySet rutherfordGuppies = new GuppySet(rutherfordNumberOfGuppies,\n rutherfordMinAge, rutherfordMaxAge,\n rutherfordMinHealthCoefficient, rutherfordMaxHealthCoefficient);\n\n Pool rutherford = setUpPool(\"Rutherford\", rutherfordVolume,\n rutherfordTemperature, rutherfordPH,\n rutherfordNutrientCoefficient, rutherfordGuppies);\n\n return rutherford;\n }", "@Override\n\tpublic boolean isForest()\n\t{\n\t\treturn true;\n\t}", "protected BaseFeat()\n {\n super(TYPE);\n }", "@Override\n\t\t\tpublic IFuzzySet cut(double minValue) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic IFuzzySet cut(double minValue) {\n\t\t\t\treturn null;\n\t\t\t}", "private void setDefaultNode() {\n\t\tint[] classes = new int[classifierNames.size()];\n\t\tfor (Instance i : instances) {\n\t\t\tclasses[i.getCategory()]++;\n\t\t}\n\t\tint mostCommonClassIdx = 0;\n\t\tfor (int i = 0; i < classes.length; i++) {\n\t\t\tif (classes[i] > classes[mostCommonClassIdx]) {\n\t\t\t\tmostCommonClassIdx = i;\n\t\t\t} else if (classes[i] == classes[mostCommonClassIdx]) {\n\t\t\t\tmostCommonClassIdx = (Math.random() > 0.5?mostCommonClassIdx:i); // I hope this is an OK implementation of the randomness\n\t\t\t}\n\t\t}\n\t\tbaselineNode = new LeafNode((double)classes[mostCommonClassIdx]/(double)instances.size(), classifierNames.get(mostCommonClassIdx));\n\t}", "public UUID getForest() {\n return forest;\n }", "CrawlController build(CrawlParameters parameters) throws Exception;", "public ParametersBuilder() {\n this(Parameters.DEFAULT);\n }", "public static void main(String[] args) {\n\t\tif (args.length != 2) {\n\t\t\tSystem.err.println(\"This program requires two parameters, not \"+args.length+\". The first is a training file and the second is a data file.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tDecisionLearningTree dt = new DecisionLearningTree(args[0],args[1]);\n\t\tList<String> rs = dt.useBaselineClassifierOnData(); //dt.useTreeOnData();\n\t\tfor (String r : rs) {\n\t\t\tSystem.out.println(r);\n\t\t}\n\t\tSystem.out.println(\"==========================================================\");\n\t\tSystem.out.println(\"Reporting tree:\");\n\t\tdt.report();\t\t\n\t}", "public static QuadricRobustEstimator create() {\n return create(DEFAULT_ROBUST_METHOD);\n }", "private Classifier createDummyClassifier(String action, String con, Classifier[] parent_classifier ){\n String cName = \"DUMMY\";\n Classifier father = parent_classifier[0];\n Classifier mother = parent_classifier[1];\n double newPred = (father.getPrediction() + mother.getPrediction()) / 2;\n double newPreErr = (father.getPredictionError() + mother.getPredictionError()) / 2;\n double newFit = (father.getFitness() + mother.getFitness()) / 2;\n Classifier classifier_Child = new Classifier(\n cName,\n newPred,\n newPreErr,\n newFit,\n con,\n action);\n return classifier_Child;\n }", "public myC45PruneableClassifierTree(ModelSelection toSelectLocModel,\n boolean pruneTree,float cf,\n boolean raiseTree,\n boolean cleanup)\n throws Exception {\n\n super(toSelectLocModel);\n\n m_pruneTheTree = pruneTree;\n m_CF = cf;\n m_subtreeRaising = raiseTree;\n m_cleanup = cleanup;\n }", "public abstract Cut<C> a(BoundType boundType, DiscreteDomain<C> discreteDomain);", "public Stack() {\r\n this(20);\r\n }", "public abstract Cut<C> b(BoundType boundType, DiscreteDomain<C> discreteDomain);", "public RandomSubVectorThresholdLearnerTest(\n String testName)\n {\n super(testName);\n\n this.random = new Random();\n }", "public Knights()\r\n\t{\r\n\t\tsuper(Settings.COST_PRODUCTION_KNIGHT, Settings.TIME_COST_KNIGHT, \r\n\t\t\t\tSettings.SPEED_KNIGHT, Settings.DAMMAGES_KNIGHT, Settings.DAMMAGES_KNIGHT);\r\n\t}", "public void testConstructors()\n {\n VectorThresholdInformationGainLearner<String> subLearner = null;\n double percentToSample = RandomSubVectorThresholdLearner.DEFAULT_PERCENT_TO_SAMPLE;\n VectorFactory<?> vectorFactory = VectorFactory.getDefault();\n int[] dimensionsToConsider = null;\n RandomSubVectorThresholdLearner<String> instance = new RandomSubVectorThresholdLearner<String>();\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertNotNull(instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n\n subLearner = new VectorThresholdInformationGainLearner<String>();\n percentToSample = percentToSample / 2.0;\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, random);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n\n vectorFactory = VectorFactory.getSparseDefault();\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, random, vectorFactory);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n \n dimensionsToConsider = new int[] {5, 12};\n vectorFactory = VectorFactory.getSparseDefault();\n instance = new RandomSubVectorThresholdLearner<String>(subLearner,\n percentToSample, dimensionsToConsider, random, vectorFactory);\n assertSame(subLearner, instance.getSubLearner());\n assertEquals(percentToSample, instance.getPercentToSample());\n assertSame(dimensionsToConsider, instance.getDimensionsToConsider());\n assertSame(random, instance.getRandom());\n assertSame(vectorFactory, instance.getVectorFactory());\n }", "public Taste() {\n }", "protected ForrestRunner(String workingDir) {\n super(\"Forrest Runner\");\n\n this.workingDir = workingDir;\n }", "void setFeatures(Features f) throws Exception;", "@Override\n public void buildClassifier(Instances trainingData) throws Exception {\n // can classifier handle the data?\n getCapabilities().testWithFail(trainingData);\n\n tree = new MultiInstanceDecisionTree(trainingData);\n }", "public TopicsTreeModel()\r\n\t{\r\n\t\tthis(new LinkedHashMap<ITreeNode<Topics>, Boolean>());\r\n\t}", "public BinTree induceTree(int[] partition, int[] features) {\r\n\t\t// if the partition is empty, we can not return a tree\r\n\t\tif (partition.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// check if all entries in partition belong to the same class. If so,\r\n\t\t// return node, labeled with class value\r\n\t\t// you may want to check if pruning is applicable here (and then just\r\n\t\t// return the majority class).\r\n\t\tint[] classCnt = new int[classes.length];\r\n\t\tString sameValue = null;\r\n\t\tboolean sameClass = true;\r\n\t\tfor (int p = 0; p < partition.length; p++) {\r\n\t\t\tString targetValue = output[partition[p]];\r\n\t\t\tfor (int n = 0; n < classes.length; n++) {\r\n\t\t\t\tif (targetValue.equals(classes[n])) {\r\n\t\t\t\t\tclassCnt[n]++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (p == 0)\r\n\t\t\t\tsameValue = targetValue;\r\n\t\t\telse {\r\n\t\t\t\tif (!sameValue.equalsIgnoreCase(targetValue)) {\r\n\t\t\t\t\tsameClass = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (sameClass) {\r\n\t\t\treturn new BinTree(sameValue);\r\n\t\t} else {\r\n\t\t\tint max = 0;\r\n\t\t\tfor (int n = 1; n < classes.length; n++)\r\n\t\t\t\tif (classCnt[max] < classCnt[n])\r\n\t\t\t\t\tmax = n;\r\n\t\t\tif ((double) classCnt[max] / (double) partition.length > 0.50\r\n\t\t\t\t\t|| partition.length < 5) { // if more than 50% of samples\r\n\t\t\t\t\t\t\t\t\t\t\t\t// in partition are of the same\r\n\t\t\t\t\t\t\t\t\t\t\t\t// class OR fewer than 5 samples\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t\treturn new BinTree(classes[max]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if no features are available, we can not return a tree\r\n\t\tif (features.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// class values are not equal so we select a particular feature to split\r\n\t\t// the partition\r\n\t\tint selectedFeature = selectFeature(partition, features);\r\n\r\n\t\t// create new partition of samples\r\n\t\t// use only corresponding subset of full partition\r\n\t\tint[] partTrue = matches(partition, selectedFeature, true);\r\n\t\tint[] partFalse = matches(partition, selectedFeature, false);\r\n\t\t// remove the feature from the new set (to be sent to subtrees)\r\n\t\tint[] nextFeatures = new int[features.length - 1];\r\n\t\tint cnt = 0;\r\n\t\tfor (int f = 0; f < features.length; f++) {\r\n\t\t\tif (features[f] != selectedFeature)\r\n\t\t\t\tnextFeatures[cnt++] = features[f];\r\n\t\t}\r\n\t\t// construct the subtrees using the new partitions and reduced set of\r\n\t\t// features\r\n\t\tBinTree branchTrue = induceTree(partTrue, nextFeatures);\r\n\t\tBinTree branchFalse = induceTree(partFalse, nextFeatures);\r\n\r\n\t\t// if either of the subtrees failed, we have confronted a problem, use\r\n\t\t// the most likely class value of the current partition\r\n\t\tBinTree defaultTree = null;\r\n\t\tif (branchTrue == null || branchFalse == null) {\r\n\t\t\t// indicate a majority vote\r\n\t\t\tint[] freq = new int[classes.length];\r\n\t\t\tint most = 0;\r\n\t\t\tfor (int c = 0; c < classes.length; c++) {\r\n\t\t\t\tint[] pos = matches(partition, classes[c]);\r\n\t\t\t\tfreq[c] = pos.length;\r\n\t\t\t\tif (freq[c] >= freq[most])\r\n\t\t\t\t\tmost = c;\r\n\t\t\t}\r\n\t\t\t// the majority class value can replace any null trees...\r\n\t\t\tdefaultTree = new BinTree(classes[most]);\r\n\t\t\tif (branchTrue == null && branchFalse == null)\r\n\t\t\t\treturn defaultTree;\r\n\t\t\telse\r\n\t\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\t\treturn new BinTree(labelFeature(selectedFeature),\r\n\t\t\t\t\t\t(branchTrue == null ? defaultTree : branchTrue),\r\n\t\t\t\t\t\t(branchFalse == null ? defaultTree : branchFalse));\r\n\t\t} else { // if both subtrees were successfully created we can either\r\n\t\t\tif (branchTrue.classValue != null && branchFalse.classValue != null) {\r\n\t\t\t\tif (branchTrue.classValue.equals(branchFalse.classValue)) {\r\n\t\t\t\t\t// return the the current node with the classlabel common to\r\n\t\t\t\t\t// both subtrees, or\r\n\t\t\t\t\treturn new BinTree(branchTrue.classValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\treturn new BinTree(labelFeature(selectedFeature), branchTrue,\r\n\t\t\t\t\tbranchFalse);\r\n\t\t}\r\n\t}", "public ScribbleFactoryImpl()\n {\n\t\tsuper();\n\t}", "private GridCoverageRequest setStandardReaderDefaults(GridCoverageRequest subsettingRequest) throws IOException {\n DateRange temporalSubset = subsettingRequest.getTemporalSubset();\n NumberRange<?> elevationSubset = subsettingRequest.getElevationSubset();\n Map<String, List<Object>> dimensionSubset = subsettingRequest.getDimensionsSubset();\n\n // Reader is not a StructuredGridCoverage2DReader instance. Set default ones with policy \"time = max, elevation = min\".\n\n // Setting default time\n if (temporalSubset == null) {\n // use \"max\" as the default\n Date maxTime = accessor.getMaxTime();\n if (maxTime != null) {\n temporalSubset = new DateRange(maxTime, maxTime);\n }\n }\n\n // Setting default elevation\n if (elevationSubset == null) {\n // use \"min\" as the default\n Number minElevation = accessor.getMinElevation();\n if (minElevation != null) {\n elevationSubset = new NumberRange(minElevation.getClass(), minElevation, minElevation);\n }\n }\n\n // Setting default custom dimensions\n final List<String> customDomains = accessor.getCustomDomains();\n int availableCustomDimensions = 0; \n int specifiedCustomDimensions = 0;\n if (customDomains != null && !customDomains.isEmpty()) {\n availableCustomDimensions = customDomains.size();\n specifiedCustomDimensions = dimensionSubset != null ? dimensionSubset.size() : 0; \n if (dimensionSubset == null) {\n dimensionSubset = new HashMap<String, List<Object>>();\n }\n }\n if (availableCustomDimensions != specifiedCustomDimensions) {\n setDefaultCustomDimensions(customDomains, dimensionSubset);\n }\n\n subsettingRequest.setDimensionsSubset(dimensionSubset);\n subsettingRequest.setTemporalSubset(temporalSubset);\n subsettingRequest.setElevationSubset(elevationSubset);\n return subsettingRequest;\n }", "public Features() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public PointCutASTNode(PointCutASTNode self) {\n\t\tsuper(self);\n\t}", "public Cut<C> c(DiscreteDomain<C> discreteDomain) {\n return this;\n }", "public CvBoostParams()\r\n {\r\n\r\n super( CvBoostParams_0() );\r\n\r\n return;\r\n }", "public Builder defaultArgs(String args) {\n defaultArgs(toList(args));\n return this;\n }", "public MdnFeatures()\n {\n }", "Classifier getBase_Classifier();", "public CSGEnvironmentBSP(\r\n\t) {\r\n\t\tthis( false );\r\n\t}", "public DecisionLearningTree(String training, String test) {\n\t\ttrainingFile = training;\n\t\ttestFile = test;\n\t\treadTrainingFile();\n\t\troot = readDataFile();\n\t}", "public Fox() {\n super(randomAge(MAX_AGE), randomSex(), MAX_AGE, BREEDING_AGE, MAX_LITTER_SIZE, BREEDING_PROBABILITY, FOOD_VALUE, FULL_LEVEL);\n constructor();\n }", "public static void main(String[] args) {\n\t\tCreateClassificationData test = new CreateClassificationData(\"originalData/Data.txt\");\n\t}", "public Cut<C> c(DiscreteDomain<C> discreteDomain) {\n Comparable a = a(discreteDomain);\n return a != null ? b(a) : Cut.e();\n }", "public Train(){\n}", "public DecisionTrace() {\r\n\r\n\t}", "public FeatureExtraction() {\n\t}", "public TreeNode(){ this(null, null, 0);}", "public Factory() {\n\t\tnb_rounds = 0; \n\t\tnb_to_train = 0; \n\t\ttraining_queue = new LinkedList<Pair<Soldier, Integer>>(); \n\t\tcurrent = null;\n\t}", "public AdvancedTreeFeatureConfig(Species speciesIn, List<TreeDecorator> decoratorsIn, int ageIn, int maxWaterDepthIn, boolean ignoreVinesIn, int heightIn, int heightRandomIn, int extraHeightIn ,int extraBranchLengthIn, int branchYPosRandomIn) {\n super(speciesIn, decoratorsIn, ageIn);\n this.maxWaterDepth = maxWaterDepthIn;\n this.ignoreVines = ignoreVinesIn;\n this.height = heightIn;\n this.heightRandom = heightRandomIn;\n this.extraHeight = extraHeightIn;\n this.extraBranchLength = extraBranchLengthIn;\n this.branchYPosRandom = branchYPosRandomIn;\n }", "public RandomNeighborhoodOperator(int nbRelaxedVars)\n{\n\tthis(nbRelaxedVars, 0);\n}", "static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t AttributeSet testAttributes, \n\t\t\t\t\t SymbolicAttribute goalAttribute) {\n\tDecisionTreeBuilder builder = \n\t new DecisionTreeBuilder(learningSet, testAttributes,\n\t\t\t\t goalAttribute);\n\t\n\treturn builder.build();\n }", "public RandomizedRunner(Class<?> testClass) throws InitializationError {\n if (RandomizedTest.systemPropertyAsBoolean(SYSPROP_STACKFILTERING, true)) {\n this.traces = new TraceFormatting(DEFAULT_STACK_FILTERS);\n } else {\n this.traces = new TraceFormatting();\n }\n \n this.suiteClass = testClass;\n this.allTargetMethods = immutableCopy(sort(allDeclaredMethods(suiteClass)));\n \n // Initialize the runner's master seed/ randomness source.\n final long randomSeed = MurmurHash3.hash(sequencer.getAndIncrement() + System.nanoTime());\n final String globalSeed = System.getProperty(SYSPROP_RANDOM_SEED);\n if (globalSeed != null) {\n final long[] seedChain = SeedUtils.parseSeedChain(globalSeed);\n if (seedChain.length == 0 || seedChain.length > 2) {\n throw new IllegalArgumentException(\"Invalid system property \" \n + SYSPROP_RANDOM_SEED + \" specification: \" + globalSeed);\n }\n \n if (seedChain.length > 1)\n testCaseRandomnessOverride = new Randomness(seedChain[1]);\n runnerRandomness = new Randomness(seedChain[0]);\n } else if (suiteClass.isAnnotationPresent(Seed.class)) {\n runnerRandomness = new Randomness(seedFromAnnot(suiteClass, randomSeed)[0]);\n } else {\n runnerRandomness = new Randomness(randomSeed);\n }\n \n // Iterations property is primary wrt to annotations, so we leave an \"undefined\" value as null.\n if (System.getProperty(SYSPROP_ITERATIONS) != null) {\n this.iterationsOverride = RandomizedTest.systemPropertyAsInt(SYSPROP_ITERATIONS, 0);\n if (iterationsOverride < 1)\n throw new IllegalArgumentException(\n \"System property \" + SYSPROP_ITERATIONS + \" must be >= 1: \" + iterationsOverride);\n } else {\n this.iterationsOverride = null;\n }\n \n this.killAttempts = RandomizedTest.systemPropertyAsInt(SYSPROP_KILLATTEMPTS, DEFAULT_KILLATTEMPTS);\n this.killWait = RandomizedTest.systemPropertyAsInt(SYSPROP_KILLWAIT, DEFAULT_KILLWAIT);\n this.timeoutOverride = RandomizedTest.systemPropertyAsInt(SYSPROP_TIMEOUT, DEFAULT_TIMEOUT);\n \n // TODO: should validation and everything else be done lazily after RunNotifier is available?\n \n // Fail fast if suiteClass is inconsistent or selected \"standard\" JUnit rules are somehow broken.\n validateTarget();\n \n // Collect all test candidates, regardless if they will be executed or not.\n suiteDescription = Description.createSuiteDescription(suiteClass);\n testCandidates = collectTestCandidates(suiteDescription);\n testGroups = collectGroups(testCandidates);\n }", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "public static void main(String[] args) {\n\t\tint[] prices = {1, 5, 8, 9, 10, 17, 17, 20, 24, 30};\n\t\t\n\t\tRod r = new Rod(10);\n\t\tdouble revenue = r.RecursiveCutRod(prices, 10);\n\t\tSystem.out.println(\"Revenue: \" + revenue);\n\t\t\n\t\tRod r2 = new Rod(10);\n\t\tdouble revenue2 = r2.MemoizedCutRod(prices, 4);\n\t\tSystem.out.println(\"Revenue: \" + revenue2);\n\t\t\n\t\tRod r3 = new Rod(10);\n\t\tdouble revenue3 = r3.BottomUpCutRod(prices, 10);\n\t\tSystem.out.println(\"Revenue: \" + revenue3);\n\t}", "public TaxoNode(\r\n\t\t\tString\t\tname,\r\n\t\t\tString\t\tdisplayName,\r\n\t\t\tString\t\tcontrolName,\r\n\t\t\tint\t\t\t\tid,\r\n\t\t\tint\t\t\t\ttermID,\r\n\t\t\tint\t\t\t\tfacetid,\r\n\t\t\tTaxoNode\tparent,\r\n\t\t\tString\t\tsort,\r\n\t\t\tboolean\t\tisGuide,\r\n\t\t\tboolean\t\tinferredByChildren,\r\n\t\t\tboolean\t\tselectSingle ) {\r\n\t\tthis.name = name;\r\n\t\tthis.displayName = displayName;\r\n\t\tthis.controlName = controlName;\r\n\t\tif( id < 0 )\r\n\t\t\tid = nextID++;\r\n\t\tthis.id= id;\r\n\t\tthis.termID= termID;\r\n\t\tthis.facetid= facetid;\t\t// Only applies to categories\r\n\t\tthis.parent = parent;\r\n\t\tthis.sort = sort;\r\n\t\tthis.isGuideTerm = isGuide;\r\n\t\tthis.inferredByChildren = inferredByChildren;\r\n\t\tthis.selectSingle = selectSingle;\r\n\t\tchildren = null;\r\n\t\tsynset = null; \t\t// No syns unless specified\r\n\t\texclset = null; \t// No exclusions unless specified\r\n\t\timpliedNodes = null; \t// No implied (other than parent) unless specified\r\n\t\tiMaskBase = -1;\r\n\t\tnMasks = 0;\r\n\t\tiBitInMask = -1;\r\n\t}", "public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;", "private HierarchyFactory ()\n {\n }", "private void initCutContext (SessionState state)\n\t{\n\t\tstate.setAttribute (STATE_CUT_IDS, new Vector ());\n\n\t\tstate.setAttribute (STATE_CUT_FLAG, Boolean.FALSE.toString());\n\n\t}", "public DebrisField(boolean forest, int pos)\n {\n if(forest)\n {\n this.value = F_DEFAULT;\n state = new forestState();\n }\n else {\n this.value = DF_DEFAULT;\n state = new debrisFieldState();\n }\n this.pos = pos;\n }", "public Builder defaultArgs(List<String> args) {\n if (isValid(args)) {\n this.defaultArgs = split(args);\n }\n return this;\n }", "private void createFeatures() {\n\t\tfeatures = new Feature[NUM_FEATURES];\n\n\t\t// Create dummy feature\n\t\tfeatures[0] = new DummyFeature(width, height, 0, 0 - THRESHOLD);\n\n\t\t// Create the rest of the features\n\t\tfor (int i = 1; i < NUM_FEATURES; i++) {\n\t\t\tfeatures[i] = new Feature(width, height, i);\n\t\t}\n\t}", "public static FeatureSet of(final Feature... features) {\n return new FeatureSet(ImmutableSet.copyOf(features), ImmutableSet.of());\n }", "public WekaLogitLearner() { super(new Logistic2()); }", "public void createBase(SpanningTree sptree_base) {\n int initLevel = 0;\n SpanningForests sp = new SpanningForests(initLevel);\n sp.trees.add(sptree_base);\n dforests.put(initLevel, sp);\n }", "@JsonCreator\n public DefaultCrif(@JsonProperty(\"trade_id\") String tradeId, //\n @JsonProperty(\"valuation_date\") String valuationDate, //\n @JsonProperty(\"end_date\") String endDate, //\n @JsonProperty(\"notional\") String notional, //\n @JsonProperty(\"trade_currency\") String notionalCurrency, //\n @JsonProperty(\"im_model\") String imModel, //\n @JsonProperty(\"product_class\") String productClass, //\n @JsonProperty(\"risk_type\") String riskType, //\n @JsonProperty(\"qualifier\") String qualifier, //\n @JsonProperty(\"bucket\") String bucket, //\n @JsonProperty(\"label1\") String label1, //\n @JsonProperty(\"label2\") String label2, //\n @JsonProperty(\"amount\") String amount, //\n @JsonProperty(\"amount_currency\") String amountCurrency, //\n @JsonProperty(\"amount_usd\") String amountUSD, //\n @JsonProperty(\"post_regulation\") String postRegulation, //\n @JsonProperty(\"collect_regulation\") String collectRegulation) {\n this.valuationDate = valuationDate;\n this.endDate = endDate;\n this.tradeId = tradeId;\n this.imModel = imModel;\n this.productClass = productClass;\n this.riskType = riskType;\n this.qualifier = qualifier;\n this.bucket = bucket;\n this.label1 = label1;\n this.label2 = label2;\n this.amount = amount;\n this.amountCurrency = amountCurrency;\n this.amountUSD = amountUSD;\n this.postRegulation = postRegulation;\n this.collectRegulation = collectRegulation;\n this.notional = notional;\n this.notionalCurrency = notionalCurrency;\n }", "public Doolhof()\n {\n this(255, 255, new RechtKaart(1, false));\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "abstract Feature createFeature(boolean enabled, int count);", "@SuppressWarnings(\"unused\")\n private Flight() {\n this(null, null, null, null, null, null, null, null, null, null, null);\n }", "public ArcherTower() {\n\t\tsuper(defaultAttack, defaultRange, defaultAttackSpeed, name);\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tdefaultconstructor d = new defaultconstructor();\r\n\tSystem.out.println(d.Age);\t\r\n\tSystem.out.println(d.Name);\r\n\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static CRF getSupervisedCRF(InstanceList train, ModelConfig config, Corpus dev, String geneFile, Performance per) throws GimliException, FileNotFoundException {\n int order = config.getOrder() + 1;\n int[] orders = new int[order];\n for (int j = 0; j < order; j++) {\n orders[j] = j;\n }\n\n CRF crf = new CRF(train.getPipe(), (Pipe) null);\n String startStateName = crf.addOrderNStates(\n train,\n orders,\n null, // \"defaults\" parameter; see mallet javadoc\n \"O\",\n forbiddenPattern,\n null,\n true); // true for a fully connected CRF\n\n for (int j = 0; j < crf.numStates(); j++) {\n crf.getState(j).setInitialWeight(Transducer.IMPOSSIBLE_WEIGHT);\n }\n crf.getState(startStateName).setInitialWeight(0.0);\n crf.setWeightsDimensionAsIn(train, false);\n\n\n\n\n CRFTrainerByThreadedLabelLikelihood trainer = new CRFTrainerByThreadedLabelLikelihood(crf, 8);\n trainer.setAddNoFactors(true);\n trainer.setGaussianPriorVariance(1.0);\n StopWatch time = new StopWatch();\n time.start();\n trainer.train(train, Integer.MAX_VALUE);\n time.stop();\n trainer.shutdown();\n\n CRFModel model = new CRFModel(config, Constants.Parsing.FW);\n model.setCRF(trainer.getCRF());\n\n Annotator an = new Annotator(dev);\n an.annotate(model);\n\n // Pre-process annotated corpus\n Parentheses.processRemoving(dev);\n Abbreviation.process(dev);\n\n String annotations = \"resources/silver/bc2gm_dev_o1_fw\";\n BCWriter bw = new BCWriter();\n bw.write(dev, new FileOutputStream(annotations));\n\n BC2Evaluator eval = new BC2Evaluator(geneFile, geneFile, annotations);\n\n Performance pe = eval.getPerformance();\n\n per.setPrecision(pe.getPrecision());\n per.setRecall(pe.getRecall());\n per.setF1(pe.getF1());\n per.setNumIterations(trainer.getIteration() - 1);\n per.setTime(time);\n\n return trainer.getCRF();\n }", "public SegmentTree() {}", "public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Horse> trainingSet = utility.readHorseColicfile(\"horseTrain.txt\");\n\t\tArrayList<Variable> variableSets = Horse.getAllVar();\n\t\tTree tree = new Tree();\n\t\t\n\t\tNode decisionTree = tree.buildTree(trainingSet, variableSets);\n\t\tutility.printNode(decisionTree);\n\t\t\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Horse> testSet = utility.readHorseColicfile(\"horseTest.txt\");\n\t\tutility.testTree(testSet, decisionTree);\n\t\t\n\n\t}", "public int getCutPoint(){\n \tint cut = random.nextInt((NODELENGTH * 3));\n \tif (cut % 3 == 1){\n \t\treturn cut + 2;\n \t}\n \telse if (cut % 3 == 2){\n \t\treturn cut + 1;\n \t}\n \telse {\n \t\treturn cut;\n \t}\n \t\n }" ]
[ "0.66022915", "0.5124428", "0.5023916", "0.49324766", "0.4766094", "0.47646475", "0.4613379", "0.46127802", "0.45361036", "0.4532479", "0.45249102", "0.4464196", "0.4437954", "0.4419233", "0.44159737", "0.44061625", "0.4356114", "0.43530008", "0.43515134", "0.43362", "0.42944893", "0.42941558", "0.42657846", "0.4250487", "0.42175442", "0.42149585", "0.42055243", "0.41940394", "0.417151", "0.4171464", "0.41669184", "0.41589853", "0.41589853", "0.41579607", "0.41508982", "0.41473553", "0.41268906", "0.4123302", "0.40978265", "0.40923482", "0.40912536", "0.4085596", "0.40776384", "0.40755233", "0.4068023", "0.4064951", "0.4064692", "0.4059372", "0.40560836", "0.40526283", "0.40480933", "0.40463114", "0.40427825", "0.4029995", "0.40247226", "0.40170333", "0.40115917", "0.4009695", "0.39962375", "0.3990747", "0.3982677", "0.39756566", "0.39724633", "0.39667925", "0.39624745", "0.3961623", "0.39477286", "0.39463037", "0.39460987", "0.39456174", "0.39454198", "0.39432335", "0.3937126", "0.39349687", "0.39329913", "0.39282885", "0.39259478", "0.39258125", "0.39241204", "0.3923798", "0.39222556", "0.390209", "0.38957512", "0.38944694", "0.3886142", "0.38832346", "0.38769618", "0.3873733", "0.38726386", "0.3871504", "0.38674566", "0.38673896", "0.3866337", "0.38628998", "0.38615838", "0.38601255", "0.38532403", "0.38531807", "0.38462532", "0.38428763" ]
0.7064701
0
Update the forest with the given point. The point is submitted to each sampler in the forest. If the sampler accepts the point, the point is submitted to the update method in the corresponding Random Cut Tree.
public void update(double[] point) { checkNotNull(point, "point must not be null"); checkArgument(point.length == dimensions, String.format("point.length must equal %d", dimensions)); executor.update(point); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void _setPoint(int index, DataPoint point) {\n ntree.set(index, point);\n ensureDistances();\n }", "public void setPoint(double point){\r\n this.point = point;\r\n }", "public abstract void setPoint(Point p);", "public void setSetpoint(double setpoint);", "@Override\r\n\tpublic void update(Plant plant) throws Exception {\n\r\n\t}", "public void update(Point point)\n {\n rectangle.set(point.x - rectangle.width()/2, point.y - rectangle.height()/2, point.x + rectangle.width()/2,point.y + rectangle.height()/2);\n\n //hitBox(this.rectangle);\n }", "public synchronized void updatePlayerPoint(long playerId, String playerName, int point) {\n/* 98 */ if (point <= this.component.getMinPoint()) {\n/* */ return;\n/* */ }\n/* 101 */ int level = MentalUtil.getShowLevel();\n/* 102 */ ZhenfaTempleWorldBean zhenfaTempleWorldBean = JsonTableService.<ZhenfaTempleWorldBean>getJsonData(level, ZhenfaTempleWorldBean.class);\n/* 103 */ if (point < zhenfaTempleWorldBean.getEntryScore()) {\n/* */ return;\n/* */ }\n/* 106 */ for (MentalRankStruct rankInfo : this.component.getRankList()) {\n/* 107 */ if (playerId == rankInfo.playerId) {\n/* 108 */ rankInfo.point = point;\n/* 109 */ this.component.setUpdate(\"rankList\");\n/* 110 */ this.component.saveToDB();\n/* 111 */ this.component.sortRank();\n/* */ \n/* */ return;\n/* */ } \n/* */ } \n/* 116 */ MentalRankStruct struct = new MentalRankStruct();\n/* 117 */ struct.playerId = playerId;\n/* 118 */ struct.playerName = playerName;\n/* 119 */ struct.point = point;\n/* */ \n/* 121 */ this.component.getRankList().add(struct);\n/* 122 */ this.component.setUpdate(\"rankList\");\n/* 123 */ this.component.saveToDB();\n/* */ \n/* 125 */ this.component.sortRank();\n/* */ }", "public T setPoint(@NonNull PointF point) {\n return setPoint(point.x, point.y);\n }", "public void setGoal(Point point) {\n mGoal = point;\n }", "public void setPoint( Float point ) {\n this.point = point;\n }", "public void moveTo(Point point){\n updateUndoBuffers(new LinkedList<>());\n xPos = point.getMyX()+myGrid.getWidth()/ HALF;\n yPos = myGrid.getHeight()/ HALF-point.getMyY();\n }", "Feature update(Feature feature);", "public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}", "public void setPoint(Integer point) {\n this.point = point;\n }", "public void setPoint(Integer point) {\n\t\tthis.point = point;\n\t}", "public void set(int index, GPoint point) {\n\t\tif (index == points.size()) {\n\t\t\tpoints.add(new GPoint(point));\n\t\t} else {\n\t\t\tpoints.get(index).set(point);\n\t\t}\n\t}", "void setPointChange(Integer setPoint, Integer expectedValue);", "void setFeature(int index, Feature feature);", "public static double getDisplacementScore(DynamicScoringRandomCutForest forest, double[] point) {\n return forest.getDynamicScore(point, 0, (x, y) -> 1.0, (x, y) -> y, (x, y) -> 1.0);\n }", "@Override\r\n\tpublic boolean updateBlogpoint(Resource resource) {\n\t\treturn this.excuteDb(\"update resource set point=? where resource_id=? \",new Object[]{\r\n\t\t\t\tresource.getPoint(),\r\n\t\t\t\tresource.getResourceid()\r\n\t\t} );\r\n\t}", "public PointF set(int index, PointF point)\n {\n flushCache();\n int realIndex = wrap(index, size());\n return points.set(realIndex, Geometry.clone(point));\n }", "public void setPoint(double value) {\r\n this.point = value;\r\n }", "@Override\r\n\tpublic void update(Person p) \r\n\t{\n\t\t\r\n\t}", "void setPosition(Point point);", "void update(String selectedGene);", "public Point apply(Point point)\n {\n assert(_index >= 0);\n assert(_index < _pattern.length);\n\n point.move(_pattern[_index]);\n\n return point;\n }", "public void updateOnAction(int update)\n {\n this.points += update;\n }", "public abstract void updateCurGene(int mid);", "public void setRevisedPoints(int thePoints)\r\n {\r\n points = points + thePoints;\r\n }", "void optimiseSetPointProfile()\n\t{\n\t\tif (this.owner.storageHeater != null)\n\t\t{\n\t\t\toptimiseStorageHeater(this.owner.storageHeater);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"WattboxController:: optimise set point called for agent \" + this.owner.getAgentName());\n\t\t}\n\n\t\t// Initialise optimisation\n\t\tdouble[] localSetPointArray = Arrays.copyOf(this.setPointProfile, this.setPointProfile.length);\n\t\tthis.optimisedSetPointProfile = Arrays.copyOf(this.setPointProfile, this.setPointProfile.length);\n\t\tdouble[] deltaT = ArrayUtils.add(this.setPointProfile, ArrayUtils.negate(this.priorDayExternalTempProfile));\n\t\tdouble[] localDemandProfile = this.calculateEstimatedSpaceHeatPumpDemand(this.setPointProfile);\n\t\tdouble leastCost = this.evaluateCost(localDemandProfile);\n\t\tdouble newCost = leastCost;\n\t\tdouble maxRecoveryPerTick = 0.5d\n\t\t\t\t* Consts.DOMESTIC_COP_DEGRADATION_FOR_TEMP_INCREASE\n\t\t\t\t* ((this.owner.getBuildingHeatLossRate() / Consts.KWH_TO_JOULE_CONVERSION_FACTOR)\n\t\t\t\t\t\t* (Consts.SECONDS_PER_DAY / this.ticksPerDay) * ArrayUtils.max(deltaT)); // i.e.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// can't\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recover\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// more\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// than\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 50%\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// heat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// loss\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// at\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 90%\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// COP.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Need\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// code\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// better\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// later\n\n\t\tfor (int i = 0; i < localSetPointArray.length; i++)\n\t\t{\n\t\t\t// Start each evaluation from the basepoint of the original (user\n\t\t\t// specified) set point profile\n\t\t\tlocalSetPointArray = Arrays.copyOf(this.setPointProfile, this.setPointProfile.length);\n\t\t\tdouble totalTempLoss = 0;\n\t\t\tdouble[] otherPrices = Arrays.copyOf(this.dayPredictedCostSignal, this.dayPredictedCostSignal.length);\n\n\t\t\tfor (int j = 0; (j < Consts.HEAT_PUMP_MAX_SWITCHOFF && (i + j < this.ticksPerDay)); j++)\n\t\t\t{\n\t\t\t\tdouble tempLoss = (((this.owner.getBuildingHeatLossRate() / Consts.KWH_TO_JOULE_CONVERSION_FACTOR)\n\t\t\t\t\t\t* (Consts.SECONDS_PER_DAY / this.ticksPerDay) * Math\n\t\t\t\t\t\t.max(0, (localSetPointArray[i + j] - this.priorDayExternalTempProfile[i + j]))) / this.owner\n\t\t\t\t\t\t.getBuildingThermalMass());\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\"Temp loss in tick \" + (i + j) + \" = \" + tempLoss);\n\t\t\t\t}\n\t\t\t\ttotalTempLoss += tempLoss;\n\n\t\t\t\tfor (int k = i + j; k < localSetPointArray.length; k++)\n\t\t\t\t{\n\t\t\t\t\tlocalSetPointArray[k] = this.setPointProfile[k] - totalTempLoss;\n\t\t\t\t\t// availableHeatRecoveryTicks++;\n\t\t\t\t}\n\t\t\t\tdouble availableHeatRecoveryTicks = localSetPointArray.length - j;\n\n\t\t\t\t// Sort out where to regain the temperature (if possible)\n\t\t\t\tint n = (int) Math.ceil((totalTempLoss * this.owner.getBuildingThermalMass()) / maxRecoveryPerTick);\n\t\t\t\t// Take this slot out of the potential cheap slots to recover\n\t\t\t\t// temp in.\n\t\t\t\totherPrices[i + j] = Double.POSITIVE_INFINITY;\n\n\t\t\t\tif (n < availableHeatRecoveryTicks && n > 0)\n\t\t\t\t{\n\t\t\t\t\t// We know it's possible to recover the temperature lost\n\t\t\t\t\t// in switch off period under the constraints set.\n\t\t\t\t\tdouble tempToRecover = (totalTempLoss / n);\n\n\t\t\t\t\t// Find the cheapest timeslots in which to recover the\n\t\t\t\t\t// temperature\n\t\t\t\t\t// If this selection results in a tie, the slot is chosen\n\t\t\t\t\t// randomly\n\t\t\t\t\tint[] recoveryIndices = ArrayUtils.findNSmallestIndices(otherPrices, n);\n\n\t\t\t\t\t// Add on temperature in each temperature recovery slot and\n\t\t\t\t\t// all subsequent slots - thus building an optimised\n\t\t\t\t\t// profile.\n\t\t\t\t\tfor (int l : recoveryIndices)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (int m = l; m < this.ticksPerDay; m++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlocalSetPointArray[m] += tempToRecover;\nif (\t\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Adding \" + tempToRecover + \" at index \" + m + \" to counter temp loss at tick \"\n\t\t\t\t\t\t\t\t\t+ (i + j + 1));\n}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((i + j) == 0)\n\t\t\t\t\t\t{\nif (\t\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Evaluating switchoff for tick zero, set point array = \"\n\t\t\t\t\t\t\t\t\t+ Arrays.toString(localSetPointArray));\n}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"In here, adding temp \" + tempToRecover + \" from index \" + l);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"With result \" + Arrays.toString(localSetPointArray));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tdouble[] tempDifference = ArrayUtils.add(this.setPointProfile, ArrayUtils.negate(localSetPointArray));\n\n\t\t\t\t\tif (ArrayUtils.max(ArrayUtils.add(ArrayUtils.absoluteValues(tempDifference), ArrayUtils\n\t\t\t\t\t\t\t.negate(Consts.MAX_PERMITTED_TEMP_DROPS))) > Consts.FLOATING_POINT_TOLERANCE)\n\t\t\t\t\t{\n\t\t\t\t\t\t// if the temperature drop, or rise, is too great, this\n\t\t\t\t\t\t// profile is unfeasible and we return null\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// calculate energy implications and cost for this\n\t\t\t\t\t\t// candidate setPointProfile\n\t\t\t\t\t\tlocalDemandProfile = this.calculateEstimatedSpaceHeatPumpDemand(localSetPointArray);\n\t\t\t\t\t\tif ((i + j) == 0)\n\t\t\t\t\t\t{\nif (\t\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Calculated demand for set point array turning off at tick \" + i + \" for \"\n\t\t\t\t\t\t\t\t\t+ (j + 1) + \" ticks \" + Arrays.toString(localSetPointArray));\n}\n\t\t\t\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Demand = \" + Arrays.toString(localDemandProfile));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (localDemandProfile != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// in here if the set point profile is achievable\n\t\t\t\t\t\t\tnewCost = this.evaluateCost(localDemandProfile);\n\n\t\t\t\t\t\t\t// Decide whether to swap the new profile with the\n\t\t\t\t\t\t\t// current best one\n\t\t\t\t\t\t\t// based on cost.\n\t\t\t\t\t\t\t// Many strategies are available - here we give two\n\t\t\t\t\t\t\t// options\n\t\t\t\t\t\t\t// Either the new cost must be better by an amount\n\t\t\t\t\t\t\t// greater than some decision threshold\n\t\t\t\t\t\t\t// held in Consts.COST_DECISION_THRESHOLD\n\t\t\t\t\t\t\t// OR (currently used) the cost must simply be\n\t\t\t\t\t\t\t// better, with a tie in cost\n\t\t\t\t\t\t\t// being decided by a \"coin toss\".\n\n\t\t\t\t\t\t\t// if((newCost - leastCost) < (0 -\n\t\t\t\t\t\t\t// Consts.COST_DECISION_THRESHOLD))\n\t\t\t\t\t\t\tif (newCost < leastCost || (newCost == leastCost && RandomHelper.nextIntFromTo(0, 1) == 1))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tleastCost = newCost;\n\t\t\t\t\t\t\t\tthis.optimisedSetPointProfile = Arrays.copyOf(localSetPointArray, localSetPointArray.length);\n\t\t\t\t\t\t\t\tthis.heatPumpDemandProfile = ArrayUtils\n\t\t\t\t\t\t\t\t\t\t.multiply(localDemandProfile, (1 / Consts.DOMESTIC_HEAT_PUMP_SPACE_COP));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Impossible to recover heat within heat pump\n\t\t\t\t\t\t\t// limits - discard this attempt.\n\t\t\t\t\t\t\tif (this.owner.getAgentID() == 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.err.println(\"WattboxController: Can't recover heat with \" + availableHeatRecoveryTicks\n\t\t\t\t\t\t\t\t\t\t+ \" ticks, need \" + n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.expectedNextDaySpaceHeatCost = leastCost;\n\t}", "public void m1291a(Point point) {\r\n this.f763l = point;\r\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }", "public void setFeedbackPoint(Shape shape, Point point){\n\t\tPolyline polyline = (Polyline)shape;\n\t\tpolyline.setFeedback(point);\n\t\t\n\t\tthis.view.getPaintPanel().update(null,null);\n\t}", "private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }", "@Override\n public void setSetpoint(double setpoint) {\n if (getController() != null) {\n getController().setSetpoint(Utilities.clip(setpoint, Constants.Hood.MIN_ANGLE, Constants.Hood.MAX_ANGLE));\n }\n super.setSetpoint(Utilities.clip(setpoint, Constants.Hood.MIN_ANGLE, Constants.Hood.MAX_ANGLE));\n }", "public void setX(double point) {\n this.x = point;\n }", "public void updatePointText(int point) {\n String textPoint = \"points: \" + point;\n text.setText(textPoint);\n }", "public void setSetpoint(float setpoint) {\r\n m_setpoint = setpoint;\r\n }", "private void setWorkmanPoint( int point ){\n\n callGetSliderAds();\n }", "public void updateAlarm(Point point) {\n WorldItem item = point.getContainedItem();\n if (item instanceof Sensor) {\n Sensor alarm = (Sensor) item;\n if (!alarm.isAlarmed()) {\n if (point.getCurrentTemp() >= alarm.getAlarmThreshold()) {\n alarm.triggerAlarm();\n }\n } else if (point.getCurrentTemp() < alarm.getAlarmThreshold()) {\n alarm.stopAlarm();\n }\n }\n }", "@Override\n\tpublic void update() {\n\t\tage++;\n\t\tpoints = Globals.points;\n\t}", "public void setTargDataPoint(DataPoint aDP)\n{\n if(SnapUtils.equals(aDP, _targPoint)) return;\n firePropChange(TargDataPoint_Prop, _targPoint, _targPoint = aDP);\n _toolTipView.reloadContents();\n}", "public void update(String feature, double value) {\n // update the weight of the feature\n if (!weightMap.containsKey(feature)) {\n weightMap.put(feature, value);\n } else {\n weightMap.put(feature, weightMap.get(feature) + value);\n }\n\n // also add to averaging map if averaging is on\n if (doAveraging) {\n if (!weightCacheMap.containsKey(feature)) {\n weightCacheMap.put(feature, value * averagingCoefficient);\n } else {\n weightCacheMap.put(feature, weightCacheMap.get(feature) + value * averagingCoefficient);\n }\n\n averagingCoefficient++;\n }\n }", "public void\nsetDetail(SoDetail detail, SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int i;\n\n // Find node in path\n i = getNodeIndex(node);\n\n//#ifdef DEBUG\n// if (i < 0)\n// SoDebugError::post(\"SoPickedPoint::setDetail\",\n// \"Node %#x is not found in path\", node);\n//#endif /* DEBUG */\n\n details.set(i, detail);\n}", "public void placePiece(Piece newPiece){pieceAtVertex = newPiece;}", "public void setCurrentPoint(int[] currentPoint) {\n this.currentPoint = currentPoint.clone();\n }", "public void setSelDataPoint(DataPoint aDP)\n{\n if(SnapUtils.equals(aDP, _selPoint)) return;\n firePropChange(SelDataPoint_Prop, _selPoint, _selPoint = aDP);\n repaint();\n}", "public void update(PersonEntity person) {\n new Thread(new UpdateRunnable(dao, person)).start();\n }", "public void actionPerformed(ActionEvent e) {\n\t\tString choice = e.getActionCommand();\n\t\tint choiceClass = clasify(choice);\n\t\tif (OUTPUT_CHOICE)\n\t\t\tSystem.out.println(R+\",\"+G+\",\"+B+\",\"+choiceClass);\n\t\tSample sample = new Sample(R, G, B, choiceClass);\n\t\tdata.add(sample);\n\t\tCOUNT++;\n\n\t\tif (prediction.equals(choice))\n\t\t\tHITS++;\n\n\t\t//Create new tree every 10 samples\n\t\tif (COUNT%10 == 0) {\n\t\t\ttree = new DecisionTree(data);\n\t\t\tforest = new RandomForest(data, FOREST_SIZE);\n\t\t}\n\n\t\trepaint();\n\t}", "public void usePoint(FireEngine engine) {\n actionPoints.computeIfPresent(engine, (e, p) -> p - 1);\n }", "public void set_control_point(int segment, int point, NurbsPoint value) {\n points[segment][point] = new NurbsPoint(value.x, value.y, value.z);\n }", "private void triggerAtPoint(Point point, int button) {\n JTable table = fixedSizeTable.getTable();\r\n int row = table.rowAtPoint(point);\r\n int column = table.columnAtPoint(point);\r\n if (row > -1 && column > -1) {\r\n // build up a matrix value object we then trigger\r\n MatrixValue matrixValue = new MatrixValue();\r\n matrixValue.row = row;\r\n matrixValue.column = column;\r\n matrixValue.value = table.getValueAt(row, column);\r\n matrixValue.action = button;\r\n fireActionTriggered(matrixValue);\r\n }\r\n }", "public void update(ZpEvaluateDegreeVersionEntity entity) {\n\t\tdao.update(entity);\n\t}", "public void setInstance(int index, double[] feature) {\n\t\tinstances.set(index,feature);\n\t}", "protected void ReplaceIndividual(int index) {\r\n \r\n Individual newInd, oldInd;\r\n \r\n oldInd = this.P.get(index);\r\n\r\n double[] features = new double[this.D];\r\n for(int j = 0; j < this.D; j++){\r\n features[j] = this.rndGenerator.nextDouble(this.f.min(this.D), this.f.max(this.D));\r\n } \r\n newInd = new Individual(oldInd.id, features, this.f.fitness(features));\r\n this.isBest(newInd);\r\n this.isActualBest(newInd);\r\n this.P.remove(index);\r\n this.P.add(index, newInd);\r\n this.FES++;\r\n this.writeHistory();\r\n \r\n }", "public void changeLastDrawn(Point point){\n\t\tif(lastDrawn != null && selectedTool != Tool.DELETE){\n\t\t\tlastDrawn.setCoords(lastDrawn.x1, lastDrawn.y1, point.x, point.y);\n\t\t\trepaint();\n\t\t}\n\t}", "public synchronized void update(double setpoint) {\n long now = System.nanoTime();\n double minutes = (now - lastTime) / 1000000000.0 / 60.0;\n\n double rotationsMotor = (float)(setpoint - lastSetpoint) / 3.0;\n double rotationsWheel = rotationsMotor * 64.0 / 20.0;\n\n rate = rotationsWheel / minutes;\n lastSetpoint = setpoint;\n lastTime = now;\n }", "@Override\n public void pidSet(UnifiedControlMode controlMode, double setpoint, PIDSettings pidSettings,\n FeedForwardSettings feedForwardSettings, TrapezoidProfileSettings trapezoidProfileSettings) {\n configPIDF(pidSettings, feedForwardSettings);\n configureTrapezoid(trapezoidProfileSettings);\n master.set(controlMode.getCTREControlMode(), setpoint);\n }", "public void set(Point p)\r\n\t{\r\n\t\tx = p.x;\r\n\t\ty = p.y;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public AnimatorType position(PointF point)\n {\n addTransformer(new PositionTransformer(getShape(), point));\n return (AnimatorType) this;\n }", "@Override\r\n\tpublic void update(Person person) {\n\r\n\t}", "public void affectPiece(Piece piece){\r\n this.piece = piece;\r\n this.piece.affect();\r\n }", "@Override\n public void doEvaluation(Individual sample, boolean isTrain) {\n mainEvaluator.doEvaluation(sample, isTrain);\n }", "public void updateFeatue(Long id, FeatureLookup feature) {\n\r\n\t}", "public void setPoint(Point operand, Point target) {\n\tfor (Shape s : this.shapes)\n\t s.setPoint(operand, target);\n }", "public void addPoint( final Point2d point ){\n points.add(new Point2d(point));\n\n dirty = true;\n }", "@Override\n public double calculate(double measurement, double setpoint) {\n // Set setpoint to provided value\n setSetpoint(setpoint);\n return calculate(measurement);\n }", "public void setForest(UUID forest) {\n this.forest = forest;\n }", "protected void execute() {\n this.setSetpoint(OI.getAdjustedThrottle()*RobotMap.maxRPM);\n ScraperBike.debugToTable(\"PIDSetpoint\", OI.getAdjustedThrottle()*RobotMap.maxRPM);\n \n }", "@AutoGUIAnnotation(\r\n\tDescriptionForUser = \"Sets the SetPoint temperature.\",\r\n\tParameterNames = {\"Temperature [K]\"},\r\n\tDefaultValues= {\"295\"},\r\n\tToolTips = {\"Define tool-tips here\"})\r\n @iC_Annotation(MethodChecksSyntax = true )\r\n public void setTemp(float SetPoint)\r\n throws IOException, DataFormatException {\r\n\r\n\t// perform Syntax-check\r\n\tif (SetPoint < 0 || SetPoint > 500)\r\n\t\tthrow new DataFormatException(\"Set point out of range.\");\r\n\r\n\t// exit if in Syntax-check mode\r\n\tif ( inSyntaxCheckMode() )\r\n\t\treturn;\r\n\r\n // build the GPIB command string\r\n\tString str = \"SETP 1,\" + SetPoint;\r\n\r\n\t// send to the Instrument\r\n\tSendToInstrument(str);\r\n\r\n\t// wait until setpoint is reached\r\n float T;\r\n\tdo {\r\n // it is recommended to check if scripting has been paused\r\n isPaused(true);\r\n\r\n // get current temperature\r\n str = QueryInstrument(\"KRDG? A\");\r\n\r\n // convert to a float value\r\n //T = getFloat(str); // this is the recommended way of converting\r\n T = Float.parseFloat(str);\r\n\t} while ( Math.abs(T-SetPoint) > 0.1 &&\r\n m_StopScripting == false);\r\n }", "private void update_location() throws Exception {\r\n\t\tif (children.size() == 1) {\r\n\t\t\tCLocation bloc = children.get(0).get_location();\r\n\t\t\tthis.location = bloc.get_source().get_location(bloc.get_bias(), bloc.get_length());\r\n\t\t} else if (children.size() > 1) {\r\n\t\t\tCLocation eloc = children.get(children.size() - 1).get_location();\r\n\t\t\tint beg = this.location.get_bias(), end = eloc.get_bias() + eloc.get_length();\r\n\t\t\tthis.location.set_location(beg, end - beg);\r\n\t\t}\r\n\t}", "public void updatePerson() {\n\t\tSystem.out.println(\"update person\");\n\t}", "private void doPoint()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\t\tubisenseData.setPosition(new Point3D(\tx1/100,\n\t\t\t\t\t\t\t\t\t\t\t\ty1/100,\n\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\n\t\twhile (elapsedTime < toolDuration && !this.terminate)\n\t\t{\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long)(elapsedTime*SLEEP_INTERVAL));\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tthis.notifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "void update(Member member);", "public void update(){}", "public void update(){}", "public void add(int index, PointF point)\n {\n flushCache();\n points.add(index, Geometry.clone(point));\n }", "public void updateFitness ( ) {\n\n KozaFitness f = ((KozaFitness)program.fitness);\n\n f.setStandardizedFitness(param.Parameters.STATE, this.fit);\n\n }", "public void setPoint(int point) {\n\tthis.score_num.setText(String.valueOf(point));\r\n}", "private DataPoint _addPoint(DataPoint point) {\n DataPoint existingPoint = ntree.add(point);\n if (existingPoint != null) {\n return existingPoint;\n }\n ensureDistances();\n lastAddedPoint = point;\n return null;\n }", "void updateRating(String name, String park, double rating);", "public void insert(Point p) {\n if (p == null) {\n System.out.println(\"Illegal point argument\");\n }\n if (head == null || !search(p)) { //if root is empty or when the point isn't in the tree we insert it\n size++;\n head = insert(head, p, true);\n }\n }", "public int setPoint(float x, float y, int gnum);", "void updateJointTransform(RigidBodyTransform jointTransformToUpdate);", "static void setViewPointRelevantTo(Point point) {\n point.translate(-1 * viewPoint.x, -1 * viewPoint.y);\n point.x /= Map.zoom;\n point.y /= Map.zoom;\n point.translate(viewPoint.x, viewPoint.y);\n viewPoint.setLocation(point.x - GAME_WIDTH / 2, point.y - GAME_HEIGHT / 2);\n verifyViewPoint();\n }", "protected void execute() {\n \tif (setPoint != 0)\n \t\tshooterWheel.shooterWheelSpeedControllerAft.setSetPoint(setPoint);\n \tshooterWheel.driveAftWheel(shooterWheel.shooterWheelSpeedControllerAft.getControlOutput());\n \t\n }", "public void touchToScatter() {\n for (int i = 0; i < pointCount; i++) {\n int speedX = random.nextInt(2 * speedXBarrier) - speedXBarrier;\n int speedY = random.nextInt(2 * speedYBarrier) - speedYBarrier;\n points.get(i).setSpeedX(speedX);\n points.get(i).setSpeedY(speedY);\n }\n }", "public void calculatePointTemp(Point point) {\n WorldItem containedItem = point.getContainedItem();\n\n // Maintain temperature if the item here is flammable and on fire\n if (containedItem instanceof FlammableItem) {\n if (((FlammableItem) containedItem).isOnFire()) {\n return;\n }\n }\n\n // Temperature factors\n double radQDot = calcRadQDot(point);\n double convQDot = calcConvQDot(point);\n double totalQDot = radQDot + convQDot;\n\n point.setCurrentTemp(point.getCurrentTemp() + (KW_DEGREE_INCREASE * totalQDot));\n }", "protected synchronized void updatePoints(double points)\n\t{\n\t\tif(Config.VIT_MAX_PLAYER_LVL > _player.getLevel())\n\t\t{\n\t\t\tif(Config.VIT_CHECK_LUCKY_SKILL)\n\t\t\t{\n\t\t\t\tif(_player.getSkillLevel(LUCKY_SKILL) > 0)\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn;\n\t\t}\n\n\t\tint prevLvl = getLevel();\n\t\tint prevPoints = (int) _vitPoints;\n\n\t\tchangePoints(points);\n\t\tsendChangeMessage(prevPoints, prevLvl);\n\t}", "private void addPoint( LatLng point ) {\n \t\tthis.addMarker( point );\n \t\tthis.commitPolygon();\n \t}", "public void setFrameXY(RMPoint aPoint) { setFrameXY(aPoint.x, aPoint.y); }", "void add_element_to_feature(Fact factInf, Feature feature_to_assign, Element element, boolean is_fprivate, boolean is_fpublic, Feature parent_feature, boolean by_inference){\n\t\tFeatureBound eb = this.partition.boundsCalc.get_earliest_bound(element, partition.get_all_features(), parent_feature);\n\t\tFeatureBound lb = this.partition.boundsCalc.get_latest_bound(element, partition.get_all_features(), parent_feature);\n\t\tFeaturePossibility poss = this.partition.boundsCalc.get_element_possibilities(element, parent_feature, false);\n\t\t\n\t\tif(eb != null && eb.getFeature() != null){\n\t\t\telement.setEarliest_bound(eb.getFeature());\n\t\t}\n\t\tif(lb != null && lb.getFeature() != null){\n\t\t\telement.setLatest_bound(lb.getFeature());\n\t\t}\n\t\t\n\t\tif(poss != null & poss.getButton_options() != null){\n\t\t\telement.setNumber_possibilities(poss.getButton_options().size());\n\t\t}\n\t\t\n\t\tboolean already_hook = element.isIs_hook();\n\t\tboolean is_hook = hookHandler.check_is_hook(feature_to_assign, element);\n\t\t\n\t\tif(is_hook){\n\t\t\tis_fprivate = false;\n\t\t\tis_fpublic = true;\n\t\t}\n\t\t\n\t\tif(!already_hook && is_hook){\n\t\t\tfactInf.addInference(element.getIdentifier() + \", BttF says it's a hook because it references declaration(s) classified in future features\", element, is_fprivate, is_fpublic, is_hook, feature_to_assign);\n\t\t}\n\t\t\n\t\tif(already_hook && !is_hook){\n\t\t\tfactInf.addInference(element.getIdentifier() + \", BttF says it's no longer a hook, referenced declaration(s) got reclassified\", element, is_fprivate, is_fpublic, is_hook, feature_to_assign);\n\t\t}\n\t\t\n\t\tif(element.getFeature()!= null){\n\t\t\tFeature orig_feature = element.getFeature();\n\t\t\torig_feature.removeElement(element);\n\t\t}\n\t\t\n\t\tfeature_to_assign.addElement(element, is_fprivate, is_fpublic, is_hook, by_inference);\n\t\telement.setOrderOfAssignment(orderOfAssignment);\n\t\torderOfAssignment++;\n\t\t\n\t\tif(is_fprivate){\n\t\t\tpropagate_childs_of_fprivate_containers(element, feature_to_assign, factInf, parent_feature);\n\t\t\tpropagate_fprivate(element, feature_to_assign, factInf, parent_feature);\n\t\t}\n\t\t\n\t\tpropagate_childs_with_no_calls(element, feature_to_assign, factInf, parent_feature);\n\n\t\tif(cycle_stuff_on){\n\t\t\tcycleHandler.propagate_elems_in_cycle(cycle_list, element, feature_to_assign, factInf);\n\t\t}\n\t\t\n\t\t//if we are partitioning into fw+pi and we have a non terminal class, \n\t\t//all of its members go to its same feature\n\t\tif(is_fwpi){\n\t\t\tif(element.getElement_type().equals(ElementType.ELEM_TYPE_CLASS)){\n\t\t\t\t//check if it not should be pulled apart and add all of its members go to its same feature\n\t\t\t\tpropagate_members_of_unbreakable_fwpi(element, feature_to_assign, factInf, parent_feature);\n\t\t\t\t//propagate_members_of_nonterminal(element, feature_to_assign, factInf, parent_feature);\n\t\t\t}\n\t\t\tif(element.getElement_type().equals(ElementType.ELEM_TYPE_METHOD)){\n\t\t\t\tpropagate_reffrom_cannotbehook_fwpi(element, feature_to_assign, factInf, parent_feature);\n\t\t\t\tpropagate_reffrom_staticmethodmember_fwpi(element, feature_to_assign, factInf, parent_feature);\n\t\t\t}\n\t\t}\n\t\thookHandler.late_check_for_hooks(element, factInf, parent_feature);\n\t\thookHandler.recheck_hook(element, factInf);\n\t\t\n\t}", "public Point applyToPoint(Point p) {\n double newX, newY;\n Point newP;\n //the new x\n newX = p.getX() + this.dx;\n //the new y\n newY = p.getY() + this.dy;\n //the new point\n newP = new Point((newX), (newY));\n return newP;\n }", "public void pick(DrawContext dc, Point pickPoint)\n {\n\n if (dc == null)\n {\n String msg = Logging.getMessage(\"nullValue.DrawContextIsNull\");\n Logging.logger().severe(msg);\n throw new IllegalArgumentException(msg);\n }\n\n this.pickSupport.clearPickList();\n try\n {\n this.pickSupport.beginPicking(dc);\n this.render(dc);\n }\n finally\n {\n this.pickSupport.endPicking(dc);\n this.pickSupport.resolvePick(dc, pickPoint, this.pickLayer);\n }\n }", "private IPoint2D updateGoalPoint(IPoint2D loc, ArenaMap map, double lookAhead) {\n\t\tIPoint2D tmp = map.lastPointInRange(loc, lookAhead, true);\n\t\tRobot.managedPrinter.println(getClass(), \"next goal point: \" + tmp);\n\t\tif (tmp != null) {\n\t\t\ttmp.toDashboard(\"Goal point\");\n\t\t\tNetworkTable.getTable(\"motion\").putNumber(\"pointIdx\", ((IndexedPoint2D) tmp).getIndex());\n\t\t}\n\t\treturn tmp;\n\t}", "public void startDraw(Vector2 point){\n path.add(point);\n }", "public void setPosition(Point point) {\n setPosition(point.x, point.y);\n }", "protected void updateImpl(@NotNull final ParticleData particleData, final float tpf) {\n\n }", "public void updateIgnition(Point point) {\n WorldItem item = point.getContainedItem();\n if (item instanceof FlammableItem) {\n FlammableItem flammable = (FlammableItem) item;\n if (!flammable.isOnFire()) {\n if (point.getCurrentTemp() >= flammable.getCombustionThreshold()) {\n flammable.ignite();\n itemsOnFire++;\n fireLocations[getLastSpotInArray(fireLocations)] = point;\n }\n }\n }\n }" ]
[ "0.60878444", "0.57145864", "0.5708164", "0.5440586", "0.5439582", "0.5428402", "0.5400706", "0.53548396", "0.5325962", "0.5232168", "0.5231849", "0.5152055", "0.5136777", "0.51128894", "0.5036835", "0.5022935", "0.49896684", "0.4980853", "0.49609426", "0.4958456", "0.49540344", "0.49469697", "0.4945884", "0.49399978", "0.49364448", "0.49167383", "0.49065885", "0.49030834", "0.48954663", "0.48769355", "0.48736343", "0.48610827", "0.48414153", "0.48387334", "0.4818276", "0.4815844", "0.48013303", "0.47827736", "0.47775462", "0.47729853", "0.4754862", "0.47399133", "0.47178882", "0.47163445", "0.46997565", "0.469098", "0.46686777", "0.46597627", "0.46560624", "0.46466935", "0.46340284", "0.46265426", "0.46236202", "0.46234277", "0.4612973", "0.460421", "0.46040076", "0.46020645", "0.46009308", "0.45990092", "0.45949745", "0.45865586", "0.458344", "0.45830908", "0.45744613", "0.45670778", "0.45641604", "0.4561302", "0.45588616", "0.45555955", "0.454533", "0.45345953", "0.45336244", "0.45269856", "0.45130575", "0.44996607", "0.44996607", "0.44954395", "0.44949314", "0.44901103", "0.4489438", "0.44879454", "0.44818592", "0.44775343", "0.44662485", "0.44655654", "0.44608954", "0.44606686", "0.44601655", "0.44558764", "0.44499794", "0.444396", "0.44423077", "0.4442259", "0.4437406", "0.4436672", "0.4434469", "0.44342756", "0.4427782", "0.44264385" ]
0.6344224
0
Anomaly score evaluated sequentially with option of early stopping the early stopping parameter precision gives an approximate solution in the range (1precision)score(q) precision, (1+precision)score(q) + precision for the score of a point q. In this function z is hardcoded to 0.1. If this function is used, then not all the trees will be used in evaluation (but they have to be updated anyways, because they may be used for the next q). The advantage is that "almost certainly" anomalies/nonanomalies can be detected easily with few trees.
public double getApproximateAnomalyScore(double[] point) { if (!isOutputReady()) { return 0.0; } Function<RandomCutTree, Visitor<Double>> visitorFactory = tree -> new AnomalyScoreVisitor(point, tree.getRoot().getMass()); ConvergingAccumulator<Double> accumulator = new OneSidedConvergingDoubleAccumulator( DEFAULT_APPROXIMATE_ANOMALY_SCORE_HIGH_IS_CRITICAL, DEFAULT_APPROXIMATE_DYNAMIC_SCORE_PRECISION, DEFAULT_APPROXIMATE_DYNAMIC_SCORE_MIN_VALUES_ACCEPTED, numberOfTrees); Function<Double, Double> finisher = x -> x / accumulator.getValuesAccepted(); return traverseForest(point, visitorFactory, accumulator, finisher); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test069() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[4];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, (-1.0));\n assertEquals(Double.NEGATIVE_INFINITY, evaluation0.meanPriorAbsoluteError(), 0.01);\n }", "public EpsilonGreedyExploration(double epsilon) {\n this.epsilon = epsilon;\n }", "protected boolean testPrecision ()\n {\n double precision = relativePrecision / (1.0 + relativePrecision);\n \n /******************************************************\n * Check the relative precision\n */\n double relPrecision = agentStat.confidence () / agentStat.mean ();\n\n trc.show (\"testPrecision\", \" precision = \" + precision +\n \" relPrecision = \" + relPrecision);\n\n if (numMeans < 2) {\n return false;\n } else { \n return relPrecision <= precision;\n } // if\n\n }", "public double epsilon();", "public EpsilonGreedyStrategy(double epsilon) {\n this.epsilon = epsilon;\n }", "public static double averagePrecision(RankingOutput yi, RankingOutput y) {\n\t\tint[] ranking = new int[yi.getNumberOfExamples()]; \n\t\t// Stores list of images sorted by rank. Higher rank to lower rank \n\t\tint[] sortedExamples = new int[yi.getNumberOfExamples()]; \n\n\t\t// convert rank matrix to rank list\n\t\tfor(int i=0; i<yi.getNumberOfExamples(); i++){\n\t\t\t// start with lowest rank for each sample i.e 1 \n\t\t\tranking[i] = 1; \n\t\t\tfor(int j=0; j<yi.getNumberOfExamples(); j++){\n\t\t\t\tif(y.getRanking(i) > y.getRanking(j)){\n\t\t\t\t\tranking[i] = ranking[i] + 1;\n\t\t\t\t} \n\t\t\t}\n\t\t\tsortedExamples[yi.getNumberOfExamples() - ranking[i]] = i;\n\t\t} \n\n\t\tint posCount = 0;\n\t\tint totalCount = 0;\n\t\tdouble precisionAti = 0;\n\t\tfor(int i=0; i<yi.getNumberOfExamples(); i++){\n\t\t\tint label = yi.getLabel(sortedExamples[i]);\n\t\t\tif(label == 1){\n\t\t\t\tposCount++;\n\t\t\t\ttotalCount++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttotalCount++;\n\t\t\t}\n\t\t\tif(label == 1){\n\t\t\t\tprecisionAti = precisionAti + (double)posCount/(double)totalCount;\n\t\t\t}\n\t\t}\n\t\tprecisionAti = precisionAti/posCount;\n\n\t\treturn precisionAti;\n\t}", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-398.0145), 360.0);\n assertEquals(Double.NaN, evaluation0.rootMeanPriorSquaredError(), 0.01);\n }", "private void doEpsilon(){\n\t\tcurrentState = \"q0\";\n\t}", "private void updatePrecisionAndRecallAndAp(List<ScoreRetrieval> results, List<QuerieDocRelevance> queryRelevance){\n List<Double> precisionQuerieAP = new ArrayList<>();\n List<Double> precisionQuerieAPRankedTop = new ArrayList<>();\n int tp=0;\n int fp=0;\n int fn=0;\n int cont=0;\n int rankMax=10;\n \n //results.stream().map(ScoreRetrieval::getDocId).filter( docId -> querieRelevance.contains(docId)).mapToInt(List::size).sum();\n \n for(ScoreRetrieval result : results){\n if(queryRelevance.stream().filter(o -> o.getDocID()==result.getDocId()).findFirst().isPresent()){ \n tp++;\n precisionQuerieAP.add(tp/(double)(tp+fp));\n if(cont<rankMax){\n precisionQuerieAPRankedTop.add(tp/(double)(tp+fp));\n }\n }else{\n fp++;\n }\n cont++;\n }\n if(precisionQuerieAP.isEmpty()){\n apRes.add(0.0);\n }else{\n apRes.add(precisionQuerieAP.stream().mapToDouble(d->d).sum()/precisionQuerieAP.size());\n }\n if(precisionQuerieAPRankedTop.isEmpty()){\n apResRankedTopLimited.add(0.0);\n }else{\n apResRankedTopLimited.add(precisionQuerieAPRankedTop.stream().mapToDouble(d->d).sum()/precisionQuerieAPRankedTop.size());\n }\n \n \n for(QuerieDocRelevance querieRel : queryRelevance){\n if(!(results.stream().filter(q -> q.getDocId()==querieRel.getDocID()).findFirst().isPresent())){\n fn++; \n }\n }\n \n precision.add(tp/(double)(tp+fp));\n recall.add(tp/(double)(tp+fn));\n }", "@Test\n public void test02() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[6];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, '\\u0086');\n assertEquals(Double.POSITIVE_INFINITY, evaluation0.meanPriorAbsoluteError(), 0.01D);\n }", "@Test\n public void testFirstPositiveExtreme(){\n double extremeX = 2.0884971449233825358269495952366013421428061969691576000370777169;\n double extremeY = 0.76756354102375411049030346684527510737400057387717261292998154511104;\n\n precisionAssertEquals(\n \"Test [x = e^(2^(2/3) (log(5)/(7 log(10)))^(1/3))]: first positive extreme\",\n extremeY,\n systemFunctions.calculate(extremeX)\n );\n assertTrue(\n \"Test [x = 2.0]: extreme value Y less than left neighborhood value\",\n systemFunctions.calculate(2.0) > extremeY\n );\n assertTrue(\n \"Test [x = 2.1]: extreme value Y less than right neighborhood value\",\n systemFunctions.calculate(2.1) > extremeY\n );\n }", "@Test\n public void testFirstPositiveExtreme(){\n double extremeX = 2.0884971449233825358269495952366013421428061969691576000370777169;\n double extremeY = 0.76756354102375411049030346684527510737400057387717261292998154511104;\n\n precisionAssertEquals(\n \"Test [x = e^(2^(2/3) (log(5)/(7 log(10)))^(1/3))]: first positive extreme\",\n extremeY,\n systemFunctions.calculate(extremeX)\n );\n assertTrue(\n \"Test [x = 2.0]: extreme value Y less than left neighborhood value\",\n systemFunctions.calculate(2.0) > extremeY\n );\n assertTrue(\n \"Test [x = 2.1]: extreme value Y less than right neighborhood value\",\n systemFunctions.calculate(2.1) > extremeY\n );\n }", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.meanAbsoluteError();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void setEpsilon(double epsilon) {\n\t\tthis.epsilon = epsilon;\n\t}", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.relativeAbsoluteError();\n assertEquals(Double.NaN, evaluation0.meanPriorAbsoluteError(), 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, evaluation0.meanAbsoluteError(), 0.01);\n }", "@Test\n public void testOneUserTrecevalStrategySingleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 1.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "public int defaultAnomaly(int total);", "public double getEpsilon() {\n\t\treturn epsilon;\n\t}", "public void driver() {\r\n \t// At the last time point assume exponentials are largely decayed and most of what is\r\n \t// left is the constant a[0] term.\r\n gues[0] = ySeries[ySeries.length-1];\r\n for (int i = 0; i < (a.length-1)/2; i++) {\r\n \tgues[2*i+1] = 1.0;\r\n \tgues[2*i+2] = -1.0;\r\n }\r\n super.driver();\r\n }", "public RootFinder(float lower, float upper, float accuracy){\n this.a = lower;\n this.b = upper;\n this.e = accuracy;\n \n }", "public void setEpsilon(double e) {\n\t\tepsilon = e;\n\t}", "public abstract Self epsilon();", "int getPrecision(int iterations);", "@Test\n public void testScoreUpdate() {\n try {\n final BestEvalScore score = new BestEvalScore(\"thjtrfwaw\");\n double expected = 0;\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n final Evaluation eval = new Evaluation(2);\n eval.eval(0,1);\n eval.eval(1,1);\n\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(0,1);\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(1,1);\n eval.eval(1,1);\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to create instance!\", e);\n }\n\n\n }", "public double getAnomalyScore() {\n\t\treturn anomalyScore;\n\t}", "@Test\n public void testOneUserTrecevalStrategyMultipleRelevance() {\n DataModelIF<Long, Long> test = DataModelFactory.getDefaultModel();\n DataModelIF<Long, Long> predictions = DataModelFactory.getDefaultModel();\n test.addPreference(1L, 2L, 0.0);\n test.addPreference(1L, 3L, 1.0);\n test.addPreference(1L, 4L, 2.0);\n predictions.addPreference(1L, 1L, 3.0);\n predictions.addPreference(1L, 2L, 4.0);\n predictions.addPreference(1L, 3L, 5.0);\n predictions.addPreference(1L, 4L, 1.0);\n\n Precision<Long, Long> precision = new Precision<Long, Long>(predictions, test, 1.0, new int[]{1, 2, 3, 4, 5});\n\n precision.compute();\n\n assertEquals(0.5, precision.getValue(), 0.001);\n assertEquals(1.0, precision.getValueAt(1), 0.001);\n assertEquals(0.5, precision.getValueAt(2), 0.001);\n assertEquals(0.3333, precision.getValueAt(3), 0.001);\n assertEquals(0.5, precision.getValueAt(4), 0.001);\n assertEquals(0.4, precision.getValueAt(5), 0.001);\n\n Map<Long, Double> precisionPerUser = precision.getValuePerUser();\n for (Map.Entry<Long, Double> e : precisionPerUser.entrySet()) {\n long user = e.getKey();\n double value = e.getValue();\n assertEquals(0.5, value, 0.001);\n }\n }", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC((-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "void computePrecisionAndRecall(int paraLikeThreshold, int paraK, int paraN, double paraMax, double paraBelta,\n\t\t\tdouble paraGama) {\n\n\t\t// System.out.println(\"the uTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRateInds);\n\t\t// System.out.println(\"the uTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTrRatings);\n\t\t// System.out.println(\"the iTrRateInds is: \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRateInds);\n\t\t// System.out.println(\"the iTrRatings is : \");\n\t\t// SimpleTool.printMatrix(dataModel.iTrRatings);\n\t\t// System.out.println(\"the uTeRateInds is : \");\n\t\t// SimpleTool.printMatrix(dataModel.uTeRateInds);\n\t\t// System.out.println(Arrays.toString(dataModel.uTeDgr));\n\n\t\tint tempSucRecLen = 0;\n\t\tint tempRecLen = 0;\n\t\tint tempLikeLen = 0;\n\t\tint tempCount = 0;\n\t\tdouble tempNDCG = 0;\n\t\tfor (int i = 0; i < dataModel.userNum; i++) {\n\t\t\t// System.out.println(\"the user is \" + i + \" , the length is \" +\n\t\t\t// dataModel.uTeRateInds[i].length);\n\t\t\tint[] tempRecLists = recommendListForOneUser(i, paraLikeThreshold, paraK, paraN, paraBelta, paraGama);\n\t\t\t// System.out.println(\"the reclist is \" + Arrays.toString(tempRecLists));\n\t\t\tint[] tempLikeLists = likeListForOneUser(i, paraLikeThreshold);\n\t\t\t// System.out.println(\"the likelist is \" + Arrays.toString(tempLikeLists));\n\t\t\tint[] tempInterSection = SetOperator.interSection(tempRecLists, tempLikeLists);\n\n\t\t\t// System.out.println(\"User \" + i + \" recommend lists: \");\n\t\t\t// SimpleTool.printIntArray(tempRecLists);\n\t\t\tif (tempInterSection != null) {\n\t\t\t\ttempSucRecLen = tempInterSection.length;\n\t\t\t\ttempRecLen = tempRecLists.length;\n\t\t\t\ttempLikeLen = tempLikeLists.length;\n\t\t\t\tif (tempRecLen > 1e-6) {\n\t\t\t\t\tprecision += (tempSucRecLen + 0.0) / tempRecLen;\n\t\t\t\t\ttempNDCG = computeNDCG(i, tempRecLists, paraMax);\n\t\t\t\t\tNDCG += tempNDCG;\n\t\t\t\t} // Of if\n\t\t\t\tif (tempLikeLen > 1e-6) {\n\t\t\t\t\trecall += (tempSucRecLen + 0.0) / tempLikeLen;\n\t\t\t\t} // Of if\n\t\t\t} else {\n\t\t\t\ttempCount++;\n\t\t\t\tcontinue;// Of if\n\t\t\t}\n\n\t\t} // Of for i\n\t\t\t// System.out.println(\"the count is: \" + tempCount);\n\t\tprecision = precision / (dataModel.userNum - tempCount);\n\t\trecall = recall / (dataModel.userNum - tempCount);\n\t\tNDCG = NDCG / (dataModel.userNum - tempCount);\n\t}", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testGetAnomalyAttribution(RandomCutForest forest) {\n\n double [] point = {0.0,0.0,0.0};\n DiVector seenResult = forest.getAnomalyAttribution(point);\n double seenScore = forest.getAnomalyScore(point);\n assertTrue(seenResult.getHighLowSum(0) < 0.5);\n assertTrue(seenResult.getHighLowSum(1) < 0.5);\n assertTrue(seenResult.getHighLowSum(2) < 0.5);\n assertTrue(seenScore < 1.0);\n assertEquals(seenScore, seenResult.getHighLowSum(), 1E-10);\n\n DiVector likelyResult = forest.getApproximateAnomalyAttribution(point);\n double score=forest.getApproximateAnomalyScore(point);\n assertTrue(likelyResult.getHighLowSum(0) < 0.5);\n assertTrue(likelyResult.getHighLowSum(1) < 0.5);\n assertTrue(likelyResult.getHighLowSum(2) < 0.5);\n assertEquals(score, likelyResult.getHighLowSum(), 0.1);\n assertEquals(seenResult.getHighLowSum(), likelyResult.getHighLowSum(), 0.1);\n }", "public static void evaluateStdin(\n HashMap < String , HashMap < Integer , Double > > relevance_judgments,String outputPath){\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String line = null;\n double RR = 0.0;\n double N = 0.0;\n int lineCount = 0;\n\n Vector<Integer> level = new Vector<Integer>();\n level.add(1);\n level.add(5);\n level.add(10);\n\n int numRelevant = -1;\n Vector<Double>precision = new Vector<Double>();\n Vector<Double>recall = new Vector<Double>();\n Vector<Double>fmeasure = new Vector<Double>();\n Vector<Double> pAtR = new Vector<Double>();\n Vector<Double> ndcg = new Vector<Double>();\n Vector<Double> reli = new Vector<Double>();\n for (int i = 0; i<=10; i++)\n pAtR.add(0.0);\n // pAtR.set(0,1.0);\n\n int relevance_count = 0;\n int levelReach = 0;\n double currentPrecision = 0.0;\n double currentRecall = 0.0;\n double sumForAveragePrecision = 0.0;\n Double averagePrecision = 0.0;\n String query = \"\";\n Double reciprocal = 0.0;\n while ((line = reader.readLine()) != null&&!line.equals(\"\")){\n Scanner s = new Scanner(line).useDelimiter(\"\\t\");\n query = s.next();\n int did = Integer.parseInt(s.next());\n String title = s.next();\n double rel = Double.parseDouble(s.next());\n\n if (relevance_judgments.containsKey(query) == false) {\n throw new IOException(\"query not found\");\n }\n HashMap < Integer , Double > qr = relevance_judgments.get(query);\n\n if (numRelevant == -1)\n numRelevant = countRelevant(qr);\n\n lineCount++;\n if (qr.containsKey(did)&&qr.get(did) > 1.0) {\n if (relevance_count == 0)\n reciprocal = 1.0 / lineCount;\n relevance_count++;\n }\n currentPrecision = (double)relevance_count/(double)lineCount;\n if (numRelevant == 0)\n currentRecall = 0.0;\n else\n currentRecall = (double)relevance_count/(double)numRelevant;\n\n if (qr.containsKey(did)&&qr.get(did) > 1.0) {\n sumForAveragePrecision += currentPrecision;\n }\n for (int i = 0; i<=10; i++)\n if (currentRecall>=0.1*i) {\n if (currentPrecision>pAtR.get(i))\n pAtR.set(i,currentPrecision);\n }\n\n\n if (levelReach<level.size()) {\n if (qr.containsKey(did))\n reli.add(qr.get(did));\n else\n reli.add(0.0);\n\n if (level.get(levelReach) == lineCount) {\n\n precision.add(currentPrecision);\n recall.add(currentRecall);\n double upper = precision.get(levelReach)*recall.get(levelReach)*2.0;\n double lower = precision.get(levelReach) + recall.get(levelReach);\n if (lower == 0)\n fmeasure.add(0.0);\n else\n fmeasure.add(upper/lower);\n levelReach++;\n Vector<Double> sortedReli = new Vector<Double>();\n for (int i = 0; i<reli.size();i++)\n sortedReli.add(reli.get(i));\n\t\t // System.out.println(\"reli\");\n\t\t /* for (Integer i = 0; i<reli.size();i++) {\n System.out.print(reli.get(i).toString()+\" \");\n\t\t }*/\n\n Collections.sort(sortedReli);\n Collections.reverse(sortedReli);\n\t\t // System.out.println(\"sortedReli\");\n\t\t // for (int i = 0; i<reli.size();i++)\n\t\t // System.out.print(sortedReli.get(i).toString()+\" \");\n Double dcg = calculateDCG(reli);\n Double idcg = calculateDCG(sortedReli);\n\t\t // System.out.println(\"\\n\");\n\t\t // System.out.println(\"dcg=\"+dcg.toString()+\" idcg=\"+idcg.toString());\n if (idcg!=0)\n ndcg.add(dcg/idcg);\n else\n ndcg.add(0.0);\n\t\t // System.out.println(\"ndcg=\"+ndcg.get(ndcg.size()-1).toString());\n }\n }\n }\n\n String response = new String();\n response = query + \"\\t\";\n for (int i = 0; i<precision.size();i++)\n response= response+precision.get(i).toString()+\"\\t\";\n // response = response + \"\\n\";\n\n for (int i = 0; i<recall.size();i++)\n response= response+recall.get(i).toString()+\"\\t\";\n // response = response + \"\\n\";\n\n for (int i = 0; i<fmeasure.size();i++)\n response= response+fmeasure.get(i).toString()+\"\\t\";\n // response = response + \"\\n\";\n\n for (int i = 0; i<pAtR.size();i++)\n response= response+pAtR.get(i).toString()+\"\\t\";\n // response = response + \"\\n\";\n if (relevance_count == 0)\n averagePrecision = 0.0;\n else\n averagePrecision = sumForAveragePrecision / relevance_count;\n response = response + averagePrecision.toString() + \"\\t\";\n // response = response + \"\\n\";\n\n for (int i= 0; i<ndcg.size();i++)\n response = response + ndcg.get(i) + \"\\t\";\n //response = response + \"\\n\";\n\n response = response+reciprocal.toString() + \"\\n\";\n System.out.println(response);\n FileWriter fstream = new FileWriter(outputPath,true);\n BufferedWriter out = new BufferedWriter(fstream);\n out.write(response);\n out.close();\n\n\n } catch (Exception e){\n System.err.println(\"Error:\" + e.getMessage());\n }\n }", "@Test\n\tpublic void gapsLeadToBadQuality() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tt1.addValue(new SampledValue(new FloatValue(234F), 60, Quality.BAD));\n\t\tt0.setInterpolationMode(InterpolationMode.STEPS);\n\t\tt1.setInterpolationMode(InterpolationMode.STEPS);\n\t\tfinal ReadOnlyTimeSeries avg = MultiTimeSeriesUtils.getAverageTimeSeries(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0L, 110);\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(59).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(60).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(63).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(70).getQuality());\n\t}", "private int evaluateChildren() {\n if (PRINT_PROGRESS) {\n System.out.println(\"Evaled:\"+boardsEvaluated);\n }\n if (this.children == null || this.children.isEmpty()) { // Exit case: Node is a leaf\n return evaluateBoard(this.board);\n }\n \n int bestEval = Integer.MIN_VALUE;\n for (final BoardTree child : this.children) {\n child.evaluation = child.evaluateChildren();\n if (child.evaluation > bestEval) {\n bestEval = child.evaluation;\n }\n }\n return bestEval;\n }", "private float getQScore(Stone[][] board, int line, int col,\n int depth, int initialDepth){\n Chain chain = new Chain();\n Stone stone;\n if(depth % 2 == 1) stone = new Stone(color ? \"black\" : \"white\", chain);\n else stone = new Stone(color ? \"white\" : \"black\", chain);\n stone.setPosition(line, col);\n int nrStonesRemoved, chainSize, chainLiberties, score;\n board[line][col] = stone;\n //verific daca am luat pietre detinute de oponent\n nrStonesRemoved = Control.verifyNeighbourStones(board, stone.getColor(),\n line, col, false);\n //efectuez eventualele modificari ale lanturilor proprii ce pot aparea in urma plasarii pietrei\n Control.combineChains(board, stone, stone.getColor(), line, col);\n chainSize = stone.getChain().getStones().size();\n chainLiberties = stone.getChain().getLibertiesNumber();\n //aflu scorul starii\n score = nrStonesRemoved * 10 + chainSize * 30 + chainLiberties * 50;\n\n if(depth == 0){\n return (initialDepth % 2 == 1) ? -score : score;\n }\n\n float currentScore, max = 0;\n for(int i = 0; i < size; i++)\n for(int j = 0; j < size; j++){\n chain = new Chain();\n if(depth % 2 == 1) stone = new Stone(color ? \"white\" : \"black\", chain);\n else stone = new Stone(color ? \"black\" : \"white\", chain);\n stone.setPosition(i, j);\n int[] lib = Control.verifyLiberties(board, stone, i, j);\n if(board[i][j] == null && lib[0] + lib[1] != 0){\n currentScore = getQScore(board, i, j, depth - 1, initialDepth);\n if(currentScore > max){\n max = currentScore;\n }\n }\n }\n\n score += max * (depth / initialDepth);\n return (depth % 2 == 1) ? score : -score;\n }", "public double sqrt(double number, double precision){\n\t\t\n\t\t//if the number is less than 0, throw an exception.\n\t\tif(number <0)\n\t\t\tthrow new IllegalArgumentException(\"Give a value greater than 0:\"+number);\n\t\t//if the number is the same as 0 or 1 return the same number.\n\t\tif(number==0 ||number ==1)\n\t\t\treturn number;\n\t\telse if (number >0 && number <1){\n\t\t\treturn 1/(sqrt((1/number),precision));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//else begin a typical binary search\n\t\t\t//set start =0, end = number\n\t\t\tdouble start =0, mid =0, end = number;\n\t\t\tdouble midSq =0;\n\t\t\t\n\t\t\t//do while end -start is greater than precision.\n\t\t\twhile (end - start> precision)\n\t\t\t{\n\t\t\t\t// get average.\n\t\t\t\tmid = (start+end)/2;\n\t\t\t\t\n\t\t\t\t//calculate the product of the average.\n\t\t\t\tmidSq = mid * mid;\n\t\t\t\t\n\t\t\t\t//if the product equals the number, return the average.\n\t\t\t\tif(midSq == number)\n\t\t\t\t\treturn mid;\n\t\t\t\t//if you fall lesser than the number, set start to mid\n\t\t\t\telse if(midSq < number)\n\t\t\t\t\tstart = mid;\n\t\t\t\t//else set end to mid\n\t\t\t\telse\n\t\t\t\t\tend = mid;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn mid;\n\t\t\t\n\t\t}\n\t\n\t\t\n\t}", "public double threshold(double z) {\n\t\tif(z>=0) {\n\t\t\treturn 1;\n\t\t}else {\n\t\t\treturn 0;\n\t\t}\n\t}", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "public void setEpsilon(double epsilon) {\n this.epsilon = Math.max( 0.0, Math.min( 1.0, epsilon ) );\n }", "public int[] anomalyRate(TreeNode traceRoot){\r\n\t\tint[] ret = new int[ANOMALIES_CALCULATORS];\r\n\t\tfor(int i = 0; i < ret.length; i++){\r\n\t\t\tret[i] = 0;\r\n\t\t}\r\n\t\tret = anomalyTreeParse(ret, traceRoot, treeRoot);\r\n\t\treturn ret;\r\n\t}", "double computePrecision(int[][] paraPredicionMatrix) {\n double tempPrecision = 0.0;\n int tempTotal = 0;\n int temptempPrecisionCount = 0;\n for (int i = 0; i < paraPredicionMatrix.length; i++) {\n for (int j = 0; j < paraPredicionMatrix[i].length; j++) {\n if (paraPredicionMatrix[i][j] == 1) {\n tempTotal++;\n if (formalContext.testingFormalContext[i][j] > 0) {\n temptempPrecisionCount++;\n } // End if\n } // End if\n } // End for j\n } // End for i\n System.out.println(\"temptempPrecisionCount: \" + temptempPrecisionCount);\n System.out.println(\"tempTotal: \" + tempTotal);\n if (temptempPrecisionCount == 0) {\n return 0.0;\n } // End if\n tempPrecision = (temptempPrecisionCount + 0.0) / tempTotal;\n return tempPrecision;\n }", "@Override\n\tpublic boolean qualityExpected(Tree tree) \n\t{\n\t\treturn true;\n\t}", "@Test\n\tpublic void test() {\n\t\tdouble delta = 0.00001;\n\t\tSnp fakeSnp1 = new Snp(\"fakeId1\", 0, 0.3);\n\t\tSnp fakeSnp2 = new Snp(\"fakeId2\", 0, 0.8);\n\t\tSnp fakeSnp3 = new Snp(\"fakeId3\", 0, 1.4);\n\t\tPascal.set.withZScore_=true;\n\t\tArrayList<Snp> geneSnps = new ArrayList<Snp>();\n\t\tgeneSnps.add(fakeSnp1);geneSnps.add(fakeSnp2);geneSnps.add(fakeSnp3);\n\t\tDenseMatrix ld= new DenseMatrix(3,3);\n\t\t//DenseMatrix crossLd= new DenseMatrix(3,2);\n\t\t\n\t\tArrayList<Double> snpScores = new ArrayList<Double>(3);\n\t\tsnpScores.add(fakeSnp1.getZscore());\n\t\tsnpScores.add(fakeSnp2.getZscore());\n\t\tsnpScores.add(fakeSnp3.getZscore());\n\t\t//ld and crossLd calculated as follows:\n\t\t// make 0.9-toeplitz mat of size 5.\n\t\t// 3,4,5 for ld-mat\n\t\t// 1,2 for crossLd-mat\n\t\tld.set(0,0,1);ld.set(1,1,1);ld.set(2,2,1);\n\t\tld.set(0,1,0.9);ld.set(1,2,0.9);\n\t\tld.set(1,0,0.9);ld.set(2,1,0.9);\n\t\tld.set(0,2,0.81);\n\t\tld.set(2,0,0.81);\n\t\tdouble[] weights = {2,2,2};\n\t\tAnalyticVegas myAnalyticObj= null;\n\t\t//UpperSymmDenseMatrix myMatToDecompose = null;\n\t\tdouble[] myEigenvals = null;\n\t\tdouble[] emptyWeights = {1,1,1};\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, emptyWeights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\n\t\tassertEquals(myEigenvals[0],2.74067, delta);\n\t\tassertEquals(myEigenvals[1],0.1900, delta);\n\t\tassertEquals(myEigenvals[2],0.06932, delta);\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\t\n\t\tassertEquals(myEigenvals[0], 5.481348, delta);\n\t\tassertEquals(myEigenvals[1],0.380000, delta);\n\t\tassertEquals(myEigenvals[2],0.138652, delta);\n\t\t\t\n\t\tdouble[] weights2 = {1,2,0.5};\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights2);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\n\t\tassertEquals(myEigenvals[0],3.27694674, delta);\n\t\tassertEquals(myEigenvals[1],0.1492338, delta);\n\t\tassertEquals(myEigenvals[2],0.07381938, delta);\t\t\t\n\t\t\n\t}", "@Test\n public void testApproximation() {\n int N = 100;\n Mesh mesh = new Mesh(equation.t0, equation.tN, N);\n Noise noise = new Noise(mesh, 10);\n\n // We will use SDG method to approximate with a polynomial degree of p = 4.\n int p = 4;\n SDG sdg = new SDG();\n ApproxGlobal approxGlobal = sdg.Solve(equation, noise, mesh, p);\n\n // For every element, we check that the approximation at the endpoint is within 10e-10\n // of the analytical solution.\n for(int i = 0; i < approxGlobal.localApproximations.length; i++){\n ApproxLocal local = approxGlobal.localApproximations[i];\n\n double totalNoise = noise.sumUntil(i);\n double t = mesh.elements[i].upperEndpoint;\n\n double expected = this.equation.exactSolution(t, totalNoise);\n double actual = local.terminal();\n\n assertEquals(expected, actual, 10e-10);\n }\n }", "public void testZZZZEOCSettings() throws Exception{\n\n // Sort order:\n // Primary Sort = number of solved problems (high to low)\n // Secondary Sort = score (low to high)\n // Tertiary Sort = earliest submittal of last submission (low to high)\n // Forth Sort = teamName (low to high)\n // Fifth Sort = clientId (low to high)\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,250,No\",\n \"2,1,A,290,Yes\", \n\n // t5 solves A, 310 pts = 20 + 290\n // but with ECO settings, yes is not seen, so 0\n \n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n // rank, team, solved, pts\n \"1,team1,0,0\",\n };\n // without EOC permission\n String [] rankData2 = {\n // rank, team, solved, pts\n \"1,team1,1,310\",\n };\n \n InternalContest contest = new InternalContest();\n\n initData(contest, 1, 5);\n ContestTime contestTime = new ContestTime(1);\n contestTime.setElapsedMins(300);\n contest.updateContestTime(contestTime);\n JudgementNotificationsList judgementNotificationsList = new JudgementNotificationsList();\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Run[] runs = contest.getRuns();\n NotificationSetting notificationSetting = new NotificationSetting(runs[0].getProblemId());\n JudgementNotification judgementNotification = new JudgementNotification(true, 30);\n notificationSetting.setFinalNotificationYes(judgementNotification);\n JudgementNotification judgementNotificationNo = new JudgementNotification(false, 30);\n notificationSetting.setFinalNotificationNo(judgementNotificationNo);\n judgementNotificationsList.add(notificationSetting);\n contest.getContestInformation().updateJudgementNotification(notificationSetting);\n\n checkOutputXML(contest);\n\n confirmRanks(contest, rankData2);\n\n Account account = contest.getAccount(contest.getClientId());\n account.addPermission(edu.csus.ecs.pc2.core.security.Permission.Type.RESPECT_EOC_SUPPRESSION);\n contest.updateAccount(account);\n\n checkOutputXML(contest);\n\n confirmRanks(contest, rankData);\n }", "private static float calculateTrueAnomaly(float m, float e) {\n float e0 = m + e * MathUtil.sin(m) * (1.0f + e * MathUtil.cos(m));\n float e1;\n\n // iterate to improve accuracy\n int counter = 0;\n do {\n e1 = e0;\n e0 = e1 - (e1 - e * MathUtil.sin(e1) - m) / (1.0f - e * MathUtil.cos(e1));\n if (counter++ > 100) {\n Log.d(TAG, \"Failed to converge! Exiting.\");\n Log.d(TAG, \"e1 = \" + e1 + \", e0 = \" + e0);\n Log.d(TAG, \"diff = \" + MathUtil.abs(e0 - e1));\n break;\n }\n } while (MathUtil.abs(e0 - e1) > EPSILON);\n\n // convert eccentric anomaly to true anomaly\n float v =\n 2f * MathUtil.atan(MathUtil.sqrt((1 + e) / (1 - e))\n * MathUtil.tan(0.5f * e0));\n return Geometry.mod2pi(v);\n }", "public double threshold(double z) {\n\t\t// This must be implemented by you\n\t\tif(z>=0) {\n\t\t\treturn 1;\n\t\t}else {\n\t\t\treturn 0;\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n // Undeclared exception!\n try { \n evaluation0.precision(1450);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1450\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "public double computeMacroPrecision(){\n\t\tdouble res = 0;\n\t\t//iterate all labels to compute their individual precision values\n\t\tfor(Label l : labels){\n\t\t\tres += this.computePrecision(l);\n\t\t}\n\n\t\t//take the average\n\t\tres = res/((double)labels.size());\n\t\treturn res;\n\n\t}", "double getAbsoluteAccuracy();", "public double courseAverage()\n\t{\n\t\tdouble dQuiz;\n\t\tdouble dProj;\n\t\tdouble dTest;\n\t\tdouble dFinal;\n\t\tdouble dWeightedAvg;\n\t\t\n\t\tswitch(quizzesGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1:\n\t\t\t\tdQuiz= (1.0 * quiz1) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdQuiz=((1.0 * quiz1+quiz2)/2) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3)/3) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4)/4) * pctQ;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tdQuiz=((1.0 * quiz1 + quiz2 + quiz3 + quiz4 + quiz5)/5) * pctQ;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdQuiz = 0;\n\t\t}\n\t\tswitch(projGraded)\n\t\t{\n\t\t\t\n\t\t\tcase 1: \n\t\t\t\tdProj=((1.0 * proj1)) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdProj=((1.0 * proj1 + proj2)/2) * pctP;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3)/3)*pctP;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tdProj=((1.0 * proj1 + proj2 + proj3 + proj4)/4) * pctP;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdProj = 0;\n\t\t}\n\t\tswitch(testGraded)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\tdTest=(1.0 * test1) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tdTest=((1.0 * test1+test2)/2) * pctT;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tdTest=((1.0 * test1 + test2 + test3)/3) * pctT;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdTest = 0;\n\t\t}\n\t\tif(recordedFinalExam==true)\n\t\t{\n\t\t\tdFinal=finalExam*pctF;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdFinal=0;\n\t\t}\n\t\tdWeightedAvg= (dProj + dTest + dQuiz + dFinal);\n\t\treturn dWeightedAvg;\n\t\t\n\t}", "public Precision() {\n\t\tthis.threshold = 1.0;\n\t}", "@Override\n public double evaluate() throws Exception {\n return Math.log(getEx2().evaluate()) / Math.log(getEx2().evaluate());\n }", "@Test\n public void testParseSingleRoot2() {\n double[] root = new double[] {0.0, 0.75, 0.25};\n double[][] child = new double[][]{ {0.0, 0.0, 0.75}, {1.0, 0.0, 0.0}, {0.0, 0.25, 0.0} };\n int[] parents = new int[3]; \n double score = ProjectiveDependencyParser.parseSingleRoot(root, child, parents);\n System.out.println(Arrays.toString(parents)); \n assertEquals(0.0 + 1.0 + 0.75, score, 1e-13);\n JUnitUtils.assertArrayEquals(new int[]{1, -1, 1}, parents);\n }", "@Test\r\n public void testAverageacceleration() {\r\n System.out.println(\"Average Acceleration\");\r\n \r\n // Test case one.\r\n System.out.println(\"Test case #1\"); \r\n \r\n double distance = 200;\r\n long time = 16;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 0.78125;\r\n double result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case two.\r\n System.out.println(\"Test case #2\"); \r\n \r\n distance = 80;\r\n time = 200;\r\n \r\n \r\n expResult = .002;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case three.\r\n System.out.println(\"Test case #3\"); \r\n \r\n distance = 0;\r\n time = 15;\r\n \r\n \r\n expResult = 0;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case four.\r\n System.out.println(\"Test case #4\"); \r\n \r\n distance = 12;\r\n time = 1;\r\n \r\n \r\n expResult = 12;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case five.\r\n System.out.println(\"Test case #5\"); \r\n \r\n distance = 1;\r\n time = 1;\r\n \r\n \r\n expResult = 1;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case six.\r\n System.out.println(\"Test case #6\"); \r\n \r\n distance = 3;\r\n time = 8;\r\n \r\n \r\n expResult = .046875;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case seven.\r\n System.out.println(\"Test case #7\"); \r\n \r\n distance = 200;\r\n time = 1;\r\n \r\n \r\n expResult = 200;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n \r\n \r\n }", "public boolean epsilonEquals(Matrix3f m1, double epsilon) {\n\treturn Math.abs(m00 - m1.m00) <= epsilon\n\t&& Math.abs(m01 - m1.m01) <= epsilon\n\t&& Math.abs(m02 - m1.m02 ) <= epsilon\n\n\t&& Math.abs(m10 - m1.m10) <= epsilon\n\t&& Math.abs(m11 - m1.m11) <= epsilon\n\t&& Math.abs(m12 - m1.m12) <= epsilon\n\n\t&& Math.abs(m20 - m1.m20) <= epsilon\n\t&& Math.abs(m21 - m1.m21) <= epsilon\n\t&& Math.abs(m22 - m1.m22) <= epsilon;\n }", "public void testAltScoring() throws Exception {\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (Minute points for 1st Yes count)\n \"3,1,A,5,No\", // 20 (a No on a solved problem)\n \"4,1,A,7,Yes\", // zero (only \"No's\" count)\n \"5,1,A,9,No\", // 20 (another No on the solved problem)\n \n \"6,1,B,11,No\", // zero (problem has not been solved)\n \"7,1,B,13,No\", // zero (problem has not been solved)\n \n \"8,2,A,30,Yes\", // 30 (Minute points for 1st Yes)\n \n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n\n // Rank TeamId Solved Penalty\n \n // alt1: 0 0 200\n \n String[] alt1rankData = {\n \"1,team1,1,200\",\n \"2,team2,1,200\", // tie-breaker causes rank 2\n };\n \n scoreboardTest (2, runsData, alt1rankData, alt1);\n // alt2: 30 5 0\n String[] alt2rankData = {\n \"1,team1,1,45\", // 1 no@30 each + 3 min * 5\n \"2,team2,1,150\", // 5*30\n };\n \n scoreboardTest (2, runsData, alt2rankData, alt2);\n \n // alt3: 0 10 0\n String[] alt3rankData = {\n \"1,team1,1,30\", // 3 min * 10\n \"2,team2,1,300\", // 30 min * 10\n };\n \n scoreboardTest (2, runsData, alt3rankData, alt3);\n \n // alt4: 5 0 20\n String[] alt4rankData = {\n \"1,team2,1,20\", // base yes\n \"2,team1,1,25\", // base yes + 1 no\n };\n \n scoreboardTest (2, runsData, alt4rankData, alt4);\n\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.precision((-1484));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public boolean geq(Inatnum a) throws Exception {\n\t\tif((this.isZero() &&a.isZero())==true) {return true;}//if our first value is zero and our a value is zero then return true\n\t\tif((this.isZero())==false&&a.isZero()==true) {return true;}// if our first value isnt zero and our a value is then return true\n\t\tif((this.isZero())==true&&a.isZero()==false) {return false;}//if our first value is zero and our a value is not then return false\n\t\telse {return this.pred().geq(a.pred());\t}}", "NewtonRaphsonMeasures(int iterations, int tries, int time, double quality) {\n this.iterations = iterations;\n this.tries = tries;\n this.time = time;\n this.quality = quality;\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "private static String getPrecisionResults (Index i, Searcher s, ArrayList<String> queries, ArrayList<ArrayList<String>> relevantFilenames) {\n s.build(i);\n RelevanceUtils.setIndex(i);\n \n ArrayList<Double> p5s = new ArrayList<>();\n ArrayList<Double> p10s = new ArrayList<>();\n \n for (int j = 0; j < queries.size(); j++) {\n List<ScoredTextDocument> results = s.search(queries.get(j));\n p5s.add(RelevanceUtils.calculatePrecision(results, relevantFilenames.get(j), 5));\n p10s.add(RelevanceUtils.calculatePrecision(results, relevantFilenames.get(j), 10));\n }\n \n Double averageP5 = Math.round(100.0 * RelevanceUtils.calculateAverage(p5s)) / 100.0;\n Double averageP10 = Math.round(100.0 * RelevanceUtils.calculateAverage(p10s)) / 100.0;\n return averageP5 + \"\\t\" + averageP10;\n }", "@Test\n public void testFifthPositiveRegionToFirstExtreme(){\n precisionAssertEquals(\n \"Test [x = 1.8]: fifth positive region\",\n 0.821522,\n systemFunctions.calculate(1.8)\n );\n precisionAssertEquals(\n \"Test [x = 1.9]: fifth positive region\",\n 0.794358,\n systemFunctions.calculate(1.9)\n );\n precisionAssertEquals(\n \"Test [x = 2.0]: fifth positive region\",\n 0.774356,\n systemFunctions.calculate(2.0)\n );\n }", "@Test\n public void testFifthPositiveRegionToFirstExtreme(){\n precisionAssertEquals(\n \"Test [x = 1.8]: fifth positive region\",\n 0.821522,\n systemFunctions.calculate(1.8)\n );\n precisionAssertEquals(\n \"Test [x = 1.9]: fifth positive region\",\n 0.794358,\n systemFunctions.calculate(1.9)\n );\n precisionAssertEquals(\n \"Test [x = 2.0]: fifth positive region\",\n 0.774356,\n systemFunctions.calculate(2.0)\n );\n }", "public static void calculateResults(ArrayList<Record> records) throws Exception{\r\n\t\tfor(Record record : records)\r\n\t\t{\r\n\t\t\tInteger score = 0;\r\n\r\n\t\t\t// 100m\r\n\t\t\tscore += calculateTrackScore((float)25.434, 18, (float)1.81, record.getHundredMResult());\r\n\r\n\t\t\t//long jump\r\n\t\t\tscore += calculateJumpScore((float)0.1435, 220, (float)1.4, record.getLongJumpResult());\r\n\r\n\t\t\t// shot put\r\n\t\t\tscore += calculateThrowScore((float)51.39, (float)1.5, (float)1.05, record.getShotPutResult());\r\n\r\n\t\t\t// high jump\r\n\t\t\tscore += calculateJumpScore((float)0.8465, 75, (float)1.42, record.getHighJumpResult());\r\n\r\n\t\t\t// 400 m\r\n\t\t\tscore += calculateTrackScore((float)1.53775, 82, (float)1.81,\r\n\t\t\t\t\tUtils.minutesToSeconds(record.getFourHundredMResult()));\r\n\r\n\t\t\t// 110 m hurdles\r\n\t\t\tscore += calculateTrackScore((float)5.74352, (float)28.5, (float)1.92, record.getOneHundredTenResult());\r\n\r\n\t\t\t// Discus throw\r\n\t\t\tscore += calculateThrowScore((float)12.91, 4, (float)1.10, record.getDiscusResult());\r\n\r\n\t\t\t// pole vault\r\n\t\t\tscore += calculateJumpScore((float)0.2797, 100, (float)1.35, record.getPoleVaultResult());\r\n\r\n\t\t\t// javelin throw\r\n\t\t\tscore += calculateThrowScore((float)10.14, 7, (float)1.08, record.getJavelinResult());\r\n\r\n\t\t\t// 1500 m\r\n\t\t\tscore += calculateTrackScore((float)0.03768, 480, (float)1.85,\r\n\t\t\t\t\tUtils.minutesToSeconds(record.getThousandFiveHundredResult()));\r\n\r\n\t\t\trecord.setScore(score);\r\n\t\t}\r\n\t}", "@Test\r\n public void testAppartentMagnitude() {\r\n System.out.println(\"appartentMagnitude\");\r\n \r\n // Test case one.\r\n System.out.println(\"Test case #1\"); \r\n \r\n double magnitude = 12;\r\n double distance = 200;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 0.0003;\r\n double result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case two.\r\n System.out.println(\"Test case #2\"); \r\n \r\n magnitude = 13;\r\n distance = -50;\r\n \r\n expResult = -999999;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case three.\r\n System.out.println(\"Test case #3\"); \r\n \r\n magnitude = 56;\r\n distance = 20;\r\n \r\n expResult = -999999;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, -999999);\r\n \r\n // Test case four.\r\n System.out.println(\"Test case #4\"); \r\n \r\n magnitude = 56;\r\n distance = 20;\r\n \r\n expResult = -999999;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case five.\r\n System.out.println(\"Test case #5\"); \r\n \r\n magnitude = 14;\r\n distance = 0;\r\n \r\n expResult = -999999;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case six.\r\n System.out.println(\"Test case #6\"); \r\n \r\n magnitude = -50;\r\n distance = 12;\r\n \r\n expResult = -0.3472;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case seven.\r\n System.out.println(\"Test case #7\"); \r\n \r\n magnitude = 50;\r\n distance = 20;\r\n \r\n expResult = 0.125;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case eight.\r\n System.out.println(\"Test case #8\"); \r\n \r\n magnitude = 13;\r\n distance = 1;\r\n \r\n expResult = 13;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n }", "public double empiricalLikelihood(int numSamples, ArrayList<ArrayList<Integer>> testing) {\n\t\tNCRPNode[] path = new NCRPNode[numLevels];\n\t\tNCRPNode node;\n\t\t\n\t\tpath[0] = rootNode;\n\n\t\tArrayList<Integer> fs;\n\t\tint sample, level, type, token, doc, seqLen;\n\n\t\tDirichlet dirichlet = new Dirichlet(numLevels, alpha);\n\t\tdouble[] levelWeights;\n\t\t//dictionary\n\t\tdouble[] multinomial = new double[numTypes];\n\n\t\tdouble[][] likelihoods = new double[ testing.size() ][ numSamples ];\n\t\t\n\t\t//for each sample\n\t\tfor (sample = 0; sample < numSamples; sample++) {\n\t\t\tArrays.fill(multinomial, 0.0);\n\n\t\t\t//select a path\n\t\t\tfor (level = 1; level < numLevels; level++) {\n\t\t\t\tpath[level] = path[level-1].selectExisting();\n\t\t\t}\n\t \n\t\t\t//sample level weights\n\t\t\tlevelWeights = dirichlet.nextDistribution();\n\t \n\t\t\t//for each words in dictionary\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\t//for each topic\n\t\t\t\tfor (level = 0; level < numLevels; level++) {\n\t\t\t\t\tnode = path[level];\n\t\t\t\t\tmultinomial[type] +=\n\t\t\t\t\t\tlevelWeights[level] * \n\t\t\t\t\t\t(eta + node.typeCounts[type]) /\n\t\t\t\t\t\t(etaSum + node.totalTokens);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//convert to log\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\tmultinomial[type] = Math.log(multinomial[type]);\n\t\t\t}\n\n\t\t\t//calculate document likelihoods \n\t\t\tfor (doc=0; doc<testing.size(); doc++) {\n fs = testing.get(doc);\n seqLen = fs.size();\n \n for (token = 0; token < seqLen; token++) {\n type = fs.get(token);\n likelihoods[doc][sample] += multinomial[type];\n }\n }\n\t\t}\n\t\n double averageLogLikelihood = 0.0;\n double logNumSamples = Math.log(numSamples);\n for (doc=0; doc<testing.size(); doc++) {\n \t\n \t//find the max for normalization, avoid overflow of sum\n double max = Double.NEGATIVE_INFINITY;\n for (sample = 0; sample < numSamples; sample++) {\n if (likelihoods[doc][sample] > max) {\n max = likelihoods[doc][sample];\n }\n }\n\n double sum = 0.0;\n //normalize \n for (sample = 0; sample < numSamples; sample++) {\n sum += Math.exp(likelihoods[doc][sample] - max);\n }\n\n //calc average\n averageLogLikelihood += Math.log(sum) + max - logNumSamples;\n }\n\n\t\treturn averageLogLikelihood;\n }", "static String three(String points) {\n AVL tree = new AVL(); // New Binary Search Tree Object\n ArrayGenerator arrayGen = new ArrayGenerator(); // Create Random Array\n\n int insertValue = arrayGen.getInsertValue();\n\n int[] arr = arrayGen.getArray(); // Get Random array\n\n tree.createAVL(arr); // Create AVL from array of values\n\n // Create Tree traversals\n tree.createTraversals();\n\n // Inorder and PostOrder of original AVL\n String orgInOrder = tree.traversal.getInOrder();\n String orgPostOrder = tree.traversal.getPostOrder();\n\n // Insert Value into tree\n tree.root = tree.insert(tree.root, insertValue);\n\n // Clear Traversals\n tree.traversal.clearTraversals();\n\n // Create New Tree traversals\n tree.createTraversals();\n\n // Get new PreOrder after Insert\n String newPreOrder = tree.traversal.getPreOrder();\n\n // Create Question\n String question = \"Suppose you have an AVL Tree with Inorder traversal \" + orgInOrder\n + \" and Postorder traversal \" + orgPostOrder + \". Now suppose you insert \" + insertValue\n + \" in the tree. What is the Preorder Traversal of the resulting tree after the insert?\";\n String point = \"Question (\" + points + \" point)\";\n String ans = generateAnswers(newPreOrder);// Generate Answers\n String questionThree = point + \"\\n\" + question + \"\\n\" + ans;\n return questionThree;\n }", "public static double solveKepler(double mean_anomaly, double ecc)\n\t{\n\t\tif (Math.abs(ecc) < 0.000000001)\n\t\t{\n\t\t\treturn mean_anomaly;\n\t\t}\n\t\tint maxit = 10000;\n\t\tint it = 0;\n\n\t\tdouble de = 1000.0;\n\n\t\tdouble ea = mean_anomaly;\n\t\tdouble old_m = mean_anomaly;\n\n\t\twhile ((it < maxit) && (Math.abs(de) > 1.0E-10))\n\t\t{\n\t\t\tdouble new_m = ea - ecc * Math.sin(ea);\n\t\t\tde = (old_m - new_m) / (1.0 - ecc * Math.cos(ea));\n\t\t\tea = ea + de;\n\t\t\tit = it + 1;\n\t\t}\n\t\treturn ea;\n\t}", "public interface PrecisionProvider {\n\n /**\n * Returns the number of digits that can be calculated precisely with a given amount of iterations.\n *\n * @param iterations The number of iterations you want to calculate\n * @return The number of digits that will be calculated correctly\n */\n int getPrecision(int iterations);\n\n /**\n * Calculates the number of iterations required for the specified level of precision. More information:\n * https://mathoverflow.net/q/261162/146822\n *\n * @param precision The level of precision you want to calculate.\n * @return The number of iterations required\n */\n int getNumIterations(int precision);\n}", "public double getBestScore();", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"]!pZ174<n,\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[8];\n doubleArray0[0] = (double) (-2);\n doubleArray0[1] = (double) (-2);\n doubleArray0[2] = (double) (-1);\n doubleArray0[3] = (double) (-2);\n doubleArray0[4] = (double) (-2);\n doubleArray0[5] = (double) (-1);\n doubleArray0[6] = (double) (-1);\n doubleArray0[7] = (double) (-2);\n try { \n evaluation0.evaluationForSingleInstance(doubleArray0, (Instance) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[0];\n // Undeclared exception!\n try { \n evaluation0.updateNumericScores(doubleArray0, doubleArray0, (-3363.03107));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "private static String getPrecisionResultsAggregator (Index i, ArrayList<String> queries, ArrayList<ArrayList<String>> relevantFilenames,List<Double> porcentajes, Searcher ... searcher){\n ArrayList<Searcher> searchers = new ArrayList<>();\n for(Searcher s:searcher){\n s.build(i);\n searchers.add(s);\n }\n \n RelevanceUtils.setIndex(i);\n\n ArrayList<Double> p5s = new ArrayList<>();\n ArrayList<Double> p10s = new ArrayList<>();\n\n for (int j = 0; j < queries.size(); j++) {\n ArrayList<List<ScoredTextDocument>> scores = new ArrayList<>();\n for(Searcher s:searchers){\n List<ScoredTextDocument> results = s.search(queries.get(j));\n scores.add(results);\n }\n List<ScoredTextDocument> results = WeightedSumRankAggregator.sum(scores,porcentajes);\n p5s.add(RelevanceUtils.calculatePrecision(results, relevantFilenames.get(j), 5));\n p10s.add(RelevanceUtils.calculatePrecision(results, relevantFilenames.get(j), 10));\n }\n\n Double averageP5 = Math.round(100.0 * RelevanceUtils.calculateAverage(p5s)) / 100.0;\n Double averageP10 = Math.round(100.0 * RelevanceUtils.calculateAverage(p10s)) / 100.0;\n return averageP5 + \"\\t\" + averageP10;\n }", "@Test\n public void testThirdNegativeRegionToExtremePoint(){\n precisionAssertEquals(\n \"Test [x = -1.7]: third negative region\",\n -9.26823,\n systemFunctions.calculate(-1.7)\n );\n precisionAssertEquals(\n \"Test [x = -1.8]: third negative region\",\n -6.30266,\n systemFunctions.calculate(-1.8)\n );\n precisionAssertEquals(\n \"Test [x = -1.9]: third negative region\",\n -5.40983,\n systemFunctions.calculate(-1.9)\n );\n }", "@Test\n public void testThirdNegativeRegionToExtremePoint(){\n precisionAssertEquals(\n \"Test [x = -1.7]: third negative region\",\n -9.26823,\n systemFunctions.calculate(-1.7)\n );\n precisionAssertEquals(\n \"Test [x = -1.8]: third negative region\",\n -6.30266,\n systemFunctions.calculate(-1.8)\n );\n precisionAssertEquals(\n \"Test [x = -1.9]: third negative region\",\n -5.40983,\n systemFunctions.calculate(-1.9)\n );\n }", "@Test\r\n public void testCalcScore() {\r\n \r\n //initialize variables\r\n int year = 0;\r\n int wheat = 0;\r\n int population = 0;\r\n int acres = 0;\r\n double expResult = 0;\r\n double result = 0;\r\n \r\n //test one - valid test\r\n System.out.println(\"Test 01\");\r\n year = 1;\r\n wheat = 100;\r\n population = 50;\r\n acres = 50;\r\n expResult = 1200.0;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test two - invalid year\r\n System.out.println(\"Test 02\");\r\n year = 0;\r\n wheat = 100;\r\n population = 50;\r\n acres = 50;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test three - invalid wheat\r\n System.out.println(\"Test 03\");\r\n year = 3;\r\n wheat = -350;\r\n population = 100;\r\n acres = 5;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test four - invalid acres\r\n System.out.println(\"Test 04\");\r\n year = 1;\r\n wheat = 25;\r\n population = 5;\r\n acres = -5;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test five - invalid population\r\n System.out.println(\"Test 05\");\r\n year = 2;\r\n wheat = 35;\r\n population = -50;\r\n acres = 3;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test six - multiple invalids\r\n System.out.println(\"Test 06\");\r\n year = -1;\r\n wheat = -100;\r\n population = -5;\r\n acres = -1;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n \r\n //test seven - single invalid, positive result\r\n System.out.println(\"Test 07\");\r\n year = 2;\r\n wheat = 100;\r\n population = -50;\r\n acres = 5;\r\n expResult = -1;\r\n result = ScoreControl.calcScore(year, wheat, population, acres);\r\n assertEquals(expResult, result, 0.0);\r\n System.out.println(result + \" \" + expResult);\r\n }", "@Test\n public void testParseMultiRoot2() {\n double[] root = new double[] {0.0, 0.75, 0.25};\n double[][] child = new double[][]{ {0.0, 0.0, 0.75}, {1.0, 0.0, 0.0}, {0.0, 0.25, 0.0} };\n int[] parents = new int[3]; \n double score = ProjectiveDependencyParser.parseMultiRoot(root, child, parents);\n System.out.println(Arrays.toString(parents)); \n assertEquals(0.75 + 1.0 + 0.25, score, 1e-13);\n JUnitUtils.assertArrayEquals(new int[]{1, -1, -1}, parents);\n }", "private synchronized void evaluate(int indexOfInterest) {\r\n\r\n switch (indexOfInterest) {\r\n case 0: //evaluating values on the X axis\r\n if ((Math.abs(peakValue) >= 1.3) && (Math.abs(peakValue) <= 3.2) && !goodScoreUpdated && !mediumScoreUpdated && !badScoreUpdated) {\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.GOOD, event.getEventType());\r\n goodScoreUpdated = true;\r\n }\r\n if ((Math.abs(peakValue) > 3.2) && (Math.abs(peakValue) <= 4.2) && !mediumScoreUpdated && !badScoreUpdated) {\r\n\r\n event.setScoreToMedium();\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.MEDIUM, event.getEventType());\r\n currentScoreTypeForEvent = ScoreType.MEDIUM;\r\n mediumScoreUpdated = true;\r\n }\r\n if ((Math.abs(peakValue) > 4.2) && !badScoreUpdated) {\r\n\r\n event.setScoreToBad();\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.BAD, event.getEventType());\r\n currentScoreTypeForEvent = ScoreType.BAD;\r\n badScoreUpdated = true;\r\n }\r\n\r\n case 1: //evaluating values on the Y axis\r\n if (event.getEventType().equals(DrivingEventType.BRAKE)) {\r\n if ((Math.abs(peakValue) >= 1.75) && (Math.abs(peakValue) <= 3.3) && !goodScoreUpdated && !mediumScoreUpdated && !badScoreUpdated) {\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.GOOD, event.getEventType());\r\n goodScoreUpdated = true;\r\n }\r\n if ((Math.abs(peakValue) > 3.3) && (Math.abs(peakValue) <= 5.5) && !mediumScoreUpdated && !badScoreUpdated) {\r\n\r\n event.setScoreToMedium();\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.MEDIUM, event.getEventType());\r\n currentScoreTypeForEvent = ScoreType.MEDIUM;\r\n mediumScoreUpdated = true;\r\n }\r\n if ((Math.abs(peakValue) > 5.5) && !badScoreUpdated) {\r\n\r\n event.setScoreToBad();\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.BAD, event.getEventType());\r\n currentScoreTypeForEvent = ScoreType.BAD;\r\n badScoreUpdated = true;\r\n }\r\n } else if (event.getEventType().equals(DrivingEventType.ACCELERATION)) {\r\n if ((Math.abs(peakValue) >= 0.9) && (Math.abs(peakValue) <= 2.5) && !goodScoreUpdated && !mediumScoreUpdated && !badScoreUpdated) {\r\n\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.GOOD, event.getEventType());\r\n goodScoreUpdated = true;\r\n }\r\n if ((Math.abs(peakValue) > 2.5) && (Math.abs(peakValue) <= 3.3) && !mediumScoreUpdated && !badScoreUpdated) {\r\n\r\n event.setScoreToMedium();\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.MEDIUM, event.getEventType());\r\n currentScoreTypeForEvent = ScoreType.MEDIUM;\r\n mediumScoreUpdated = true;\r\n }\r\n if ((Math.abs(peakValue) > 3.3) && !badScoreUpdated) {\r\n\r\n event.setScoreToBad();\r\n scoreListener.onScoreTypeChangeForEvent(ScoreType.BAD, event.getEventType());\r\n currentScoreTypeForEvent = ScoreType.BAD;\r\n badScoreUpdated = true;\r\n }\r\n }\r\n }\r\n }", "int getNumIterations(int precision);", "@Test(timeout = 4000)\n public void test070() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateNumericScores(doubleArray0, doubleArray0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "private long expr(int priority)\r\n throws IOException,\r\n LexerException {\r\n\r\n Token tok = expr_token();\r\n long lhs, rhs;\r\n\r\n // System.out.println(\"Expr lhs token is \" + tok);\r\n switch (tok.getType()) {\r\n case '(':\r\n lhs = expr(0);\r\n tok = expr_token();\r\n if (tok.getType() != ')') {\r\n expr_untoken(tok);\r\n error(tok, \"Missing ) in expression. Got \" + tok.getText());\r\n return 0;\r\n }\r\n break;\r\n\r\n case '~':\r\n lhs = ~expr(11);\r\n break;\r\n case '!':\r\n lhs = expr(11) == 0 ? 1 : 0;\r\n break;\r\n case '-':\r\n lhs = -expr(11);\r\n break;\r\n case NUMBER:\r\n NumericValue value = (NumericValue) tok.getValue();\r\n lhs = value.longValue();\r\n break;\r\n case CHARACTER:\r\n lhs = tok.getValue().toString().charAt(0);//((Character) tok.getValue()).charValue();\r\n break;\r\n case IDENTIFIER:\r\n if (warnings.contains(Warning.UNDEF))\r\n warning(tok, \"Undefined token '\" + tok.getText()\r\n + \"' encountered in conditional.\");\r\n lhs = 0;\r\n break;\r\n\r\n default:\r\n expr_untoken(tok);\r\n error(tok,\r\n \"Bad token in expression: \" + tok.getText());\r\n return 0;\r\n }\r\n\r\n EXPR:\r\n for (;;) {\r\n // System.out.println(\"expr: lhs is \" + lhs + \", pri = \" + priority);\r\n Token op = expr_token();\r\n int pri = expr_priority(op);\t/* 0 if not a binop. */\r\n\r\n if (pri == 0 || priority >= pri) {\r\n expr_untoken(op);\r\n break EXPR;\r\n }\r\n rhs = expr(pri);\r\n // System.out.println(\"rhs token is \" + rhs);\r\n switch (op.getType()) {\r\n case '/':\r\n if (rhs == 0) {\r\n error(op, \"Division by zero\");\r\n lhs = 0;\r\n } else {\r\n lhs = lhs / rhs;\r\n }\r\n break;\r\n case '%':\r\n if (rhs == 0) {\r\n error(op, \"Modulus by zero\");\r\n lhs = 0;\r\n } else {\r\n lhs = lhs % rhs;\r\n }\r\n break;\r\n case '*':\r\n lhs = lhs * rhs;\r\n break;\r\n case '+':\r\n lhs = lhs + rhs;\r\n break;\r\n case '-':\r\n lhs = lhs - rhs;\r\n break;\r\n case '<':\r\n lhs = lhs < rhs ? 1 : 0;\r\n break;\r\n case '>':\r\n lhs = lhs > rhs ? 1 : 0;\r\n break;\r\n case '&':\r\n lhs = lhs & rhs;\r\n break;\r\n case '^':\r\n lhs = lhs ^ rhs;\r\n break;\r\n case '|':\r\n lhs = lhs | rhs;\r\n break;\r\n\r\n case LSH:\r\n lhs = lhs << rhs;\r\n break;\r\n case RSH:\r\n lhs = lhs >> rhs;\r\n break;\r\n case LE:\r\n lhs = lhs <= rhs ? 1 : 0;\r\n break;\r\n case GE:\r\n lhs = lhs >= rhs ? 1 : 0;\r\n break;\r\n case EQ:\r\n lhs = lhs == rhs ? 1 : 0;\r\n break;\r\n case NE:\r\n lhs = lhs != rhs ? 1 : 0;\r\n break;\r\n case LAND:\r\n lhs = (lhs != 0) && (rhs != 0) ? 1 : 0;\r\n break;\r\n case LOR:\r\n lhs = (lhs != 0) || (rhs != 0) ? 1 : 0;\r\n break;\r\n\r\n case '?': {\r\n tok = expr_token();\r\n if (tok.getType() != ':') {\r\n expr_untoken(tok);\r\n error(tok, \"Missing : in conditional expression. Got \" + tok.getText());\r\n return 0;\r\n }\r\n long falseResult = expr(0);\r\n lhs = (lhs != 0) ? rhs : falseResult;\r\n }\r\n break;\r\n\r\n default:\r\n error(op,\r\n \"Unexpected operator \" + op.getText());\r\n return 0;\r\n\r\n }\r\n }\r\n\r\n /*\r\n * (new Exception(\"expr returning \" + lhs)).printStackTrace();\r\n */\r\n // System.out.println(\"expr returning \" + lhs);\r\n return lhs;\r\n }", "public static double findSquareRootUsingNewtonsMethod(int c, double epsilon) {\r\n\t\tdouble t;\r\n\t\tt = c;\r\n//\t\tepsilon=1*(Math.pow(10, -15));\r\n\r\n\t\twhile (Math.abs(t - c / t) > epsilon * t) {\r\n\t\t\tt = (c / t + t) / 2.0;\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "@Override\n\tpublic int predict(int[] ex) {\n\t\tdouble sum = 0.0; \n\t\tint prediction;\n\t\tfor (int currentRound = 0; currentRound < this.numberRounds; currentRound++){\n\t\t\tif (this.dSC[this.hypothesis[currentRound]].predict(ex) == 0)\n\t\t\t\tprediction = -1;\n\t\t\telse \n\t\t\t\tprediction = 1;\n\t\t\tsum += this.alpha[currentRound] * prediction; \n\t\t}\n\t\tif (sum > 0)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedAreaUnderROC();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "public interface AnomalyRate{\r\n\t\tpublic int calculAnomaly(int total, int freq); // anomaly rate of ngram present in model\r\n\t\tpublic int defaultAnomaly(int total); // anomaly rate by default\r\n\t}", "@Test\n public void testCalcProbTheta() throws Exception {\n\n double guessProb1 = ItemResponseTheory.calcProbTheta(c, lambda, theta1, alpha1);\n double guessProb2 = ItemResponseTheory.calcProbTheta(c, lambda, theta2, alpha1);\n double guessProb3 = ItemResponseTheory.calcProbTheta(c, lambda, theta3, alpha1);\n double guessProb4 = ItemResponseTheory.calcProbTheta(c, lambda, theta4, alpha1);\n double guessProb5 = ItemResponseTheory.calcProbTheta(c, lambda, theta5, alpha1);\n double guessProb6 = ItemResponseTheory.calcProbTheta(c, lambda, theta6, alpha1);\n double guessProb7 = ItemResponseTheory.calcProbTheta(c, lambda, theta7, alpha1);\n\n double ans1 = 0.2;\n double ans2 = 0.21;\n double ans3 = 0.23;\n double ans4 = 0.3;\n double ans5 = 0.47;\n double ans6 = 0.73;\n double ans7 = 0.9;\n\n double tolerance = 0.005;\n\n assertTrue(\"Prob(theta1)\", Math.abs(guessProb1 - ans1)< tolerance);\n assertTrue(\"Prob(theta2)\", Math.abs(guessProb2 - ans2) < tolerance);\n assertTrue(\"Prob(theta3)\", Math.abs(guessProb3 - ans3) < tolerance);\n assertTrue(\"Prob(theta4)\", Math.abs(guessProb4 - ans4) < tolerance);\n assertTrue(\"Prob(theta5)\", Math.abs(guessProb5 - ans5) < tolerance);\n assertTrue(\"Prob(theta6)\", Math.abs(guessProb6 - ans6) < tolerance);\n assertTrue(\"Prob(theta7)\", Math.abs(guessProb7 - ans7) < tolerance);\n\n }", "public void setEpsilon(double newEpsilon) {\n\t\tepsilon = newEpsilon;\n\t}", "public void score(){\n\t\tscores=new float[3];\n\t\ttop3=new String[3];\n\t\tfor(int i=0;i<3;i++){\n\t\t\ttop3[i]=new String();\n\t\t\tscores[i]=(float)0;\n\t\t}\n\t\t//System.out.println(doclist.size());\n\t\tfor(int i=0;i<doclist.size();i++){\n\t\t\ttry{\n\t\t\t\tDocProcessor dp=new DocProcessor(doclist.get(i));\n\t\t\t\tdp.tokenizing();\n\t\t\t\tdp.stem();\n\t\t\t\t//System.out.println(dp.getContent());\n\t\t\t\t/*for(int j=2;j>=0;j--){\n\t\t\t\t\tSystem.out.println(\"top\"+(3-j)+\": \"+scores[j]);\n\t\t\t\t\tSystem.out.println(top3[j]);\n\t\t\t\t}*/\n\t\t\t\tfloat score=dp.score(this.keywords);\n\t\t\t\tfor(int j=2;j>=0;j--){\n\t\t\t\t\tif(score>scores[j]){\n\t\t\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\t\t\tscores[k]=scores[k+1];\n\t\t\t\t\t\t\ttop3[k]=top3[k+1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscores[j]=score;\n\t\t\t\t\t\ttop3[j]=dp.getContent();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*for(int j=2;j>=0;j--){\n\t\t\t\t\tSystem.out.println(\"top\"+(3-j)+\": \"+scores[j]);\n\t\t\t\t\tSystem.out.println(top3[j]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"*******************************\");*/\n\t\t\t}catch(NullPointerException f){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testThirdPositiveRegion(){\n precisionAssertEquals(\n \"Test [x = 1.05]: third positive region\",\n 0.931952,\n systemFunctions.calculate(1.05)\n );\n precisionAssertEquals(\n \"Test [x = 1.1]: third positive region\",\n 0.931852,\n systemFunctions.calculate(1.1)\n );\n precisionAssertEquals(\n \"Test [x = 1.15]: third positive region\",\n 0.931464,\n systemFunctions.calculate(1.15)\n );\n precisionAssertEquals(\n \"Test [x = 1.2]: third positive region\",\n 0.930531,\n systemFunctions.calculate(1.2)\n );\n }", "@Test\n public void testThirdPositiveRegion(){\n precisionAssertEquals(\n \"Test [x = 1.05]: third positive region\",\n 0.931952,\n systemFunctions.calculate(1.05)\n );\n precisionAssertEquals(\n \"Test [x = 1.1]: third positive region\",\n 0.931852,\n systemFunctions.calculate(1.1)\n );\n precisionAssertEquals(\n \"Test [x = 1.15]: third positive region\",\n 0.931464,\n systemFunctions.calculate(1.15)\n );\n precisionAssertEquals(\n \"Test [x = 1.2]: third positive region\",\n 0.930531,\n systemFunctions.calculate(1.2)\n );\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n Vote vote0 = new Vote();\n try { \n evaluation0.evaluateModel((Classifier) vote0, (Instances) null, (Object[]) vote0.TAGS_RULES);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "public static AUCResult appendProcessedResult(BasicNetwork network, DataSet dataSet, int epoch) {\n MLDataSet dataSetTestingAdapted = new EncogMLDataSetTestingAdaptor(dataSet);\n\n double currentSignalAUC = 0.0;\n double step = 0.01;\n double previousOneMinusBackgroundRate = 0;\n double previousSignalRate = 0.0;\n\n // For each different threshold, calculate both signal and background rates.\n for( double threshold = 0.0; threshold < 1.0; threshold += step ) {\n int totalCorrectSignalSamples = 0;\n int totalWrongSignalSamples = 0;\n int totalCorrectBackgroundSamples = 0;\n int totalWrongBackgroundSamples = 0;\n int totalSamples = 0;\n int totalIdealSignalSamples = 0;\n int totalIdealBackgroundSamples = 0;\n \n int totalTrueSignal = 0;\n int totalTrueBackground = 0;\n \n // Go over the full testing set and check results.\n for ( MLDataPair pair : dataSetTestingAdapted ) {\n final MLData output = network.compute(pair.getInput());\n\n // This is specific to our case were we expect either one class or the other\n boolean netSignal = output.getData(0) > threshold ? true : false;\n boolean netBackground = output.getData(1) > threshold ? true : false;\n boolean idealSignal = pair.getIdeal().getData(0) > 0.5 ? true : false;\n \n if ( netSignal != netBackground ) {\n if ( idealSignal && netSignal ) {\n \ttotalCorrectSignalSamples++;\n \ttotalTrueSignal++;\n }\n if ( idealSignal && !netSignal ) totalWrongSignalSamples++;\n if ( !idealSignal && netSignal ) totalWrongBackgroundSamples++;\n if ( !idealSignal && !netSignal ) {\n \ttotalCorrectBackgroundSamples++;\n \ttotalTrueBackground++;\n }\n if ( idealSignal ) totalIdealSignalSamples++;\n if ( !idealSignal ) totalIdealBackgroundSamples++;\n }\n else {\n // Both classes cannot be of the same value, therefore resolution comes with where \n \t// values are: if above or below the threshold, and if ideal is signal or background.\n double doubleNetSignal = output.getData(0);\n double doubleNetBackground = output.getData(1);\n \n if ( idealSignal ) {\n \t// We are measuring only signal here.\n \t\ttotalIdealSignalSamples++;\n \t\tif ( doubleNetSignal < threshold ) totalWrongSignalSamples++;\n \t\tif ( doubleNetSignal > threshold ) totalCorrectSignalSamples++;\n \t}\n \telse {\n \t\t// We are measuring only background here.\n \t\ttotalIdealBackgroundSamples++;\n \t\tif ( threshold < doubleNetBackground ) totalCorrectBackgroundSamples++;\n \t\tif ( threshold > doubleNetBackground ) totalWrongBackgroundSamples++;\n \t}\n }\n\n totalSamples++;\n }\n\n double signalRate = (double) totalCorrectSignalSamples / (double) totalIdealSignalSamples;\n double backgroundRate = (double) totalCorrectBackgroundSamples / (double) totalIdealBackgroundSamples;\n double oneMinusBackgroundRate = 1.0 - backgroundRate;\n\n \tappend(epoch \n \t\t+ \",\" + threshold\n \t\t+ \",\" + totalCorrectSignalSamples\n \t\t+ \",\" + totalCorrectBackgroundSamples\n \t\t+ \",\" + totalWrongSignalSamples\n \t\t+ \",\" + totalWrongBackgroundSamples\n \t\t+ \",\" + totalIdealSignalSamples\n \t\t+ \",\" + totalIdealBackgroundSamples\n \t\t+ \",\" + totalSamples\n \t\t+ \",\" + signalRate\n \t\t+ \",\" + backgroundRate\n \t\t+ \",\" + oneMinusBackgroundRate\n \t\t+ \",\" + totalTrueSignal\n \t\t+ \",\" + totalTrueBackground\n \t\t+ \",\" + (totalTrueSignal + totalTrueBackground)\n );\n\n \tdouble xDelta = oneMinusBackgroundRate - previousOneMinusBackgroundRate;\n \tdouble ySignal = signalRate + previousSignalRate;\n \t\n \tdouble tempSignalAUC = ( ySignal * xDelta ) / 2.0;\n \tcurrentSignalAUC += tempSignalAUC;\n\n \tpreviousOneMinusBackgroundRate = oneMinusBackgroundRate;\n \tpreviousSignalRate = signalRate;\n }\n \n return new AUCResult(epoch, currentSignalAUC);\n }", "@Test(timeout = 4000)\n public void test092() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[8];\n doubleArray0[6] = 4.8;\n try { \n evaluation0.evaluateModelOnceAndRecordPrediction(doubleArray0, (Instance) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public static double f(double z){\n return 1 / (1 + Math.exp(-z));\n }", "public static void main(String[] args) {\n\t\tAnalyse ana = new Analyse(20, 5);\r\n//\t\tArrayList<Map.Entry<Integer, Double>> current = ana.getNeighbor(\"\")\r\n//\t\tfor(int i = 0; i < ana.average.length; i++){\r\n//\t\t\tSystem.out.println(ana.average[i]);\r\n//\t\t}\r\n//\t\tfor (int i = 0; i < 5; i++) {\r\n//\t\t\tSystem.out.println(ana.heap.get(i).getValue());\r\n//\t\t}\r\n\t\tSystem.out.println(ana.similarity.size());\r\n//\t\tArrayList<Map.Entry<Integer, Double>> record = ana.getNeighbor(\"0155061224\");\r\n//\t\tSystem.out.println(ana.heap.size());\r\n//\t\tSystem.out.println(record.size());\r\n//\t\tfor(int i = 0; i < record.size(); i++){\r\n//\t\t\tSystem.out.println(record.get(i).getKey());\r\n//\t\t\tSystem.out.println(record.get(i).getValue());\r\n////\t\t\tSystem.out.println(ana.matrix[record.get(i).getKey()][ana.read.getItems().indexOf(3149)]);\r\n//\t\t}\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"score\" + ana.predictionBaseline(\"100\"));\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\tSystem.out.println(end - start);\r\n//\t\tSystem.out.println(ana.predictionBaseline(\"0155061224\"));\r\n\t}", "private double getAverage(Queue<Integer> q) {\r\n double average = 0;\r\n\r\n Iterator<Integer> it = q.iterator();\r\n while(it.hasNext()) {\r\n int current = it.next();\r\n average += current;\r\n if(!it.hasNext()) // last element\r\n average += current * LAST_MOVE_WEIGHT;\r\n }\r\n\r\n average /= MEMORY_SIZE + LAST_MOVE_WEIGHT;\r\n\r\n return average;\r\n }" ]
[ "0.54412854", "0.528634", "0.52025884", "0.51266915", "0.4995719", "0.4958935", "0.49230886", "0.47984904", "0.4797044", "0.4787309", "0.47150996", "0.47150996", "0.46762502", "0.4671411", "0.4651617", "0.462876", "0.46097934", "0.45577", "0.45475605", "0.45384273", "0.45099065", "0.45080358", "0.44874313", "0.44844812", "0.44783235", "0.4472764", "0.44706225", "0.44663215", "0.4464632", "0.44353127", "0.44198108", "0.4388433", "0.43883786", "0.43829256", "0.4382152", "0.43701956", "0.436898", "0.4365231", "0.43623096", "0.43621898", "0.4341742", "0.4339062", "0.43234074", "0.43053862", "0.43020386", "0.42861986", "0.4275493", "0.4261849", "0.4260955", "0.42603433", "0.425928", "0.4259057", "0.42545202", "0.4253671", "0.42460054", "0.42401472", "0.42359722", "0.42359516", "0.4231018", "0.42290103", "0.42255273", "0.42053953", "0.41853017", "0.41853017", "0.41800073", "0.41744503", "0.41722754", "0.41662052", "0.41603112", "0.41563326", "0.41527864", "0.4144986", "0.41306713", "0.41282842", "0.4127227", "0.41214153", "0.41214153", "0.41174862", "0.4115799", "0.4112855", "0.41125497", "0.41120544", "0.4108283", "0.41062522", "0.41035745", "0.40993127", "0.4098192", "0.40972862", "0.40953267", "0.4093107", "0.40924552", "0.40924552", "0.40869182", "0.40827674", "0.40760368", "0.40757546", "0.4074138", "0.407088", "0.40684086", "0.4042357" ]
0.52893466
1
Given a point with missing values, return a new point with the missing values imputed. Each tree in the forest individual produces an imputed value. For 1dimensional points, the median imputed value is returned. For points with more than 1 dimension, the imputed point with the 25th percentile anomaly score is returned.
public double[] imputeMissingValues(double[] point, int numberOfMissingValues, int[] missingIndexes) { checkArgument(numberOfMissingValues >= 0, "numberOfMissingValues must be greater than or equal to 0"); // We check this condition in traverseForest, but we need to check it here s wellin case we need to copy the // point in the next block checkNotNull(point, "point must not be null"); if (numberOfMissingValues == 0) { return Arrays.copyOf(point, point.length); } checkNotNull(missingIndexes, "missingIndexes must not be null"); checkArgument(numberOfMissingValues <= missingIndexes.length, "numberOfMissingValues must be less than or equal to missingIndexes.length"); if (!isOutputReady()) { return new double[dimensions]; } Function<RandomCutTree, MultiVisitor<double[]>> visitorFactory = tree -> new ImputeVisitor(point, numberOfMissingValues, missingIndexes); if (numberOfMissingValues == 1) { // when there is 1 missing value, we sort all the imputed values and return the median Collector<double[], ArrayList<Double>, ArrayList<Double>> collector = Collector.of( ArrayList::new, (list, array) -> list.add(array[missingIndexes[0]]), (left, right) -> { left.addAll(right); return left; }, list -> { list.sort(Comparator.comparing(Double::doubleValue)); return list; } ); ArrayList<Double> imputedValues = traverseForestMulti(point, visitorFactory, collector); double[] returnPoint = Arrays.copyOf(point, dimensions); returnPoint[missingIndexes[0]] = imputedValues.get(numberOfTrees / 2); return returnPoint; } else { // when there is more than 1 missing value, we sort the imputed points by anomaly score and // return the point with the 25th percentile anomaly score Collector<double[], ArrayList<double[]>, ArrayList<double[]>> collector = Collector.of( ArrayList::new, ArrayList::add, (left, right) -> { left.addAll(right); return left; }, list -> { list.sort(Comparator.comparing(this::getAnomalyScore)); return list; } ); ArrayList<double[]> imputedPoints = traverseForestMulti(point, visitorFactory, collector); return imputedPoints.get(numberOfTrees / 4); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getApproximateAnomalyScore(double[] point) {\n if (!isOutputReady()) {\n return 0.0;\n }\n\n Function<RandomCutTree, Visitor<Double>> visitorFactory = tree ->\n new AnomalyScoreVisitor(point, tree.getRoot().getMass());\n\n ConvergingAccumulator<Double> accumulator = new OneSidedConvergingDoubleAccumulator(\n DEFAULT_APPROXIMATE_ANOMALY_SCORE_HIGH_IS_CRITICAL,\n DEFAULT_APPROXIMATE_DYNAMIC_SCORE_PRECISION,\n DEFAULT_APPROXIMATE_DYNAMIC_SCORE_MIN_VALUES_ACCEPTED,\n numberOfTrees);\n\n Function<Double, Double> finisher = x -> x / accumulator.getValuesAccepted();\n\n return traverseForest(point, visitorFactory, accumulator, finisher);\n }", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public void interpolateMissing() {\n if (keyframes.size()==1)\n return;\n fillTrans();\n fillRots();\n fillScales();\n for (int objIndex=0;objIndex<numObjects;objIndex++)\n pivots[objIndex].applyToSpatial(toChange[objIndex]);\n }", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testGetAnomalyAttribution(RandomCutForest forest) {\n\n double [] point = {0.0,0.0,0.0};\n DiVector seenResult = forest.getAnomalyAttribution(point);\n double seenScore = forest.getAnomalyScore(point);\n assertTrue(seenResult.getHighLowSum(0) < 0.5);\n assertTrue(seenResult.getHighLowSum(1) < 0.5);\n assertTrue(seenResult.getHighLowSum(2) < 0.5);\n assertTrue(seenScore < 1.0);\n assertEquals(seenScore, seenResult.getHighLowSum(), 1E-10);\n\n DiVector likelyResult = forest.getApproximateAnomalyAttribution(point);\n double score=forest.getApproximateAnomalyScore(point);\n assertTrue(likelyResult.getHighLowSum(0) < 0.5);\n assertTrue(likelyResult.getHighLowSum(1) < 0.5);\n assertTrue(likelyResult.getHighLowSum(2) < 0.5);\n assertEquals(score, likelyResult.getHighLowSum(), 0.1);\n assertEquals(seenResult.getHighLowSum(), likelyResult.getHighLowSum(), 0.1);\n }", "public double getIML_AtExceedProb() throws ParameterException {\n\n\t\tif (im.getName().equals(MMI_Param.NAME)) {\n\t\t\tdouble exceedProb = ( (Double) ( (Parameter) exceedProbParam).getValue()).\n\t\t\tdoubleValue();\n\t\t\tif (exceedProb == 0.5) {\n\t\t\t\tif (sigmaTruncTypeParam.getValue().equals(SigmaTruncTypeParam.SIGMA_TRUNC_TYPE_1SIDED)) {\n\t\t\t\t\tthrow new RuntimeException(MMI_Param.MMI_ERROR_STRING);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn getMean();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new RuntimeException(MMI_Param.MMI_ERROR_STRING);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn super.getIML_AtExceedProb();\n\t\t}\n\t}", "public Point getFinalPoint(int maxX, int maxY, double noise, double percentOfExcess, int x, int y) {\n Point alteredPoint = new Point();\n //Alter coords\n double maxXRange = maxX * noise; //Now we have the max number that could be added to the actual x coord. The range will be composed of 0 - maxRange\n double maxYRange = maxY * noise; //Getting the X and Y value according to the noise percent.\n\n //Lets get the formula for determine which value between 0 and RANGE would be added acording to the level\n //Cero for 0% of excess, maxRange for 100% of excess\n //Solve y=ax^2\n\n double a_x = maxXRange / (100 * 100);\n double a_y = maxYRange / (100 * 100);\n\n //Then, lets look for a random number with the help of the number that the formula throw in this kind of range: -6 form < form < + 6 form\n //By this way, we could ensure that the directions will probably not be the same in a short time\n\n\n double noiseX = getNoiseAccordingExcessPercent(a_x, percentOfExcess); //This noise is direclty proportional to the percentOfExcess on breathing rate\n double noiseY = getNoiseAccordingExcessPercent(a_y, percentOfExcess);\n\n //If you want to be more accurate, you can use different values for different levels\n int minimum = 10;//< If you want to change in what excess the user will note a bigger change in the robot control, change this.\n\n noiseX += minimum;\n noiseY += minimum; //By this way, we ensure that also in low levels, we will get a minimum noise of 25. for example at 1% of excess\n\n int adjust = 6;//For make the range\n\n alteredPoint.x = getAlteredPointOfCoord(x, (int) noiseX, adjust);\n alteredPoint.y = getAlteredPointOfCoord(y, (int) noiseY, adjust);\n\n //Just to stay in bounds\n if (alteredPoint.x >= maxX) { //Because if we reach the max, it's like start again\n alteredPoint.x = maxX - 1;\n } else if (alteredPoint.y >= maxY) {\n alteredPoint.y = maxY - 1;\n }\n return alteredPoint;\n }", "private KdTreeNode insert(Point point, KdTreeNode current, int idx) {\n if (current == null) {\n return new KdTreeNode(new Point(point.getX(), point.getY()));\n }\n\n // change 0 to 1 and vice versa, also can do i = 1 - i;\n if (KdTree.comparePoints(current.point, point, idx) > 0) {\n idx ^= 1;\n current.left = this.insert(point, current.left, idx);\n } else if (KdTree.comparePoints(current.point, point, idx) < 0) {\n idx ^= 1;\n current.right = this.insert(point, current.right, idx);\n }\n return current;\n }", "public abstract boolean illuminates(Point3 point);", "public void updateIgnition(Point point) {\n WorldItem item = point.getContainedItem();\n if (item instanceof FlammableItem) {\n FlammableItem flammable = (FlammableItem) item;\n if (!flammable.isOnFire()) {\n if (point.getCurrentTemp() >= flammable.getCombustionThreshold()) {\n flammable.ignite();\n itemsOnFire++;\n fireLocations[getLastSpotInArray(fireLocations)] = point;\n }\n }\n }\n }", "Function<RealMatrix, T> getErrorValueNaNProcessor();", "public void infect() {\n\n if (random.getRandom() <= getProbability()) {\n isInfected = true;\n isInfectedOnThisStep = true;\n }\n }", "public static double findAndRemoveMean( double[] inArray ) {\r\n if ((inArray == null) || (inArray.length == 0)) {\r\n return Double.MIN_VALUE;\r\n }\r\n double meanToZero;\r\n ArrayStats arrmean = new ArrayStats( inArray );\r\n meanToZero = arrmean.getMean();\r\n ArrayOps.removeValue(inArray, meanToZero);\r\n return meanToZero;\r\n }", "public Point valueFor(Point punto) throws MmwInterpolationOutOfBoundsException { \n\t\t\n\t\tif((punto.getX().longValue() < punti.first().getX().longValue())||\n\t\t\t\t(punto.getX().longValue() > punti.last().getX().longValue())) {\n\t\t\t\n\t\t\tthrow new MmwInterpolationOutOfBoundsException(\"Fuori range\");\n\t\t}\n\t\tif(punto.getX().equals(punti.first().getX())) {\n\t\t\t\n\t\t\treturn punti.first();\n\t\t}\n\t\tif(punto.getX().equals(punti.last().getX())) {\n\t\t\t\n\t\t\treturn punti.last();\n\t\t}\n\t\t\n\t\tPoint prec = punti.floor(punto);\n\t\tPoint succ = punti.ceiling(punto);\n\t\tif (prec.equals(succ)) {//se precedente e successivo sono LO STESSO PUNTO(oggetto) vuol dire\n\t\t\t\t\t\t\t\t//che il punto da interpolare coincide con un campione reale presente nel Set\n\t\t\tpunto.setY(round(succ.getY()));\n\t\t\t//lo score di qualità è massimo perchè i punti coincidono\n\t\t\tpunto.setScore(1.0);\n\t\t} else { // se ho effettivamente due estremi diversi dell'intervallo \n\t\t\t\t\t//faccio l'interpolazione\n\t\t\tDouble m = (succ.getY()-prec.getY())/(succ.getX()-prec.getX()); //coeffic. angolare\n\t\t\tpunto.setY(round(prec.getY()+m*(punto.getX()-prec.getX())));\n\t\t\t\n\t\t\tpunto.setScore(round(this.score(prec.getX(), succ.getX(), punto.getX())));\n\t\t}\n\t\treturn punto;\n\t}", "public static double getMedian()\n {\n // add your code here\n if(s.size()==g.size()){\n return (double) ((s.peek()+g.peek())/2);\n }\n else if(s.size() > g.size()) {\n return (double) s.peek();\n }\n else {\n return (double) g.peek();\n }\n }", "default DiscreteDoubleMap2D nonPositivePart() {\r\n\t\treturn pointWiseMinimum(ZERO);\r\n\t}", "public double findMedian() {\n if (maxheap.size() == minheap.size()) {\n return (maxheap.peek() + minheap.peek()) * 0.5;\n } else {\n return maxheap.peek();\n }\n }", "private void calculateNewIntensity(BSTNode node) {\r\n \r\n // if the node is NOT null, execute if statement\r\n if (node != null) {\r\n \r\n // call method on left node\r\n calculateNewIntensity(node.getLeft());\r\n \r\n // visit the node (calculate and assign new intensity value)\r\n node.newIntensity(node);\r\n \r\n // call method on right node\r\n calculateNewIntensity(node.getRight());\r\n }\r\n }", "public double getMean(){\n\t\treturn Math.exp(location + scale * scale / 2);\n\t}", "private double noisyIntensity(double value) {\n\n\t\t// add multiplicative noise: log the value, add noise then take the exp\n\t\tdouble logValue = Math.log(value);\n\t\tdouble multiplicativeNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tlogValue += multiplicativeNoise;\n\t\tvalue = Math.exp(logValue);\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "public static AiPersona getNeutralPersona(){\n for (AiPersona persona:AiList){\n if (persona.getName().equals(\"neutral\")){\n return persona;\n }\n }\n System.err.println(\"There is no neutral AI personality\");\n return null;\n }", "private TargetInformation findHighGoal(Mat image) {\r\n\t\tTargetInformation ret = new TargetInformation();\r\n\t\tret.targetingPeg = false;\r\n\t\t\r\n long[] xsums = sums(image, true);\r\n long[] ysums = sums(image, false);\r\n \r\n\t List<PeakLoc> xpeaks = findPeaks(xsums, 10);\r\n\t List<PeakLoc> ypeaks = findPeaks(ysums, 10);\r\n\r\n\t if (ypeaks.size() == 2 && xpeaks.size() > 0) {\r\n\t \tret.targetFound = true;\r\n\t \tret.x = (xpeaks.get(0).getStop() - xpeaks.get(0).getStart()) / 2;\r\n\t \tret.gap = ypeaks.get(1).getStart() - ypeaks.get(0).getStop();\r\n\t \tret.width = xpeaks.get(0).getStop() - xpeaks.get(0).getStart();\r\n\t \tret.height = ypeaks.get(1).getStop() - ypeaks.get(0).getStart();\r\n\t \tret.y = (ypeaks.get(0).getStop() + ypeaks.get(1).getStart())/2;\r\n\t \t\r\n\t \tdouble pixelsPerInch = ret.gap / highGoalGapInches;\r\n\t \tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t{\r\n\t \t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalWidthInches) / 2;\r\n\t \t}\r\n\t \tif (ypeaks.get(0).isTruePeak())\r\n\t \t{\r\n\t \t\tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch * 2 + ret.width / highGoalHeightInches) / 3;\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalHeightInches) / 2;\r\n\t \t\t}\r\n\t \t} \t\r\n\t \t\r\n\t \tret.aimX = ret.x + (cameraOffsetInches - shooterOffsetInches) * pixelsPerInch;\r\n\t \t\r\n\t \tret.correctionAngle = (double)((ret.aimX - image.cols() / 2)) / pixelsPerXDegree;\r\n\t }\r\n\t else\r\n\t {\r\n\t \tret.targetFound = false;\r\n\t }\r\n\t \r\n\t return ret;\r\n\t}", "public void perturbOverlappingPoints(final double factor) {\n double distance;\n boolean repeat;\n int numPoints = getNumPoints();\n\n for (int i = 0; i < numPoints; i++) {\n repeat = false;\n // look for repeated points by computing distance to\n // previous points\n\n for (int j = i + 1; j < numPoints; j++) {\n distance = getDistance(i, j);\n\n if ((distance == 0) || (Double.isNaN(distance))) {\n repeat = true;\n\n continue;\n }\n }\n\n // if point is repeated assume a random perturbation will fix it\n if (repeat) {\n double[] newPoint = new double[dimensions];\n\n for (int k = 0; k < dimensions; k++) {\n newPoint[k] = getComponent(i, k)\n + ((Math.random() - 0.5) * factor);\n getPoint(i).setData(newPoint);\n }\n } else {\n continue;\n }\n }\n }", "public void calculateNewIntensity() {\r\n \r\n // call the recursive method with the root\r\n calculateNewIntensity(root);\r\n }", "public static void fillTheForest() {\n int x = (int)(Math.random() * SIZE);\n int y = (int)(Math.random() * SIZE);\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (i == x && j == y){\n forest[i][j] = 1;\n } else {\n forest[i][j] = 0;\n }\n }\n }\n }", "public int defaultAnomaly(int total);", "public double populationMean()\n\t{\n\t\treturn null == _distPopulation ? java.lang.Double.NaN : _distPopulation.mean();\n\t}", "public TPoint autoMarkAt(int n, double x, double y) {\n OffsetOriginStep step = (OffsetOriginStep) getStep(n);\n // be sure coords have unfixed origin\n ImageCoordSystem coords = trackerPanel.getCoords();\n coords.setFixedOrigin(false);\n if (step == null) {\n step = (OffsetOriginStep) createStep(n, x, y);\n if (step != null) {\n return step.getPoints()[0];\n }\n } else {\n TPoint p = step.getPoints()[0];\n if (p != null) {\n Mark mark = step.marks.get(trackerPanel);\n if (mark == null) {\n // set step location to image position of current world coordinates\n double xx = coords.worldToImageX(n, step.worldX, step.worldY);\n double yy = coords.worldToImageY(n, step.worldX, step.worldY);\n p.setLocation(xx, yy);\n }\n p.setAdjusting(true);\n p.setXY(x, y);\n p.setAdjusting(false);\n firePropertyChange(\"step\", null, n); //$NON-NLS-1$\n return p;\n }\n }\n return null;\n }", "public DataPoint getPoint(final int i) {\n if (i >= getNumPoints()) {\n System.err\n .println(\"Error: requested datapoint outside of dataset range\");\n\n return null;\n }\n\n return ntree.get(i);\n }", "public org.apache.spark.sql.catalyst.util.QuantileSummaries insert (double x) { throw new RuntimeException(); }", "@SuppressWarnings(\"unused\")\r\n private double[] getSeedPoint(double[] center) {\r\n double lowIntensity = -50;\r\n double highIntensity = 50;\r\n \r\n int originalX = (int)center[0], currentX = (int)center[0];\r\n int originalY = (int)center[1], currentY = (int)center[1];\r\n \r\n boolean pointFound = false;\r\n \r\n while(!pointFound && currentX < xDim) {\r\n if(srcImage.get(currentX, currentY, (int)center[2]).doubleValue() < highIntensity &&\r\n srcImage.get(currentX, currentY, (int)center[2]).doubleValue() > lowIntensity) {\r\n pointFound = true;\r\n break;\r\n }\r\n if(currentX - originalX > currentY - originalY)\r\n currentY++;\r\n else\r\n currentX++;\r\n }\r\n \r\n if(pointFound) {\r\n center[0] = currentX;\r\n center[1] = currentY;\r\n }\r\n \r\n return center;\r\n \r\n }", "public InhomogeneousPoint2D getSuggestedPrincipalPointValue() {\n return mSuggestedPrincipalPointValue;\n }", "public static double getDisplacementScore(DynamicScoringRandomCutForest forest, double[] point) {\n return forest.getDynamicScore(point, 0, (x, y) -> 1.0, (x, y) -> y, (x, y) -> 1.0);\n }", "public double getUnderlyingPoolNotionalMean(final UnderlyingPool underlyingPool) {\n\n ArgumentChecker.notNull(underlyingPool, \"Underlying pool\");\n\n final MeanCalculator mean = new MeanCalculator();\n\n return mean.evaluate(underlyingPool.getObligorNotionals());\n }", "private float getMinX(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float minX = Float.POSITIVE_INFINITY;\n for (float [] point : points) {\n minX = Math.min(minX, point [0]);\n } \n return minX;\n }", "public Pile getExhaustPile(){\n return piles.getExhaustPile();\n }", "int insertSelective(XPsDigest95thPercentileByAvgUs record);", "private Matrix gaussianEliminate(){\r\n\t\t//Start from the 0, 0 (top left)\r\n\t\tint rowPoint = 0;\r\n\t\tint colPoint = 0;\r\n\t\t// instantiate the array storing values for new Matrix\r\n\t\tDouble[][] newVal = deepCopy(AllVal);\r\n\t\twhile (rowPoint < row && colPoint < col) {\r\n\t\t\t// find the index with max number (absolute value) from rowPoint to row\r\n\t\t\tDouble max = Math.abs(newVal[rowPoint][colPoint]);\r\n\t\t\tint index = rowPoint;\r\n\t\t\tint maxindex = rowPoint;\r\n\t\t\twhile (index < row) {\r\n\t\t\t\tif (max < Math.abs(newVal[index][colPoint])) {\r\n\t\t\t\t\tmax = newVal[index][colPoint];\r\n\t\t\t\t\tmaxindex = index;\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t\t// if max is 0 then that must mean there are no pivots\r\n\t\t\tif (max == 0) {\r\n\t\t\t\tcolPoint++;\r\n\t\t\t}else {\r\n\t\t\t\t//TODO: refactor into method\r\n\t\t\t\tDouble[] Temp = newVal[rowPoint];\r\n\t\t\t\tnewVal[rowPoint] = newVal[maxindex];\r\n\t\t\t\tnewVal[maxindex] = Temp;\r\n\t\t\t\t// Fill 0 lower part of pivot\r\n\t\t\t\tfor(int lower = rowPoint + 1; lower < row; lower++) {\r\n\t\t\t\t\tDouble ratio = newVal[lower][colPoint]/newVal[rowPoint][colPoint];\r\n\t\t\t\t\tnewVal[lower][colPoint] = (Double) 0.0;\r\n\t\t\t\t\t// adjust for the remaining element\r\n\t\t\t\t\tfor (int remain = colPoint + 1; remain < col; remain++) {\r\n\t\t\t\t\t\tnewVal[lower][remain] = newVal[lower][remain] - newVal[lower][remain]*ratio;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trowPoint++;\r\n\t\t\t\tcolPoint++;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newVal);\r\n\t}", "public static < T extends RealType< T > > boolean fillInChannel( final Image< T > target, final int[] offset, final ImagePlus imp, final int channel, final int timepoint )\n\t{\n\t\tif ( imp.getType() == ImagePlus.GRAY8 )\n\t\t{\n\t\t\tfinal ArrayList< Image< UnsignedByteType > > images = new ArrayList<Image<UnsignedByteType>>();\n\n\t\t\t// first get wrapped instances of all channels\n\t\t\timages.add( getWrappedImageUnsignedByte( imp, channel, timepoint ) );\t\t\t\n\n\t\t\taverageAllChannels( target, images, offset );\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse if ( imp.getType() == ImagePlus.GRAY16 )\n\t\t{\n\t\t\tfinal ArrayList< Image< UnsignedShortType > > images = new ArrayList<Image<UnsignedShortType>>();\n\n\t\t\t// first get wrapped instances of all channels\n\t\t\timages.add( getWrappedImageUnsignedShort( imp, channel, timepoint ) );\t\t\t\n\n\t\t\taverageAllChannels( target, images, offset );\n\t\t\treturn true;\n\t\t}\n\t\telse if ( imp.getType() == ImagePlus.GRAY32 )\n\t\t{\n\t\t\tfinal ArrayList< Image< FloatType > > images = new ArrayList<Image<FloatType>>();\n\n\t\t\t// first get wrapped instances of all channels\n\t\t\timages.add( getWrappedImageFloat( imp, channel, timepoint ) );\n\t\t\t\n\t\t\taverageAllChannels( target, images, offset );\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tLog.error( \"Unknow image type: \" + imp.getType() );\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic Object hesseI(double[] point) {\n\t\treturn null;\n\t}", "public knnImpute(InstanceSet tra, int neighbors) {\r\n\t\tnneigh = neighbors;\r\n\t\tIS = tra;\r\n\t}", "public void guess(){\n\t\tfor(int i=0;i<size;i++){\n\t\t\tfor(int j=0;j<size;j++){\n\t\t\t\tif(!boundary[i][j]){\n\t\t\t\t\tvalues[i][j]=100/(.05*i+1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "@ParameterizedTest\n @ArgumentsSource(TestForestProvider.class)\n public void testMultipleAttributions(RandomCutForest forest) {\n int hardPass=0;\n int causal=0;\n double [] point ={6.0,0.0,0.0};\n DiVector result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.2);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.getHighLowSum(1) + result.getHighLowSum(2) < 1.0);\n assertTrue(result.high[0] > forest.getAnomalyScore(point)/3);\n if (result.high[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n // the last line states that first coordinate was high and was a majority contributor to the score\n // the previous test states that the contribution is twice the average of the 12 possible contributors.\n // these tests all subparts of the score at once\n\n point=new double [] {-6.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.getHighLowSum()>1.0);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] > forest.getAnomalyScore(point)/3);\n if (result.low[0] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > forest.getAnomalyScore(point)/3);\n if (result.high[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,-6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.low[1] > forest.getAnomalyScore(point)/3);\n if (result.low[1] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n point=new double [] {0.0,0.0,6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.low[2] < 0.5);\n assertTrue(result.high[2] > forest.getAnomalyScore(point)/3);\n if (result.high[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n point=new double [] {0.0,0.0,-6.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.getHighLowSum(0) < 0.5) ++hardPass;\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n assertTrue(result.high[2] < 0.5);\n assertTrue(result.low[2] > forest.getAnomalyScore(point)/3);\n if (result.low[2] > 0.5 * forest.getAnomalyScore(point)) ++causal;\n\n\n assertTrue(causal>=5); // maximum is 6; there can be skew in one direction\n\n point=new double [] {-3.0,0.0,0.0};\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0] < 0.5);\n if (result.getHighLowSum(1) < 0.5) ++hardPass;\n if (result.getHighLowSum(2) < 0.5) ++hardPass;\n assertTrue(result.low[0] >\n forest.getAnomalyScore(point)/3);\n\n /* For multiple causes, the relationship of scores only hold for larger\n * distances.\n */\n\n point=new double [] {-3.0,6.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n if (result.low[0] > 0.5) ++hardPass;\n assertTrue(result.high[0] < 0.5);\n assertTrue(result.low[1] < 0.5);\n assertTrue(result.high[1] > 0.5);\n if (result.high[1]>0.9) ++hardPass;\n assertTrue(result.getHighLowSum(2)< 0.5);\n assertTrue(result.high[1]+result.low[0]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {6.0,-3.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.low[0] < 0.5);\n assertTrue(result.high[0] > 0.5);\n if (result.high[0]>0.9) ++hardPass;\n if (result.low[1] > 0.5) ++hardPass;\n assertTrue(result.high[1] < 0.5);\n assertTrue(result.getHighLowSum(2) < 0.5);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n\n point=new double [] {20.0,-10.0,0.0};\n assertTrue(result.getHighLowSum()>1.0);\n result = forest.getAnomalyAttribution(point);\n assertTrue(result.high[0]+result.low[1]>\n 0.8*forest.getAnomalyScore(point));\n if (result.high[0]>1.8*result.low[1]) ++hardPass;\n if (result.low[1]>result.high[0]/2.2) ++hardPass;\n\n assertTrue(hardPass>=15); //maximum is 20\n }", "public T median();", "public double getIllumination(SimpleMatrix normal, SimpleMatrix point) {\n double illumination = intensity * Vectors.dot(\n Vectors.unit(normal),\n Vectors.unit(point.minus(position))\n );\n\n return Math.max(illumination, 0);\n }", "public Point safeApply(Point point, Region region)\n {\n assert(_index >= 0);\n assert(_index < _pattern.length);\n\n Delta delta = _pattern[_index];\n\n if (point.wouldGoOutside(delta, region)) return point;\n\n return point.move(_pattern[_index]);\n }", "public final EObject entryRuleGoalImplication() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleGoalImplication = null;\r\n\r\n\r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1377:2: (iv_ruleGoalImplication= ruleGoalImplication EOF )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1378:2: iv_ruleGoalImplication= ruleGoalImplication EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n newCompositeNode(grammarAccess.getGoalImplicationRule()); \r\n }\r\n pushFollow(FOLLOW_ruleGoalImplication_in_entryRuleGoalImplication2853);\r\n iv_ruleGoalImplication=ruleGoalImplication();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n current =iv_ruleGoalImplication; \r\n }\r\n match(input,EOF,FOLLOW_EOF_in_entryRuleGoalImplication2863); if (state.failed) return current;\r\n\r\n }\r\n\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public knnImpute(InstanceSet tra, InstanceSet MVs, int neighbors) {\r\n\t\tnneigh = neighbors;\r\n\t\tIS = tra;\r\n\t\tIStest = MVs;\r\n\t}", "@Override\n public double getInfectivity(double heat, double dampness, double wealth) {\n return (infectivity * (1.0 - wealth));\n }", "private void nullLeaf(AVLNode<T> node) {\n AVLNode<T> prev = getParent(root, node);\n int comp = node.getData().compareTo(prev.getData());\n if (comp > 0) {\n prev.setRight(null);\n AVLNode<T> min = findMin(prev.getLeft());\n AVLNode<T> max = findMax(prev.getLeft());\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n } else {\n prev.setLeft(null);\n AVLNode<T> max = findMax(prev.getRight());\n AVLNode<T> min = findMin(prev.getRight());\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n }\n }", "public String[][] impute(InstanceAttributes atts) {\r\n\t\tInstance neighbor;\r\n\t\tdouble dist, mean, maxdist, candidateDist;\r\n\t\tint actual, totalN;\r\n\t\tint[] N = new int[nneigh];\r\n\t\tdouble[] Ndist = new double[nneigh];\r\n\t\tboolean allNull;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// Load in memory a dataset that contains a classification problem\r\n\t\t\tint in = 0;\r\n\t\t\tint out = 0;\r\n\r\n\t\t\tndatos = IS.getNumInstances();\r\n\t\t\tnvariables = atts.getNumAttributes();\r\n\t\t\tnentradas = atts.getInputNumAttributes();\r\n\t\t\tnsalidas = atts.getOutputNumAttributes();\r\n\r\n\t\t\tX = new String[ndatos][nvariables];// matrix with transformed data\r\n\r\n\t\t\tmostCommon = new String[nvariables];\r\n\t\t\tfiltered = new boolean[ndatos];\r\n\r\n\t\t\tFreqList[] timesSeen = new FreqList[nvariables]; // matrix with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// frequences of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// attribute\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// values\r\n\r\n\t\t\tfor (int i = 0; i < ndatos; i++) {\r\n\t\t\t\tInstance inst = IS.getInstance(i);\r\n\r\n\t\t\t\tfiltered[i] = false;\r\n\t\t\t\tin = 0;\r\n\t\t\t\tout = 0;\r\n\r\n\t\t\t\tif (inst.existsAnyMissingValue()) {\r\n\r\n\t\t\t\t\t// since exists MVs, first we must compute the nearest\r\n\t\t\t\t\t// neighbors for our instance\r\n\t\t\t\t\tmaxdist = Double.MAX_VALUE;\r\n\t\t\t\t\tfor (int n = 0; n < nneigh; n++) {\r\n\t\t\t\t\t\tNdist[n] = Double.MAX_VALUE;\r\n\t\t\t\t\t\tN[n] = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (int k = 0; k < ndatos; k++) {\r\n\t\t\t\t\t\tneighbor = IS.getInstance(k);\r\n\r\n\t\t\t\t\t\tdist = distance(inst, neighbor, atts);\r\n\t\t\t\t\t\tif (dist > 0) { // Leave one out + dont have the same\r\n\t\t\t\t\t\t\t\t\t\t// missing attributes\r\n\t\t\t\t\t\t\tif (dist <= maxdist) {\r\n\t\t\t\t\t\t\t\tactual = -1;\r\n\t\t\t\t\t\t\t\tcandidateDist = Ndist[0];\r\n\t\t\t\t\t\t\t\tfor (int n = 0; n < nneigh; n++) {\r\n\r\n\t\t\t\t\t\t\t\t\tif (dist < Ndist[n]) {\r\n\t\t\t\t\t\t\t\t\t\tif (actual != -1) {\r\n\t\t\t\t\t\t\t\t\t\t\tif (Ndist[n] > Ndist[actual]) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tcandidateDist = Ndist[actual];\r\n\t\t\t\t\t\t\t\t\t\t\t\tactual = n;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t\t\t\t\tactual = n;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (actual != -1) {\r\n\t\t\t\t\t\t\t\t\tN[actual] = k;\r\n\t\t\t\t\t\t\t\t\tNdist[actual] = dist;\r\n\t\t\t\t\t\t\t\t\tmaxdist = Math.max(candidateDist, dist);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (int j = 0; j < nvariables; j++) {\r\n\t\t\t\t\tAttribute a = atts.getAttribute(j);\r\n\t\t\t\t\tdireccion = a.getDirectionAttribute();\r\n\t\t\t\t\ttipo = a.getType();\r\n\r\n\t\t\t\t\tif (direccion == Attribute.INPUT) {\r\n\t\t\t\t\t\tif (tipo != Attribute.NOMINAL\r\n\t\t\t\t\t\t\t\t&& !inst.getInputMissingValues(in)) {\r\n\t\t\t\t\t\t\tif (tipo == Attribute.INTEGER)\r\n\t\t\t\t\t\t\t\tX[i][j] = new String(String.valueOf((int) inst\r\n\t\t\t\t\t\t\t\t\t\t.getInputRealValues(in)));\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tX[i][j] = new String(String.valueOf(inst\r\n\t\t\t\t\t\t\t\t\t\t.getInputRealValues(in)));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (!inst.getInputMissingValues(in))\r\n\t\t\t\t\t\t\t\tX[i][j] = inst.getInputNominalValues(in);\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t// save computing time\r\n\t\t\t\t\t\t\t\tallNull = true;\r\n\t\t\t\t\t\t\t\tif (tipo != Attribute.NOMINAL) {\r\n\t\t\t\t\t\t\t\t\tmean = 0.0;\r\n\t\t\t\t\t\t\t\t\ttotalN = 0;\r\n\t\t\t\t\t\t\t\t\tfor (int m = 0; m < nneigh; m++) {\r\n\t\t\t\t\t\t\t\t\t\tif (N[m] != -1) {\r\n\t\t\t\t\t\t\t\t\t\t\tInstance inst2 = IS\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getInstance(N[m]);\r\n\t\t\t\t\t\t\t\t\t\t\tif (!inst2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getInputMissingValues(in)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tmean += inst2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getInputRealValues(in);\r\n\t\t\t\t\t\t\t\t\t\t\t\ttotalN++;\r\n\t\t\t\t\t\t\t\t\t\t\t\tallNull = false;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tX[i][j] = String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(nearestValidNeighbor(inst,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tin, atts)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getInputRealValues(in));\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\ttimesSeen[j] = new FreqList();\r\n\r\n\t\t\t\t\t\t\t\t\tfor (int m = 0; m < nneigh; m++) {\r\n\t\t\t\t\t\t\t\t\t\tInstance inst2 = IS.getInstance(N[m]);\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (N[m] != -1\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !inst2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getInputMissingValues(in)) {\r\n\t\t\t\t\t\t\t\t\t\t\ttimesSeen[j].AddElement(inst2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getInputNominalValues(in));\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (timesSeen[j].totalElements != 0)\r\n\t\t\t\t\t\t\t\t\t\tX[i][j] = new String(timesSeen[j]\r\n\t\t\t\t\t\t\t\t\t\t\t\t.mostCommon().getValue()); // replace\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// missing\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// data\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\tX[i][j] = nearestValidNeighbor(inst,\r\n\t\t\t\t\t\t\t\t\t\t\t\tin, atts)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getInputNominalValues(in);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tin++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tX[i][j] = inst.getOutputNominalValues(out);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Dataset exception = \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\t// Return the dataset imputed.\r\n\t\treturn X;\r\n\r\n\t}", "int getMedian () {\n if (fillLength == 0)\n throw new IndexOutOfBoundsException(\"An error occurred in getMedian method of StepDArray class\");\n return array[fillLength / 2];\n }", "private Double getMean(Double[] values) {\n double sum = 0;\n int count = 0;\n for (Double d: values) {\n if (d != null) {\n sum += d;\n ++count;\n }\n }\n return count == 0 ? null : (sum / count);\n }", "public TreeNode inorderSuccessor_naive(TreeNode root, TreeNode p) {\n Stack<TreeNode> stack = new Stack<>();\n TreeNode prev = null;\n while (root != null || !stack.empty()) {\n if (root != null) {\n stack.push(root);\n root = root.left;\n }\n else {\n root = stack.pop();\n if (prev != null && prev == p) {\n return root;\n }\n prev = root;\n root = root.right;\n }\n }\n return null;\n }", "public abstract boolean illuminates(Point3 point, World world);", "double terrainFactorInf() {\n double value;\n switch (getParent().getField().getTerrain().getId()) {\n case TERRAIN_B:\n case TERRAIN_Q:\n value = 1d;\n break;\n\n case TERRAIN_H:\n case TERRAIN_K:\n case TERRAIN_T:\n value = .8d;\n break;\n\n case TERRAIN_W:\n case TERRAIN_G:\n case TERRAIN_D:\n value = .5d;\n break;\n\n case TERRAIN_J:\n value = .4d;\n break;\n\n case TERRAIN_S:\n default:\n value = .45d;\n break;\n }\n return value;\n }", "public Double median() {\n if (minHeap.isEmpty() && maxHeap.isEmpty()) {\n return null;\n } else {\n if (minHeap.size() != maxHeap.size()) {\n return Double.valueOf(maxHeap.peek());\n } else {\n return Double.valueOf(minHeap.peek() + maxHeap.peek()) / 2;\n }\n }\n }", "public void imprime(){\n imprimeP();\n }", "private static double[] addNominalNoise(double[] in, double noiseProbability, int startCol, int endCol, \n\t\t\tMatrix data, Random rand)\n\t{\n assert noiseProbability <= 1.00001 && noiseProbability >= -0.00001;\n\t\tdouble[] result = new double[in.length];\n\t\tfor (int i = 0; i < result.length; i++)\n\t\t{\n\t\t\tresult[i] = in[i];\n\t\t\tif (i < startCol || i >= endCol)\n\t\t\t\tcontinue;\n\t\t\tif (rand.nextFloat() <= noiseProbability)\n\t\t\t{\n//\t\t\t\tresult[i] = rand.nextInt(data.valueCount(i));\n\t\t\t\tif (rand.nextBoolean())\n\t\t\t\t{\n\t\t\t\t\tresult[i] += 1;\n\t\t\t\t\tif (result[i] > data.getValueCount(i) - 1)\n\t\t\t\t\t\tresult[i] = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult [i] -= 1;\n\t\t\t\t\tif (result[i] < 0)\n\t\t\t\t\t\tresult[i] = data.getValueCount(i) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public BTreeNode<E> handleUnderflow() {\n\t\tBTreeNode<E> donor = findDonor();\n\t\tint thisIndex = parent.children.indexOf(this);\n\t\tif (donor.canDonate()) {\n\t\t\tBTreeNode<E> parent = donor.parent;\n\t\t\tint donorIndex = parent.children.indexOf(donor);\n\t\t\t//rotate(donor, myGainIndex, sibLossIndex, pSepIndex);\n\t\t\t//if the donor is on the left, add the new data to the beginning of the deficient node; otherwise add it to the end\n\t\t\tif (donorIndex < thisIndex) {\n\t\t\t\trotate(donor, 0, donor.dataSize() - 1, donorIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\trotate(donor, dataSize(), 0, thisIndex);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\t//the only time you will merge right, is if the deficient node is the first child\n\t\t\tBTreeNode<E> joinedNode;\n\t\t\tif (thisIndex == 0) {\n\t\t\t\tjoinedNode = join(this, donor, thisIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tjoinedNode = join(donor, this, thisIndex - 1);\n\t\t\t}\n\n\t\t\treturn joinedNode;\n\t\t}\n\t}", "public void removeMissiles(){\n nunMissiles--;\n }", "public float getAverageBetweenPoint(){\n return getMetric()/list.size();\n }", "public void insertNearest(Point p) {\n if (size() == 0) {\n first.next = first;\n first.p = p;\n return;\n }\n double distanceBetweenNode;\n double minimumDistance = Double.POSITIVE_INFINITY;\n Node nearestN = null;\n Node n = first;\n do {\n distanceBetweenNode = n.p.distanceTo(p);\n if (distanceBetweenNode < minimumDistance) {\n nearestN = n;\n minimumDistance = distanceBetweenNode;\n }\n n = n.next;\n } while (!n.equals(first));\n Node newNode = new Node();\n newNode.p = p;\n newNode.next = nearestN.next;\n nearestN.next = newNode;\n }", "public Point getPointByTid(Integer tid) throws DataAccessException {\n\t\treturn null;\r\n\t}", "private double getHazFuncIML_ProbValues(ArbitrarilyDiscretizedFunc hazFunc,\n double imlProbVal,boolean imlAtProb, boolean probAtIML) {\n\n //gets the number of points in the function\n int numPoints = hazFunc.getNum();\n //prob at iml is selected just return the Y Value back\n if(probAtIML)\n return hazFunc.getY(numPoints-1);\n else{ //if iml at prob is selected just return the interpolated IML value.\n ArbitrarilyDiscretizedFunc tempFunc = new ArbitrarilyDiscretizedFunc();\n for(int i=0; i<numPoints; ++i)\n tempFunc.set(function.getX(i),hazFunc.getY(i));\n\n /*we are calling the function (getFirst InterpolatedX ) becuase x values for the PEER\n * are the X values and the function we get from the Hazard Curve Calc are the\n * Y Values for the Prob., now we have to find the interpolated IML which corresponds\n * X value and imlProbVal is the Y value parameter which this function accepts\n */\n //returns the interpolated IML value for the given prob.\n return tempFunc.getFirstInterpolatedX_inLogXLogYDomain(imlProbVal);\n\n }\n }", "public knnImpute(String fileParam) {\r\n\t\tconfig_read(fileParam);\r\n\t\tIS = new InstanceSet();\r\n\t\tIStest = new InstanceSet();\r\n\t}", "public double findMedian() {\n\t\t\treturn minHeap.size() > maxHeap.size() ? minHeap.peek() : (minHeap.peek() + maxHeap.peek()) / 2.0d;\n\t\t}", "@Test\n public void testInvalidScalingPerturbDataSet() throws Exception {\n int[] result = NoiseGenerator.perturbDataSet(dataSet, -1);\n Assert.assertTrue(result == null);\n }", "@Override\r\n protected double getMedianDouble() {\r\n Grids_GridDouble g = getGrid();\r\n int scale = 20;\r\n double median = g.getNoDataValue(false);\r\n long n = getN();\r\n BigInteger nBI = BigInteger.valueOf(n);\r\n if (n > 0) {\r\n double[] array = toArrayNotIncludingNoDataValues();\r\n sort1(array, 0, array.length);\r\n BigInteger[] nDivideAndRemainder2 = nBI.divideAndRemainder(\r\n new BigInteger(\"2\"));\r\n if (nDivideAndRemainder2[1].compareTo(BigInteger.ZERO) == 0) {\r\n int index = nDivideAndRemainder2[0].intValue();\r\n //median = array[ index ];\r\n //median += array[ index - 1 ];\r\n //median /= 2.0d;\r\n //return median;\r\n BigDecimal medianBigDecimal = new BigDecimal(array[index - 1]);\r\n return (medianBigDecimal.add(new BigDecimal(array[index]))).\r\n divide(new BigDecimal(2.0d), scale, BigDecimal.ROUND_HALF_DOWN).doubleValue();\r\n //return ( medianBigDecimal.add( new BigDecimal( array[ index ] ) ) ).divide( new BigDecimal( 2.0d ), scale, BigDecimal.ROUND_HALF_EVEN ).doubleValue();\r\n } else {\r\n int index = nDivideAndRemainder2[0].intValue();\r\n return array[index];\r\n }\r\n } else {\r\n return median;\r\n }\r\n }", "static int getPixValue(int x, int y) {\n return pgmInf.img[y][x];\n }", "public double findMedian() {\n int size = maxHeap.size() + minHeap.size();\n if (size ==0) {\n return Double.MIN_VALUE;\n }\n if (size%2 == 1) {\n return maxHeap.peek();\n } else {\n return (maxHeap.peek() + minHeap.peek())/2.0f;\n }\n }", "public double findMedian() {\n \treturn maxHeap.size() > minHeap.size() ? maxHeap.peek() : (maxHeap.peek() - minHeap.peek()) / 2.0; \n }", "void losePoints() {\n if (currentPoints >= POINTSGIVEN) {\n currentPoints -= POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "int insert(XPsDigest95thPercentileByAvgUs record);", "static TDN revealFirst ( TDN chosen, TDN current, int guess ) {\n\t// return ... ;\n\t// return ... chosen.first ... chosen.second ... chosen.third ... current.first ... current.second ... current.third .. guess ;\n\t/*\n\treturn new TDN ( ... chosen.first ... chosen.second ... chosen.third ... current.first ... current.second ... current.third .. guess,\n\t\t\t ... chosen.first ... chosen.second ... chosen.third ... current.first ... current.second ... current.third .. guess,\n\t\t\t ... chosen.first ... chosen.second ... chosen.third ... current.first ... current.second ... current.third .. guess ) ;\n\t*/\n\tif ( chosen.first == guess ) {\n\t return new TDN ( chosen.first,\n\t\t\t current.second,\n\t\t\t current.third) ;\n\t} else {\n\t return current;\n\t /*\n\t return new TDN ( current.first,\n\t current.second,\n\t\t\t current.third) ;\n\t */\n\t}\n }", "private Point findMeanByArrayList(ArrayList<GenUsers> ulist) {\n\t\t\n int count = ulist.size();\n double ht_sum=0,wt_sum=0;\n\t\t\n\t\t//code: find the mean male point and mean female point\n\t\tfor(int i=0;i<count;i++) {\n\t\t\tht_sum= ht_sum + ulist.get(i).getHt();\n\t\t\twt_sum= wt_sum + ulist.get(i).getWt();\n\t\t\t\n\t\t}\n\t\t\n\t\tdouble ht_mean = ht_sum/count;\n\t\tdouble wt_mean = wt_sum/count;\n\t\treturn new Point(ht_mean,wt_mean);\n\t}", "protected static double indetPositionFunc(double t) {\n\t\tif (t > 0.5) {\n\t\t\treturn -2.0 * (t - 1.0);\n\t\t} else {\n\t\t\treturn 2.0 * t;\n\t\t}\n\t}", "@Override\n\tpublic void replaceMissingValues(final double[] array) {\n\n\t}", "public static Value makeAnyNumNotNaNInf() {\n return theNumNotNaNInf;\n }", "@Test\n public void basicTest() {\n Point myPoint;\n\n// myPoint = pointSet.nearest(2, 2);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(2, -2);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(1, 4);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(3, -100);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(0, 0);\n// System.out.println(myPoint.toString());\n//\n// myPoint = kdPointSet.nearest(2, 2); //THIS ONE DOES NOT MATCH NAIVE!\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(2, -2);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(1, 4);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(3, -100);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(0, 0);\n// System.out.println(myPoint.toString());\n\n\n\n\n\n\n }", "@Test void compareToNaive() {\n\t\tfor (var type : new ImageType[]{ImageType.SB_U8, ImageType.SB_U16, ImageType.SB_F32, ImageType.SB_F64}) {\n\t\t\tvar src = (ImageGray)type.createImage(width, height);\n\t\t\tvar dst = (ImageGray)type.createImage(1, 1);\n\n\t\t\tGImageMiscOps.fillUniform(src, rand, 0, 100);\n\n\t\t\tdouble mean = GImageStatistics.mean(src);\n\t\t\tGeometricMeanFilter.filter(src, radiusX, radiusY, mean, dst);\n\n\t\t\tassertEquals(width, dst.width);\n\t\t\tassertEquals(height, dst.height);\n\n\t\t\tfor (int y = 0; y < dst.height; y++) {\n\t\t\t\tfor (int x = 0; x < dst.width; x++) {\n\t\t\t\t\tdouble found = GeneralizedImageOps.get(dst, x, y);\n\t\t\t\t\tassertEquals(naiveMean(src, x, y, radiusX, radiusY), found, 1.0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public AnyType findMin() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMin(root).element;\r\n\t}", "private void prune(Exemplar predictedExemplar, Instance newInst) throws Exception {\n\n /* remove the Exemplar */\n removeExemplar(predictedExemplar);\n\n /* look for the best nominal feature and the best numeric feature to cut */\n int numAttr = -1, nomAttr = -1;\n double smallestDelta = Double.POSITIVE_INFINITY, delta;\n int biggest_N_Nom = -1, biggest_N_Num = -1, n, m;\n for(int i = 0; i < m_Train.numAttributes(); i++){\n\n if(i == m_Train.classIndex())\n\tcontinue;\n\n /* numeric attribute */\n if(m_Train.attribute(i).isNumeric()){\n\n\t/* compute the distance 'delta' to the closest boundary */\n\tdouble norm = m_MaxArray[i] - m_MinArray[i];\n\tif(norm != 0){\n\t delta = Math.min((predictedExemplar.getMaxBorder(i) - newInst.value(i)), \n\t\t\t (newInst.value(i) - predictedExemplar.getMinBorder(i))) / norm;\n\t} else {\n\t delta = Double.POSITIVE_INFINITY;\n\t}\n\n\t/* compute the size of the biggest Exemplar which would be created */\n\tn = m = 0;\n\tEnumeration enu = predictedExemplar.enumerateInstances();\n\twhile(enu.hasMoreElements()){\n\t Instance ins = (Instance) enu.nextElement();\n\t if(ins.value(i) < newInst.value(i))\n\t n++;\n\t else if(ins.value(i) > newInst.value(i))\n\t m++;\n\t}\n\tn = Math.max(n, m);\n\n\tif(delta < smallestDelta){\n\t smallestDelta = delta;\n\t biggest_N_Num = n;\n\t numAttr = i;\n\t} else if(delta == smallestDelta && n > biggest_N_Num){\n\t biggest_N_Num = n;\n\t numAttr = i;\n\t}\n\n\t/* nominal attribute */\n } else {\n\n\t/* compute the size of the Exemplar which would be created */\n\tEnumeration enu = predictedExemplar.enumerateInstances();\n\tn = 0;\n\twhile(enu.hasMoreElements()){\n\t if(((Instance) enu.nextElement()).value(i) != newInst.value(i))\n\t n++;\n\t}\n\tif(n > biggest_N_Nom){\n\t biggest_N_Nom = n;\n\t nomAttr = i;\n\t} \n }\n }\n\n /* selection of the feature to cut between the best nominal and the best numeric */\n int attrToCut;\n if(numAttr == -1 && nomAttr == -1){\n attrToCut = 0;\n } else if (numAttr == -1){\n attrToCut = nomAttr;\n } else if(nomAttr == -1){\n attrToCut = numAttr;\n } else {\n if(biggest_N_Nom > biggest_N_Num)\n\tattrToCut = nomAttr;\n else\n\tattrToCut = numAttr;\n }\n\n /* split the Exemplar */\n Instance curInst;\n Exemplar a, b;\n a = new Exemplar(this, m_Train, 10, predictedExemplar.classValue());\n b = new Exemplar(this, m_Train, 10, predictedExemplar.classValue());\n LinkedList leftAlone = new LinkedList();\n Enumeration enu = predictedExemplar.enumerateInstances();\n if(m_Train.attribute(attrToCut).isNumeric()){\n while(enu.hasMoreElements()){\n\tcurInst = (Instance) enu.nextElement();\n\tif(curInst.value(attrToCut) > newInst.value(attrToCut)){\n\t a.generalise(curInst);\n\t} else if (curInst.value(attrToCut) < newInst.value(attrToCut)){\n\t b.generalise(curInst);\n\t} else if (notEqualFeatures(curInst, newInst)) {\n\t leftAlone.add(curInst);\n\t}\n }\n } else {\n while(enu.hasMoreElements()){\n\tcurInst = (Instance) enu.nextElement();\n\tif(curInst.value(attrToCut) != newInst.value(attrToCut)){\n\t a.generalise(curInst);\n\t} else if (notEqualFeatures(curInst, newInst)){\n\t leftAlone.add(curInst);\n\t}\n }\n }\n\t\n /* treat the left alone Instances */\n while(leftAlone.size() != 0){\n\n Instance alone = (Instance) leftAlone.removeFirst();\n a.preGeneralise(alone);\n if(!a.holds(newInst)){\n\ta.validateGeneralisation();\n\tcontinue;\n }\n a.cancelGeneralisation();\n b.preGeneralise(alone);\n if(!b.holds(newInst)){\n\tb.validateGeneralisation();\n\tcontinue;\n }\n b.cancelGeneralisation();\n Exemplar exem = new Exemplar(this, m_Train, 3, alone.classValue());\n exem.generalise(alone);\n initWeight(exem);\n addExemplar(exem);\n }\n\n /* add (or not) the new Exemplars */\n if(a.numInstances() != 0){\n initWeight(a);\n addExemplar(a);\n }\n if(b.numInstances() != 0){\n initWeight(b);\n addExemplar(b);\t \n }\n }", "private void hover(GridPoint pt){\n\t\t// if too far away, move back to point\n\t\tif(grid.getDistance(grid.getLocation(this), pt) > 10) {\n\t\t\tmoveTowards(pt, 2);\n\t\t}\n\t\t// otherwise hover randomly\n\t\telse{\n\t\t\tmoveAmount(RandomHelper.nextIntFromTo(-1, 1),\n\t\t\t\t\t RandomHelper.nextIntFromTo(-1,1));\n\t\t}\n\t}", "private InteractionObject getInteractionUnder(float[] point) {\n\t\tfor ( int i=interactionObjects.size() - 1; i>=0; i--) {\n\t\t\tInteractionObject interaction = interactionObjects.get(i);\n\t\t\tif ( interaction.hitTesting(point, DiagramController.this) ) {\n\t\t\t\treturn interaction;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public List<Neighbor> getNearNeighborsInSample(double[] point) {\n return getNearNeighborsInSample(point, Double.POSITIVE_INFINITY);\n }", "private DataPoint _addPoint(DataPoint point) {\n DataPoint existingPoint = ntree.add(point);\n if (existingPoint != null) {\n return existingPoint;\n }\n ensureDistances();\n lastAddedPoint = point;\n return null;\n }", "public AnyType findMin() {\n if (isEmpty())\n throw new UnderflowException();\n return root.element;\n }", "public Point getPointMiddle()\n {\n Point temp = new Point();\n temp.x = Math.round((float)(rettangoloX + larghezza/2));\n temp.y = Math.round((float)(rettangoloY + altezza/2)); \n return temp;\n }", "public Point[] nearestPair() {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (this.size<2)\treturn null; //step 1\n\t\t\tif (this.size==2){\n\t\t\t\tAnswer[0]=this.minx.getData();\n\t\t\t\tAnswer[1]=this.maxx.getData();\n\t\t\t\treturn Answer;\t\t\t\n\t\t\t}\n\t\t\tdouble MinDistance=-1; // for sure it will be change in the next section, just for avoid warrning.\n\t\t\tdouble MinDistanceInStrip=-1;\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2]; // around the median\n\t\t\tboolean LargestAxis = getLargestAxis(); //step 2\n\t\t\tContainer median = getMedian(LargestAxis); //step 3\n\t\t\tif (LargestAxis){// step 4 - calling the recursive function nearestPairRec\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.minx.getData().getX(), median.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextX().getData().getX(), this.maxx.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.miny.getData().getY(), median.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextY().getData().getY(), this.maxy.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (MinPointsLeft!=null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}\n\t\t\telse if (MinPointsRight!=null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 - nearest point around the median\n\t\t\tif (MinDistance==-1) MinDistance=0;\n\t\t\tMinPointsInStrip = nearestPairInStrip(median, MinDistance*2, LargestAxis);\n\t\t\tif (MinPointsInStrip != null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "public static double fix(double pixel)\n\t{\n\t\treturn 0.5 + (int) pixel;\n\t}", "public static Image attackPoint()\n\t{\n\t\treturn attackPoint;\n\t}", "private Color getMedianPixel(BufferedImage image){\n Color[] pixels = imageToArray(image);\n return orderStat.findColor(pixels, pixels.length/2);\n }", "public Point getPieceToEat(Point orig, Point dest){\r\n return getMidPoint(orig, dest);\r\n }", "public interface IInfusable {\n\n int getInfused();\n\n void setInfused(int i);\n\n default float getInfusedFactor() {\n return ((float) getInfused()) / GeneralConfig.maxInfuse.get();\n }\n}", "void deleteMedian () {\n if (fillLength > 0) {\n for (int i = fillLength / 2; i < fillLength - 1; i++) {\n array[i] = array[i + 1];\n }\n array[fillLength - 1] = 0;\n fillLength--;\n }\n }", "public static double getMedian()\n {\n PriorityQueue<Integer> smallerHeap = (leftHeap.size() < rightHeap.size() ? leftHeap : rightHeap);\n PriorityQueue<Integer> biggerHeap = (rightHeap.size() > leftHeap.size()? rightHeap: leftHeap);\n\n if(smallerHeap.size() == biggerHeap.size())\n {\n return (double)((smallerHeap.peek() + biggerHeap.peek())/2.0);\n }\n \n return biggerHeap.peek();\n }", "public static int firstMissing(int[] x){\n int[] ans = new int[x.length];\n for(int j=0; j<x.length; j++ ){\n if(x[j]>0 && x[j]<x.length) ans[x[j]] = x[j];\n }\n\n for(int j=1; j<ans.length; j++){\n if(ans[j]!=j) return j;\n }\n return ans[ans.length-1]+1;\n }", "public static int findMedianInt (Scanner scn)\n {\n ArrayList<Integer> lines = new ArrayList<Integer>();\n while (scn.hasNext())\n {\n lines.add(scn.nextInt());\n }\n if (lines.size() > 0)\n {\n Collections.sort(lines);\n return lines.get(lines.size() / 2);\n }\n else\n {\n throw new NoSuchElementException();\n }\n }", "@Test\n public void addEntry_nan_ignored() {\n variance.addEntry(NaN);\n // Add any values (let's say 7 and 9). Verify that the result is equal to their variance.\n variance.addEntry(7);\n variance.addEntry(9);\n assertThat(variance.computeResult()).isEqualTo(1.0);\n }", "private Point getRandomMiniPoint()\n {\n Random r = new Random();\n\n // Random x value\n int minX = 0;\n int x = 0;\n int maxX = findViewById(R.id.the_canvas).getWidth() - ((GameBoard)findViewById(R.id.the_canvas)).getMiniSpriteWidth();\n x = r.nextInt(maxX-minX+1)+minX;\n\n // Start at the top\n int y = 0;\n\n return new Point (x,y);\n }" ]
[ "0.5205527", "0.46670762", "0.4636763", "0.45763582", "0.4498049", "0.4470727", "0.43739793", "0.4373331", "0.4335044", "0.43235976", "0.43047994", "0.430153", "0.43009862", "0.42997035", "0.42841512", "0.4277328", "0.42639443", "0.4255044", "0.42342162", "0.42339852", "0.42167184", "0.42092848", "0.41926724", "0.41644216", "0.41623122", "0.4156788", "0.41482538", "0.41395256", "0.4135844", "0.41324916", "0.41302434", "0.41250432", "0.41018456", "0.4100409", "0.4093306", "0.40907824", "0.4074329", "0.4072217", "0.40645954", "0.40645042", "0.4056303", "0.40434054", "0.4035056", "0.40333873", "0.4014541", "0.40049505", "0.4002225", "0.40009767", "0.4000365", "0.39987552", "0.39903104", "0.39875832", "0.39770928", "0.39684817", "0.39673877", "0.39672592", "0.3960482", "0.3946653", "0.39456335", "0.3939216", "0.39305878", "0.39299175", "0.3928077", "0.39266467", "0.39224806", "0.3919604", "0.39189252", "0.3917102", "0.39156112", "0.39148495", "0.39106423", "0.39103046", "0.39091948", "0.3895519", "0.3886592", "0.3885093", "0.38762674", "0.38717923", "0.387001", "0.38662854", "0.38647488", "0.3864645", "0.38622993", "0.38614917", "0.38588977", "0.38566798", "0.38533795", "0.38508365", "0.38484213", "0.38422027", "0.38381615", "0.38352898", "0.38342863", "0.38309807", "0.38217667", "0.38158607", "0.3805463", "0.38020453", "0.38012877", "0.38008714" ]
0.69118166
0
Given an initial shingled point, extrapolate the stream into the future to produce a forecast. This method is intended to be called when the input data is being shingled, and it works by imputing forward one shingle block at a time.
public double[] extrapolateBasic(double[] point, int horizon, int blockSize, boolean cyclic, int shingleIndex) { checkArgument(0 < blockSize && blockSize < dimensions, "blockSize must be between 0 and dimensions (exclusive)"); checkArgument(dimensions % blockSize == 0, "dimensions must be evenly divisible by blockSize"); checkArgument(0 <= shingleIndex && shingleIndex < dimensions / blockSize, "shingleIndex must be between 0 (inclusive) and dimensions / blockSize"); double[] result = new double[blockSize * horizon]; int[] missingIndexes = new int[blockSize]; double[] queryPoint = Arrays.copyOf(point, dimensions); if (cyclic) { extrapolateBasicCyclic(result, horizon, blockSize, shingleIndex, queryPoint, missingIndexes); } else { extrapolateBasicSliding(result, horizon, blockSize, queryPoint, missingIndexes); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updatePredictions (long currTime, TimeSeries inputSeries)\n {\n\n// TODO: decide if this is necessary, it's in PPALg >>\n this.state.clearPredictionsFrom (currTime + stepSize);\n//this.state.clearPredictions();\n\n TimeSeries timeSeries = (TimeSeries) inputSeries.clone();\n\n // if timeSeries is shorter than the minimum stream do nothing.\n if (timeSeries.size() < minStreamLength)\n return;\n\n // trim the first <minPeriod> number of elements from the timeSeries.\n // this removes non-periodicity that is seen in simulators first few elements.\n\n timeSeries.trimFromStart(minPeriodLength);\n\n df.addText (\"First trim of time series : \" + timeSeries.shortToString());\n\n // find the best shift of the time series against iteself that leads to the most matching\n ArrayList shiftGraph = findBestShiftGraph (timeSeries);\n\n // trim the shifted graph to make sure we aren't starting in the middle of an event\n int amountTrimmed = trimShiftGraph (shiftGraph);\n\n df.addText (\"Trim amount : \" + amountTrimmed);\n df.addText (\"final, trimmed shift graph : \" + shiftGraph.toString());\n\n // the offset is the total amount of the time series we have discarded, it is the offset\n // to the leading edge of a periodic repeating occurence\n int offset = amountTrimmed + minPeriodLength;\n\n // create a new periodic event object\n PeriodicEvent pe = getPeriod (shiftGraph, offset);\n\n if (pe == null || pe.getEvent().isEmpty())\n {\n df.addText (\" Periodic event is null \");\n return;\n }\n\n df.addText (\" Periodic Event is : \" + pe.toString());\n\n // get the current time from which we will extrapolate\n long time = currTime;\n\n int period = pe.getPeriod();\n ArrayList event = pe.getEvent();\n\n // if we divide the timeSeries into portions the size of the time period, how much is left over?\n // for this we do not consider the trimmed amount.\n int timeSeriesSize = timeSeries.size() - amountTrimmed;\n\n if (timeSeriesSize <= period)\n return;\n int remainder = getRemainder (timeSeriesSize, period);\n df.addText (\"remainder is : \" + remainder);\n\n // cycle through the remaining portion of the last period adding any predictions based on\n // our periodic event that we have identified.\n // must subtract 1 since index is zero-base, & reaminder is one-based\n for (int i = remainder -1 ; i < event.size(); i++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (i >= 0 && event.get (i) != null)\n {\n prediction = ((Double) event.get(i)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (i)\n\n int extrapolationCount = 2;\n\n // We make <j> additional extapolation into the future beyond the last period fragment\n while (extrapolationCount > 0)\n {\n for (int j = 0; j < event.size(); j++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (event.get (j) != null)\n {\n prediction = ((Double) event.get(j)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (j)\n\n extrapolationCount--;\n } // end while (extapoliationCount)\n\n\n state.updateError (timeSeries, currTime);\n }", "protected double forecast( double t )\n throws IllegalArgumentException\n {\n double previousTime = t - getTimeInterval();\n \n // As a starting point, we set the first forecast value to be\n // the same as the observed value\n if ( previousTime < getMinimumTimeValue()+TOLERANCE )\n return getObservedValue( t );\n \n try\n {\n double b = getSlope( previousTime );\n \n double forecast\n = alpha*getObservedValue(t)\n + (1.0-alpha)*(getForecastValue(previousTime)+b);\n \n return forecast;\n }\n catch ( IllegalArgumentException iaex )\n {\n double maxTimeValue = getMaximumTimeValue();\n \n double b = getSlope( maxTimeValue-getTimeInterval() );\n double forecast\n = getForecastValue(maxTimeValue)\n + (t-maxTimeValue)*b;\n \n return forecast;\n }\n }", "@Override\n public void forecast(int numFuturePoints) {\n\n int startPoint = 0, endPoint = actual.length;\n double lastValue = actual[startPoint],forecast;\n double[][] trainMatrix = new double[trainPoints + validationPoints][2];\n trainMatrix[0][0] = actual[startPoint];\n trainMatrix[0][1] = lastValue;\n\n for (int i = startPoint + 1; i < endPoint; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n\n lastValue = optAlpha * actual[i] + (1 - optAlpha) * lastValue;\n }\n\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n\n forecastDataSet = new DataSet();\n startPoint = actual.length;\n Observation observation;\n double forecastValue, lowerBound, upperBound;\n\n for (int i = startPoint; i < startPoint + numFuturePoints; i++) {\n forecastValue = lastValue;\n\n lastValue = optAlpha * forecastValue + (1 - optAlpha) * lastValue;\n\n if (forecastValue < 0) {\n forecastValue = 0l;\n lowerBound = 0l;\n upperBound = 0l;\n } else {\n forecastValue = BiasnessHandler.adjustBiasness(forecastValue, accuracyIndicators.getBias());\n lowerBound = forecastValue - errorBound;\n upperBound = forecastValue + errorBound;\n }\n\n observation = new Observation();\n observation.setIndependentValue(IndependentVariable.SLICE, i - startPoint);\n observation.setDependentValue(forecastValue);\n observation.setLowerDependentValue(lowerBound > 0 ? lowerBound : 0);\n observation.setUpperDependentValue(upperBound);\n forecastDataSet.add(observation);\n\n }\n }", "void warmup(ConsolidatedSnapshot snapshot, double[] forecasts);", "protected void smooth() {\n if (!timer.isRunning() || sequence == null) {\n return;\n }\n if (spline == null) {\n spline = Functions.getSpline(sequence, numSplinePoints, 4);\n error = Double.MAX_VALUE;\n establishPairings();\n } else if (error < ERROR_TOLERANCE) {\n if (numSplinePoints <= 4) {\n\tspline = null;\n\terror = Double.MAX_VALUE;\n\ttimer.stop();\n\treturn;\n }\n \n numSplinePoints = Math.min(numSplinePoints - 4, 4);\n error = Double.MAX_VALUE;\n\n spline = Functions.getSpline(sequence, numSplinePoints, 4);\n establishPairings();\n }\n\n error = 0.0;\n int ptCnt = 0;\n for (Pt pt : sequence) {\n Pt destination = (Pt) pt.getAttribute(\"tween\");\n\n if (pt.distance(destination) < 1.0) {\n\tpt.setLocation(destination.getX(), destination.getY());\n } else {\n\tdouble dx = (destination.getX() - pt.getX()) / C;\n\tdouble dy = (destination.getY() - pt.getY()) / C;\n\tpt.setLocation(pt.getX() + dx , pt.getY() + dy);\n\terror += Math.hypot(dx, dy);\n }\n ptCnt++;\n }\n \n }", "private void establishPairings() {\n int splineIdx = 0;\n double splineDist = 0.0;\n double seqDist = 0.0;\n Pt pt;\n Pt prevSeq = sequence.get(0);\n Pt prevSpline;\n for (int seqIdx=0; seqIdx < sequence.size(); seqIdx++) {\n\n // part 1: get pt and seqDist set up correctly\n pt = sequence.get(seqIdx);\n seqDist += prevSeq.distance(pt);\n prevSeq = pt;\n\n // part 2: find index of spline point that is just past where we\n // want to be, then find the interpolated point between our\n // known point and that spline point. Set the \"tween\" attribute\n // of the sequence point.\n double additionalDist = 0.0;\n prevSpline = spline.get(splineIdx);\n Pt spt;\n for (int sidx = splineIdx; sidx < spline.size(); sidx++) {\n\tspt = spline.get(sidx);\n\tadditionalDist = spt.distance(prevSpline);\n\tif (additionalDist + splineDist >= seqDist) {\n\t // the target point is between splineIdx and sidx\n\t Pt target = Functions.getPointAtDistance(spline, splineIdx, splineDist, 1, seqDist);\n\t pt.setAttribute(\"tween\", target);\n\t break;\n\t} else if (sidx >= (spline.size() -1)) {\n\t pt.setAttribute(\"tween\", spline.getLast());\n\t}\n\tprevSpline = spt;\n\tsplineIdx = sidx;\n\tsplineDist += additionalDist;\n }\n }\n }", "private void Step() {\n\t\tif (numberOfColumns == currentCycle) {\n\t\t\treturn;\n\t\t}\n\t\tif (numberOfRows != 1) {\n\n\t\t\tstall = 0;\n\t\t\tx = 0;\n\n\t\t\twhile (x < numberOfRows) {\n\t\t\t\tif (lstInstructionsPipeLine.get(x).issue_cycle == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (stall == 1) {\n\t\t\t\t\tDisplay_Stall(x, currentCycle);\n\t\t\t\t} else {\n\t\t\t\t\tswitch (lstInstructionsPipeLine.get(x).pipeline_stage) {\n\n\t\t\t\t\tcase \"IF\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"ID\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\tfor (int i = (x - 1); i >= 0; i--) {\n\n\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\")\n\t\t\t\t\t\t\t\t\t&& lstInstructionsPipeLine.get(i).operator.functional_unit\n\t\t\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).operator.functional_unit)) {\n\t\t\t\t\t\t\t\t// *** Structural Hazard ***\n\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).source_register1)\n\t\t\t\t\t\t\t\t\t|| lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).source_register2))) {\n\t\t\t\t\t\t\t\tif (dataForwarding == 1) {\n\n\t\t\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(i).operator.name.equals(\"ld\")\n\t\t\t\t\t\t\t\t\t\t\t|| lstInstructionsPipeLine.get(i).operator.name.equals(\"sd\")) {\n\t\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"WB\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t\t// ** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"MEM\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"WB\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t\t// *** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\telse if (dataForwarding == 0) {\n\t\t\t\t\t\t\t\t\t// If forwarding is disabled and the\n\t\t\t\t\t\t\t\t\t// previous instruction is not completed,\n\t\t\t\t\t\t\t\t\t// stall.\n\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t// *** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).destination_register))\n\t\t\t\t\t\t\t\t\t&& (!lstInstructionsPipeLine.get(i).destination_register.equals(\"null\"))) {\n\n\t\t\t\t\t\t\t\tif ((lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\"))\n\t\t\t\t\t\t\t\t\t\t&& ((lstInstructionsPipeLine.get(i).operator.execution_cycles\n\t\t\t\t\t\t\t\t\t\t\t\t- lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(i).execute_counter) >= (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(x).operator.execution_cycles - 1))) {\n\t\t\t\t\t\t\t\t\t// *** WAW Hazard ***\n\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\"))\n\t\t\t\t\t\t\t\t\t&& ((lstInstructionsPipeLine.get(i).operator.execution_cycles\n\t\t\t\t\t\t\t\t\t\t\t- lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t.get(i).execute_counter) == (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(x).operator.execution_cycles - 1))) {\n\n\t\t\t\t\t\t\t\t// *** WB will happen at the same time ***\n\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (stall != 1) {\n\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(x).operator.name == \"br_taken\") {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t\tif ((x + 1) < numberOfRows) {\n\t\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x + 1).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Complete the execution of the branch.\n\t\t\t\t\t\t\telse if (lstInstructionsPipeLine.get(x).operator.name == \"br_untaken\") {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Move the instruction into the EX stage.\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"EX\";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"EX\":\n\t\t\t\t\t\tif (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t.get(x).execute_counter < lstInstructionsPipeLine.get(x).operator.execution_cycles) {\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"EX\";\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"MEM\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"WB\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \" \":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"Unrecognized Pipeline Stage!\", \"Dialog\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (stall == 1) {\n\t\t\t\t\t\tDisplay_Stall(x, currentCycle);\n\t\t\t\t\t} else if (lstInstructionsPipeLine.get(x).pipeline_stage == \"EX\") {\n\t\t\t\t\t\tSystem.out.println(lstInstructionsPipeLine.get(x).operator.display_value + \" - row=\" + x\n\t\t\t\t\t\t\t\t+ \" col=\" + currentCycle);\n\t\t\t\t\t\tJPanel pnl_EXE_tmp = new JPanel();\n\t\t\t\t\t\tpnl_EXE_tmp.setBackground(col_EXE);\n\t\t\t\t\t\tpnl_EXE_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\t\t\tpanelShowResult.add(pnl_EXE_tmp);\n\t\t\t\t\t\tJLabel lblExe_tmp = new JLabel(lstInstructionsPipeLine.get(x).operator.display_value);\n\t\t\t\t\t\tpnl_EXE_tmp.add(lblExe_tmp);\n\t\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\t\tpanelShowResult.repaint();\n\n\t\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x,\"EX\");/// k,v\n\t\t\t\t\t}\n\t\t\t\t\t// Output the pipeline stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tJPanel pnl_tmp = new JPanel();\n\t\t\t\t\t\tswitch (lstInstructionsPipeLine.get(x).pipeline_stage) {\n\t\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_ID);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_MEM);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_WB);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// pnl_tmp.setBackground(col_EXE);\n\t\t\t\t\t\tpnl_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\t\t\tpanelShowResult.add(pnl_tmp);\n\t\t\t\t\t\tJLabel lbl_tmp = new JLabel(lstInstructionsPipeLine.get(x).pipeline_stage);\n\t\t\t\t\t\tpnl_tmp.add(lbl_tmp);\n\t\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\t\tpanelShowResult.repaint();\n\n\t\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\t\t}\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"x:\" + x);\n\t\t\t\tx++;\n\t\t\t} // End of while loop\n\n\t\t\tif (stall != 1 && x < numberOfRows) {\n\t\t\t\t// Issue a new instruction.\n\t\t\t\tlstInstructionsPipeLine.get(x).issue_cycle = Integer.toString(currentCycle);\n\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"IF\";\n\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\tpnl_IF_tmp.setBackground(col_IF);\n\t\t\t\tpnl_IF_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(x).pipeline_stage);\n\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\tpanelShowResult.repaint();\n\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,v\n\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\tcurrentCycle++;\n\t\t} else {\n\n\t\t\tif (currentCycle == 0) {\n\t\t\t\tlstInstructionsPipeLine.get(0).issue_cycle = Integer.toString(currentCycle);\n\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"IF\";\n\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\tpnl_IF_tmp.setBackground(col_IF);\n\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).getPipeline_stage());\n\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\tpanelShowResult.repaint();\n\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(0).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\t\tcurrentCycle++;\n\t\t\t} else {\n\t\t\t\tswitch (lstInstructionsPipeLine.get(0).pipeline_stage) {\n\t\t\t\tcase \"IF\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"ID\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ID\":\n\n\t\t\t\t\t// If branch is taken, complete this instruction.\n\t\t\t\t\tif (lstInstructionsPipeLine.get(0).operator.name.substring(0, 2) == \"br\") {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\t\t\t\t\t// Move the instruction into the EX stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"EX\";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EX\":\n\t\t\t\t\t// If the instruction hasn't completed.\n\t\t\t\t\tif (lstInstructionsPipeLine\n\t\t\t\t\t\t\t.get(0).execute_counter < lstInstructionsPipeLine.get(0).operator.execution_cycles) {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"EX\";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\t\t\t\t\t// Move the instruction to the MEM stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"MEM\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MEM\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"WB\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"WB\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \" \":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"Unrecognized Pipeline Stage!\", \"Dialog\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t\t// If the instruction is in the EX stage, display the functional\n\t\t\t\t// unit.\n\t\t\t\tif (lstInstructionsPipeLine.get(0).pipeline_stage == \"EX\") {\n\t\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\t\tpnl_IF_tmp.setBackground(col_EXE);\n\t\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).pipeline_stage);\n\t\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\tpanelShowResult.repaint();\n\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x,\"EX\");/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,v\n\n\t\t\t\t\tSystem.out.println(lstInstructionsPipeLine.get(0).operator.display_value + \" - row=\" + x + \" col=\"\n\t\t\t\t\t\t\t+ currentCycle);\n\t\t\t\t} else {\n\t\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\t\tswitch (lstInstructionsPipeLine.get(0).pipeline_stage) {\n\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_ID);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_MEM);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_WB);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// pnl_IF_tmp.setBackground(col_IF);\n\t\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).pipeline_stage);\n\t\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\tpanelShowResult.repaint();\n\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\t\t// s = \"document.instruction_table.column\" + currentCycle +\n\t\t\t\t\t// \".value =\n\t\t\t\t\t// parent.top_frame.lstInstructions[0].pipeline_stage;\";\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\t}\n\t\t\t\t// eval(s);\n\t\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\t\tcurrentCycle++;\n\t\t\t}\n\t\t}\n\t}", "@Nonnull\n public LocateInitialRightPoint apply() {\n assertAlive();\n @Nullable LineSearchPoint lastPoint = null;\n try {\n int loops = 0;\n while (true) {\n if (null != lastPoint) lastPoint.freeRef();\n lastPoint = thisPoint;\n lastPoint.addRef();\n if (isSame(cursor, monitor, initialPoint, thisPoint)) {\n monitor.log(String.format(\"%s ~= %s\", initialPoint.point.rate, thisX));\n return this;\n } else if (thisPoint.point.getMean() > initialPoint.point.getMean()) {\n thisX = thisX / 13;\n } else if (thisPoint.derivative < initialDerivFactor * thisPoint.derivative) {\n thisX = thisX * 7;\n } else {\n monitor.log(String.format(\"%s <= %s\", thisPoint.point.getMean(), initialPoint.point.getMean()));\n return this;\n }\n\n if (null != thisPoint) thisPoint.freeRef();\n thisPoint = cursor.step(thisX, monitor);\n if (isSame(cursor, monitor, lastPoint, thisPoint)) {\n monitor.log(String.format(\"%s ~= %s\", lastPoint.point.rate, thisX));\n return this;\n }\n monitor.log(String.format(\"F(%s) = %s, evalInputDelta = %s\", thisX, thisPoint, thisPoint.point.getMean() - initialPoint.point.getMean()));\n if (loops++ > 50) {\n monitor.log(String.format(\"Loops = %s\", loops));\n return this;\n }\n }\n } finally {\n if (null != lastPoint) lastPoint.freeRef();\n }\n }", "void steady_flight_at_given_speed (double step, double start_pitch) {\n // preamble: make sure inputs are in\n //computeFlowAndRegenPlotAndAdjust();\n\n //strut.aoa = 0.5; // ad hoc\n\n recomp_all_parts();\n\n double load = FoilBoard.this.load;\n\n // now moved into load box and bar \n //rider.weight = load - BOARD_WEIGHT - RIG_WEIGHT - FOIL_WEIGHT;\n\n steady_flight_at_given_speed___ok = false; // so far util done\n\n craft_pitch = start_pitch;\n // double prev_pitch = -20; // we nned it only because pitch value gets rounded somewhere in recomp_all_parts...\n while (craft_pitch < aoa_max && craft_pitch > aoa_min) {\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n double lift = foil_lift();\n if (lift == load // exact hit, done !(almost never happens, though)\n // happens due to rounding\n // || prev_pitch == craft_pitch\n ) \n break;\n if (step > 0 && lift > load) { // done or pivot\n if (step < 0.0025) { \n // done! flight is OK\n steady_flight_at_given_speed___ok = true;\n break;\n }\n step = -step/2; // shrink step & pivot\n } else if (step < 0 && lift < load) { \n step = -step/2; // shrink step & pivot\n } // else keep going with current stepa\n // prev_pitch = craft_pitch;\n craft_pitch += step;\n }\n\n // expect small increse in drag as the result\n vpp.set_mast_aoa_for_given_drag(total_drag()); // (wing.drag+stab.drag);\n recomp_all_parts();\n\n // old linearly increasing logic \n //find_aoa_of_min_drag();\n //if (foil_lift() > load_numeric) {\n // // need to reduce AoA\n // while (craft_pitch > aoa_min) {\n // craft_pitch -= 0.1;\n // System.out.println(\"-- reducing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() <= load_numeric) \n // break; // done\n // } \n //}\n //else if (foil_lift() < load_numeric) {\n // // need to increase AoA\n // while (craft_pitch < aoa_max) {\n // craft_pitch += 0.1;\n // System.out.println(\"-- increasing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() >= load_numeric) \n // break; // done\n // } \n //}\n\n }", "void burnIn(DoubleMatrix1D startingPoint){\n \n System.out.println(\"Starting burn-in for SubThreshSampler. x=\"+startingPoint);\n \n x = startingPoint;\n\n initScale();\n \n if(!adaptiveScale)\n tuneScale();//want to start out with a good scale\n \n //ok now let's burn in until the first and second half of our burn-in periods\n //have nicely overlapping distributions (say, the difference in means is less than \n //half the st. dev. for each variable (using the less of 1st, 2nd half st. dev.))\n ArrayList<DoubleMatrix1D> burnInSamp = new ArrayList<>();\n DoubleMatrix1D firstHalfSum = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D secondHalfSum = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D firstHalfSumSq = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D secondHalfSumSq = DoubleFactory1D.dense.make(numDOFs);\n \n boolean done = false;\n\n int nhalf = 0;\n \n for(int b=0; !done; b++){//burn-in samples\n \n while(true) {//draw until acceptable candidate found\n DoubleMatrix1D y = nextCandidate();\n if(checkCandidate(y))//accepting\n break;\n }\n \n burnInSamp.add(x);\n secondHalfSum.assign(x,Functions.plus);\n DoubleMatrix1D xsq = x.copy().assign(Functions.square);\n secondHalfSumSq.assign(xsq,Functions.plus);\n \n if(b%2==1){//stuff to be done after every pair of samples\n \n //update first and second halves\n DoubleMatrix1D y = burnInSamp.get(b/2);\n firstHalfSum.assign(y,Functions.plus);\n secondHalfSum.assign(y,Functions.minus);\n DoubleMatrix1D ysq = y.copy().assign(Functions.square);\n firstHalfSumSq.assign(ysq,Functions.plus);\n secondHalfSumSq.assign(ysq,Functions.minus);\n \n //now sums are up to date\n //let's try the overlap condition (except right at beginning, hence b>10)\n if(b>10){\n nhalf = b/2+1;//number of samples in each half\n DoubleMatrix1D meanDiff = secondHalfSum.copy().assign(firstHalfSum,Functions.minus);\n meanDiff.assign(Functions.mult(1./nhalf));\n\n DoubleMatrix1D std1 = getStDVec(firstHalfSum,firstHalfSumSq,nhalf);\n DoubleMatrix1D std2 = getStDVec(secondHalfSum,secondHalfSumSq,nhalf);\n\n\n done = true;//overlap condition met\n for(int dof=0; dof<numDOFs; dof++){\n if( meanDiff.get(dof) > 0.5*Math.min(std1.get(dof),std2.get(dof)) ){\n done = false;\n break;\n }\n }\n }\n }\n \n if(done)\n System.out.println(\"Burn-in complete at sample \"+b);\n else if( (b+1)%1000000 == 0 )\n System.out.println(\"Burn-in sample \"+b+\" done. x: \"+x);\n }\n \n //we can get a useFrequency from the second half\n DoubleMatrix1D var = getStDVec(secondHalfSum,secondHalfSumSq,nhalf).assign(Functions.square);//full-sequence variance\n DoubleMatrix1D mean = secondHalfSum.copy().assign(Functions.mult(1./nhalf));\n \n //autocorrelation can get a little messy for high shifts\n //but if each dimension's autocorrelation has dropped below 0.1*var for some useFrequency < uf\n //then uf should be a good thinning (minimally correlated samples, for each dimension)\n //we'll use dimGood to keep track of which dimensions have had this\n BitSet dimGood = new BitSet();\n double bestAutorat[] = new double[numDOFs];//to keep track of progress in each dimension (best so far)\n \n \n for(int uf=1; uf<nhalf; uf++){\n \n //calculate autocorrelation (in the sense of covariance of sequence with shifted sequence)\n DoubleMatrix1D autocorr = DoubleFactory1D.dense.make(numDOFs);\n for(int s=nhalf; s<2*nhalf-uf; s++){//start with cross-sum\n DoubleMatrix1D crossTerm = burnInSamp.get(s).copy().assign(mean,Functions.minus);\n DoubleMatrix1D relSamp2 = burnInSamp.get(s+uf).copy().assign(mean,Functions.minus);;\n crossTerm.assign( relSamp2, Functions.mult );\n autocorr.assign( crossTerm, Functions.plus );\n }\n //normalize\n autocorr.assign(Functions.mult(1./(nhalf-uf)));\n \n //for each DOF,\n //autocorr is now the average product of sequence*(sequence shifted by uf)\n //minus the square of the mean of the sequence\n \n DoubleMatrix1D autorat = autocorr.copy().assign( var, Functions.div );\n \n for(int dim=0; dim<numDOFs; dim++){\n if(autorat.get(dim)<0.1)\n dimGood.set(dim);\n bestAutorat[dim] = Math.min(bestAutorat[dim],autorat.get(dim));\n }\n \n if(dimGood.cardinality()==numDOFs){//all dimensions good\n //if( autorat.zSum()/numDOFs < 0.1 ){//on average, autocorrelation not more than 0.1x variance\n //autocorrelation should ultimately drop to 0, and it may have negative values\n //but it may be comparable to variance for very small uf\n useFrequency = uf;\n System.out.println(\"Setting useFrequency=\"+useFrequency+\". Variance: \"+var+\" Autocorr: \"+autocorr);\n break;\n }\n \n if(uf==nhalf-1){\n useFrequency = uf;\n System.out.println(\"Warning: high autocorrelation detected at all useFrequencies! \"\n + \"Setting useFrequency=\"+uf);\n }\n else if( (uf+1)%1000000 == 0 ){\n System.out.print(\"Trying useFrequency \"+uf+\n \". Best autocorrelation/variance ratios so far: \");\n for(int dof=0; dof<numDOFs; dof++)\n System.out.print(bestAutorat[dof]+\" \");\n System.out.println();\n }\n }\n }", "public void setFlangeSpot() {\n\t\tint position;\n\t\tif (!isReverse) {\n\t\t\tif (!isWah && !isDistorted) {\n\t\t\t\tposition = alGetSourcei(musicSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(flangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isWah && isDistorted) {\n\t\t\t\tposition = alGetSourcei(wahDistortSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(wahDistortFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isWah) {\n\t\t\t\tposition = alGetSourcei(wahSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(wahFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isDistorted) {\n\t\t\t\tposition = alGetSourcei(distortSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(distortFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!isWah && !isDistorted) {\n\t\t\t\tposition = alGetSourcei(reverseSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(revFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isWah && isDistorted) {\n\t\t\t\tposition = alGetSourcei(revWahDistortSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(revWahDistortFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isWah) {\n\t\t\t\tposition = alGetSourcei(revWahSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(revWahFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isDistorted) {\n\t\t\t\tposition = alGetSourcei(revDistortSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(revDistortFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t}\n\t\tif (flangeForward) {\n\t\t\tif (++flangeOffset >= flangeMS * 20)\n\t\t\t\tflangeForward = false;\n\t\t}\n\t\telse {\n\t\t\tif (--flangeOffset <= flangeMS * 10)\n\t\t\t\tflangeForward = true;\n\t\t}\n\t}", "public Point getNextForecastedPos() {\n return nextPos ;\n }", "private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public void fallDetectionV2(MovementInstance movementInstance){\n double acceleration = movementInstance.getAccelerationVector();\n switch (state){\n case INIT_STATE:\n // Acceleration considered as free fall if it has value lower than 0.42G ~ 0.63G\n if (acceleration < 0.63){\n state = FallingState.FREE_FALL_DETECTION_STATE;\n }\n break;\n case FREE_FALL_DETECTION_STATE:\n //Loading data to Dateset List for 4 seconds\n flDataset.add(movementInstance);\n if(Instant.now().toEpochMilli() - flDataset.get(0).getInstanceTime() > 4000){\n Log.println(Log.DEBUG, TAG, \"FREE_FALL_DETECTED\");\n state = FallingState.IMPACT_DETECTION_STATE;\n }\n break;\n case IMPACT_DETECTION_STATE:\n //Max is Impact maximum G\n MovementInstance max = flDataset.stream().max(Comparator\n .comparing(MovementInstance::getAccelerationVector))\n .orElseThrow(NoSuchElementException::new);\n /* Min is free Fall minimum G: filter values before the Impact (max)\n and find if there is free fall (min) prior to impact */\n MovementInstance min = flDataset.stream()\n .filter(s -> s.getInstanceTime() < max.getInstanceTime())\n .min(Comparator.comparing(MovementInstance::getAccelerationVector))\n .orElseThrow(NoSuchElementException::new);\n /* Duration should be under 0.8sec and Impact > 2.02G ~ 3.1G according to statistics.\n We calculate the duration between the lowest free fall G and the highest impact G */\n long duration = max.getInstanceTime() - min.getInstanceTime();\n if (duration > 250 && duration < 800 && max.getAccelerationVector() > 2.02){\n Log.println(Log.DEBUG, TAG, \"IMPACT_DETECTED - Falling Duration: \" +duration);\n boolean isMotionless = flDataset.stream()\n //Get values that are 1 sec after the impact (filter out any bounces)\n .filter(s -> s.getInstanceTime() > max.getInstanceTime() + 1000)\n //if the remaining values show motionless behaviour then true/next state\n .noneMatch(s -> s.getAccelerationVector() < 0.90 || s.getAccelerationVector() > 1.10);\n if (isMotionless){\n Log.println(Log.DEBUG, TAG, \"IMMOBILITY_DETECTED\");\n state = FallingState.IMMOBILITY_DETECTION_STATE;\n }\n else {\n //Clear fall dataset list and reset states if motion is detected\n flDataset.clear();\n //Reset\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n state = FallingState.INIT_STATE;\n }\n }\n else {\n //Clear fall dataset list and reset states if duration or max G is incorrect.\n flDataset.clear();\n //Reset\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n state = FallingState.INIT_STATE;\n }\n break;\n case IMMOBILITY_DETECTION_STATE:\n // Trigger Countdown Alarm\n Intent intent = new Intent();\n intent.setAction(FALL_RECEIVER);\n sendBroadcast(intent);\n Log.println(Log.DEBUG, TAG, \"Alarm Triggered!!!\");\n state = FallingState.INIT_STATE;\n break;\n }\n }", "public void compute(double timeIn)\n {\n this.currentTime.set(timeIn);\n\n double time = timeIn;\n if (time > x[numberOfPoints.getValue() - 1])\n time = x[numberOfPoints.getValue() - 1];\n if (time < x[0])\n time = x[0];\n\n int index = determineSplineIndex(time);\n\n double h = time - x[index];\n\n double h2 = MathTools.square(h);\n double h3 = h2 * h;\n double h4 = h3 * h;\n double h5 = h4 * h;\n\n for (int i = 0; i < numberOfSplines; i++)\n {\n splines[i].value(index, h, h2, h3, h4, h5, position[i], velocity[i], acceleration[i], jerk[i], null, null);\n }\n\n }", "@Override\r\n protected double computeValue()\r\n {\n return interpFlow.getValue(Scheduler.getCurrentTime());\r\n }", "public void propagate(double t0, double tf)\n\t{\n\t\tdouble[] temp = new double[6];\n\n\t\t// Determine step size\n\t\tdouble n = this.meanMotion();\n\t\tdouble period = this.period();\n\t\tdouble dt = period / steps;\n\t\tif ((t0 + dt) > tf) // check to see if we're going past tf\n\t\t{\n\t\t\tdt = tf - t0;\n\t\t}\n\n\t\t// determine initial E and M\n\t\tdouble sqrome2 = Math.sqrt(1.0 - this.e * this.e);\n\t\tdouble cta = Math.cos(this.ta);\n\t\tdouble sta = Math.sin(this.ta);\n\t\tdouble sine0 = (sqrome2 * sta) / (1.0 + this.e * cta);\n\t\tdouble cose0 = (this.e + cta) / (1.0 + this.e * cta);\n\t\tdouble e0 = Math.atan2(sine0, cose0);\n\n\t\tdouble ma = e0 - this.e * Math.sin(e0);\n\n\t\t// determine sqrt(1+e/1-e)\n\n\t\t//double q = Math.sqrt((1.0 + this.e) / (1.0 - this.e));\n\n\t\t// initialize t\n\n\t\tdouble t = t0;\n\n\t\twhile (t < tf)\n\t\t{\n\t\t\tma = ma + n * dt;\n\t\t\tdouble ea = solveKepler(ma, this.e);\n\n\t\t\tdouble sinE = Math.sin(ea);\n\t\t\tdouble cosE = Math.cos(ea);\n\t\t\tdouble den = 1.0 - this.e * cosE;\n\n\t\t\tdouble sinv = (sqrome2 * sinE) / den;\n\t\t\tdouble cosv = (cosE - this.e) / den;\n\n\t\t\tthis.ta = Math.atan2(sinv, cosv);\n\t\t\tif (this.ta < 0.0)\n\t\t\t{\n\t\t\t\tthis.ta = this.ta + 2.0 * Constants.pi;\n\t\t\t}\n\n\t\t\tt = t + dt;\n\n\t\t\ttemp = this.randv();\n\t\t\tthis.rv = new VectorN(temp);\n\n\t\t\tif ((t + dt) > tf)\n\t\t\t{\n\t\t\t\tdt = tf - t;\n\t\t\t}\n\n\t\t}\n\t}", "private void scout() {\n\t\ttargetFlower = null;\n\t\t// fly to flower if nearby\n\t\tif(foundFlower()) {\n\t\t\tstate = \"TARGETING\";\n\t\t}\n\t\t// otherwise keep scouting\n\t\telse{\n\t\t\t// change angle randomly during flight\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "@Override\n public float nextFloat() {\n nextState();\n return outputFloat();\n }", "@Override\n\tpublic TimeSeriesDataStructureI firstTimeSeriesAdjustment(TimeSeriesDataStructureI tsd) {\n\t\treturn tsd;\n\t}", "@Override\r\n public TsData doInitialFiltering(X11Step step, TsData s, InformationSet info) {\r\n SymmetricFilter trendFilter = TrendCycleFilterFactory.makeTrendFilter(context.getFrequency());\r\n return new DefaultTrendFilteringStrategy(trendFilter, null).process(s,\r\n s.getDomain());\r\n }", "Stream<DataPoint> getHistoryData(Symbol symbol, LocalDateTime startTime, LocalDateTime endTime, int numberOfPoints);", "public void run(){\n this.p_absoluteTemperature = 0.001;\n //this.p_temperatureFactor = 7.5;\n this.p_temperatureFactor = 10;\n \n // Set original and current temperature\n this.temperatureInitial = 100;\n this.temperature = 100;\n \n runAlgorithm();\n }", "public void apply(com.esotericsoftware.spine.Skeleton r27) {\n /*\n r26 = this;\n r0 = r26;\n r7 = r0.events;\n r0 = r26;\n r2 = r0.listeners;\n r0 = r2.size;\n r23 = r0;\n r20 = 0;\n L_0x000e:\n r0 = r26;\n r2 = r0.tracks;\n r2 = r2.size;\n r0 = r20;\n if (r0 < r2) goto L_0x0019;\n L_0x0018:\n return;\n L_0x0019:\n r0 = r26;\n r2 = r0.tracks;\n r0 = r20;\n r17 = r2.get(r0);\n r17 = (com.esotericsoftware.spine.AnimationStatePR.TrackEntry) r17;\n if (r17 != 0) goto L_0x002a;\n L_0x0027:\n r20 = r20 + 1;\n goto L_0x000e;\n L_0x002a:\n r2 = 0;\n r7.size = r2;\n r0 = r17;\n r5 = r0.time;\n r0 = r17;\n r4 = r0.lastTime;\n r0 = r17;\n r0 = r0.endTime;\n r18 = r0;\n r0 = r17;\n r6 = r0.loop;\n if (r6 != 0) goto L_0x0047;\n L_0x0041:\n r2 = (r5 > r18 ? 1 : (r5 == r18 ? 0 : -1));\n if (r2 <= 0) goto L_0x0047;\n L_0x0045:\n r5 = r18;\n L_0x0047:\n r0 = r17;\n r0 = r0.previous;\n r25 = r0;\n r0 = r17;\n r2 = r0.mixDuration;\n r3 = 0;\n r2 = (r2 > r3 ? 1 : (r2 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x018b;\n L_0x0056:\n r0 = r17;\n r2 = r0.mixTime;\n r0 = r17;\n r3 = r0.mixDuration;\n r8 = r2 / r3;\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r2 < 0) goto L_0x006d;\n L_0x0066:\n r8 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = 0;\n r0 = r17;\n r0.mixDuration = r2;\n L_0x006d:\n if (r25 != 0) goto L_0x00e0;\n L_0x006f:\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.mix(r3, r4, r5, r6, r7, r8);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r9 = \"none -> \";\n r3.<init>(r9);\n r0 = r17;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \": \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n L_0x009a:\n r21 = 0;\n r0 = r7.size;\n r24 = r0;\n L_0x00a0:\n r0 = r21;\n r1 = r24;\n if (r0 < r1) goto L_0x0196;\n L_0x00a6:\n if (r6 == 0) goto L_0x01d1;\n L_0x00a8:\n r2 = r4 % r18;\n r3 = r5 % r18;\n r2 = (r2 > r3 ? 1 : (r2 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x00d6;\n L_0x00b0:\n r2 = r5 / r18;\n r0 = (int) r2;\n r16 = r0;\n r0 = r17;\n r2 = r0.listener;\n if (r2 == 0) goto L_0x00c6;\n L_0x00bb:\n r0 = r17;\n r2 = r0.listener;\n r0 = r20;\n r1 = r16;\n r2.complete(r0, r1);\n L_0x00c6:\n r21 = 0;\n r0 = r26;\n r2 = r0.listeners;\n r0 = r2.size;\n r24 = r0;\n L_0x00d0:\n r0 = r21;\n r1 = r24;\n if (r0 < r1) goto L_0x01db;\n L_0x00d6:\n r0 = r17;\n r2 = r0.time;\n r0 = r17;\n r0.lastTime = r2;\n goto L_0x0027;\n L_0x00e0:\n r0 = r25;\n r11 = r0.time;\n r0 = r25;\n r2 = r0.loop;\n if (r2 != 0) goto L_0x00f6;\n L_0x00ea:\n r0 = r25;\n r2 = r0.endTime;\n r2 = (r11 > r2 ? 1 : (r11 == r2 ? 0 : -1));\n if (r2 <= 0) goto L_0x00f6;\n L_0x00f2:\n r0 = r25;\n r11 = r0.endTime;\n L_0x00f6:\n r0 = r17;\n r2 = r0.animation;\n if (r2 != 0) goto L_0x0144;\n L_0x00fc:\n r0 = r25;\n r9 = r0.animation;\n r0 = r25;\n r13 = r0.loop;\n r14 = 0;\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r15 = r2 - r8;\n r10 = r27;\n r12 = r11;\n r9.mix(r10, r11, r12, r13, r14, r15);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r0 = r25;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \" -> none: \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n L_0x012f:\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r2 < 0) goto L_0x009a;\n L_0x0135:\n com.badlogic.gdx.utils.Pools.free(r25);\n r2 = 0;\n r0 = r17;\n r0.previous = r2;\n r2 = 0;\n r0 = r17;\n r0.mixDuration = r2;\n goto L_0x009a;\n L_0x0144:\n r0 = r25;\n r9 = r0.animation;\n r0 = r25;\n r13 = r0.loop;\n r14 = 0;\n r10 = r27;\n r12 = r11;\n r9.apply(r10, r11, r12, r13, r14);\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.mix(r3, r4, r5, r6, r7, r8);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r0 = r25;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \" -> \";\n r3 = r3.append(r9);\n r0 = r17;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \": \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n goto L_0x012f;\n L_0x018b:\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.apply(r3, r4, r5, r6, r7);\n goto L_0x009a;\n L_0x0196:\n r0 = r21;\n r19 = r7.get(r0);\n r19 = (com.esotericsoftware.spine.Event) r19;\n r0 = r17;\n r2 = r0.listener;\n if (r2 == 0) goto L_0x01af;\n L_0x01a4:\n r0 = r17;\n r2 = r0.listener;\n r0 = r20;\n r1 = r19;\n r2.event(r0, r1);\n L_0x01af:\n r22 = 0;\n L_0x01b1:\n r0 = r22;\n r1 = r23;\n if (r0 < r1) goto L_0x01bb;\n L_0x01b7:\n r21 = r21 + 1;\n goto L_0x00a0;\n L_0x01bb:\n r0 = r26;\n r2 = r0.listeners;\n r0 = r22;\n r2 = r2.get(r0);\n r2 = (com.esotericsoftware.spine.AnimationStatePR.AnimationStateListener) r2;\n r0 = r20;\n r1 = r19;\n r2.event(r0, r1);\n r22 = r22 + 1;\n goto L_0x01b1;\n L_0x01d1:\n r2 = (r4 > r18 ? 1 : (r4 == r18 ? 0 : -1));\n if (r2 >= 0) goto L_0x00d6;\n L_0x01d5:\n r2 = (r5 > r18 ? 1 : (r5 == r18 ? 0 : -1));\n if (r2 < 0) goto L_0x00d6;\n L_0x01d9:\n goto L_0x00b0;\n L_0x01db:\n r0 = r26;\n r2 = r0.listeners;\n r0 = r21;\n r2 = r2.get(r0);\n r2 = (com.esotericsoftware.spine.AnimationStatePR.AnimationStateListener) r2;\n r0 = r20;\n r1 = r16;\n r2.complete(r0, r1);\n r21 = r21 + 1;\n goto L_0x00d0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.esotericsoftware.spine.AnimationStatePR.apply(com.esotericsoftware.spine.Skeleton):void\");\n }", "private void follow() {\n\t\t// calculate distance back to hive\n\t\tdouble distToHive = grid.getDistance(grid.getLocation(this),grid.getLocation(hive));\n\t\t// if close to flower from dance information, start scouting\n\t\tif(distToHive > followDist - 5) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying in direction of dance\n\t\telse{\n\t\t\t// deviate slightly from correct angle because bee's aren't perfect (I don't think)\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/50, Math.PI/50);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "@Generated(hash = 74421150)\n public synchronized void resetForecast() {\n forecast = null;\n }", "private void setSteeringContinuous(double FL, double FR, double BL, double BR) {\n double FLoffset = -1, FRoffset = -1, BLoffset = 2, BRoffset = 2;\n\n FLpid.setSetpoint(FL + FLoffset);\n FRpid.setSetpoint(FR + FRoffset);\n BRpid.setSetpoint(BR + BRoffset);\n BLpid.setSetpoint(BL + BLoffset);\n\n steeringFL.moveAtPercent(FLpid.calculate(FLcoder.getAbsolutePosition()));\n steeringFR.moveAtPercent(FRpid.calculate(FRcoder.getAbsolutePosition()));\n steeringBL.moveAtPercent(BLpid.calculate(BLcoder.getAbsolutePosition()));\n steeringBR.moveAtPercent(BRpid.calculate(BRcoder.getAbsolutePosition()));\n }", "@Override\n\t\tpublic float getInterpolation(float input) {\n\t\t\t\n//\t\t\tfloat t = a*(float) Math.sin(Math.PI * 2/2.8f * input);\n//\t\t\tLog.d(\"debug\", \"input = \"+input+\",,\"+ \"t = \"+t);\n//\t\t\treturn t ;\n\t\t\treturn input;\n\t\t}", "private void optimiseWaterHeatProfileWithSpreading()\n\t{\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"== OptimiseWaterHeatProfile for a \" + this.owner.getAgentID() + \" ==\");\n\t\t}\n\n\t\tdouble[] baseArray = ArrayUtils.multiply(this.hotWaterVolumeDemandProfile, Consts.WATER_SPECIFIC_HEAT_CAPACITY\n\t\t\t\t/ Consts.KWH_TO_JOULE_CONVERSION_FACTOR * (this.owner.waterSetPoint - ArrayUtils.min(Consts.MONTHLY_MAINS_WATER_TEMP))\n\t\t\t\t/ Consts.DOMESTIC_HEAT_PUMP_WATER_COP);\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"hotWaterVolumeDemandProfile: \" + Arrays.toString(this.hotWaterVolumeDemandProfile));\n\t\t}\n\n\t\tthis.waterHeatDemandProfile = Arrays.copyOf(baseArray, baseArray.length);\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"waterHeatDemandProfile: \" + Arrays.toString(this.waterHeatDemandProfile));\n\t\t}\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"spreadWaterDemand(baseArray) : \" + Arrays.toString(this.spreadWaterDemand(baseArray)));\n\t\t}\n\n\t\tdouble[] totalHeatDemand = ArrayUtils.add(this.heatPumpDemandProfile, this.spreadWaterDemand(baseArray));\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"totalHeatDemand: \" + Arrays.toString(totalHeatDemand));\n\t\t}\n\n\t\tdouble currCost = this.evaluateCost(totalHeatDemand);\n\t\tdouble[] tempArray = Arrays.copyOf(baseArray, baseArray.length);\n\n\t\tfor (int i = 0; i < baseArray.length; i++)\n\t\t{\n\t\t\tif (baseArray[i] > 0)\n\t\t\t{\n\t\t\t\tdouble extraHeatRequired = 0;\n\t\t\t\tfor (int j = i - 1; j >= 0; j--)\n\t\t\t\t{\n\t\t\t\t\t//TODO - this needs a better (exponential) model, temp loss per second should be improved.\n\t\t\t\t\textraHeatRequired += (Consts.WATER_TEMP_LOSS_PER_SECOND * ((double) Consts.SECONDS_PER_DAY / this.ticksPerDay))\n\t\t\t\t\t\t\t* this.hotWaterVolumeDemandProfile[i]\n\t\t\t\t\t\t\t* (Consts.WATER_SPECIFIC_HEAT_CAPACITY / Consts.KWH_TO_JOULE_CONVERSION_FACTOR)\n\t\t\t\t\t\t\t/ Consts.DOMESTIC_HEAT_PUMP_WATER_COP;\n\t\t\t\t\ttempArray[j] += baseArray[i] + extraHeatRequired;\n\t\t\t\t\ttempArray[j + 1] = 0;\n\t\t\t\t\ttotalHeatDemand = ArrayUtils.add(this.heatPumpDemandProfile, this.spreadWaterDemand(tempArray));\n\t\t\t\t\tdouble newCost = this.evaluateCost(totalHeatDemand);\n\t\t\t\t\tif (newCost < currCost)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.waterHeatDemandProfile = ArrayUtils.add(totalHeatDemand, ArrayUtils.negate(this.heatPumpDemandProfile));\n\t\t\t\t\t\tcurrCost = newCost;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "SpacecraftState propagate(AbsoluteDate target) throws OrekitException;", "private boolean parseForecasts(String rawData) {\n if (rawData == null) {\n return false;\n }\n\n if (!forecasts.isEmpty()) {\n forecasts.clear();\n }\n\n try {\n // Make a json array from the response string\n JSONObject jsonObj = new JSONObject( rawData );\n\n locationName = jsonObj.getString(\"LocationName\");\n waveModelName = jsonObj.getJSONObject(\"WaveModel\").getString(\"Description\");\n waveModelRun = jsonObj.getJSONObject(\"WaveModel\").getString(\"ModelRun\");\n\n // We need to save the model run for later so we can check for updates\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEEE MMMM dd, yyyy HHZ\");\n try {\n mLastFetchDate = formatter.parse(waveModelRun.replaceAll(\"z$\", \"+0000\"));\n\n // Add the hindcasting offset\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(mLastFetchDate);\n calendar.add(Calendar.HOUR_OF_DAY, 5);\n mLastFetchDate = calendar.getTime();\n } catch (Exception e) {\n return false;\n }\n\n windModelName = jsonObj.getJSONObject(\"WindModel\").getString(\"Description\");\n windModelRun = jsonObj.getJSONObject(\"WindModel\").getString(\"ModelRun\");\n\n // Get alllllll of the forecast data!\n JSONArray forecastJsonAray = jsonObj.getJSONArray(\"ForecastData\");\n dayCount = 0;\n int forecastOffset = 0;\n for (int i = FORECAST_DATA_BEGIN_INDEX; i < FORECAST_DATA_COUNT; i++) {\n Forecast newForecast = new Forecast();\n\n // Grab the next forecast object from the raw array\n JSONObject rawForecast = forecastJsonAray.getJSONObject(i);\n\n newForecast.date = rawForecast.getString(\"Date\");\n newForecast.time = rawForecast.getString(\"Time\");\n\n newForecast.minimumBreakingHeight = rawForecast.getDouble(\"MinimumBreakingHeight\");\n newForecast.maximumBreakingHeight = rawForecast.getDouble(\"MaximumBreakingHeight\");\n newForecast.windSpeed = rawForecast.getDouble(\"WindSpeed\");\n newForecast.windDirection = rawForecast.getDouble(\"WindDirection\");\n newForecast.windCompassDirection = rawForecast.getString(\"WindCompassDirection\");\n\n ApiApiMessagesSwellMessage primarySwell = new ApiApiMessagesSwellMessage();\n primarySwell.setWaveHeight(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"WaveHeight\"));\n primarySwell.setPeriod(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"Period\"));\n primarySwell.setDirection(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"Direction\"));\n primarySwell.setCompassDirection( rawForecast.getJSONObject(\"PrimarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.primarySwellComponent = primarySwell;\n\n ApiApiMessagesSwellMessage secondarySwell = new ApiApiMessagesSwellMessage();\n secondarySwell.setWaveHeight(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"WaveHeight\"));\n secondarySwell.setPeriod(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"Period\"));\n secondarySwell.setDirection(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"Direction\"));\n secondarySwell.setCompassDirection(rawForecast.getJSONObject(\"SecondarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.secondarySwellComponent = secondarySwell;\n\n ApiApiMessagesSwellMessage tertiarySwell = new ApiApiMessagesSwellMessage();\n tertiarySwell.setWaveHeight(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"WaveHeight\"));\n tertiarySwell.setPeriod(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"Period\"));\n tertiarySwell.setDirection(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"Direction\"));\n tertiarySwell.setCompassDirection(rawForecast.getJSONObject(\"TertiarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.tertiarySwellComponent = tertiarySwell;\n\n if (newForecast.time.equals(\"01 AM\") || newForecast.time.equals(\"02 AM\")) {\n dayIndices[dayCount] = i - FORECAST_DATA_BEGIN_INDEX - forecastOffset;\n dayCount++;\n } else if (forecasts.size() == 0) {\n dayIndices[dayCount] = i - FORECAST_DATA_BEGIN_INDEX - forecastOffset;\n dayCount++;\n }\n\n forecasts.add(newForecast);\n }\n } catch ( JSONException e ) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "@Override\n protected void execute() {\n double now = Timer.getFPGATimestamp();\n double deltaT = now - startT;\n if(deltaT < 1){\n Robot.hatchIntake.hatchSolenoid(false);\n }else if(deltaT > 1 && deltaT < 1.5){\n Robot.hatchIntake.hatchSolenoid(true);\n }\n }", "public void updateSMA(){\n audioInput.read(audioBuffer, 0, bufferSize);\n Complex [] FFTarr = doFFT(shortToDouble(audioBuffer));\n FFTarr = bandPassFilter(FFTarr);\n double sum = 0;\n for(int i = 0; i<FFTarr.length;i++){\n sum+=Math.abs(FFTarr[i].re()); // take the absolute value of the FFT raw value\n }\n double bandPassAverage = sum/FFTarr.length;\n Log.d(LOGTAG, \"bandPassAverage: \" + bandPassAverage);\n\n //Cut out loud samples, otherwise compute rolling average as usual\n if(bandPassAverage>THROW_OUT_THRESHOLD){\n mySMA.compute(mySMA.currentAverage());\n }else {\n mySMA.compute(bandPassAverage);\n }\n }", "@Test\r\n\tpublic void exerciseMovingAverage() {\n\t\tList<Integer> temparaturArray = Arrays.asList(8, 7, 6, 6, 7, 7, 8, 10, 13, 16, 10, 20, 23, 26, 30, 29, 27, 45, 24, 23, 20, 18, 15, 11);\r\n\t\tObservable<Integer> temparaturSequence = Observable\r\n\t\t\t\t.interval(0, 1L, TimeUnit.HOURS, testScheduler)\r\n\t\t\t\t.take(temparaturArray.size())\r\n\t\t\t\t.map(i -> temparaturArray.get(i.intValue()));\r\n\t\t\r\n\t\t// TODO: calculate the moving average (SMA) of the given temperature sequence (each hour of a single day).\r\n\t\t// use the previous three values for each data point.\r\n // HINT: use a suitable overload of the same method used in \"Batching\"\r\n // and then calculate the average of each batch using LINQ\r\n // HINT: don't forget to pass the scheduler\r\n\t\tObservable<Double> movingAverage = Observable.empty();\r\n\r\n\t\t// verify\r\n\t\tTestSubscriber<Double> testSubscriber = new TestSubscriber<>();\r\n\t\tmovingAverage.subscribe(testSubscriber);\r\n\r\n\t\t// let the time elapse until completion\r\n\t\ttestScheduler.advanceTimeBy(1, TimeUnit.DAYS);\r\n\t\t\r\n\t\tlog(testSubscriber.getOnNextEvents());\r\n\t\t\r\n\t\ttestSubscriber.assertNoErrors();\r\n\t\ttestSubscriber.assertCompleted();\r\n\t\t\r\n\t\t// expected values:\r\n\t\tList<Double> expected = Arrays.asList(\r\n\t\t\t\t7.0, 6.333333333333333, 6.333333333333333, 6.666666666666667, 7.333333333333333, \r\n\t\t\t\t8.333333333333334, 10.333333333333334, 13.0, 13.0, 15.333333333333334, \r\n\t\t\t\t17.666666666666668, 23.0, 26.333333333333332, 28.333333333333332, \r\n\t\t\t\t28.666666666666668, 33.666666666666664, 32.0, 30.666666666666668, \r\n\t\t\t\t22.333333333333332, 20.333333333333332, 17.666666666666668, 14.666666666666666, \r\n\t\t\t\t// the last two values have limited input, i.e.\r\n\t\t\t\t// (15+11)/2 and (11)/1\r\n\t\t\t\t13.0, 11.0);\r\n\t\ttestSubscriber.assertReceivedOnNext(expected);\r\n\t\t\r\n\t}", "@Override\n\tpublic float getInterpolation(float input) {\n\t\tdouble a = input * PI_3;\n\t\tdouble b = Math.sin(a) / a;\n\t\tdouble c = b * (input * -1 + 1);\n\t\treturn (float) c * -1 + 1;\n\n\t}", "private void sleep() {\n\t\ttargetFlower = null;\n\t\tif(startForaging()) {\n\t\t\t// add food to bee's crop for upcoming foraging run\n\t\t\tif(food < startingCrop){\n\t\t\t\thive.food -= (startingCrop - food);\n\t\t\t\tfood = startingCrop;\n\t\t\t}\n\t\t\tif(startScouting() || hive.dancingBees.size() <= 0) {\n\t\t\t\tstate = \"SCOUTING\";\n\t\t\t\tcurrentAngle = RandomHelper.nextDoubleFromTo(0, 2*Math.PI);\n\t\t\t}\n\t\t\telse{ // else follow a dance\n\t\t\t\t// if bee follows dance, store angle and distance in the bee object\n\t\t\t\tint index = RandomHelper.nextIntFromTo(0, hive.dancingBees.size() - 1);\n\t\t\t\tNdPoint flowerLoc = space.getLocation(hive.dancingBees.get(index).targetFlower);\n\t\t\t\tNdPoint myLoc = space.getLocation(this);\n\t\t\t\tdouble ang = SpatialMath.calcAngleFor2DMovement(space, myLoc, flowerLoc);\n\t\t\t\tdouble dist = space.getDistance(flowerLoc, myLoc);\n\t\t\t\t\n\t\t\t\t// start following dance at correct angle\n\t\t\t\tcurrentAngle = ang;\n\t\t\t\tfollowDist = dist;\n\t\t\t\tstate = \"FOLLOWING\";\n\t\t\t}\n\t\t}\n\t\telse { // continue sleeping\n\t\t\thive.food -= lowMetabolicRate/2;\n\t\t\thover(grid.getLocation(hive));\n\t\t\t// update energy and food storage\n\t\t\tif(food > startingCrop){\n\t\t\t\tfood -= foodTransferRate;\n\t\t\t\thive.food += foodTransferRate;\n\t\t\t}\n\t\t}\n\t}", "public static void MCLSPIFB(){\n\t\tMountainCar mcGen = new MountainCar(); // default: reward 100 on the right side and 0 everywhere else\n\t\t\n\t\t\n\t\t// Define terminal function and reward function\t\n\t\tStateConditionTest terminalTest = new StateConditionTest() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean satisfies(State s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif ((Double)s.get(\"x\") >= 0.5) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\t\n\t\tTerminalFunction tf = new TerminalFunction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean isTerminal(State s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn terminalTest.satisfies(s);\n\t\t\t}\n\t\t};\n\t\t\n\t\tRewardFunction rf = /*new GoalBasedRF(tf, 100, 0);*/\n\t\t\t\tnew RewardFunction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic double reward(State s1, Action a, State s2) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif ((Double)s2.get(\"x\") >= 0.5) {\n\t\t\t\t\treturn 100;\n\t\t\t\t}\n\t\t\t\tif ((Double)s2.get(\"x\") == mcGen.physParams.xmin) {\n\t\t\t\t\treturn -100;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t};\n\t\tmcGen.setRf(rf);\n\t\tSADomain domain = mcGen.generateDomain();\n\t\tSystem.out.println(\"physParams:\\n===========================\");\n\t\tSystem.out.println(\"xmin:\" + mcGen.physParams.xmin + \", xmax:\" + mcGen.physParams.xmax + \", vallypos:\" + mcGen.physParams.valleyPos());\n\t\tSystem.out.println(\"vmin:\" + mcGen.physParams.vmin + \", vmax:\" + mcGen.physParams.vmax);\n\t\tSystem.out.println(\"===========================\");\n\t\t\n\t\t// Generate data from random state\n\t\tStateGenerator rstateGenerator = new MCRandomStateGenerator(mcGen.physParams);\n\t\tSARSCollector collector = new SARSCollector.UniformRandomSARSCollector(domain);\n\t\tSARSData dataset = collector.collectNInstances(rstateGenerator, domain.getModel(), 5000, 20, null);\n\n\t\t\n\t\tSARS xData = dataset.get(0);\n\t\tMCState xState = (MCState) xData.s;\n\t\tMCState xState2 = (MCState) xData.sp;\n\t\tSystem.out.println(\"s: x:\" + xState.x\n\t\t\t\t+ \", v:\" + xState.v + \n\t\t\t\t\", action:\" + xData.a.actionName() + \n\t\t\t\t\", reward:\" + xData.r);\n\t\tSystem.out.println(\"s': x:\" + xState2.x\n\t\t\t\t+ \", v:\" + xState2.v);\n\t\tSystem.out.println(\"===========================\");\n\t\t\n\t\t// Generate 5000 SARS tuple instances for our dataset.\n\t\t// Car state generator for no more than 20 steps at a time or until we hit a terminal state.\n\t\t\n\t\t// Generate Fourier Basis\n\t\t// Fourier Basis: mapping from states to features\n\t\tNormalizedVariableFeatures inputFeatures = new NormalizedVariableFeatures()\n\t\t\t\t.variableDomain(\"x\", new VariableDomain(mcGen.physParams.xmin, mcGen.physParams.xmax))\n\t\t\t\t.variableDomain(\"v\", new VariableDomain(mcGen.physParams.vmin, mcGen.physParams.vmax));\n\t\tFourierBasis fBasis = new FourierBasis(inputFeatures, 4); // order(4) means the number of basis functions\n\t\t\n\t\t// Instantiate LSPI\n\t\t// LSPI needs mapping from state to action features, so\n\t\t// first define a state feature representation, \n\t\t// and then construct state-action features by taking the cross product of those features with each action\n\t\tLSPI lspi = new LSPI(domain, 0.99, new DenseCrossProductFeatures(fBasis, 3), dataset); // 3: number of actions: FORWARD, COSTA, BACKWARD\n\t\tPolicy policy = lspi.runPolicyIteration(30, 1e-6);\n\t\t\n\t\t// Visualization\n\t\tMCState laststate = new MCState(mcGen.physParams.valleyPos(), 0);\n\t\tSystem.out.println(\"===========================\\nState process according to policy:\\n\");\n\n\t\t\n\t\tfor (int i = 0; i < 1000; i++) {\n\t\t\tif (terminalTest.satisfies(laststate)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tAction curAction = policy.action(laststate);\n\t\t\tMCModel model = new MCModel(mcGen.physParams);\n\t\t\tMCState curState = (MCState) model.sample(laststate, curAction);\n\t\t\tif (i % 10 == 0) {\n\t\t\t\tSystem.out.println(\"State \" + i +\n\t\t\t\t\t\t\":\\tx = \" + laststate.x + \n\t\t\t\t\t\t\";\\tv = \" + laststate.v + \n\t\t\t\t\t\t\";\\taction = \" + curAction.actionName());\n\t\t\t}\t\t\t\n\t\t\tlaststate = curState;\n\t\t}\n\t\tVisualizer visualizer = MountainCarVisualizer.getVisualizer(mcGen);\n\t\tVisualActionObserver vo = new VisualActionObserver(visualizer);\n\t\tvo.initGUI();\n\t\t\n\t\tSimulatedEnvironment environment = new SimulatedEnvironment(domain, new MCState(mcGen.physParams.valleyPos(), 0));\n\t\tenvironment.addObservers(vo);\n\t\t\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tPolicyUtils.rollout(policy, environment);\n\t\t\tenvironment.resetEnvironment();\n\t\t}\n\t\tSystem.out.println(\"Finished\");\n\t\tSystem.out.println(policy.action(new MCState(0.05, -8)));\n\t}", "SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target) throws OrekitException;", "public void mo42335f() {\n Object andSet = getAndSet(null);\n if (andSet == null) {\n return;\n }\n if (this.f36202N.get() != 0) {\n this.f36205a.mo41789a(andSet);\n C13747d.m58699c(this.f36202N, 1);\n return;\n }\n cancel();\n this.f36205a.onError(new MissingBackpressureException(\"Couldn't emit value due to lack of requests!\"));\n }", "StateVector predict(int newSite, Vec pivot, double B, Vec t, Vec originPrime, double XL, double deltaE) {\n // newSite = index of the new site\n // pivot = pivot point of the new site in the local coordinates of this state vector (i.e. coordinates of the old site)\n // B and t = magnitude and direction of the magnetic field at the pivot point, in global coordinates\n // XL = thickness of the scattering material\n // deltaE = energy loss in the scattering material\n // originPrime = origin of the detector coordinates at the new site in global coordinates\n\n // This constructs a new blank state vector with pivot and helix parameters undefined as yet\n StateVector aPrime = new StateVector(newSite, B, t, originPrime);\n aPrime.kUp = kUp;\n aPrime.helix.X0 = pivot; // pivot before helix rotation, in coordinate system of the previous site\n\n double E = helix.a.v[2] * Math.sqrt(1.0 + helix.a.v[4] * helix.a.v[4]);\n double deltaEoE = deltaE / E;\n\n // Transform helix in old coordinate system to new pivot point lying on the next detector plane\n if (deltaE == 0.) {\n aPrime.helix.a = this.helix.pivotTransform(pivot);\n } else {\n aPrime.helix.a = this.helix.pivotTransform(pivot, deltaEoE);\n }\n\n if (debug) { // drho and dz are indeed always zero here\n aPrime.helix.a.print(\"StateVector predict: pivot transformed helix; should have zero drho and dz\");\n helix.a.print(\"old helix\");\n pivot.print(\"new pivot\");\n helix.X0.print(\"old pivot\");\n }\n\n F = new DMatrixRMaj(5,5);\n this.helix.makeF(aPrime.helix.a, F); // Calculate derivatives of the pivot transform\n if (deltaE != 0.) {\n double factor = 1.0 - deltaEoE;\n for (int i = 0; i < 5; i++) F.unsafe_set(i, 2, F.unsafe_get(i,2)*factor); \n }\n\n // Transform to the coordinate system of the field at the new site\n // First, transform the pivot point to the new system\n aPrime.helix.X0 = aPrime.helix.toLocal(this.helix.toGlobal(aPrime.helix.X0));\n\n // Calculate the matrix for the net rotation from the old site coordinates to the new site coordinates\n RotMatrix Rt = aPrime.helix.Rot.multiply(this.helix.Rot.invert());\n if (debug) {\n aPrime.helix.Rot.print(\"aPrime rotation matrix\");\n this.helix.Rot.print(\"this rotation matrix\");\n Rt.print(\"rotation from old local frame to new local frame\");\n aPrime.helix.a.print(\"StateVector:predict helix before rotation\");\n }\n\n // Rotate the helix parameters here. \n // dz and drho will remain unchanged at zero\n // phi0 and tanl(lambda) change, as does kappa (1/pt). However, |p| should be unchanged by the rotation.\n // This call to rotateHelix also calculates the derivative matrix fRot\n aPrime.helix.a = HelixState.rotateHelix(aPrime.helix.a, Rt, tempM);\n if (debug) {\n aPrime.helix.a.print(\"StateVector:predict helix after rotation\");\n System.out.println(\"fRot from StateVector:predict\");\n tempM.print();\n }\n CommonOps_DDRM.mult(tempM, F, tempA);\n\n // Test the derivatives\n /*\n if (debug) {\n double daRel[] = { 0.01, 0.03, -0.02, 0.05, -0.01 };\n StateVector aPda = this.Copy();\n for (int i = 0; i < 5; i++) {\n aPda.a.v[i] = a.v[i] * (1.0 + daRel[i]);\n }\n Vec da = aPda.a.dif(a);\n StateVector aPrimeNew = this.Copy();\n aPrimeNew.a = aPda.pivotTransform(pivot);\n RotMatrix RtTmp = Rot.invert().multiply(aPrime.Rot);\n SquareMatrix fRotTmp = new SquareMatrix(5);\n aPrimeNew.a = rotateHelix(aPrimeNew.a, RtTmp, fRotTmp);\n for (int i = 0; i < 5; i++) {\n double deltaExact = aPrimeNew.a.v[i] - aPrime.a.v[i];\n double delta = 0.;\n for (int j = 0; j < 5; j++) {\n delta += F.M[i][j] * da.v[j];\n }\n System.out.format(\"Test of F: Helix parameter %d, deltaExact=%10.8f, delta=%10.8f\\n\", i, deltaExact,\n delta);\n }\n }\n */\n\n aPrime.kLow = newSite;\n aPrime.kUp = kUp;\n\n // Add the multiple scattering contribution for the silicon layer\n // sigmaMS is the rms of the projected scattering angle\n if (XL == 0.) {\n Cinv.set(this.helix.C);\n if (debug) System.out.format(\"StateVector.predict: XL=%9.6f\\n\", XL);\n } else {\n double momentum = (1.0 / helix.a.v[2]) * Math.sqrt(1.0 + helix.a.v[4] * helix.a.v[4]);\n double sigmaMS = HelixState.projMSangle(momentum, XL);\n if (debug) System.out.format(\"StateVector.predict: momentum=%12.5e, XL=%9.6f sigmaMS=%12.5e\\n\", momentum, XL, sigmaMS);\n this.helix.getQ(sigmaMS, Q);\n CommonOps_DDRM.add(this.helix.C, Q, Cinv);\n }\n\n // Now propagate the multiple scattering matrix and covariance matrix to the new site\n CommonOps_DDRM.multTransB(Cinv, tempA, tempM);\n aPrime.helix.C = new DMatrixRMaj(5,5);\n CommonOps_DDRM.mult(tempA, tempM, aPrime.helix.C);\n\n return aPrime;\n }", "@Override\n public void periodic()\n {\n if(AutoIntake)\n intake(-0.2f, -0.5f);\n }", "float[] feedForward(float... inputs);", "@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n while (!sh.liftReady && time.milliseconds() < 1500) {\n }\n //\n sh.pivotPID(650, true, .07/650, .01, .01/650, 2);\n sh.pivotPID(640, false, .07/640, .01, .01/640, 2);\n\n\n\n }", "public void processData(int newVal) {\n\t\tif(samplePoints[counter] < 0) {\n\t\t\tsamplePoints[counter] = newVal;\n\t\t\tlastAverage = newVal;\n\t\t} else {\n\t\t\tdouble newAverage = lastAverage + ((newVal - samplePoints[counter]) / SAMPLE_POINTS);\n\t\t\tdouble difference = 10 * Math.abs(newAverage - lastAverage);\n\t\t\tsamplePoints[counter] = newVal;\n\t\t\tlastAverage = newAverage;\n\t\t\tif(tookOff) {\n\t\t\t\tif(difference > DIFFERENCE_THRESHOLD || System.currentTimeMillis() - startTime > 16000) {\n\t\t\t\t\t//The robot is landing\n\t\t\t\t\tSound.beep();\n\t\t\t\t\tziplineController.resumeThread();\n\t\t\t\t\ttookOff = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(difference < DIFFERENCE_THRESHOLD) {\n\t\t\t\t\tdifferenceCounter--;\n\t\t\t\t} else {\n\t\t\t\t\tdifferenceCounter = DIFFERENCE_POINTS_COUNTER;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(differenceCounter < 0) {\n\t\t\t\t\t//The robot is now in the air.\n\t\t\t\t\tSound.beep();\n\t\t\t\t\ttookOff = true;\n\t\t\t\t\tstartTime = System.currentTimeMillis();\n\t\t\t\t\tziplineController.resumeThread();\n\t\t\t\t\tArrays.fill(samplePoints, -1);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcounter = (counter + 1) % SAMPLE_POINTS;\n\t}", "public void startFeeding() {\n motor.set(FEED_SPEED);\n }", "StateVector smooth(StateVector snS, StateVector snP) {\n if (debug) System.out.format(\"StateVector.smooth of filtered state %d %d, using smoothed state %d %d and predicted state %d %d\\n\", kLow, kUp,\n snS.kLow, snS.kUp, snP.kLow, snP.kUp);\n StateVector sS = this.copy();\n\n // solver.setA defines the input matrix and checks whether it is singular. \n // A copy is needed because the input gets modified.\n if (!solver.setA(snP.helix.C.copy())) {\n SquareMatrix invrs = KalTrack.mToS(snP.helix.C).fastInvert();\n if (invrs == null) {\n logger.warning(\"StateVector:smooth, inversion of the covariance matrix failed\");\n snP.helix.C.print();\n for (int i=0; i<5; ++i) { // Fill the inverse with something not too crazy and continue . . .\n for (int j=0; j<5; ++j) {\n if (i == j) {\n Cinv.unsafe_set(i,j,1.0/snP.helix.C.unsafe_get(i,j));\n } else {\n Cinv.unsafe_set(i, j, 0.);\n snP.helix.C.unsafe_set(i, j, 0.);\n }\n }\n } \n } else {\n if (debug) {\n KalTrack.mToS(snP.helix.C).print(\"singular covariance?\");\n invrs.print(\"inverse\");\n invrs.multiply(KalTrack.mToS(snP.helix.C)).print(\"unit matrix?\"); \n }\n for (int i=0; i<5; ++i) {\n for (int j=0; j<5; ++j) {\n Cinv.unsafe_set(i, j, invrs.M[i][j]);\n }\n }\n }\n } else {\n solver.invert(Cinv);\n }\n\n CommonOps_DDRM.multTransB(helix.C, sS.F, tempM);\n CommonOps_DDRM.mult(tempM, Cinv, tempA);\n\n vecToM(snS.helix.a.dif(snP.helix.a), tempV);\n CommonOps_DDRM.mult(tempA, tempV, tempV2);\n sS.helix.a = helix.a.sum(mToVec(tempV2));\n if (debug) {\n System.out.println(\"StateVector:smooth, inverse of the covariance:\");\n Cinv.print(\"%11.6e\");\n CommonOps_DDRM.mult(snP.helix.C, Cinv, tempM);\n System.out.format(\"Unit matrix?? \");\n tempM.print();\n System.out.format(\"Predicted helix covariance: \");\n snP.helix.C.print();\n System.out.format(\"This helix covariance: \");\n helix.C.print();\n System.out.format(\"Matrix F \");\n sS.F.print();\n System.out.format(\"tempM \");\n tempM.print();\n System.out.format(\"tempA \");\n tempA.print();\n System.out.format(\"Difference of helix parameters tempV: \");\n tempV.print();\n System.out.format(\"tempV2 \");\n tempV2.print();\n sS.helix.a.print(\"new helix parameters\");\n }\n\n CommonOps_DDRM.subtract(snS.helix.C, snP.helix.C, tempM);\n CommonOps_DDRM.multTransB(tempM, tempA, Cinv);\n CommonOps_DDRM.mult(tempA, Cinv, tempM);\n CommonOps_DDRM.add(helix.C, tempM, sS.helix.C);\n \n if (debug) sS.print(\"Smoothed\");\n return sS;\n }", "public float getSat() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 4);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 4);\n\t\t}\n\t}", "public static void main(String[] args) {\r\n double d = 3.5;\r\n int i = 2;\r\n System.out.println(d/i);\r\n MovingAverage movingAverage = new A0346MovingAveragefromDataStream().new MovingAverage(3);\r\n System.out.println(movingAverage.next(1));\r\n System.out.println(movingAverage.next(10));\r\n System.out.println(movingAverage.next(3));\r\n System.out.println(movingAverage.next(5));\r\n }", "public static PredictedPoint fastTick(PredictedPoint last, double angle, double maxVelocity) {\n double offset = R.normalRelativeAngle(angle - last.heading);\n double turn = BackAsFrontRobot2.getQuickestTurn(offset);\n int ahead = offset == turn ? +1 : -1;\n\n double newHeading = getNewHeading(last.heading, turn, last.velocity);\n\n double newVelocity = getTickVelocity(last.velocity, maxVelocity, ahead, Double.POSITIVE_INFINITY);\n\n return last.tick(newHeading, newVelocity);\n }", "private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }", "private void condenseSteam() {\n if (getPressure()> Constants.ATMOSPHERIC_PRESSURE) {\n double boilingPoint = Water.getBoilingTemperature(getPressure());\n if (boilingPoint > steam.getTemperature()) { // remove steam such that it equalizes to the boiling point\n double newSteamPressure = Math.max(Water.getBoilingPressure(steam.getTemperature()), Constants.ATMOSPHERIC_PRESSURE);\n \n\n int newQuantity = steam.getParticlesAtState(newSteamPressure, getCompressibleVolume());\n int deltaQuantity = steam.getParticleNr() - newQuantity;\n if (deltaQuantity < 0) {\n System.out.println(\"BAD\");\n }\n steam.remove(deltaQuantity);\n getWater().add(new Water(steam.getTemperature(), deltaQuantity));\n }\n } \n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tprotected final void processWhenNotUpdated(Node node) {\n\t\tboolean propagateFurther = false;\n\t\tNodeInfo nodeInfo = node.getInfo();\n\t\tCollection<Node> predecessors = nodeInfo.getCFGInfo().getInterProceduralLeafPredecessors();\n\t\tF newIN = (F) nodeInfo.getIN(analysisName);\n\t\tif (newIN == null) {\n\t\t\t/*\n\t\t\t * In this scenario, we must set the propagation flag, so that\n\t\t\t * all successors are processed at least once.\n\t\t\t */\n\t\t\tpropagateFurther = true;\n\t\t\tif (predecessors.isEmpty()) {\n\t\t\t\tnewIN = this.getEntryFact();\n\t\t\t} else {\n\t\t\t\tnewIN = this.getTop();\n\t\t\t}\n\t\t}\n\n\t\tboolean inChanged = false;\n\t\tif (this.analysisName == AnalysisName.CROSSCALL_PREDICATE_ANALYSIS && node instanceof PostCallNode) {\n\t\t\t// A small hack here.\n\t\t\tPostCallNode postNode = (PostCallNode) node;\n\t\t\tList<FunctionDefinition> funcDef = postNode.getParent().getInfo().getCalledDefinitions();\n\t\t\tif (funcDef.isEmpty() || funcDef.stream().noneMatch(f -> this.functionWithBarrier.contains(f))) {\n\t\t\t\tpredecessors = new HashSet<>();\n\t\t\t\tpredecessors.add(postNode.getParent().getPreCallNode());\n\t\t\t}\n\t\t}\n\t\tfor (Node predNode : predecessors) {\n\t\t\tF predOUT = (F) predNode.getInfo().getOUT(analysisName);\n\t\t\tif (predOUT == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tF edgeOUT = this.edgeTransferFunction(predOUT, predNode, node);\n\t\t\tinChanged |= newIN.merge(edgeOUT, null);\n\t\t}\n\n\t\tif (node instanceof PostCallNode) {\n\t\t\tinChanged |= processPostCallNodesIN((PostCallNode) node, newIN);\n\t\t}\n\n\t\tnodeInfo.setIN(analysisName, newIN);\n\n\t\t// Step 2: Apply the flow-function on IN, to obtain the OUT.\n\t\tF newOUT = node.accept(this, newIN);\n\t\tnodeInfo.setOUT(analysisName, newOUT);\n\n\t\t// Step 3: Process the successors, if needed.\n\t\tpropagateFurther |= inChanged;\n\t\tif (propagateFurther) {\n\t\t\tglobalWorkList.addAll(nodeInfo.getCFGInfo().getInterProceduralLeafSuccessors());\n\t\t\tif (node instanceof PreCallNode) {\n\t\t\t\tPreCallNode pre = (PreCallNode) node;\n\t\t\t\tthis.globalWorkList.add(pre.getParent().getPostCallNode());\n\t\t\t}\n\t\t\t// If we are adding successors of a BeginNode of a FunctionDefinition, we should\n\t\t\t// add all the ParameterDeclarations.\n\t\t\tif (node instanceof BeginNode && node.getParent() instanceof FunctionDefinition) {\n\t\t\t\tFunctionDefinition func = (FunctionDefinition) node.getParent();\n\t\t\t\tfor (ParameterDeclaration paramDecl : func.getInfo().getCFGInfo().getParameterDeclarationList()) {\n\t\t\t\t\tthis.globalWorkList.add(paramDecl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private synchronized EventType scheduleNextEvent()\n {\n Date today = new Date();\n Date today_sunrise = ss.getSunrise(latitude, longitude);\n Date today_sunset = ss.getSunset(latitude, longitude);\n Date today_off = ss.getOff(off);\n\n // get sunrise and sunset time for tomorrow\n Calendar tomorrow = Calendar.getInstance();\n tomorrow.roll(Calendar.DATE, true);\n Date tomorrow_sunrise = ss.getSunrise(latitude, longitude, tomorrow.getTime());\n Date tomorrow_sunset = ss.getSunset(latitude, longitude, tomorrow.getTime());\n Date tomorrow_off = ss.getOff(off);\n\n // determine if sunrise or sunset is the next event\n if (today.after(today_sunset)) {\n // get tomorrow's date time\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + tomorrow_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule tomorrow's sunrise as next event\n timer.schedule(new SunriseTask(), tomorrow_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = tomorrow_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else if (today.after(today_sunrise)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNSET \");\n System.out.println(\" @ \" + today_sunset);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_sunset);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunsetToday;\n return nextEvent;\n } else if (today.after(today_off)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: OFF \");\n System.out.println(\" @ \" + today_off);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_off);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + today_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunrise as next event\n timer.schedule(new SunriseTask(), today_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = today_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseToday;\n return nextEvent;\n }\n }", "public void setFund() {\n\t\t// catching a NullPointer because I'm not sure why it happens and fear a crash during a concert.\n\t\ttry\n\t\t{\n\t\t\t// TODO: maybe this won't be necessary once the threads are implemented.\n\t\t\tif(!this.pause)\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < this.adjustedNumInputs; i++)\n\t\t\t\t{\n\t\t\t\t\t// println(\"setFund(); this.frequencyArray[i] = \" + this.frequencyArray[i].getFeatures());\n\t\n\t\t\t\t\t// want to assign the value of .getFeatures() to a variable and check for null,\n\t\t\t\t\t// but can't, b/c it returns a float. :/ (So that must not be exactly the problem.)\n\t\t\t\t\tif (this.frequencyArray[i].getFeatures() != null) {\n\t\t\t\t\t\t// println(\"i = \" + i);\n\t\t\t\t\t\t// println(\"setFund(); this.fundamentalArray[i] = \" + this.fundamentalArray[i] + \"this.frequencyArray[i].getFeatures() = \" + this.frequencyArray[i].getFeatures());\n\t\t\t\t\t\tthis.fundamentalArray[i] = this.frequencyArray[i].getFeatures();\n\t\t\t\t\t\tthis.amplitudeArray[i]\t= this.frequencyArray[i].getAmplitude(); // * 100;\n\t\n\t\t\t\t\t\t// ignores pitches with amplitude lower than \"sensitivity\":\n\t\t\t\t\t\tif (this.frequencyArray[i].getAmplitude() > this.sensitivity) {\n\t\t\t\t\t\t\tthis.adjustedFundArray[i] = this.fundamentalArray[i];\n\t\t\t\t\t\t} // if: amp > sensitivity\n\t\t\t\t\t} // if: features() != null\n\t\t\t\t} // if: > numInputs\n\t\t\t}\n\t\t} catch(NullPointerException npe) {}\n\t}", "public void startExecuting()\n\t{\n\t\tdouble d0 = this.leapTarget.xCoord - this.entity.posX;\n\t\tdouble d1 = this.leapTarget.zCoord - this.entity.posZ;\n\t\tfloat f = MathHelper.sqrt(d0 * d0 + d1 * d1);\n\t\tthis.entity.motionX += (d0 / (double)f * 0.5D * 0.800000011920929D + this.entity.motionX * 0.20000000298023224D)/2;\n\t\tthis.entity.motionZ += (d1 / (double)f * 0.5D * 0.800000011920929D + this.entity.motionZ * 0.20000000298023224D)/2;\n\t\tthis.entity.motionY = (double)this.leapMotionY;\n\t}", "@Test\n public void multipleShocksOnSameDataReversed() {\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(relativeShift, absoluteShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.6, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void singleShock() {\n MarketDataShock shock = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(shock);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.5, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "private double[] spreadWaterDemand(double[] basicDemandArray)\n\t{\n\t\tdouble[] totalHeatDemand = ArrayUtils.add(basicDemandArray, this.heatPumpDemandProfile);\n\t\tfor (int i = 0; i < totalHeatDemand.length; i++)\n\t\t{\n\t\t\tif (totalHeatDemand[i] > this.maxHeatPumpElecDemandPerTick)\n\t\t\t{\n\t\t\t\t// If heat pump can't cope, use the immersion to top up.\n\t\t\t\ttotalHeatDemand[i] = totalHeatDemand[i]\n\t\t\t\t\t\t+ ((totalHeatDemand[i] - this.maxHeatPumpElecDemandPerTick) * Consts.DOMESTIC_HEAT_PUMP_WATER_COP / Consts.IMMERSION_HEATER_COP);\n\t\t\t\tif (totalHeatDemand[i] > this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick)\n\t\t\t\t{\n\t\t\t\t\t// Even the immersion can't cope - spread the load into the\n\t\t\t\t\t// ticks beforehand\n\t\t\t\t\tdouble heatToMove = (totalHeatDemand[i] - (this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick))\n\t\t\t\t\t\t\t* Consts.IMMERSION_HEATER_COP;\n\t\t\t\t\ttotalHeatDemand[i] = this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick;\n\t\t\t\t\tfor (int j = i - 1; j >= 0 && heatToMove > 0; j--)\n\t\t\t\t\t{\n\t\t\t\t\t\ttotalHeatDemand[j] += heatToMove / Consts.DOMESTIC_HEAT_PUMP_WATER_COP;\n\t\t\t\t\t\tif (totalHeatDemand[j] > this.maxHeatPumpElecDemandPerTick)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotalHeatDemand[j] = totalHeatDemand[j]\n\t\t\t\t\t\t\t\t\t+ ((totalHeatDemand[j] - this.maxHeatPumpElecDemandPerTick) * Consts.DOMESTIC_HEAT_PUMP_WATER_COP / Consts.IMMERSION_HEATER_COP);\n\t\t\t\t\t\t\tif (totalHeatDemand[j] > this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Even the immersion can't cope - spread the\n\t\t\t\t\t\t\t\t// load into the ticks beforehand\n\n\t\t\t\t\t\t\t\theatToMove = (totalHeatDemand[j] - (this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick))\n\t\t\t\t\t\t\t\t\t\t* Consts.IMMERSION_HEATER_COP;\n\t\t\t\t\t\t\t\ttotalHeatDemand[j] = this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\theatToMove = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\theatToMove = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (heatToMove > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// haven't been able to heat the water by the required\n\t\t\t\t\t\t// time. Move extra load to the end of the day... ?\n\t\t\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Water heating fail\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// totalHeatDemand[0] += heatToMove;\n\t\t\t\t\t\tfor (int j = totalHeatDemand.length - 1; j >= i && heatToMove > 0; j--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttotalHeatDemand[j] += heatToMove / Consts.DOMESTIC_HEAT_PUMP_WATER_COP;\n\t\t\t\t\t\t\tif (totalHeatDemand[j] > this.maxHeatPumpElecDemandPerTick)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttotalHeatDemand[j] = totalHeatDemand[j]\n\t\t\t\t\t\t\t\t\t\t+ ((totalHeatDemand[j] - this.maxHeatPumpElecDemandPerTick) * Consts.DOMESTIC_HEAT_PUMP_WATER_COP / Consts.IMMERSION_HEATER_COP);\n\t\t\t\t\t\t\t\tif (totalHeatDemand[j] > this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Even the immersion can't cope - spread\n\t\t\t\t\t\t\t\t\t// the load into the ticks beforehand\n\n\t\t\t\t\t\t\t\t\theatToMove = (totalHeatDemand[j] - (this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick))\n\t\t\t\t\t\t\t\t\t\t\t* Consts.IMMERSION_HEATER_COP;\n\t\t\t\t\t\t\t\t\ttotalHeatDemand[j] = this.maxHeatPumpElecDemandPerTick + this.maxImmersionHeatPerTick;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\theatToMove = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\theatToMove = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ArrayUtils.add(totalHeatDemand, ArrayUtils.negate(this.heatPumpDemandProfile));\n\t}", "protected void apply(float interpolatedTime) {\n\t}", "private static List<? extends AForecast> extractDataForThePast(List<? extends AForecast> data) {\n return extractDataForDate(data, TimeUtil.convertDateFromISOString(data.get(0).getApplicableDate()));\n }", "@Test\n public void convertAFby() {\n DistEventType x = DistEventType.LocalEvent(\"x\", 0);\n DistEventType y = DistEventType.LocalEvent(\"y\", 0);\n\n TemporalInvariantSet synInvs = new TemporalInvariantSet();\n synInvs.add(new AlwaysFollowedInvariant(x, y, \"t\"));\n List<dynoptic.invariants.BinaryInvariant> dynInvs = DynopticMain\n .synInvsToDynInvs(synInvs);\n assertTrue(dynInvs.size() == 1);\n\n BinaryInvariant dInv = dynInvs.iterator().next();\n assertTrue(dInv instanceof AlwaysFollowedBy);\n assertTrue(dInv.getFirst().equals(x));\n assertTrue(dInv.getSecond().equals(y));\n }", "public abstract double computeOutputFlow(double inputFlow);", "public void toNow() {\r\n // in suspending state, the current step must be non-interruptable\r\n if (currentStep != null && !currentStep.isInterruptable()) {\r\n double now = currentSimulationTime();\r\n double passed_time = now - lastTime;\r\n\r\n if (MathTools.less(0, passed_time)) {\r\n // get the demand of the first job\r\n double demand = running_processes.get(currentStep);\r\n demand -= passed_time;\r\n\r\n // avoid trouble caused by rounding issues\r\n demand = MathTools.equalsDouble(demand, 0) ? 0.0 : demand;\r\n\r\n assert demand >= 0 : \"Remaining demand (\" + demand + \") smaller than zero! at simulation time: \"\r\n + now;\r\n\r\n running_processes.put(currentStep, demand);\r\n }\r\n lastTime = now;\r\n }\r\n }", "private double[][] calculateValues() throws ExafsScanPointCreatorException {\n\t\tscanTimes= new ArrayList<> ();\n\t\tdouble[][] preEdgeEnergies = createStepArray(initialEnergy, aEnergy, preEdgeStep, preEdgeTime, false,\n\t\t\t\tnumberDetectors);\n\t\tscanTimes.add(new ExafsScanRegionTime(\"PreEdge\", preEdgeEnergies.length, new double[]{preEdgeTime}));\n\t\tdouble[][] abEnergies = convertABSteps(aEnergy, bEnergy, preEdgeStep, edgeStep, preEdgeTime);\n\t\tscanTimes.add(new ExafsScanRegionTime(\"AbEdge\", abEnergies.length, new double[]{preEdgeTime}));\n\n\t\tdouble[][] bcEnergies = createStepArray(bEnergy+edgeStep, cEnergy, edgeStep, edgeTime, false, numberDetectors);\n\t\tscanTimes.add(new ExafsScanRegionTime(\"BcEnergy\", bcEnergies.length, new double[]{edgeTime}));\n\t\t// if varying time the temporarily set the exafs time to a fixed value\n\t\tif (!exafsConstantTime)\n\t\t\texafsTime = exafsFromTime;\n\n\t\tdouble[][] exafsEnergies;\n\t\tif (exafsConstantEnergyStep)\n\t\t\texafsEnergies = createStepArray(cEnergy, finalEnergy, exafsStep, exafsTime, true, numberDetectors);\n\t\telse\n\t\t\texafsEnergies = calculateExafsEnergiesConstantKStep();\n\t\t// now change all the exafs times if they vary\n\t\tif (!exafsConstantTime)\n\t\t\texafsEnergies = convertTimes(exafsEnergies, exafsFromTime, exafsToTime);\n\n\t\t// Smooth out the transition between edge and exafs region.\n\t\tfinal double[][][] newRegions = createEdgeToExafsSteps(cEnergy, exafsEnergies, edgeStep, exafsTime);\n\t\tfinal double[][] edgeToExafsEnergies = newRegions[0];\n\t\tif(edgeToExafsEnergies != null)\n\t\t\tscanTimes.add(new ExafsScanRegionTime(\"EdgetoExafs\", edgeToExafsEnergies.length, new double[]{exafsTime}));\n\t\texafsEnergies = newRegions[1];\n\n\t\t// The edgeToExafsEnergies replaces the first EXAFS_SMOOTH_COUNT\n\n\t\t// merge arrays\n\t\tdouble []exafsRegionTimeArray = new double[exafsEnergies.length];\n\t\tint k =0;\n\t\tfor(double[] exafsEnergy : exafsEnergies)\n\t\t\texafsRegionTimeArray[k++ ] = exafsEnergy[1];\n\t\tscanTimes.add(new ExafsScanRegionTime(\"Exafs\", 1, exafsRegionTimeArray));\n\t\tdouble[][] allEnergies = (double[][]) ArrayUtils.addAll(preEdgeEnergies, abEnergies);\n\t\tallEnergies = (double[][]) ArrayUtils.addAll(allEnergies, bcEnergies);\n\t\tif (edgeToExafsEnergies != null)\n\t\t\tallEnergies = (double[][]) ArrayUtils.addAll(allEnergies, edgeToExafsEnergies);\n\t\tallEnergies = (double[][]) ArrayUtils.addAll(allEnergies, exafsEnergies);\n\t\treturn allEnergies;\n\t}", "public void toNow() {\r\n double now = currentSimulationTime();\r\n double passed_time = now - lastTime - suspendetTime;\r\n\r\n if (MathTools.less(0, passed_time)) {\r\n if (currentStep != null) {\r\n\r\n // get the demand of the first job\r\n double demand = running_processes.get(currentStep);\r\n demand -= passed_time;\r\n SuspendableFCFSResource.this.remainingDemand -= passed_time;\r\n \r\n // avoid trouble caused by rounding issues\r\n demand = MathTools.equalsDouble(demand, 0) ? 0.0 : demand;\r\n\r\n assert demand >= 0 : \"Remaining demand (\" + demand + \") smaller than zero! at simulation time: \"\r\n + now;\r\n\r\n running_processes.put(currentStep, demand);\r\n }\r\n }\r\n lastTime = now;\r\n suspendetTime = 0;\r\n }", "private TimeSeries initMovingTimeSeries(int maxBarCount) {\n //TimeSeries series = CsvTradesLoader.loadBitstampSeries();\n //TimeSeries series = CsvTicksLoader.load(\"EURUSD_Daily_201701020000_201712290000.csv\");\n //TimeSeries series = CsvTicksLoader.load(\"2019_D.csv\");\n\n TimeSeries series = new BaseTimeSeries(selected.getPeriod().getName());\n\n for (PeriodBar periodBar : selected.getPeriod().getBars()) {\n ZonedDateTime time = periodBar.getEndTime();\n double open = periodBar.getOpenPrice().doubleValue();\n double close = periodBar.getClosePrice().doubleValue();\n double max = periodBar.getMaxPrice().doubleValue();\n double min = periodBar.getMinPrice().doubleValue();\n double vol = periodBar.getVolume().doubleValue();\n\n series.addBar(new BaseBar(time, open, max, min, close, vol));\n }\n\n System.out.print(\"Initial bar count: \" + series.getBarCount());\n // Limitating the number of bars to maxBarCount\n series.setMaximumBarCount(maxBarCount);\n LAST_BAR_CLOSE_PRICE = series.getBar(series.getEndIndex()).getClosePrice();\n System.out.println(\" (limited to \" + maxBarCount + \"), close price = \" + LAST_BAR_CLOSE_PRICE);\n\n //live = CsvTicksLoader.load(\"2020_D.csv\");\n //live = CsvTicksLoader.load(\"2020_D.csv\");\n\n live = new BaseTimeSeries(selected.getName());\n\n for (ForwardTestBar forwardTestBar : selected.getBars()) {\n ZonedDateTime time = forwardTestBar.getEndTime();\n double open = forwardTestBar.getOpenPrice().doubleValue();\n double close = forwardTestBar.getClosePrice().doubleValue();\n double max = forwardTestBar.getMaxPrice().doubleValue();\n double min = forwardTestBar.getMinPrice().doubleValue();\n double vol = forwardTestBar.getVolume().doubleValue();\n\n live.addBar(new BaseBar(time, open, max, min, close, vol));\n }\n\n return series;\n }", "public int run(Point xS, Point xE)\n throws OptimizerException, Exception\n {\n boolean terminate = false;\n boolean f1eqf2 = false;\n // Vector of points, used for parallel computation\n Point[] x = new Point[2];\n x[0] = new Point(xS.getDimensionContinuous(), xS.getDimensionDiscrete(), xS.getDimensionF());\n x[1] = (Point)x0.clone();\n \n x0 = (Point)xS.clone();\n x3 = (Point)xE.clone();\n \n dx = LinAlg.subtract(x3.getX(), x0.getX());\n double I = 1.; // interval length (in terms of alpha, which is normalized)\n nIntRed = 0; // zero-based step of interval division\n I *= getReductionFactor();\n x[1].setX( LinAlg.add(x0.getX(), LinAlg.multiply(I, dx)) );\n nIntRed++;\n I *= getReductionFactor();\n x[0].setX( LinAlg.add(x0.getX(), LinAlg.multiply(I, dx)) );\n // initial function evaluation\n\n x = getF(x);\n \tx1 = (Point)x[0].clone();\n x2 = (Point)x[1].clone();\n\n do\n {\n nIntRed++;\n I *=getReductionFactor();\n\n if (x2.getF(0) < x1.getF(0))\n { // data management\n fLowBor = x1.getF(0); // we need that for one of the stopping criteria\n x0 = (Point)x1.clone();\n x1 = (Point)x2.clone();\n // new point\n x2.setX( LinAlg.subtract(x3.getX(), LinAlg.multiply(I, dx)) );\n x2 = getF(x2);\n }\n else\n { // data management\n fLowBor = x2.getF(0); // we need that for one of the stopping criteria\n x3 = (Point)x2.clone();\n x2 = (Point)x1.clone();\n // new point\n x1.setX( LinAlg.add(x0.getX(), LinAlg.multiply(I, dx)) );\n x1 = getF(x1);\n }\n\n // check for null space of objective function, unless\n // stoCri is equal to one\n if (stoCri != 1 && x1.getF(0) == x2.getF(0))\n {\n if (f1eqf2) // the last two were also equal, so the\n terminate = true; // current three are equal\n f1eqf2 = true;\n }\n else // reset flag\n f1eqf2 = false;\n } while (iterate() && !terminate);\n\n // tolerance achieved or maximum number of iteration exceeded\n // store minimum value\n if (x1.getF(0) < x2.getF(0))\n {\n xLow = (Point)x0.clone();\n xMin = (Point)x1.clone();\n xUpp = (Point)x2.clone(); \n }\n else\n {\n xLow = (Point)x1.clone();\n xMin = (Point)x2.clone();\n xUpp = (Point)x3.clone(); \n }\n // if we got a null space\n if (terminate) return -2;\n // check whether the maximum number of iteration is exceeded\n if (stoCri == 1)\n if (!isDFltdFMin()) return -1;\n // if search has been successful\n return +1;\n }", "public static void main(String[] args) {\n neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0,\n 10.00);\n feedGas.addComponent(\"nitrogen\", 1.03);\n feedGas.addComponent(\"CO2\", 1.42);\n feedGas.addComponent(\"methane\", 83.88);\n feedGas.addComponent(\"ethane\", 8.07);\n feedGas.addComponent(\"propane\", 3.54);\n feedGas.addComponent(\"i-butane\", 0.54);\n feedGas.addComponent(\"n-butane\", 0.84);\n feedGas.addComponent(\"i-pentane\", 0.21);\n feedGas.addComponent(\"n-pentane\", 0.19);\n feedGas.addComponent(\"n-hexane\", 0.28);\n feedGas.addComponent(\"water\", 0.0);\n feedGas.addComponent(\"TEG\", 0);\n feedGas.createDatabase(true);\n feedGas.setMixingRule(10);\n feedGas.setMultiPhaseCheck(true);\n\n Stream dryFeedGas = new Stream(\"dry feed gas\", feedGas);\n dryFeedGas.setFlowRate(11.23, \"MSm3/day\");\n dryFeedGas.setTemperature(30.4, \"C\");\n dryFeedGas.setPressure(52.21, \"bara\");\n StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil(dryFeedGas);\n Stream waterSaturatedFeedGas = new Stream(saturatedFeedGas.getOutStream());\n saturatedFeedGas.setName(\"water saturator\");\n neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n feedTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02, 0.98 });\n\n Stream TEGFeed = new Stream(\"lean TEG to absorber\", feedTEG);\n TEGFeed.setFlowRate(6.1 * 1100.0, \"kg/hr\");\n TEGFeed.setTemperature(35.4, \"C\");\n TEGFeed.setPressure(52.21, \"bara\");\n\n SimpleTEGAbsorber absorber = new SimpleTEGAbsorber(\"SimpleTEGAbsorber\");\n absorber.addGasInStream(waterSaturatedFeedGas);\n absorber.addSolventInStream(TEGFeed);\n absorber.setNumberOfStages(10);\n absorber.setStageEfficiency(0.35);\n\n Stream dehydratedGas = new Stream(absorber.getGasOutStream());\n dehydratedGas.setName(\"dry gas from absorber\");\n Stream richTEG = new Stream(absorber.getSolventOutStream());\n\n ThrottlingValve glycol_flash_valve = new ThrottlingValve(richTEG);\n glycol_flash_valve.setName(\"Rich TEG HP flash valve\");\n glycol_flash_valve.setOutletPressure(4.9);\n\n Heater richGLycolHeaterCondeser = new Heater(glycol_flash_valve.getOutStream());\n richGLycolHeaterCondeser.setName(\"rich TEG preheater\");\n richGLycolHeaterCondeser.setOutTemperature(273.15 + 35.5);\n\n Heater richGLycolHeater = new Heater(richGLycolHeaterCondeser.getOutStream());\n richGLycolHeater.setName(\"rich TEG heater HP\");\n richGLycolHeater.setOutTemperature(273.15 + 62.0);\n\n Separator flashSep = new Separator(richGLycolHeater.getOutStream());\n flashSep.setName(\"degasing separator\");\n Stream flashGas = new Stream(flashSep.getGasOutStream());\n flashGas.setName(\"gas from degasing separator\");\n Stream flashLiquid = new Stream(flashSep.getLiquidOutStream());\n flashLiquid.setName(\"liquid from degasing separator\");\n\n Heater richGLycolHeater2 = new Heater(flashLiquid);\n richGLycolHeater2.setName(\"LP rich glycol heater\");\n richGLycolHeater2.setOutTemperature(273.15 + 139.0);\n richGLycolHeater2.setOutPressure(1.23);\n\n Mixer mixerTOreboiler = new Mixer(\"reboil mxer\");\n mixerTOreboiler.addStream(richGLycolHeater2.getOutStream());\n\n Heater heaterToReboiler = new Heater(mixerTOreboiler.getOutStream());\n heaterToReboiler.setOutTemperature(273.15 + 206.6);\n\n Separator regenerator2 = new Separator(heaterToReboiler.getOutStream());\n\n Stream gasFromRegenerator = new Stream(regenerator2.getGasOutStream());\n\n Heater sepregenGasCooler = new Heater(gasFromRegenerator);\n sepregenGasCooler.setOutTemperature(273.15 + 109.0);\n sepregenGasCooler.setOutPressure(1.23);\n//\t\tsepregenGasCooler.setEnergyStream(richGLycolHeaterCondeser.getEnergyStream());\n\n Separator sepRegen = new Separator(sepregenGasCooler.getOutStream());\n\n Stream liquidRegenReflux = new Stream(sepRegen.getLiquidOutStream());\n\n Recycle resycle2 = new Recycle(\"reflux resycle\");\n resycle2.addStream(liquidRegenReflux);\n\n Heater coolerRegenGas = new Heater(sepRegen.getGasOutStream());\n coolerRegenGas.setOutTemperature(273.15 + 35.5);\n\n Separator sepregenGas = new Separator(coolerRegenGas.getOutStream());\n\n Stream gasToFlare = new Stream(sepregenGas.getGasOutStream());\n\n Stream liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream());\n\n Stream hotLeanTEG = new Stream(regenerator2.getLiquidOutStream());\n\n neqsim.thermo.system.SystemInterface stripGas = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n stripGas.setMolarComposition(new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 });\n\n Stream strippingGas = new Stream(\"stripGas\", stripGas);\n strippingGas.setFlowRate(70.0, \"kg/hr\");\n strippingGas.setTemperature(206.6, \"C\");\n strippingGas.setPressure(1.23, \"bara\");\n\n WaterStripperColumn stripper = new WaterStripperColumn(\"TEG stripper\");\n stripper.addGasInStream(strippingGas);\n stripper.addSolventInStream(hotLeanTEG);\n stripper.setNumberOfStages(10);\n stripper.setStageEfficiency(0.5);\n\n Recycle resycle3 = new Recycle(\"gas stripper resycle\");\n resycle3.addStream(stripper.getGasOutStream());\n\n Pump hotLeanTEGPump = new Pump(stripper.getSolventOutStream());\n hotLeanTEGPump.setName(\"hot lean TEG pump\");\n hotLeanTEGPump.setOutletPressure(20.0);\n\n Heater coolerhOTteg = new Heater(hotLeanTEGPump.getOutStream());\n coolerhOTteg.setName(\"hot lean TEG cooler\");\n coolerhOTteg.setOutTemperature(273.15 + 116.8);\n\n Heater coolerhOTteg2 = new Heater(coolerhOTteg.getOutStream());\n coolerhOTteg2.setName(\"medium hot lean TEG cooler\");\n coolerhOTteg2.setOutTemperature(273.15 + 89.3);\n\n Heater coolerhOTteg3 = new Heater(coolerhOTteg2.getOutStream());\n coolerhOTteg3.setName(\"lean TEG cooler\");\n coolerhOTteg3.setOutTemperature(273.15 + 44.85);\n\n Pump hotLeanTEGPump2 = new Pump(coolerhOTteg3.getOutStream());\n hotLeanTEGPump2.setName(\"lean TEG HP pump\");\n hotLeanTEGPump2.setOutletPressure(52.21);\n\n Stream leanTEGtoabs = new Stream(hotLeanTEGPump2.getOutStream());\n leanTEGtoabs.setName(\"lean TEG to absorber\");\n\n neqsim.thermo.system.SystemInterface pureTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n pureTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 });\n\n Stream makeupTEG = new Stream(\"lean TEG to absorber\", pureTEG);\n makeupTEG.setFlowRate(1e-6, \"kg/hr\");\n makeupTEG.setTemperature(35.4, \"C\");\n makeupTEG.setPressure(52.21, \"bara\");\n\n Calculator makeupCalculator = new Calculator(\"makeup calculator\");\n makeupCalculator.addInputVariable(dehydratedGas);\n makeupCalculator.addInputVariable(flashGas);\n makeupCalculator.addInputVariable(gasToFlare);\n makeupCalculator.addInputVariable(liquidToTrreatment);\n makeupCalculator.setOutputVariable(makeupTEG);\n\n StaticMixer makeupMixer = new StaticMixer(\"makeup mixer\");\n makeupMixer.addStream(leanTEGtoabs);\n makeupMixer.addStream(makeupTEG);\n\n Recycle resycleLeanTEG = new Recycle(\"lean TEG resycle\");\n resycleLeanTEG.addStream(makeupMixer.getOutStream());\n\n neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();\n operations.add(dryFeedGas);\n operations.add(saturatedFeedGas);\n operations.add(waterSaturatedFeedGas);\n operations.add(TEGFeed);\n operations.add(absorber);\n operations.add(dehydratedGas);\n operations.add(richTEG);\n operations.add(glycol_flash_valve);\n operations.add(richGLycolHeaterCondeser);\n operations.add(richGLycolHeater);\n operations.add(flashSep);\n operations.add(flashGas);\n operations.add(flashLiquid);\n operations.add(richGLycolHeater2);\n operations.add(mixerTOreboiler);\n operations.add(heaterToReboiler);\n operations.add(regenerator2);\n operations.add(gasFromRegenerator);\n operations.add(sepregenGasCooler);\n operations.add(sepRegen);\n operations.add(liquidRegenReflux);\n operations.add(resycle2);\n\n operations.add(coolerRegenGas);\n operations.add(sepregenGas);\n operations.add(gasToFlare);\n operations.add(liquidToTrreatment);\n operations.add(hotLeanTEG);\n operations.add(strippingGas);\n operations.add(stripper);\n\n operations.add(resycle3);\n operations.add(hotLeanTEGPump);\n operations.add(coolerhOTteg);\n operations.add(coolerhOTteg2);\n operations.add(coolerhOTteg3);\n operations.add(hotLeanTEGPump2);\n operations.add(leanTEGtoabs);\n operations.add(makeupCalculator);\n operations.add(makeupTEG);\n operations.add(makeupMixer);\n operations.add(resycleLeanTEG);\n\n operations.run();\n richGLycolHeater2.getOutStream().getFluid().display();\n System.out.println(\"Energy reboiler \" + heaterToReboiler.getDuty());\n mixerTOreboiler.addStream(liquidRegenReflux);\n mixerTOreboiler.addStream(resycle3.getOutStream());\n //\n operations.run();\n absorber.replaceSolventInStream(resycleLeanTEG.getOutStream());\n operations.run();\n // richGLycolHeater2.getOutStream().getFluid().display();\n\n System.out.println(\"Energy reboiler 2 \" + heaterToReboiler.getDuty());\n\n System.out.println(\"wt lean TEG after stripper \"\n + ((WaterStripperColumn) operations.getUnit(\"TEG stripper\")).getSolventOutStream().getFluid()\n .getPhase(\"aqueous\").getWtFrac(\"TEG\"));\n\n operations.save(\"c:/temp/TEGprocessSimple.neqsim\");\n }", "public double getSpread(double delta, boolean upGoing) {\n\t\tTtStatSeg seg;\n\t\t\n\t\tfor(int k=0; k<spread.size(); k++) {\n\t\t\tseg = spread.get(k);\n\t\t\tif(delta >= seg.minDelta && delta <= seg.maxDelta) {\n\t\t\t\treturn Math.min(seg.interp(delta), TauUtil.DEFSPREAD);\n\t\t\t}\n\t\t}\n\t\tif(upGoing) {\n\t\t\treturn Math.min(spread.get(0).interp(delta), TauUtil.DEFSPREAD);\n\t\t}\n\t\treturn TauUtil.DEFSPREAD;\n\t}", "public synchronized final void process() throws FilterException {\n if (this.result == null)\n throw new FilterException(i18n.getString(\"outputNotSet\"));\n if (this.source == null)\n throw new FilterException(i18n.getString(\"inputNotSet\"));\n\n try {\n // Starts the input interpretation (transformation)\n this.transformer.transform(this.source, this.result);\n } catch (TransformerException e) {\n throw new FilterException(e);\n } finally {\n this.source = null;\n this.result = null;\n }\n }", "public void updateAlarm(Point point) {\n WorldItem item = point.getContainedItem();\n if (item instanceof Sensor) {\n Sensor alarm = (Sensor) item;\n if (!alarm.isAlarmed()) {\n if (point.getCurrentTemp() >= alarm.getAlarmThreshold()) {\n alarm.triggerAlarm();\n }\n } else if (point.getCurrentTemp() < alarm.getAlarmThreshold()) {\n alarm.stopAlarm();\n }\n }\n }", "@Override\n public void update(float tpf) {\n super.update(tpf);\n\n updateTurn(tpf);\n updateBrakeAndAccelerate();\n\n SignalMode signalMode = getState(SignalMode.class);\n SignalTracker signalTracker = signalMode.getSignalTracker();\n boolean requested = signalTracker.test(SignalMode.F_HORN1.getId());\n MavDemo1.getVehicle().setHornStatus(requested);\n }", "@Override\n\tpublic void travel(float strafe, float vertical, float forward) {\n\t\tif (this.isInWater()) {\n\t\t\tthis.moveRelative(strafe, vertical, forward, 0.02F);\n\t\t\tthis.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);\n\t\t\tthis.motionX *= 0.800000011920929D;\n\t\t\tthis.motionY *= 0.800000011920929D;\n\t\t\tthis.motionZ *= 0.800000011920929D;\n\t\t} else if (this.isInLava()) {\n\t\t\tthis.moveRelative(strafe, vertical, forward, 0.02F);\n\t\t\tthis.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);\n\t\t\tthis.motionX *= 0.5D;\n\t\t\tthis.motionY *= 0.5D;\n\t\t\tthis.motionZ *= 0.5D;\n\t\t} else {\n\t\t\tfloat f = 0.91F;\n\n\t\t\tif (this.onGround) {\n\t\t\t\t//f = this.world.getBlockState(new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ))).getBlock().slipperiness * 0.91F;\n\t\t\t\tBlockPos underPos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ));\n\t\t\t\tIBlockState underState = this.world.getBlockState(underPos);\n\t\t\t\tf = underState.getBlock().getSlipperiness(underState, this.world, underPos, this) * 0.91F;\n\t\t\t}\n\n\t\t\tfloat f1 = 0.16277136F / (f * f * f);\n\t\t\tthis.moveRelative(strafe, vertical, forward, this.onGround ? 0.1F * f1 : 0.02F);\n\t\t\tf = 0.91F;\n\n\t\t\tif (this.onGround) {\n\t\t\t\t//f = this.world.getBlockState(new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ))).getBlock().slipperiness * 0.91F;\n\t\t\t\tBlockPos underPos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ));\n\t\t\t\tIBlockState underState = this.world.getBlockState(underPos);\n\t\t\t\tf = underState.getBlock().getSlipperiness(underState, this.world, underPos, this) * 0.91F;\n\t\t\t}\n\n\t\t\tthis.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);\n\t\t\tthis.motionX *= (double)f;\n\t\t\tthis.motionY *= (double)f;\n\t\t\tthis.motionZ *= (double)f;\n\t\t}\n\n\t\tthis.prevLimbSwingAmount = this.limbSwingAmount;\n\t\tdouble d1 = this.posX - this.prevPosX;\n\t\tdouble d0 = this.posZ - this.prevPosZ;\n\t\tfloat f2 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F;\n\n\t\tif (f2 > 1.0F) {\n\t\t\tf2 = 1.0F;\n\t\t}\n\n\t\tthis.limbSwingAmount += (f2 - this.limbSwingAmount) * 0.4F;\n\t\tthis.limbSwing += this.limbSwingAmount;\n\t}", "public static void main(String[] args) throws Exception {\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // use event time for the application\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n // configure watermark interval\n env.getConfig().setAutoWatermarkInterval(1000L);\n\n // ingest sensor stream\n DataStream<SensorReading> readings = env\n // SensorSource generates random temperature readings\n .addSource(new SensorSource())\n // assign timestamps and watermarks which are required for event time\n .assignTimestampsAndWatermarks(new SensorTimeAssigner());\n\n // filter out sensor measurements with temperature below 25 degrees\n DataStream<SensorReading> filteredReadings = readings\n .filter(r -> r.temperature >= 25);\n\n // the above filter transformation using a FilterFunction instead of a lambda function\n // DataStream<SensorReading> filteredReadings = readings\n // .filter(new TemperatureFilter(25));\n\n // project the reading to the id of the sensor\n DataStream<String> sensorIds = filteredReadings\n .map(r -> r.id);\n\n // the above map transformation using a MapFunction instead of a lambda function\n // DataStream<String> sensorIds = filteredReadings\n // .map(new IdExtractor());\n\n // split the String id of each sensor to the prefix \"sensor\" and sensor number\n DataStream<String> splitIds = sensorIds\n .flatMap((FlatMapFunction<String, String>)\n (id, out) -> { for (String s: id.split(\"_\")) { out.collect(s);}})\n // provide result type because Java cannot infer return type of lambda function\n .returns(Types.STRING);\n\n // the above flatMap transformation using a FlatMapFunction instead of a lambda function\n // DataStream<String> splitIds = sensorIds\n // .flatMap(new IdSplitter());\n\n // print result stream to standard out\n splitIds.print();\n\n // execute application\n env.execute(\"Basic Transformations Example\");\n }", "public Point movePoint(){\n\t\tSystem.out.println(\"Enter new zero point for figure\");\n\t\tthis.in = new Scanner(System.in);\n\t\tString temp = in.nextLine();\n\t\tString[] data = temp.trim().split(\" \");\n\t\tint a = Integer.parseInt(data[0]);\n\t\tint\tb = Integer.parseInt(data[1]);\n\t\tPoint p = new Point(a, b);\n\t\treturn p;\n\t}", "private double[] calculateEstimatedSpaceHeatPumpDemand(double[] localSetPointArray)\n\t{\n\t\tdouble[] energyProfile = new double[this.ticksPerDay];\n\t\tdouble[] deltaT = ArrayUtils.add(localSetPointArray, ArrayUtils.negate(this.priorDayExternalTempProfile));\n\t\t// int availableHeatRecoveryTicks = ticksPerDay;\n\t\tdouble maxRecoveryPerTick = 0.5d * Consts.DOMESTIC_COP_DEGRADATION_FOR_TEMP_INCREASE; // i.e.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// can't\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recover\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// more\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// than\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 50%\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// heat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// loss\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// at\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 90%\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// COP.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Need\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// code\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// better\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// later\n\t\t// double internalTemp = this.setPointProfile[0];\n\n\t\tfor (int i = 0; i < this.ticksPerDay; i++)\n\t\t{\n\t\t\t// --availableHeatRecoveryTicks;\n\t\t\t// currentTempProfile[i] = internalTemp;\n\t\t\tdouble tempChange;\n\n\t\t\tif (i > 0)\n\t\t\t{\n\t\t\t\ttempChange = localSetPointArray[i] - localSetPointArray[i - 1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttempChange = localSetPointArray[i] - this.setPointProfile[0];\n\t\t\t}\n\n\t\t\t// double setPointMaintenanceEnergy = deltaT[i] *\n\t\t\t// ((owner.buildingHeatLossRate /\n\t\t\t// Consts.KWH_TO_JOULE_CONVERSION_FACTOR)) * (Consts.SECONDS_PER_DAY\n\t\t\t// / ticksPerDay);\n\t\t\tdouble setPointMaintenanceEnergy = (this.setPointProfile[i] - this.priorDayExternalTempProfile[i])\n\t\t\t\t\t* ((this.owner.getBuildingHeatLossRate() / Consts.KWH_TO_JOULE_CONVERSION_FACTOR))\n\t\t\t\t\t* (Consts.SECONDS_PER_DAY / this.ticksPerDay);\n\n\t\t\t// tempChangePower can be -ve if the temperature is falling. If\n\t\t\t// tempChangePower magnitude\n\t\t\t// is greater than or equal to setPointMaintenance, the heat pump is\n\t\t\t// off.\n\t\t\tdouble tempChangeEnergy = tempChange * this.owner.getBuildingThermalMass();\n\n\t\t\t// Although the temperature profiles supplied should be such that\n\t\t\t// the heat\n\t\t\t// can always be recovered within a reasonable cap - we could put a\n\t\t\t// double\n\t\t\t// check in here.\n\t\t\t/*\n\t\t\t * if (tempChangeEnergy > maxRecoveryPerTick *\n\t\t\t * ((owner.buildingHeatLossRate /\n\t\t\t * Consts.KWH_TO_JOULE_CONVERSION_FACTOR) * (Consts.SECONDS_PER_DAY\n\t\t\t * / ticksPerDay) * ArrayUtils.max(deltaT))) { //System.err.println(\n\t\t\t * \"WattboxController: Should never get here - asked to get demand for a profile that can't recover temp\"\n\t\t\t * ); return null; }\n\t\t\t */\n\n\t\t\t// Add in the energy to maintain the new temperature, otherwise it\n\t\t\t// can be cheaper\n\t\t\t// To let the temperature fall and re-heat under flat price and\n\t\t\t// external temperature\n\t\t\t// conditions. TODO: Is this a good physical analogue?\n\t\t\t// setPointMaintenanceEnergy += tempChange *\n\t\t\t// ((owner.buildingHeatLossRate /\n\t\t\t// Consts.KWH_TO_JOULE_CONVERSION_FACTOR)) * (Consts.SECONDS_PER_DAY\n\t\t\t// / ticksPerDay);\n\n\t\t\tdouble heatPumpEnergyNeeded = Math.max(0, (setPointMaintenanceEnergy + tempChangeEnergy) / Consts.DOMESTIC_HEAT_PUMP_SPACE_COP);\n\t\t\t// double heatPumpEnergyNeeded = (setPointMaintenanceEnergy /\n\t\t\t// Consts.DOMESTIC_HEAT_PUMP_SPACE_COP) + (tempChangeEnergy *\n\t\t\t// (Consts.DOMESTIC_HEAT_PUMP_SPACE_COP *\n\t\t\t// Consts.DOMESTIC_COP_DEGRADATION_FOR_TEMP_INCREASE));\n\n\t\t\t// zero the energy if heat pump would be off\n\t\t\tif (deltaT[i] < Consts.HEAT_PUMP_THRESHOLD_TEMP_DIFF)\n\t\t\t{\n\t\t\t\t// heat pump control algorithm would switch off pump\n\t\t\t\theatPumpEnergyNeeded = 0;\n\t\t\t}\n\n\t\t\tif (heatPumpEnergyNeeded > (this.owner.ratedPowerHeatPump * Consts.DOMESTIC_HEAT_PUMP_SPACE_COP * 24 / this.ticksPerDay))\n\t\t\t{\n\t\t\t\t// This profiel produces a value that exceeds the total capacity\n\t\t\t\t// of the\n\t\t\t\t// heat pump and is therefore unachievable.\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\"Nulling the demand profile for energy needed \" + heatPumpEnergyNeeded);\n\t\t\t\t}\n\t\t\t\t// Can't satisfy this demand for this set point profile, return\n\t\t\t\t// null\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tenergyProfile[i] = heatPumpEnergyNeeded;\n\t\t}\n\n\t\treturn energyProfile;\n\n\t}", "private void doPoint()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\t\tubisenseData.setPosition(new Point3D(\tx1/100,\n\t\t\t\t\t\t\t\t\t\t\t\ty1/100,\n\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\n\t\twhile (elapsedTime < toolDuration && !this.terminate)\n\t\t{\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long)(elapsedTime*SLEEP_INTERVAL));\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tthis.notifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "public static void M_Forecast(X_M_Forecast f) {\n\t\tList<MPPMRP> list = getQuery(f, null, null).list();\n\t\tfor (MPPMRP mrp : list) {\n\t\t\tmrp.setM_Forecast(f);\n\t\t}\n\t}", "private void applySensoryInputToBrain() {\n\t\tArrayList<MNeuron> neurons = mnetwork.getNeurons();\n\n\t\t/* Temporarily hardcode id's of neurons of interest. */\n\t\tint numVSegs = Agent.configNumSegments;\n\t\tint firstVFoodNid = 3;\n\t\tint lastVFoodNid = firstVFoodNid + numVSegs - 1;\n\t\tint firstVWallNid = lastVFoodNid + 1;\n\t\tint lastVWallNid = firstVWallNid + numVSegs - 1;\n\t\tint firstVEnemyNid = lastVWallNid + 1;\n\t\tint lastVEnemyNid = firstVEnemyNid + numVSegs - 1;\n\n\t\t/*\n\t\t Provide input current the network using the sensory\n\t\t components of the interface.\n\t\t */\n\t\tfor (MNeuron n : neurons) {\n\t\t\tdouble current;\n\t\t\tint index;\n\t\t\tint id = n.getID();\n\n\t\t\t/* If the neuron is a food visual neuron. */\n\t\t\tif (id >= firstVFoodNid && id <= lastVFoodNid) {\n\t\t\t\tindex = id - 3;\n\t\t\t\tcurrent = ninterface.affectors.vFood[index];\n\t\t\t\tn.addCurrent(60.0*current);\n\t\t\t} /* If the neuron is a wall visual neuron. */ else if (id >= firstVWallNid && id <= lastVWallNid) {\n\t\t\t\tindex = id - numVSegs - 3;\n\t\t\t\tcurrent = ninterface.affectors.vWall[index];\n\t\t\t\tn.addCurrent(60.0*current);\n\t\t\t} /* If the neuron is an enemy visual neuron. */ else if (id >= firstVEnemyNid && id <= lastVEnemyNid) {\n\t\t\t\tindex = id - 2 * numVSegs - 3;\n\t\t\t\tcurrent = ninterface.affectors.vEnemy[index];\n\t\t\t\tn.addCurrent(60.0*current);\n\t\t\t}\n\t\t}\n\t}", "@NonNull\n @Override\n public PointF transformMeteringPoint(@NonNull PointF point) {\n final PointF referencePoint = new PointF(point.x, point.y);\n Size referenceSize = previewSize;\n\n // 1. Account for cropping.\n // This will enlarge the preview size so that aspect ratio matches.\n referenceSize = applyPreviewCropping(referenceSize, referencePoint);\n\n // 2. Scale to the preview stream coordinates.\n // This will move to the preview stream coordinates by scaling.\n referenceSize = applyPreviewScale(referenceSize, referencePoint);\n\n // 3. Rotate to the stream coordinate system.\n // This leaves us with sensor stream coordinates.\n referenceSize = applyPreviewToSensorRotation(referenceSize, referencePoint);\n\n // 4. Move to the crop region coordinate system.\n // The crop region is the union of all currently active streams.\n referenceSize = applyCropRegionCoordinates(referenceSize, referencePoint);\n\n // 5. Move to the active array coordinate system.\n referenceSize = applyActiveArrayCoordinates(referenceSize, referencePoint);\n LOG.i(\"input:\", point, \"output (before clipping):\", referencePoint);\n\n // 6. Probably not needed, but make sure we clip.\n if (referencePoint.x < 0) referencePoint.x = 0;\n if (referencePoint.y < 0) referencePoint.y = 0;\n if (referencePoint.x > referenceSize.getWidth()) referencePoint.x = referenceSize.getWidth();\n if (referencePoint.y > referenceSize.getHeight()) referencePoint.y = referenceSize.getHeight();\n LOG.i(\"input:\", point, \"output (after clipping):\", referencePoint);\n return referencePoint;\n }", "public void homogenize() {\n\t\tif (DoubleComparison.eq(w, 0)){\n\t\t\tthrow new RuntimeException(\"Can't homogenize points at infinity (last component zero)\");\n\t\t}\n\n\t\tthis.x = x / w;\n\t\tthis.y = y / w;\n\t\tthis.z = z / w;\n\t\tthis.w = 1;\n\t}", "@Override\n public void estimate() throws RadioSourceEstimationException, NotReadyException,\n LockedException {\n if (isLocked()) {\n throw new LockedException();\n }\n if (!isReady()) {\n throw new NotReadyException();\n }\n\n try {\n mLocked = true;\n\n if (mListener != null) {\n mListener.onEstimateStart(this);\n }\n\n createInnerEstimatorsIfNeeded();\n\n final List<RangingReadingLocated<S, P>> rangingReadings = new ArrayList<>();\n final List<RssiReadingLocated<S, P>> rssiReadings = new ArrayList<>();\n for (final ReadingLocated<P> reading : mReadings) {\n if (reading instanceof RangingReadingLocated) {\n rangingReadings.add((RangingReadingLocated<S, P>) reading);\n\n } else if (reading instanceof RssiReadingLocated) {\n rssiReadings.add((RssiReadingLocated<S, P>) reading);\n\n } else if (reading instanceof RangingAndRssiReadingLocated) {\n rangingReadings.add(createRangingReading(\n (RangingAndRssiReadingLocated<S, P>) reading));\n rssiReadings.add(createRssiReading(\n (RangingAndRssiReadingLocated<S, P>) reading));\n }\n }\n\n //estimate position using ranging data, if possible\n P estimatedPosition = null;\n if (!mRssiPositionEnabled) {\n mRangingInnerEstimator.setUseReadingPositionCovariances(\n mUseReadingPositionCovariances);\n mRangingInnerEstimator.setHomogeneousLinearSolverUsed(\n mUseHomogeneousRangingLinearSolver);\n mRangingInnerEstimator.setReadings(rangingReadings);\n mRangingInnerEstimator.setInitialPosition(mInitialPosition);\n\n mRangingInnerEstimator.estimate();\n\n mEstimatedPositionCoordinates =\n mRangingInnerEstimator.getEstimatedPositionCoordinates();\n mEstimatedPositionCovariance =\n mRangingInnerEstimator.getEstimatedPositionCovariance();\n estimatedPosition = mRangingInnerEstimator.getEstimatedPosition();\n }\n\n //estimate transmitted power and/or pathloss if enabled\n if (mTransmittedPowerEstimationEnabled || mPathLossEstimationEnabled || mRssiPositionEnabled) {\n mRssiInnerEstimator.setPositionEstimationEnabled(mRssiPositionEnabled);\n mRssiInnerEstimator.setInitialPosition(estimatedPosition);\n\n mRssiInnerEstimator.setTransmittedPowerEstimationEnabled(\n mTransmittedPowerEstimationEnabled);\n mRssiInnerEstimator.setInitialTransmittedPowerdBm(\n mInitialTransmittedPowerdBm);\n\n mRssiInnerEstimator.setPathLossEstimationEnabled(\n mPathLossEstimationEnabled);\n mRssiInnerEstimator.setInitialPathLossExponent(\n mInitialPathLossExponent);\n\n mRssiInnerEstimator.setReadings(rssiReadings);\n\n mRssiInnerEstimator.estimate();\n\n if (mRssiPositionEnabled) {\n mEstimatedPositionCoordinates =\n mRssiInnerEstimator.getEstimatedPositionCoordinates();\n mEstimatedPositionCovariance =\n mRssiInnerEstimator.getEstimatedPositionCovariance();\n }\n\n if (mTransmittedPowerEstimationEnabled) {\n //transmitted power estimation enabled\n mEstimatedTransmittedPowerdBm =\n mRssiInnerEstimator.getEstimatedTransmittedPowerdBm();\n mEstimatedTransmittedPowerVariance =\n mRssiInnerEstimator.getEstimatedTransmittedPowerVariance();\n } else {\n //transmitted power estimation disabled\n mEstimatedTransmittedPowerdBm = mInitialTransmittedPowerdBm;\n mEstimatedTransmittedPowerVariance = null;\n }\n\n if (mPathLossEstimationEnabled) {\n //pathloss exponent estimation enabled\n mEstimatedPathLossExponent =\n mRssiInnerEstimator.getEstimatedPathLossExponent();\n mEstimatedPathLossExponentVariance =\n mRssiInnerEstimator.getEstimatedPathLossExponentVariance();\n } else {\n //pathloss exponent estimation disabled\n mEstimatedPathLossExponent = mInitialPathLossExponent;\n mEstimatedPathLossExponentVariance = null;\n }\n\n //build covariance matrix\n if (mRssiPositionEnabled) {\n //if only RSSI estimation is done, we use directly the available estimated covariance\n mEstimatedCovariance = mRssiInnerEstimator.getEstimatedCovariance();\n\n } else {\n //if both ranging and RSSI data is used, we build covariance matrix by setting\n //position covariance estimated by ranging estimator into top-left corner, and then\n //adding covariance terms related to pathloss exponent and transmitted power\n final Matrix rssiCov = mRssiInnerEstimator.getEstimatedCovariance();\n if (mEstimatedPositionCovariance != null && rssiCov != null) {\n final int dims = getNumberOfDimensions();\n int n = dims;\n if (mTransmittedPowerEstimationEnabled) {\n n++;\n }\n if (mPathLossEstimationEnabled) {\n n++;\n }\n\n final int dimsMinus1 = dims - 1;\n final int nMinus1 = n - 1;\n mEstimatedCovariance = new Matrix(n, n);\n mEstimatedCovariance.setSubmatrix(0, 0,\n dimsMinus1, dimsMinus1,\n mEstimatedPositionCovariance);\n mEstimatedCovariance.setSubmatrix(dims, dims,\n nMinus1, nMinus1, rssiCov);\n } else {\n mEstimatedCovariance = null;\n }\n }\n\n } else {\n mEstimatedCovariance = mEstimatedPositionCovariance;\n mEstimatedTransmittedPowerdBm = mInitialTransmittedPowerdBm;\n mEstimatedTransmittedPowerVariance = null;\n\n mEstimatedPathLossExponent = mInitialPathLossExponent;\n mEstimatedPathLossExponentVariance = null;\n }\n\n if (mListener != null) {\n mListener.onEstimateEnd(this);\n }\n\n } catch (final AlgebraException e) {\n throw new RadioSourceEstimationException(e);\n } finally {\n mLocked = false;\n }\n }", "private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop storage is full, return to hive with information\n\t\telse if(food >= maxCrop) {\n\t\t\tif(targetFlower != null) {\n\t\t\t\tlastFlowerNectar = targetFlower.food;\n\t\t\t}\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if daylight is diminishing, return to hive\n\t\telse if(clock.time > (endForagingTime + 1.0)){\n\t\t\tlastFlowerNectar = 0;\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if flower loses all nectar, start scouting for new flower\n\t\telse if(targetFlower.food <= 0){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// semi-random decision to scout for new flower if current flower has low food\n\t\telse if(RandomHelper.nextIntFromTo(0,(int)(maxFlowerNectar/4)) > targetFlower.food &&\n\t\t\t\tRandomHelper.nextDoubleFromTo(0,1) < forageNoise){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// otherwise continue harvesting current flower\n\t\telse{\n\t\t\thover(grid.getLocation(targetFlower));\n\t\t\ttargetFlower.food -= foragingRate;\n\t\t\tfood += foragingRate;\n\t\t\tfood -= lowMetabolicRate;\n\t\t}\n\t}", "protected void execute() {\n \tif (setPoint != 0)\n \t\tshooterWheel.shooterWheelSpeedControllerAft.setSetPoint(setPoint);\n \tshooterWheel.driveAftWheel(shooterWheel.shooterWheelSpeedControllerAft.getControlOutput());\n \t\n }", "public FordFulkerson(FlowNetwork G, int s, int t) {\n\t validate(s, G.V());\n\t validate(t, G.V());\n\t if (s == t) throw new IllegalArgumentException(\"Source equals sink\");\n\t if (!isFeasible(G, s, t)) throw new IllegalArgumentException(\"Initial flow is infeasible\");\n\n\t // while there exists an augmenting path, use it\n\t value = excess(G, t);\n\t while (hasAugmentingPath(G, s, t)) {\n\n\t // compute bottleneck capacity\n\t double bottle = Double.POSITIVE_INFINITY;\n\t for (int v = t; v != s; v = edgeTo[v].other(v)) {\n\t bottle = Math.min(bottle, edgeTo[v].residualCapacityTo(v));\n\t }\n\n\t // augment flow\n\t for (int v = t; v != s; v = edgeTo[v].other(v)) {\n\t edgeTo[v].addResidualFlowTo(v, bottle); \n\t }\n\n\t value += bottle;\n\t }\n\n\t // check optimality conditions\n\t assert check(G, s, t);\n\t }", "public ExtrapolatedSaturationPointEvaluator(int[] anchorpoints,\n\t\t\tISamplingAlgorithmFactory<IInstance, ? extends ASamplingAlgorithm<IInstance>> samplingAlgorithmFactory,\n\t\t\tIDataset<IInstance> train, double trainSplitForAnchorpointsMeasurement,\n\t\t\tLearningCurveExtrapolationMethod extrapolationMethod, long seed, IDataset<IInstance> test) {\n\t\tsuper();\n\t\tthis.anchorpoints = anchorpoints;\n\t\tthis.samplingAlgorithmFactory = samplingAlgorithmFactory;\n\t\tthis.train = train;\n\t\tthis.trainSplitForAnchorpointsMeasurement = trainSplitForAnchorpointsMeasurement;\n\t\tthis.extrapolationMethod = extrapolationMethod;\n\t\tthis.seed = seed;\n\t\tthis.epsilon = DEFAULT_EPSILON;\n\t\tthis.test = test;\n\t}", "private void planDynamicStairs() throws GameActionException, HungryException {\r\n\t\tInteger fluxHeight = gameMap.get(fluxInfo.location).totalHeight;\r\n\t\tif (fluxHeight == fluxHeightWhenStairsPlanned){\r\n\t\t\tif (DEBUG) System.out.println(\"No need to plan stairs now\");\r\n\t\t\t//return; /* No return for now. Always plan stairs, so no stupid block lockups will occur */\r\n\t\t}\r\n\t\t\r\n\t\tif (DEBUG) System.out.println(\"-----TOWER-----\");\r\n\t\tDirection randDir = navigation.getRandomDirection();\r\n\t\tMapLocation start1 = fluxInfo.location.add(randDir).add(randDir);\r\n\t\tMapLocation start2 = fluxInfo.location.subtract(randDir).subtract(randDir);\r\n\t\tif ((gameMap.get(start1) == null) || (gameMap.get(start2) == null))\r\n\t\t\t/* unlucky - start position wasn't scanned yet */\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfluxHeightWhenStairsPlanned = fluxHeight;\r\n\t\t\r\n\t\tList<MapLocation> fluxPath1 = navigation.findPathUsingAStar(gameMap, start1, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath1);\r\n\t\tList<MapLocation> fluxPath2 = navigation.findPathUsingAStar(gameMap, start2, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath2);\r\n\t\tCollections.reverse(fluxPath1);\r\n\t\tCollections.reverse(fluxPath2);\r\n\t\tList<MapLocation> result = new ArrayList<MapLocation>();\r\n\t\twhile ((fluxPath1.size() > 0) && (fluxPath2.size() > 0) && (fluxPath1.get(0).equals(fluxPath2.get(0)))){\r\n\t\t\tresult.add(fluxPath1.remove(0));\r\n\t\t\tfluxPath2.remove(0);\r\n\t\t}\r\n\t\tCollections.reverse(result);\r\n\t\tif (result.size() >= stairs.size())\r\n\t\t\t/* prefer fresh data, but not too short */\r\n\t\t\tstairs = result;\r\n\t\tif (DEBUG) System.out.println(result);\r\n\t\tif (DEBUG) System.out.println(navigation.changePathToDirections(result));\r\n\t\tif (DEBUG) System.out.println(\"----/TOWER-----\");\r\n\t}", "@Test\r\n public void testSplineApproximator() {\r\n List<Point> data = createConvergingDataset();\r\n List<ExpectedApproximation> exp = new ArrayList<ExpectedApproximation>();\r\n // inside\r\n exp.add(new ExpectedApproximation(400, 3, 700));\r\n exp.add(new ExpectedApproximation(1000, 17, 1050));\r\n // outside\r\n exp.add(new ExpectedApproximation(0, 0, 400));\r\n exp.add(new ExpectedApproximation(1062, 40, 1066));\r\n test(SplineInterpolationLinearExtrapolationApproximator.INSTANCE, data, exp);\r\n\r\n data = createLinearDataset();\r\n exp.clear();\r\n // inside\r\n exp.add(new ExpectedApproximation(100, 3, 200));\r\n exp.add(new ExpectedApproximation(300, 11, 400));\r\n // outside\r\n exp.add(new ExpectedApproximation(0, 0, 100));\r\n exp.add(new ExpectedApproximation(400, 17, 500));\r\n test(SplineInterpolationLinearExtrapolationApproximator.INSTANCE, data, exp);\r\n \r\n data = createIncreasingDecreasingDataset();\r\n exp.clear();\r\n // inside\r\n exp.add(new ExpectedApproximation(400, 3, 700));\r\n exp.add(new ExpectedApproximation(700, 23, 900));\r\n // outside\r\n exp.add(new ExpectedApproximation(0, 0, 400));\r\n exp.add(new ExpectedApproximation(0, 35, 500));\r\n test(SplineInterpolationLinearExtrapolationApproximator.INSTANCE, data, exp);\r\n }", "void forward(float steps) {\n _x += _rotVector.x * steps;\n _y += _rotVector.y * steps;\n }", "private static float easeInOut(float t) {\n return MathHelper.lerp(t, t * t, 2 * t - (t * t));\n }", "private void calculatePrediction(int sensor_id){\n\t\t\n\t\tpredicted_sensor_readings[sensor_id][0] = (heta.getMatrix(sensor_id, sensor_id,0,M + number_of_sensors-1).times(getFeatureMatrix(sensor_id))).get(0, 0);\n\t\t\n\t}", "private void applyShadowStream(UUID streamId, long snapshot) {\n log.debug(\"Apply shadow stream for stream {}, snapshot={}\", streamId, snapshot);\n\n log.trace(\"Current addresses of stream {} :: {}\", streamId, rt.getSequencerView().getStreamAddressSpace(\n new StreamAddressRange(streamId, Long.MAX_VALUE, Address.NON_ADDRESS)));\n\n UUID shadowStreamId = getShadowStreamId(streamId);\n\n // In order to avoid data loss as part of a plugin failing to successfully\n // stop/resume checkpoint and trim. We will not ignore trims on the shadow stream.\n // However, because in between different snapshot cycles, the shadow stream could\n // have been trimmed (without a checkpoint) we will sync the stream up to the first\n // valid known position during the current cycle (i.e. the first applied entry in\n // the current snapshot cycle, which should not have been trimmed by the time of\n // applying the shadow stream).\n StreamOptions options = StreamOptions.builder()\n .ignoreTrimmed(false)\n .cacheEntries(false)\n .build();\n\n // This variable reflects the minimum timestamp for all shadow streams in the current snapshot cycle.\n // We seek up to this address, assuming that no trim should occur beyond this snapshot start\n long currentMinShadowStreamTimestamp =\n metadataManager.getReplicationMetadata(session).getCurrentCycleMinShadowStreamTs();\n OpaqueStream shadowOpaqueStream = new OpaqueStream(rt.getStreamsView().get(shadowStreamId, options));\n shadowOpaqueStream.seek(currentMinShadowStreamTimestamp);\n Stream<OpaqueEntry> shadowStream = shadowOpaqueStream.streamUpTo(snapshot);\n\n Iterator<OpaqueEntry> iterator = shadowStream.iterator();\n List<SMREntry> smrEntries = new ArrayList<>();\n\n // Clear the stream before updates are applied atomically.\n // This is done for all replicated streams except 2 cases -\n // 1. Merge-only streams\n // 2. Streams which did not evidence data on either source or sink\n // as these streams will get trimmed and 'clear' will be a 'data loss'.\n if (MERGE_ONLY_STREAMS.contains(streamId)) {\n log.debug(\"Do not clear stream={} (merge stream)\", streamId);\n }\n\n boolean shouldAddClearRecord = !MERGE_ONLY_STREAMS.contains(streamId);\n\n while (iterator.hasNext()) {\n // append a clear record at the beginning of every non-merge-only stream\n if(shouldAddClearRecord) {\n smrEntries.add(CLEAR_ENTRY);\n shouldAddClearRecord = false;\n }\n\n OpaqueEntry opaqueEntry = iterator.next();\n smrEntries.addAll(opaqueEntry.getEntries().get(shadowStreamId));\n }\n\n // if clear record has not been added by now, indicates that shadow stream is empty.\n if (shouldAddClearRecord) {\n log.trace(\"No data was written to stream {} on source or sink. Do not clear.\", streamId);\n return;\n }\n\n if (streamId.equals(REGISTRY_TABLE_ID)) {\n smrEntries = filterRegistryTableEntries(smrEntries);\n }\n\n List<SMREntry> buffer = new ArrayList<>();\n long bufferSize = 0;\n int numBatches = 1;\n\n for (SMREntry smrEntry : smrEntries) {\n // Apply all SMR entries in a single transaction as long as it does not exceed the max write size(25MB).\n // It was observed that special streams(ProtobufDescriptor table), can get a lot of updates, especially\n // due to schema updates during an upgrade. If the table was not checkpointed and trimmed on the Source,\n // no de-duplication on these updates will occur. As a result, the transaction size can be large.\n // Although it is within the maxWriteSize limit, deserializing these entries to read the table can cause an\n // OOM on applications running with a small memory footprint. So for such tables, introduce an\n // additional limit of max number of entries(50 by default) applied in a single transaction. This\n // algorithm is in line with the limits imposed in Compaction and Restore workflows.\n if (bufferSize + smrEntry.getSerializedSize() > metadataManager.getRuntime().getParameters()\n .getMaxWriteSize() || maxEntriesLimitReached(streamId, buffer)) {\n try (TxnContext txnContext = metadataManager.getTxnContext()) {\n updateLog(txnContext, buffer, streamId);\n CorfuStoreMetadata.Timestamp ts = txnContext.commit();\n log.debug(\"Applied shadow stream partially for stream {} on address :: {}. {} SMR entries written\",\n streamId, ts.getSequence(), buffer.size());\n buffer.clear();\n buffer.add(smrEntry);\n bufferSize = smrEntry.getSerializedSize();\n numBatches++;\n }\n } else {\n buffer.add(smrEntry);\n bufferSize += smrEntry.getSerializedSize();\n }\n }\n if (!buffer.isEmpty()) {\n try (TxnContext txnContext = metadataManager.getTxnContext()) {\n updateLog(txnContext, buffer, streamId);\n txnContext.commit();\n }\n }\n log.debug(\"Completed applying updates to stream {}. {} entries applied across {} transactions. \", streamId,\n smrEntries.size(), numBatches);\n }", "private void runFilters() {\n \tif (currentPoint * itp < time1) {\r\n \t\t//Accelerating filter 1\r\n \t\tfilterSum1 = currentPoint / filterLength1;\r\n \t}\r\n \telse if (currentPoint >= totalPoints - filterLength2) {\r\n \t\tfilterSum1 = 0;\r\n \t}\r\n \telse if (currentPoint * itp >= timeToDeccel) {\r\n \t\t//Deccelerating filter 1\r\n \t\tfilterSum1 = (totalPoints - filterLength2 - currentPoint) / filterLength1;\r\n \t}\r\n \telse {\r\n \t\tfilterSum1 = 1;\r\n \t}\r\n \t\r\n \t//Creating filterSum2 from the sum of the last filterLength2 values of filterSum1(Boxcar filter)\r\n \tfilterSums1[currentPoint] = filterSum1;\r\n \tint filter2Start = (int) ((currentPoint > filterLength2) ? currentPoint - filterLength2 + 1 : 0);\r\n \tfilterSum2 = 0;\r\n \tfor(int i = filter2Start; i <= currentPoint; i++) {\r\n \t\tfilterSum2 += filterSums1[i];\r\n \t}\r\n \t\r\n\t}", "public interface Transducer {\n double popNextPressurePsiValue();\n}", "private void goForwardOne() \n {\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n m_source_.setIndex(m_source_.getIndex() + 1);\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n m_bufferOffset_ ++;\n }\n }", "public FordFulkerson(FlowNetwork G, int s, int t) {\r\n V = G.V();\r\n if (s == t)\r\n throw new IllegalArgumentException(\"Source equals sink\");\r\n // if (!isFeasible(G, s, t)) throw new\r\n // IllegalArgumentException(\"Initial flow is\r\n // infeasible\");\r\n\r\n // while there exists an augmenting path, use it\r\n value = excess(G, t);\r\n while (hasAugmentingPath(G, s, t)) {\r\n\r\n // compute bottleneck capacity\r\n double bottle = Double.POSITIVE_INFINITY;\r\n for (int v = t; v != s; v = edgeTo[v].other(v)) {\r\n bottle = Math.min(bottle, edgeTo[v].residualCapacityTo(v));\r\n }\r\n\r\n // augment flow\r\n for (int v = t; v != s; v = edgeTo[v].other(v)) {\r\n edgeTo[v].addResidualFlowTo(v, bottle);\r\n }\r\n\r\n value += bottle;\r\n }\r\n\r\n // check optimality conditions\r\n // assert check(G, s, t);\r\n }", "public void computeForecasts (GUICalcProgressBar progress, RJGUIController.XferForecastMod xfer) {\n\n\t\t// Save the catalog parameters\n\n\t\tcat_forecastStartTimeParam = xfer.x_forecastStartTimeParam;\n\t\tcat_forecastEndTimeParam = xfer.x_forecastEndTimeParam;\n\n\t\t// Compute the aftershock forecasts\n\n\t\tseqSpecForecast = makeForecast (progress, cat_forecastStartTimeParam, cur_model, \"Seq. Specific\");\n\t\tgenericForecast = makeForecast (progress, cat_forecastStartTimeParam, genericModel, \"Generic\");\n\t\tbayesianForecast = makeForecast (progress, cat_forecastStartTimeParam, bayesianModel, \"Bayesian\");\n\n\t\t// Remove the model-specific message\n\t\t\n\t\tif (progress != null) {\n\t\t\t//progress.setIndeterminate(true);\n\t\t\t//progress.setProgressMessage(\"Plotting...\");\n\t\t\tprogress.setIndeterminate(true, \"Plotting...\");\n\t\t}\n\n\t\t// Pre-compute elements for expected aftershock MFDs.\n\n\t\tgui_view.precomputeEAMFD (progress, cat_forecastStartTimeParam, cat_forecastEndTimeParam);\n\n\t\treturn;\n\t}", "@Override\r\n public FlowState call() {\r\n // TODO: We should not need? to pass the flowState because this flow is already known (reapplying same values???)\r\n FlowState flowState = getFlowState();\r\n if ( flowState == null ) {\r\n throw new FlowException(\"No flowState with id:\", getExistingFlowStateLookupKey());\r\n } else {\r\n return getFlowManagementWithCheck().continueFlowState(getExistingFlowStateLookupKey(), true, this.getInitialFlowState());\r\n }\r\n }", "static void SKP_Silk_MA_Prediction(short[] in, /* I: Input signal */\n\t\tint in_offset, short[] B, /* I: MA prediction coefficients, Q12 [order] */\n\t\tint B_offset, int[] S, /* I/O: State vector [order] */\n\t\tshort[] out, /* O: Output signal */\n\t\tint out_offset, final int len, /* I: Signal length */\n\t\tfinal int order /* I: Filter order */\n\t)\n\t{\n\t\tint k, d, in16;\n\t\tint out32;\n\n\t\tfor (k = 0; k < len; k++) {\n\t\t\tin16 = in[in_offset + k];\n\t\t\tout32 = (in16 << 12) - S[0];\n\t\t\tout32 = SigProcFIX.SKP_RSHIFT_ROUND(out32, 12);\n\n\t\t\tfor (d = 0; d < order - 1; d++) {\n\t\t\t\tS[d] = SigProcFIX.SKP_SMLABB_ovflw(S[d + 1], in16, B[B_offset + d]);\n\t\t\t}\n\t\t\tS[order - 1] = SKP_SMULBB(in16, B[B_offset + order - 1]);\n\n\t\t\t/* Limit */\n\t\t\tout[out_offset + k] = (short) SigProcFIX.SKP_SAT16(out32);\n\t\t}\n\t}", "@NotNull\n private Coordinate flipH() {\n angle = 180 - angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(90 - angle))),\n this.centerPointCoordinate.getYCoordinate());\n return nextCenterPointCoordinate;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public synchronized void processIncoming(Data data) throws WekaException {\n if (isStopRequested()) {\n return;\n }\n\n if (getStepManager().isStreamFinished(data)) {\n // done\n // notify downstream steps of end of stream\n Data d = new Data(data.getConnectionName());\n getStepManager().throughputFinished(d);\n return;\n }\n\n getStepManager().throughputUpdateStart();\n if (m_plotListeners.size() > 0) {\n if (getStepManager().numIncomingConnectionsOfType(\n StepManager.CON_INSTANCE) > 0) {\n Instance instance =\n (Instance) data.getPayloadElement(StepManager.CON_INSTANCE);\n if (m_reset) {\n m_reset = false;\n List<String> legendEntries = new ArrayList<String>();\n int i;\n for (i = 0; i < instance.dataset().numAttributes() && i < 10; i++) {\n legendEntries.add(instance.dataset().attribute(i).name());\n }\n m_instanceWidth = i;\n\n for (PlotNotificationListener l : m_plotListeners) {\n l.setLegend(legendEntries, 0.0, 1.0);\n }\n }\n\n double[] dataPoint = new double[m_instanceWidth];\n for (int i = 0; i < dataPoint.length; i++) {\n if (!instance.isMissing(i)) {\n dataPoint[i] = instance.value(i);\n }\n }\n for (PlotNotificationListener l : m_plotListeners) {\n l.acceptDataPoint(dataPoint);\n }\n\n } else if (getStepManager().numIncomingConnectionsOfType(\n StepManager.CON_CHART) > 0) {\n if (m_reset) {\n m_reset = false;\n double min =\n data.getPayloadElement(StepManager.CON_AUX_DATA_CHART_MIN, 0.0);\n double max =\n data.getPayloadElement(StepManager.CON_AUX_DATA_CHART_MAX, 1.0);\n List<String> legend =\n (List<String>) data\n .getPayloadElement(StepManager.CON_AUX_DATA_CHART_LEGEND);\n for (PlotNotificationListener l : m_plotListeners) {\n l.setLegend(legend, min, max);\n }\n }\n double[] dataPoint =\n (double[]) data\n .getPayloadElement(StepManager.CON_AUX_DATA_CHART_DATA_POINT);\n for (PlotNotificationListener l : m_plotListeners) {\n l.acceptDataPoint(dataPoint);\n }\n }\n }\n getStepManager().throughputUpdateEnd();\n }" ]
[ "0.54695356", "0.5069816", "0.50442743", "0.5040404", "0.50354", "0.4844892", "0.46471435", "0.46027446", "0.45731345", "0.4492047", "0.44831118", "0.44403768", "0.4433545", "0.4420093", "0.44062832", "0.440073", "0.4396864", "0.4373615", "0.43480384", "0.43384618", "0.43305215", "0.43230107", "0.43194422", "0.4308324", "0.42912552", "0.42711174", "0.42606258", "0.42572477", "0.42436728", "0.42305318", "0.42214933", "0.42124942", "0.42103332", "0.42076376", "0.42046386", "0.4201758", "0.4200142", "0.41921535", "0.41915408", "0.41892478", "0.41841283", "0.4179414", "0.41742375", "0.41642967", "0.41622508", "0.41564745", "0.4139515", "0.41389573", "0.41376442", "0.41305795", "0.41287017", "0.41172796", "0.41139677", "0.4113401", "0.41015387", "0.41013992", "0.4094178", "0.4085444", "0.40814143", "0.40808102", "0.40806288", "0.40802845", "0.407906", "0.40763178", "0.40756828", "0.40671128", "0.40646", "0.4049962", "0.403863", "0.40364084", "0.40272236", "0.4025372", "0.40230224", "0.40225977", "0.4022454", "0.40211663", "0.40203682", "0.40197778", "0.40137503", "0.4013192", "0.40128314", "0.40065706", "0.40036604", "0.4001005", "0.39998287", "0.39992672", "0.3992337", "0.3981791", "0.39801562", "0.39798474", "0.39769843", "0.39761332", "0.39739755", "0.3971939", "0.3965921", "0.39656782", "0.39646676", "0.39641923", "0.39608604", "0.39583758", "0.39578652" ]
0.0
-1
Given an initial shingled point, extrapolate the stream into the future to produce a forecast. This method is intended to be called when the input data is being shingled, and it works by imputing forward one shingle block at a time. If the shingle is cyclic, then this method uses 0 as the shingle index.
public double[] extrapolateBasic(double[] point, int horizon, int blockSize, boolean cyclic) { return extrapolateBasic(point, horizon, blockSize, cyclic, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updatePredictions (long currTime, TimeSeries inputSeries)\n {\n\n// TODO: decide if this is necessary, it's in PPALg >>\n this.state.clearPredictionsFrom (currTime + stepSize);\n//this.state.clearPredictions();\n\n TimeSeries timeSeries = (TimeSeries) inputSeries.clone();\n\n // if timeSeries is shorter than the minimum stream do nothing.\n if (timeSeries.size() < minStreamLength)\n return;\n\n // trim the first <minPeriod> number of elements from the timeSeries.\n // this removes non-periodicity that is seen in simulators first few elements.\n\n timeSeries.trimFromStart(minPeriodLength);\n\n df.addText (\"First trim of time series : \" + timeSeries.shortToString());\n\n // find the best shift of the time series against iteself that leads to the most matching\n ArrayList shiftGraph = findBestShiftGraph (timeSeries);\n\n // trim the shifted graph to make sure we aren't starting in the middle of an event\n int amountTrimmed = trimShiftGraph (shiftGraph);\n\n df.addText (\"Trim amount : \" + amountTrimmed);\n df.addText (\"final, trimmed shift graph : \" + shiftGraph.toString());\n\n // the offset is the total amount of the time series we have discarded, it is the offset\n // to the leading edge of a periodic repeating occurence\n int offset = amountTrimmed + minPeriodLength;\n\n // create a new periodic event object\n PeriodicEvent pe = getPeriod (shiftGraph, offset);\n\n if (pe == null || pe.getEvent().isEmpty())\n {\n df.addText (\" Periodic event is null \");\n return;\n }\n\n df.addText (\" Periodic Event is : \" + pe.toString());\n\n // get the current time from which we will extrapolate\n long time = currTime;\n\n int period = pe.getPeriod();\n ArrayList event = pe.getEvent();\n\n // if we divide the timeSeries into portions the size of the time period, how much is left over?\n // for this we do not consider the trimmed amount.\n int timeSeriesSize = timeSeries.size() - amountTrimmed;\n\n if (timeSeriesSize <= period)\n return;\n int remainder = getRemainder (timeSeriesSize, period);\n df.addText (\"remainder is : \" + remainder);\n\n // cycle through the remaining portion of the last period adding any predictions based on\n // our periodic event that we have identified.\n // must subtract 1 since index is zero-base, & reaminder is one-based\n for (int i = remainder -1 ; i < event.size(); i++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (i >= 0 && event.get (i) != null)\n {\n prediction = ((Double) event.get(i)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (i)\n\n int extrapolationCount = 2;\n\n // We make <j> additional extapolation into the future beyond the last period fragment\n while (extrapolationCount > 0)\n {\n for (int j = 0; j < event.size(); j++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (event.get (j) != null)\n {\n prediction = ((Double) event.get(j)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (j)\n\n extrapolationCount--;\n } // end while (extapoliationCount)\n\n\n state.updateError (timeSeries, currTime);\n }", "private void establishPairings() {\n int splineIdx = 0;\n double splineDist = 0.0;\n double seqDist = 0.0;\n Pt pt;\n Pt prevSeq = sequence.get(0);\n Pt prevSpline;\n for (int seqIdx=0; seqIdx < sequence.size(); seqIdx++) {\n\n // part 1: get pt and seqDist set up correctly\n pt = sequence.get(seqIdx);\n seqDist += prevSeq.distance(pt);\n prevSeq = pt;\n\n // part 2: find index of spline point that is just past where we\n // want to be, then find the interpolated point between our\n // known point and that spline point. Set the \"tween\" attribute\n // of the sequence point.\n double additionalDist = 0.0;\n prevSpline = spline.get(splineIdx);\n Pt spt;\n for (int sidx = splineIdx; sidx < spline.size(); sidx++) {\n\tspt = spline.get(sidx);\n\tadditionalDist = spt.distance(prevSpline);\n\tif (additionalDist + splineDist >= seqDist) {\n\t // the target point is between splineIdx and sidx\n\t Pt target = Functions.getPointAtDistance(spline, splineIdx, splineDist, 1, seqDist);\n\t pt.setAttribute(\"tween\", target);\n\t break;\n\t} else if (sidx >= (spline.size() -1)) {\n\t pt.setAttribute(\"tween\", spline.getLast());\n\t}\n\tprevSpline = spt;\n\tsplineIdx = sidx;\n\tsplineDist += additionalDist;\n }\n }\n }", "protected void smooth() {\n if (!timer.isRunning() || sequence == null) {\n return;\n }\n if (spline == null) {\n spline = Functions.getSpline(sequence, numSplinePoints, 4);\n error = Double.MAX_VALUE;\n establishPairings();\n } else if (error < ERROR_TOLERANCE) {\n if (numSplinePoints <= 4) {\n\tspline = null;\n\terror = Double.MAX_VALUE;\n\ttimer.stop();\n\treturn;\n }\n \n numSplinePoints = Math.min(numSplinePoints - 4, 4);\n error = Double.MAX_VALUE;\n\n spline = Functions.getSpline(sequence, numSplinePoints, 4);\n establishPairings();\n }\n\n error = 0.0;\n int ptCnt = 0;\n for (Pt pt : sequence) {\n Pt destination = (Pt) pt.getAttribute(\"tween\");\n\n if (pt.distance(destination) < 1.0) {\n\tpt.setLocation(destination.getX(), destination.getY());\n } else {\n\tdouble dx = (destination.getX() - pt.getX()) / C;\n\tdouble dy = (destination.getY() - pt.getY()) / C;\n\tpt.setLocation(pt.getX() + dx , pt.getY() + dy);\n\terror += Math.hypot(dx, dy);\n }\n ptCnt++;\n }\n \n }", "protected double forecast( double t )\n throws IllegalArgumentException\n {\n double previousTime = t - getTimeInterval();\n \n // As a starting point, we set the first forecast value to be\n // the same as the observed value\n if ( previousTime < getMinimumTimeValue()+TOLERANCE )\n return getObservedValue( t );\n \n try\n {\n double b = getSlope( previousTime );\n \n double forecast\n = alpha*getObservedValue(t)\n + (1.0-alpha)*(getForecastValue(previousTime)+b);\n \n return forecast;\n }\n catch ( IllegalArgumentException iaex )\n {\n double maxTimeValue = getMaximumTimeValue();\n \n double b = getSlope( maxTimeValue-getTimeInterval() );\n double forecast\n = getForecastValue(maxTimeValue)\n + (t-maxTimeValue)*b;\n \n return forecast;\n }\n }", "@Override\n\tpublic TimeSeriesDataStructureI firstTimeSeriesAdjustment(TimeSeriesDataStructureI tsd) {\n\t\treturn tsd;\n\t}", "public Point getNextForecastedPos() {\n return nextPos ;\n }", "private void Step() {\n\t\tif (numberOfColumns == currentCycle) {\n\t\t\treturn;\n\t\t}\n\t\tif (numberOfRows != 1) {\n\n\t\t\tstall = 0;\n\t\t\tx = 0;\n\n\t\t\twhile (x < numberOfRows) {\n\t\t\t\tif (lstInstructionsPipeLine.get(x).issue_cycle == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (stall == 1) {\n\t\t\t\t\tDisplay_Stall(x, currentCycle);\n\t\t\t\t} else {\n\t\t\t\t\tswitch (lstInstructionsPipeLine.get(x).pipeline_stage) {\n\n\t\t\t\t\tcase \"IF\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"ID\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\tfor (int i = (x - 1); i >= 0; i--) {\n\n\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\")\n\t\t\t\t\t\t\t\t\t&& lstInstructionsPipeLine.get(i).operator.functional_unit\n\t\t\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).operator.functional_unit)) {\n\t\t\t\t\t\t\t\t// *** Structural Hazard ***\n\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).source_register1)\n\t\t\t\t\t\t\t\t\t|| lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).source_register2))) {\n\t\t\t\t\t\t\t\tif (dataForwarding == 1) {\n\n\t\t\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(i).operator.name.equals(\"ld\")\n\t\t\t\t\t\t\t\t\t\t\t|| lstInstructionsPipeLine.get(i).operator.name.equals(\"sd\")) {\n\t\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"WB\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t\t// ** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"MEM\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"WB\")\n\t\t\t\t\t\t\t\t\t\t\t\t&& !lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t\t// *** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\telse if (dataForwarding == 0) {\n\t\t\t\t\t\t\t\t\t// If forwarding is disabled and the\n\t\t\t\t\t\t\t\t\t// previous instruction is not completed,\n\t\t\t\t\t\t\t\t\t// stall.\n\t\t\t\t\t\t\t\t\tif (!lstInstructionsPipeLine.get(i).pipeline_stage.equals(\" \")) {\n\t\t\t\t\t\t\t\t\t\t// *** RAW Hazard **\n\t\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).destination_register\n\t\t\t\t\t\t\t\t\t.equals(lstInstructionsPipeLine.get(x).destination_register))\n\t\t\t\t\t\t\t\t\t&& (!lstInstructionsPipeLine.get(i).destination_register.equals(\"null\"))) {\n\n\t\t\t\t\t\t\t\tif ((lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\"))\n\t\t\t\t\t\t\t\t\t\t&& ((lstInstructionsPipeLine.get(i).operator.execution_cycles\n\t\t\t\t\t\t\t\t\t\t\t\t- lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(i).execute_counter) >= (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(x).operator.execution_cycles - 1))) {\n\t\t\t\t\t\t\t\t\t// *** WAW Hazard ***\n\t\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if ((lstInstructionsPipeLine.get(i).pipeline_stage.equals(\"EX\"))\n\t\t\t\t\t\t\t\t\t&& ((lstInstructionsPipeLine.get(i).operator.execution_cycles\n\t\t\t\t\t\t\t\t\t\t\t- lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t.get(i).execute_counter) == (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(x).operator.execution_cycles - 1))) {\n\n\t\t\t\t\t\t\t\t// *** WB will happen at the same time ***\n\t\t\t\t\t\t\t\tstall = 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (stall != 1) {\n\t\t\t\t\t\t\tif (lstInstructionsPipeLine.get(x).operator.name == \"br_taken\") {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t\tif ((x + 1) < numberOfRows) {\n\t\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x + 1).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Complete the execution of the branch.\n\t\t\t\t\t\t\telse if (lstInstructionsPipeLine.get(x).operator.name == \"br_untaken\") {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Move the instruction into the EX stage.\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"EX\";\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"EX\":\n\t\t\t\t\t\tif (lstInstructionsPipeLine\n\t\t\t\t\t\t\t\t.get(x).execute_counter < lstInstructionsPipeLine.get(x).operator.execution_cycles) {\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"EX\";\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).execute_counter++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"MEM\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"WB\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \" \":\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \" \";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"Unrecognized Pipeline Stage!\", \"Dialog\",\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (stall == 1) {\n\t\t\t\t\t\tDisplay_Stall(x, currentCycle);\n\t\t\t\t\t} else if (lstInstructionsPipeLine.get(x).pipeline_stage == \"EX\") {\n\t\t\t\t\t\tSystem.out.println(lstInstructionsPipeLine.get(x).operator.display_value + \" - row=\" + x\n\t\t\t\t\t\t\t\t+ \" col=\" + currentCycle);\n\t\t\t\t\t\tJPanel pnl_EXE_tmp = new JPanel();\n\t\t\t\t\t\tpnl_EXE_tmp.setBackground(col_EXE);\n\t\t\t\t\t\tpnl_EXE_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\t\t\tpanelShowResult.add(pnl_EXE_tmp);\n\t\t\t\t\t\tJLabel lblExe_tmp = new JLabel(lstInstructionsPipeLine.get(x).operator.display_value);\n\t\t\t\t\t\tpnl_EXE_tmp.add(lblExe_tmp);\n\t\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\t\tpanelShowResult.repaint();\n\n\t\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x,\"EX\");/// k,v\n\t\t\t\t\t}\n\t\t\t\t\t// Output the pipeline stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tJPanel pnl_tmp = new JPanel();\n\t\t\t\t\t\tswitch (lstInstructionsPipeLine.get(x).pipeline_stage) {\n\t\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_ID);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_MEM);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\t\tpnl_tmp.setBackground(col_WB);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// pnl_tmp.setBackground(col_EXE);\n\t\t\t\t\t\tpnl_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\t\t\tpanelShowResult.add(pnl_tmp);\n\t\t\t\t\t\tJLabel lbl_tmp = new JLabel(lstInstructionsPipeLine.get(x).pipeline_stage);\n\t\t\t\t\t\tpnl_tmp.add(lbl_tmp);\n\t\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\t\tpanelShowResult.repaint();\n\n\t\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\t\t}\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"x:\" + x);\n\t\t\t\tx++;\n\t\t\t} // End of while loop\n\n\t\t\tif (stall != 1 && x < numberOfRows) {\n\t\t\t\t// Issue a new instruction.\n\t\t\t\tlstInstructionsPipeLine.get(x).issue_cycle = Integer.toString(currentCycle);\n\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage = \"IF\";\n\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\tpnl_IF_tmp.setBackground(col_IF);\n\t\t\t\tpnl_IF_tmp.setBounds(currentCycle * 40 + (50 + 100), x * 20 + 20, 40, 20);// (w+row_x)\n\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(x).pipeline_stage);\n\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\tpanelShowResult.repaint();\n\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,v\n\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\tlstInstructionsPipeLine.get(x).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\tcurrentCycle++;\n\t\t} else {\n\n\t\t\tif (currentCycle == 0) {\n\t\t\t\tlstInstructionsPipeLine.get(0).issue_cycle = Integer.toString(currentCycle);\n\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"IF\";\n\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\tpnl_IF_tmp.setBackground(col_IF);\n\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).getPipeline_stage());\n\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\tpanelShowResult.repaint();\n\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(0).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\t\tcurrentCycle++;\n\t\t\t} else {\n\t\t\t\tswitch (lstInstructionsPipeLine.get(0).pipeline_stage) {\n\t\t\t\tcase \"IF\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"ID\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"ID\":\n\n\t\t\t\t\t// If branch is taken, complete this instruction.\n\t\t\t\t\tif (lstInstructionsPipeLine.get(0).operator.name.substring(0, 2) == \"br\") {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\t\t\t\t\t// Move the instruction into the EX stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"EX\";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"EX\":\n\t\t\t\t\t// If the instruction hasn't completed.\n\t\t\t\t\tif (lstInstructionsPipeLine\n\t\t\t\t\t\t\t.get(0).execute_counter < lstInstructionsPipeLine.get(0).operator.execution_cycles) {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"EX\";\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).execute_counter++;\n\t\t\t\t\t}\n\t\t\t\t\t// Move the instruction to the MEM stage.\n\t\t\t\t\telse {\n\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"MEM\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"MEM\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \"WB\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"WB\":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \" \":\n\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage = \" \";\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), \"Unrecognized Pipeline Stage!\", \"Dialog\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t\t// If the instruction is in the EX stage, display the functional\n\t\t\t\t// unit.\n\t\t\t\tif (lstInstructionsPipeLine.get(0).pipeline_stage == \"EX\") {\n\t\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\t\tpnl_IF_tmp.setBackground(col_EXE);\n\t\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).pipeline_stage);\n\t\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\tpanelShowResult.repaint();\n\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x,\"EX\");/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,v\n\n\t\t\t\t\tSystem.out.println(lstInstructionsPipeLine.get(0).operator.display_value + \" - row=\" + x + \" col=\"\n\t\t\t\t\t\t\t+ currentCycle);\n\t\t\t\t} else {\n\t\t\t\t\tJPanel pnl_IF_tmp = new JPanel();\n\t\t\t\t\tswitch (lstInstructionsPipeLine.get(0).pipeline_stage) {\n\t\t\t\t\tcase \"ID\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_ID);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"MEM\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_MEM);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"WB\":\n\t\t\t\t\t\tpnl_IF_tmp.setBackground(col_WB);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// pnl_IF_tmp.setBackground(col_IF);\n\t\t\t\t\tpnl_IF_tmp.setBounds(x * 40 + x, currentCycle * 20 + (20), 40, 20);// (w+row_x)\n\t\t\t\t\tpanelShowResult.add(pnl_IF_tmp);\n\t\t\t\t\tJLabel lblIF_tmp = new JLabel(lstInstructionsPipeLine.get(0).pipeline_stage);\n\t\t\t\t\tpnl_IF_tmp.add(lblIF_tmp);\n\t\t\t\t\tpanelShowResult.revalidate();\n\t\t\t\t\tpanelShowResult.repaint();\n\t\t\t\t\tmapAnswer.put(\"txt_\" + currentCycle + \"_\" + x, lstInstructionsPipeLine.get(x).pipeline_stage);/// k\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// v\n\n\t\t\t\t\t// s = \"document.instruction_table.column\" + currentCycle +\n\t\t\t\t\t// \".value =\n\t\t\t\t\t// parent.top_frame.lstInstructions[0].pipeline_stage;\";\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\tlstInstructionsPipeLine.get(0).pipeline_stage + \" - row=\" + x + \" col=\" + currentCycle);\n\t\t\t\t}\n\t\t\t\t// eval(s);\n\t\t\t\tSystem.out.println(\"Clk:\" + currentCycle);\n\t\t\t\tcurrentCycle++;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void forecast(int numFuturePoints) {\n\n int startPoint = 0, endPoint = actual.length;\n double lastValue = actual[startPoint],forecast;\n double[][] trainMatrix = new double[trainPoints + validationPoints][2];\n trainMatrix[0][0] = actual[startPoint];\n trainMatrix[0][1] = lastValue;\n\n for (int i = startPoint + 1; i < endPoint; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n\n lastValue = optAlpha * actual[i] + (1 - optAlpha) * lastValue;\n }\n\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n\n forecastDataSet = new DataSet();\n startPoint = actual.length;\n Observation observation;\n double forecastValue, lowerBound, upperBound;\n\n for (int i = startPoint; i < startPoint + numFuturePoints; i++) {\n forecastValue = lastValue;\n\n lastValue = optAlpha * forecastValue + (1 - optAlpha) * lastValue;\n\n if (forecastValue < 0) {\n forecastValue = 0l;\n lowerBound = 0l;\n upperBound = 0l;\n } else {\n forecastValue = BiasnessHandler.adjustBiasness(forecastValue, accuracyIndicators.getBias());\n lowerBound = forecastValue - errorBound;\n upperBound = forecastValue + errorBound;\n }\n\n observation = new Observation();\n observation.setIndependentValue(IndependentVariable.SLICE, i - startPoint);\n observation.setDependentValue(forecastValue);\n observation.setLowerDependentValue(lowerBound > 0 ? lowerBound : 0);\n observation.setUpperDependentValue(upperBound);\n forecastDataSet.add(observation);\n\n }\n }", "@Nonnull\n public LocateInitialRightPoint apply() {\n assertAlive();\n @Nullable LineSearchPoint lastPoint = null;\n try {\n int loops = 0;\n while (true) {\n if (null != lastPoint) lastPoint.freeRef();\n lastPoint = thisPoint;\n lastPoint.addRef();\n if (isSame(cursor, monitor, initialPoint, thisPoint)) {\n monitor.log(String.format(\"%s ~= %s\", initialPoint.point.rate, thisX));\n return this;\n } else if (thisPoint.point.getMean() > initialPoint.point.getMean()) {\n thisX = thisX / 13;\n } else if (thisPoint.derivative < initialDerivFactor * thisPoint.derivative) {\n thisX = thisX * 7;\n } else {\n monitor.log(String.format(\"%s <= %s\", thisPoint.point.getMean(), initialPoint.point.getMean()));\n return this;\n }\n\n if (null != thisPoint) thisPoint.freeRef();\n thisPoint = cursor.step(thisX, monitor);\n if (isSame(cursor, monitor, lastPoint, thisPoint)) {\n monitor.log(String.format(\"%s ~= %s\", lastPoint.point.rate, thisX));\n return this;\n }\n monitor.log(String.format(\"F(%s) = %s, evalInputDelta = %s\", thisX, thisPoint, thisPoint.point.getMean() - initialPoint.point.getMean()));\n if (loops++ > 50) {\n monitor.log(String.format(\"Loops = %s\", loops));\n return this;\n }\n }\n } finally {\n if (null != lastPoint) lastPoint.freeRef();\n }\n }", "@Override\r\n public TsData doInitialFiltering(X11Step step, TsData s, InformationSet info) {\r\n SymmetricFilter trendFilter = TrendCycleFilterFactory.makeTrendFilter(context.getFrequency());\r\n return new DefaultTrendFilteringStrategy(trendFilter, null).process(s,\r\n s.getDomain());\r\n }", "void steady_flight_at_given_speed (double step, double start_pitch) {\n // preamble: make sure inputs are in\n //computeFlowAndRegenPlotAndAdjust();\n\n //strut.aoa = 0.5; // ad hoc\n\n recomp_all_parts();\n\n double load = FoilBoard.this.load;\n\n // now moved into load box and bar \n //rider.weight = load - BOARD_WEIGHT - RIG_WEIGHT - FOIL_WEIGHT;\n\n steady_flight_at_given_speed___ok = false; // so far util done\n\n craft_pitch = start_pitch;\n // double prev_pitch = -20; // we nned it only because pitch value gets rounded somewhere in recomp_all_parts...\n while (craft_pitch < aoa_max && craft_pitch > aoa_min) {\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n double lift = foil_lift();\n if (lift == load // exact hit, done !(almost never happens, though)\n // happens due to rounding\n // || prev_pitch == craft_pitch\n ) \n break;\n if (step > 0 && lift > load) { // done or pivot\n if (step < 0.0025) { \n // done! flight is OK\n steady_flight_at_given_speed___ok = true;\n break;\n }\n step = -step/2; // shrink step & pivot\n } else if (step < 0 && lift < load) { \n step = -step/2; // shrink step & pivot\n } // else keep going with current stepa\n // prev_pitch = craft_pitch;\n craft_pitch += step;\n }\n\n // expect small increse in drag as the result\n vpp.set_mast_aoa_for_given_drag(total_drag()); // (wing.drag+stab.drag);\n recomp_all_parts();\n\n // old linearly increasing logic \n //find_aoa_of_min_drag();\n //if (foil_lift() > load_numeric) {\n // // need to reduce AoA\n // while (craft_pitch > aoa_min) {\n // craft_pitch -= 0.1;\n // System.out.println(\"-- reducing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() <= load_numeric) \n // break; // done\n // } \n //}\n //else if (foil_lift() < load_numeric) {\n // // need to increase AoA\n // while (craft_pitch < aoa_max) {\n // craft_pitch += 0.1;\n // System.out.println(\"-- increasing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() >= load_numeric) \n // break; // done\n // } \n //}\n\n }", "private void goForwardOne() \n {\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n m_source_.setIndex(m_source_.getIndex() + 1);\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n m_bufferOffset_ ++;\n }\n }", "public static double H1Spline1(double x) {\n double HSplineValue = 0.0;\n if (x >= 0 && x <= 1) {\n HSplineValue = (1.0 + (2.0 * x)) * (x - 1) * (x - 1);\n } else if (x < 0 && x >= -1) {\n HSplineValue = (1.0 - (2.0 * x)) * (x + 1) * (x + 1);\n }\n return HSplineValue;\n }", "void warmup(ConsolidatedSnapshot snapshot, double[] forecasts);", "public void setFlangeSpot() {\n\t\tint position;\n\t\tif (!isReverse) {\n\t\t\tif (!isWah && !isDistorted) {\n\t\t\t\tposition = alGetSourcei(musicSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(flangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isWah && isDistorted) {\n\t\t\t\tposition = alGetSourcei(wahDistortSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(wahDistortFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isWah) {\n\t\t\t\tposition = alGetSourcei(wahSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(wahFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isDistorted) {\n\t\t\t\tposition = alGetSourcei(distortSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(distortFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!isWah && !isDistorted) {\n\t\t\t\tposition = alGetSourcei(reverseSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(revFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isWah && isDistorted) {\n\t\t\t\tposition = alGetSourcei(revWahDistortSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(revWahDistortFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isWah) {\n\t\t\t\tposition = alGetSourcei(revWahSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(revWahFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t\telse if (isDistorted) {\n\t\t\t\tposition = alGetSourcei(revDistortSourceIndex, AL_SAMPLE_OFFSET);\n\t\t\t\talSourcei(revDistortFlangeSourceIndex, AL_SAMPLE_OFFSET, position - flangeOffset);\n\t\t\t}\n\t\t}\n\t\tif (flangeForward) {\n\t\t\tif (++flangeOffset >= flangeMS * 20)\n\t\t\t\tflangeForward = false;\n\t\t}\n\t\telse {\n\t\t\tif (--flangeOffset <= flangeMS * 10)\n\t\t\t\tflangeForward = true;\n\t\t}\n\t}", "private synchronized EventType scheduleNextEvent()\n {\n Date today = new Date();\n Date today_sunrise = ss.getSunrise(latitude, longitude);\n Date today_sunset = ss.getSunset(latitude, longitude);\n Date today_off = ss.getOff(off);\n\n // get sunrise and sunset time for tomorrow\n Calendar tomorrow = Calendar.getInstance();\n tomorrow.roll(Calendar.DATE, true);\n Date tomorrow_sunrise = ss.getSunrise(latitude, longitude, tomorrow.getTime());\n Date tomorrow_sunset = ss.getSunset(latitude, longitude, tomorrow.getTime());\n Date tomorrow_off = ss.getOff(off);\n\n // determine if sunrise or sunset is the next event\n if (today.after(today_sunset)) {\n // get tomorrow's date time\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + tomorrow_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule tomorrow's sunrise as next event\n timer.schedule(new SunriseTask(), tomorrow_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = tomorrow_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else if (today.after(today_sunrise)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNSET \");\n System.out.println(\" @ \" + today_sunset);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_sunset);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunsetToday;\n return nextEvent;\n } else if (today.after(today_off)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: OFF \");\n System.out.println(\" @ \" + today_off);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_off);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + today_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunrise as next event\n timer.schedule(new SunriseTask(), today_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = today_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseToday;\n return nextEvent;\n }\n }", "public static void main(String[] args) {\r\n double d = 3.5;\r\n int i = 2;\r\n System.out.println(d/i);\r\n MovingAverage movingAverage = new A0346MovingAveragefromDataStream().new MovingAverage(3);\r\n System.out.println(movingAverage.next(1));\r\n System.out.println(movingAverage.next(10));\r\n System.out.println(movingAverage.next(3));\r\n System.out.println(movingAverage.next(5));\r\n }", "void burnIn(DoubleMatrix1D startingPoint){\n \n System.out.println(\"Starting burn-in for SubThreshSampler. x=\"+startingPoint);\n \n x = startingPoint;\n\n initScale();\n \n if(!adaptiveScale)\n tuneScale();//want to start out with a good scale\n \n //ok now let's burn in until the first and second half of our burn-in periods\n //have nicely overlapping distributions (say, the difference in means is less than \n //half the st. dev. for each variable (using the less of 1st, 2nd half st. dev.))\n ArrayList<DoubleMatrix1D> burnInSamp = new ArrayList<>();\n DoubleMatrix1D firstHalfSum = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D secondHalfSum = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D firstHalfSumSq = DoubleFactory1D.dense.make(numDOFs);\n DoubleMatrix1D secondHalfSumSq = DoubleFactory1D.dense.make(numDOFs);\n \n boolean done = false;\n\n int nhalf = 0;\n \n for(int b=0; !done; b++){//burn-in samples\n \n while(true) {//draw until acceptable candidate found\n DoubleMatrix1D y = nextCandidate();\n if(checkCandidate(y))//accepting\n break;\n }\n \n burnInSamp.add(x);\n secondHalfSum.assign(x,Functions.plus);\n DoubleMatrix1D xsq = x.copy().assign(Functions.square);\n secondHalfSumSq.assign(xsq,Functions.plus);\n \n if(b%2==1){//stuff to be done after every pair of samples\n \n //update first and second halves\n DoubleMatrix1D y = burnInSamp.get(b/2);\n firstHalfSum.assign(y,Functions.plus);\n secondHalfSum.assign(y,Functions.minus);\n DoubleMatrix1D ysq = y.copy().assign(Functions.square);\n firstHalfSumSq.assign(ysq,Functions.plus);\n secondHalfSumSq.assign(ysq,Functions.minus);\n \n //now sums are up to date\n //let's try the overlap condition (except right at beginning, hence b>10)\n if(b>10){\n nhalf = b/2+1;//number of samples in each half\n DoubleMatrix1D meanDiff = secondHalfSum.copy().assign(firstHalfSum,Functions.minus);\n meanDiff.assign(Functions.mult(1./nhalf));\n\n DoubleMatrix1D std1 = getStDVec(firstHalfSum,firstHalfSumSq,nhalf);\n DoubleMatrix1D std2 = getStDVec(secondHalfSum,secondHalfSumSq,nhalf);\n\n\n done = true;//overlap condition met\n for(int dof=0; dof<numDOFs; dof++){\n if( meanDiff.get(dof) > 0.5*Math.min(std1.get(dof),std2.get(dof)) ){\n done = false;\n break;\n }\n }\n }\n }\n \n if(done)\n System.out.println(\"Burn-in complete at sample \"+b);\n else if( (b+1)%1000000 == 0 )\n System.out.println(\"Burn-in sample \"+b+\" done. x: \"+x);\n }\n \n //we can get a useFrequency from the second half\n DoubleMatrix1D var = getStDVec(secondHalfSum,secondHalfSumSq,nhalf).assign(Functions.square);//full-sequence variance\n DoubleMatrix1D mean = secondHalfSum.copy().assign(Functions.mult(1./nhalf));\n \n //autocorrelation can get a little messy for high shifts\n //but if each dimension's autocorrelation has dropped below 0.1*var for some useFrequency < uf\n //then uf should be a good thinning (minimally correlated samples, for each dimension)\n //we'll use dimGood to keep track of which dimensions have had this\n BitSet dimGood = new BitSet();\n double bestAutorat[] = new double[numDOFs];//to keep track of progress in each dimension (best so far)\n \n \n for(int uf=1; uf<nhalf; uf++){\n \n //calculate autocorrelation (in the sense of covariance of sequence with shifted sequence)\n DoubleMatrix1D autocorr = DoubleFactory1D.dense.make(numDOFs);\n for(int s=nhalf; s<2*nhalf-uf; s++){//start with cross-sum\n DoubleMatrix1D crossTerm = burnInSamp.get(s).copy().assign(mean,Functions.minus);\n DoubleMatrix1D relSamp2 = burnInSamp.get(s+uf).copy().assign(mean,Functions.minus);;\n crossTerm.assign( relSamp2, Functions.mult );\n autocorr.assign( crossTerm, Functions.plus );\n }\n //normalize\n autocorr.assign(Functions.mult(1./(nhalf-uf)));\n \n //for each DOF,\n //autocorr is now the average product of sequence*(sequence shifted by uf)\n //minus the square of the mean of the sequence\n \n DoubleMatrix1D autorat = autocorr.copy().assign( var, Functions.div );\n \n for(int dim=0; dim<numDOFs; dim++){\n if(autorat.get(dim)<0.1)\n dimGood.set(dim);\n bestAutorat[dim] = Math.min(bestAutorat[dim],autorat.get(dim));\n }\n \n if(dimGood.cardinality()==numDOFs){//all dimensions good\n //if( autorat.zSum()/numDOFs < 0.1 ){//on average, autocorrelation not more than 0.1x variance\n //autocorrelation should ultimately drop to 0, and it may have negative values\n //but it may be comparable to variance for very small uf\n useFrequency = uf;\n System.out.println(\"Setting useFrequency=\"+useFrequency+\". Variance: \"+var+\" Autocorr: \"+autocorr);\n break;\n }\n \n if(uf==nhalf-1){\n useFrequency = uf;\n System.out.println(\"Warning: high autocorrelation detected at all useFrequencies! \"\n + \"Setting useFrequency=\"+uf);\n }\n else if( (uf+1)%1000000 == 0 ){\n System.out.print(\"Trying useFrequency \"+uf+\n \". Best autocorrelation/variance ratios so far: \");\n for(int dof=0; dof<numDOFs; dof++)\n System.out.print(bestAutorat[dof]+\" \");\n System.out.println();\n }\n }\n }", "private void scout() {\n\t\ttargetFlower = null;\n\t\t// fly to flower if nearby\n\t\tif(foundFlower()) {\n\t\t\tstate = \"TARGETING\";\n\t\t}\n\t\t// otherwise keep scouting\n\t\telse{\n\t\t\t// change angle randomly during flight\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "Stream<DataPoint> getHistoryData(Symbol symbol, LocalDateTime startTime, LocalDateTime endTime, int numberOfPoints);", "@SuppressWarnings(\"unchecked\")\n @Test\n public void singleShock() {\n MarketDataShock shock = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(shock);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.5, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "@Override\n\tpublic float getInterpolation(float input) {\n\t\tdouble a = input * PI_3;\n\t\tdouble b = Math.sin(a) / a;\n\t\tdouble c = b * (input * -1 + 1);\n\t\treturn (float) c * -1 + 1;\n\n\t}", "public static PredictedPoint fastTick(PredictedPoint last, double angle, double maxVelocity) {\n double offset = R.normalRelativeAngle(angle - last.heading);\n double turn = BackAsFrontRobot2.getQuickestTurn(offset);\n int ahead = offset == turn ? +1 : -1;\n\n double newHeading = getNewHeading(last.heading, turn, last.velocity);\n\n double newVelocity = getTickVelocity(last.velocity, maxVelocity, ahead, Double.POSITIVE_INFINITY);\n\n return last.tick(newHeading, newVelocity);\n }", "private void follow() {\n\t\t// calculate distance back to hive\n\t\tdouble distToHive = grid.getDistance(grid.getLocation(this),grid.getLocation(hive));\n\t\t// if close to flower from dance information, start scouting\n\t\tif(distToHive > followDist - 5) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying in direction of dance\n\t\telse{\n\t\t\t// deviate slightly from correct angle because bee's aren't perfect (I don't think)\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/50, Math.PI/50);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public MoveAddress nextVariationFirstState() {\n MoveAddress other = nextVariation(1);\n return other.firstChild(1, 0);\n }", "public double getSpread(double delta, boolean upGoing) {\n\t\tTtStatSeg seg;\n\t\t\n\t\tfor(int k=0; k<spread.size(); k++) {\n\t\t\tseg = spread.get(k);\n\t\t\tif(delta >= seg.minDelta && delta <= seg.maxDelta) {\n\t\t\t\treturn Math.min(seg.interp(delta), TauUtil.DEFSPREAD);\n\t\t\t}\n\t\t}\n\t\tif(upGoing) {\n\t\t\treturn Math.min(spread.get(0).interp(delta), TauUtil.DEFSPREAD);\n\t\t}\n\t\treturn TauUtil.DEFSPREAD;\n\t}", "private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public FordFulkerson(FlowNetwork G, int s, int t) {\n\t validate(s, G.V());\n\t validate(t, G.V());\n\t if (s == t) throw new IllegalArgumentException(\"Source equals sink\");\n\t if (!isFeasible(G, s, t)) throw new IllegalArgumentException(\"Initial flow is infeasible\");\n\n\t // while there exists an augmenting path, use it\n\t value = excess(G, t);\n\t while (hasAugmentingPath(G, s, t)) {\n\n\t // compute bottleneck capacity\n\t double bottle = Double.POSITIVE_INFINITY;\n\t for (int v = t; v != s; v = edgeTo[v].other(v)) {\n\t bottle = Math.min(bottle, edgeTo[v].residualCapacityTo(v));\n\t }\n\n\t // augment flow\n\t for (int v = t; v != s; v = edgeTo[v].other(v)) {\n\t edgeTo[v].addResidualFlowTo(v, bottle); \n\t }\n\n\t value += bottle;\n\t }\n\n\t // check optimality conditions\n\t assert check(G, s, t);\n\t }", "public FordFulkerson(FlowNetwork G, int s, int t) {\r\n V = G.V();\r\n if (s == t)\r\n throw new IllegalArgumentException(\"Source equals sink\");\r\n // if (!isFeasible(G, s, t)) throw new\r\n // IllegalArgumentException(\"Initial flow is\r\n // infeasible\");\r\n\r\n // while there exists an augmenting path, use it\r\n value = excess(G, t);\r\n while (hasAugmentingPath(G, s, t)) {\r\n\r\n // compute bottleneck capacity\r\n double bottle = Double.POSITIVE_INFINITY;\r\n for (int v = t; v != s; v = edgeTo[v].other(v)) {\r\n bottle = Math.min(bottle, edgeTo[v].residualCapacityTo(v));\r\n }\r\n\r\n // augment flow\r\n for (int v = t; v != s; v = edgeTo[v].other(v)) {\r\n edgeTo[v].addResidualFlowTo(v, bottle);\r\n }\r\n\r\n value += bottle;\r\n }\r\n\r\n // check optimality conditions\r\n // assert check(G, s, t);\r\n }", "void makeService(int loc_temp,int des_temp)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint last_direction = 0;\r\n\t\t\tint[] shortest_path = new int[6400];\r\n\t\t\tint j_current = loc_temp % 80;\r\n\t\t\tint i_current = loc_temp / 80;\r\n\t\t\tBFS.setShortest(des_temp,shortest_path,BFS.adj_const);\r\n\t\t\tint temp = shortest_path[loc_temp];\r\n\t\t\twhile(temp != -1)\r\n\t\t\t{\r\n\t\t\t\tint length_min = BFS.getShortest(temp, des_temp,BFS.adj_const);\r\n\t\t\t\tint direction = -1;\r\n\t\t\t\tint flow_min = Main.MAX_INT;\r\n\t\t\t\tif((i_current-1)>=0 && BFS.adj_const[(i_current-1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current-1][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current-1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 0;//up\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current-1][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif((i_current+1)<80 && BFS.adj_const[(i_current+1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current+1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 1;//down\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tif((j_current-1)>=0 && BFS.adj_const[i_current*80+j_current-1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current-1][0]<flow_min)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current-1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 2;//left\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current-1][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif((j_current+1)<80 && BFS.adj_const[i_current*80+j_current+1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][0]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current+1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 3;//right\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tLight light = Traffic.findLight(i_current,j_current);\r\n\t\t\t\tif(light != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tboolean first = true;\r\n\t\t\t\t\twhile(!leaveLight(light,last_direction,direction))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmeet_light = true;\r\n\t\t\t\t\t\tif(first)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Waiting at a traffic light\");\r\n\t\t\t\t\t\t\tfirst = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmeet_light = false;\r\n\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Going through a traffic light\");\r\n\t\t\t\t}\r\n\t\t\t\tswitch(direction)\r\n\t\t\t\t{\r\n\t\t\t\tcase 0 ://up\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current-1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current-1][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1 ://down\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current+1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 ://left\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current-1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current-1][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 ://right\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current+1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t\tlast_direction = direction;\r\n\t\t\t\tloc = new Coordinate(i_current,j_current);\r\n\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc);\r\n\t\t\t\ttemp = shortest_path[i_current*80+j_current];\r\n\t\t\t}\t\t\r\n\t\t\tSystem.out.println(\"Passenger\" + passenger.loc + passenger.des + \": Taxi-\" + id + \" arrives at \" + des);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");;\r\n\t\t}\r\n\t}", "public void apply(com.esotericsoftware.spine.Skeleton r27) {\n /*\n r26 = this;\n r0 = r26;\n r7 = r0.events;\n r0 = r26;\n r2 = r0.listeners;\n r0 = r2.size;\n r23 = r0;\n r20 = 0;\n L_0x000e:\n r0 = r26;\n r2 = r0.tracks;\n r2 = r2.size;\n r0 = r20;\n if (r0 < r2) goto L_0x0019;\n L_0x0018:\n return;\n L_0x0019:\n r0 = r26;\n r2 = r0.tracks;\n r0 = r20;\n r17 = r2.get(r0);\n r17 = (com.esotericsoftware.spine.AnimationStatePR.TrackEntry) r17;\n if (r17 != 0) goto L_0x002a;\n L_0x0027:\n r20 = r20 + 1;\n goto L_0x000e;\n L_0x002a:\n r2 = 0;\n r7.size = r2;\n r0 = r17;\n r5 = r0.time;\n r0 = r17;\n r4 = r0.lastTime;\n r0 = r17;\n r0 = r0.endTime;\n r18 = r0;\n r0 = r17;\n r6 = r0.loop;\n if (r6 != 0) goto L_0x0047;\n L_0x0041:\n r2 = (r5 > r18 ? 1 : (r5 == r18 ? 0 : -1));\n if (r2 <= 0) goto L_0x0047;\n L_0x0045:\n r5 = r18;\n L_0x0047:\n r0 = r17;\n r0 = r0.previous;\n r25 = r0;\n r0 = r17;\n r2 = r0.mixDuration;\n r3 = 0;\n r2 = (r2 > r3 ? 1 : (r2 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x018b;\n L_0x0056:\n r0 = r17;\n r2 = r0.mixTime;\n r0 = r17;\n r3 = r0.mixDuration;\n r8 = r2 / r3;\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r2 < 0) goto L_0x006d;\n L_0x0066:\n r8 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = 0;\n r0 = r17;\n r0.mixDuration = r2;\n L_0x006d:\n if (r25 != 0) goto L_0x00e0;\n L_0x006f:\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.mix(r3, r4, r5, r6, r7, r8);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r9 = \"none -> \";\n r3.<init>(r9);\n r0 = r17;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \": \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n L_0x009a:\n r21 = 0;\n r0 = r7.size;\n r24 = r0;\n L_0x00a0:\n r0 = r21;\n r1 = r24;\n if (r0 < r1) goto L_0x0196;\n L_0x00a6:\n if (r6 == 0) goto L_0x01d1;\n L_0x00a8:\n r2 = r4 % r18;\n r3 = r5 % r18;\n r2 = (r2 > r3 ? 1 : (r2 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x00d6;\n L_0x00b0:\n r2 = r5 / r18;\n r0 = (int) r2;\n r16 = r0;\n r0 = r17;\n r2 = r0.listener;\n if (r2 == 0) goto L_0x00c6;\n L_0x00bb:\n r0 = r17;\n r2 = r0.listener;\n r0 = r20;\n r1 = r16;\n r2.complete(r0, r1);\n L_0x00c6:\n r21 = 0;\n r0 = r26;\n r2 = r0.listeners;\n r0 = r2.size;\n r24 = r0;\n L_0x00d0:\n r0 = r21;\n r1 = r24;\n if (r0 < r1) goto L_0x01db;\n L_0x00d6:\n r0 = r17;\n r2 = r0.time;\n r0 = r17;\n r0.lastTime = r2;\n goto L_0x0027;\n L_0x00e0:\n r0 = r25;\n r11 = r0.time;\n r0 = r25;\n r2 = r0.loop;\n if (r2 != 0) goto L_0x00f6;\n L_0x00ea:\n r0 = r25;\n r2 = r0.endTime;\n r2 = (r11 > r2 ? 1 : (r11 == r2 ? 0 : -1));\n if (r2 <= 0) goto L_0x00f6;\n L_0x00f2:\n r0 = r25;\n r11 = r0.endTime;\n L_0x00f6:\n r0 = r17;\n r2 = r0.animation;\n if (r2 != 0) goto L_0x0144;\n L_0x00fc:\n r0 = r25;\n r9 = r0.animation;\n r0 = r25;\n r13 = r0.loop;\n r14 = 0;\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r15 = r2 - r8;\n r10 = r27;\n r12 = r11;\n r9.mix(r10, r11, r12, r13, r14, r15);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r0 = r25;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \" -> none: \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n L_0x012f:\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r2 < 0) goto L_0x009a;\n L_0x0135:\n com.badlogic.gdx.utils.Pools.free(r25);\n r2 = 0;\n r0 = r17;\n r0.previous = r2;\n r2 = 0;\n r0 = r17;\n r0.mixDuration = r2;\n goto L_0x009a;\n L_0x0144:\n r0 = r25;\n r9 = r0.animation;\n r0 = r25;\n r13 = r0.loop;\n r14 = 0;\n r10 = r27;\n r12 = r11;\n r9.apply(r10, r11, r12, r13, r14);\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.mix(r3, r4, r5, r6, r7, r8);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r0 = r25;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \" -> \";\n r3 = r3.append(r9);\n r0 = r17;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \": \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n goto L_0x012f;\n L_0x018b:\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.apply(r3, r4, r5, r6, r7);\n goto L_0x009a;\n L_0x0196:\n r0 = r21;\n r19 = r7.get(r0);\n r19 = (com.esotericsoftware.spine.Event) r19;\n r0 = r17;\n r2 = r0.listener;\n if (r2 == 0) goto L_0x01af;\n L_0x01a4:\n r0 = r17;\n r2 = r0.listener;\n r0 = r20;\n r1 = r19;\n r2.event(r0, r1);\n L_0x01af:\n r22 = 0;\n L_0x01b1:\n r0 = r22;\n r1 = r23;\n if (r0 < r1) goto L_0x01bb;\n L_0x01b7:\n r21 = r21 + 1;\n goto L_0x00a0;\n L_0x01bb:\n r0 = r26;\n r2 = r0.listeners;\n r0 = r22;\n r2 = r2.get(r0);\n r2 = (com.esotericsoftware.spine.AnimationStatePR.AnimationStateListener) r2;\n r0 = r20;\n r1 = r19;\n r2.event(r0, r1);\n r22 = r22 + 1;\n goto L_0x01b1;\n L_0x01d1:\n r2 = (r4 > r18 ? 1 : (r4 == r18 ? 0 : -1));\n if (r2 >= 0) goto L_0x00d6;\n L_0x01d5:\n r2 = (r5 > r18 ? 1 : (r5 == r18 ? 0 : -1));\n if (r2 < 0) goto L_0x00d6;\n L_0x01d9:\n goto L_0x00b0;\n L_0x01db:\n r0 = r26;\n r2 = r0.listeners;\n r0 = r21;\n r2 = r2.get(r0);\n r2 = (com.esotericsoftware.spine.AnimationStatePR.AnimationStateListener) r2;\n r0 = r20;\n r1 = r16;\n r2.complete(r0, r1);\n r21 = r21 + 1;\n goto L_0x00d0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.esotericsoftware.spine.AnimationStatePR.apply(com.esotericsoftware.spine.Skeleton):void\");\n }", "@Test\n public void multipleShocksOnSameDataReversed() {\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(relativeShift, absoluteShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.6, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "public void setFurthestPoint(java.lang.Integer value) {\n this.furthest_point = value;\n }", "@Override\n public float nextFloat() {\n nextState();\n return outputFloat();\n }", "@SuppressWarnings(\"unchecked\")\n\t\tprivate State<T> createFirstMandatoryStateOfLoop(final State<T> sinkState) {\n\n\t\t\tfinal IterativeCondition<T> currentFilterFunction = (IterativeCondition<T>) currentPattern.getCondition();\n\t\t\tfinal State<T> firstState = createNormalState();\n\n\t\t\tfirstState.addTake(sinkState, currentFilterFunction);\n\t\t\tfinal IterativeCondition<T> ignoreCondition = getIgnoreCondition(currentPattern);\n\t\t\tif (ignoreCondition != null) {\n\t\t\t\tfirstState.addIgnore(ignoreCondition);\n\t\t\t}\n\t\t\treturn firstState;\n\t\t}", "public void propagate(double t0, double tf)\n\t{\n\t\tdouble[] temp = new double[6];\n\n\t\t// Determine step size\n\t\tdouble n = this.meanMotion();\n\t\tdouble period = this.period();\n\t\tdouble dt = period / steps;\n\t\tif ((t0 + dt) > tf) // check to see if we're going past tf\n\t\t{\n\t\t\tdt = tf - t0;\n\t\t}\n\n\t\t// determine initial E and M\n\t\tdouble sqrome2 = Math.sqrt(1.0 - this.e * this.e);\n\t\tdouble cta = Math.cos(this.ta);\n\t\tdouble sta = Math.sin(this.ta);\n\t\tdouble sine0 = (sqrome2 * sta) / (1.0 + this.e * cta);\n\t\tdouble cose0 = (this.e + cta) / (1.0 + this.e * cta);\n\t\tdouble e0 = Math.atan2(sine0, cose0);\n\n\t\tdouble ma = e0 - this.e * Math.sin(e0);\n\n\t\t// determine sqrt(1+e/1-e)\n\n\t\t//double q = Math.sqrt((1.0 + this.e) / (1.0 - this.e));\n\n\t\t// initialize t\n\n\t\tdouble t = t0;\n\n\t\twhile (t < tf)\n\t\t{\n\t\t\tma = ma + n * dt;\n\t\t\tdouble ea = solveKepler(ma, this.e);\n\n\t\t\tdouble sinE = Math.sin(ea);\n\t\t\tdouble cosE = Math.cos(ea);\n\t\t\tdouble den = 1.0 - this.e * cosE;\n\n\t\t\tdouble sinv = (sqrome2 * sinE) / den;\n\t\t\tdouble cosv = (cosE - this.e) / den;\n\n\t\t\tthis.ta = Math.atan2(sinv, cosv);\n\t\t\tif (this.ta < 0.0)\n\t\t\t{\n\t\t\t\tthis.ta = this.ta + 2.0 * Constants.pi;\n\t\t\t}\n\n\t\t\tt = t + dt;\n\n\t\t\ttemp = this.randv();\n\t\t\tthis.rv = new VectorN(temp);\n\n\t\t\tif ((t + dt) > tf)\n\t\t\t{\n\t\t\t\tdt = tf - t;\n\t\t\t}\n\n\t\t}\n\t}", "public void compute(double timeIn)\n {\n this.currentTime.set(timeIn);\n\n double time = timeIn;\n if (time > x[numberOfPoints.getValue() - 1])\n time = x[numberOfPoints.getValue() - 1];\n if (time < x[0])\n time = x[0];\n\n int index = determineSplineIndex(time);\n\n double h = time - x[index];\n\n double h2 = MathTools.square(h);\n double h3 = h2 * h;\n double h4 = h3 * h;\n double h5 = h4 * h;\n\n for (int i = 0; i < numberOfSplines; i++)\n {\n splines[i].value(index, h, h2, h3, h4, h5, position[i], velocity[i], acceleration[i], jerk[i], null, null);\n }\n\n }", "private void setSteeringContinuous(double FL, double FR, double BL, double BR) {\n double FLoffset = -1, FRoffset = -1, BLoffset = 2, BRoffset = 2;\n\n FLpid.setSetpoint(FL + FLoffset);\n FRpid.setSetpoint(FR + FRoffset);\n BRpid.setSetpoint(BR + BRoffset);\n BLpid.setSetpoint(BL + BLoffset);\n\n steeringFL.moveAtPercent(FLpid.calculate(FLcoder.getAbsolutePosition()));\n steeringFR.moveAtPercent(FRpid.calculate(FRcoder.getAbsolutePosition()));\n steeringBL.moveAtPercent(BLpid.calculate(BLcoder.getAbsolutePosition()));\n steeringBR.moveAtPercent(BRpid.calculate(BRcoder.getAbsolutePosition()));\n }", "@Override\n protected void execute() {\n double now = Timer.getFPGATimestamp();\n double deltaT = now - startT;\n if(deltaT < 1){\n Robot.hatchIntake.hatchSolenoid(false);\n }else if(deltaT > 1 && deltaT < 1.5){\n Robot.hatchIntake.hatchSolenoid(true);\n }\n }", "@NotNull\n private Coordinate flipH() {\n angle = 180 - angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(90 - angle))),\n this.centerPointCoordinate.getYCoordinate());\n return nextCenterPointCoordinate;\n }", "private TimeSeries initMovingTimeSeries(int maxBarCount) {\n //TimeSeries series = CsvTradesLoader.loadBitstampSeries();\n //TimeSeries series = CsvTicksLoader.load(\"EURUSD_Daily_201701020000_201712290000.csv\");\n //TimeSeries series = CsvTicksLoader.load(\"2019_D.csv\");\n\n TimeSeries series = new BaseTimeSeries(selected.getPeriod().getName());\n\n for (PeriodBar periodBar : selected.getPeriod().getBars()) {\n ZonedDateTime time = periodBar.getEndTime();\n double open = periodBar.getOpenPrice().doubleValue();\n double close = periodBar.getClosePrice().doubleValue();\n double max = periodBar.getMaxPrice().doubleValue();\n double min = periodBar.getMinPrice().doubleValue();\n double vol = periodBar.getVolume().doubleValue();\n\n series.addBar(new BaseBar(time, open, max, min, close, vol));\n }\n\n System.out.print(\"Initial bar count: \" + series.getBarCount());\n // Limitating the number of bars to maxBarCount\n series.setMaximumBarCount(maxBarCount);\n LAST_BAR_CLOSE_PRICE = series.getBar(series.getEndIndex()).getClosePrice();\n System.out.println(\" (limited to \" + maxBarCount + \"), close price = \" + LAST_BAR_CLOSE_PRICE);\n\n //live = CsvTicksLoader.load(\"2020_D.csv\");\n //live = CsvTicksLoader.load(\"2020_D.csv\");\n\n live = new BaseTimeSeries(selected.getName());\n\n for (ForwardTestBar forwardTestBar : selected.getBars()) {\n ZonedDateTime time = forwardTestBar.getEndTime();\n double open = forwardTestBar.getOpenPrice().doubleValue();\n double close = forwardTestBar.getClosePrice().doubleValue();\n double max = forwardTestBar.getMaxPrice().doubleValue();\n double min = forwardTestBar.getMinPrice().doubleValue();\n double vol = forwardTestBar.getVolume().doubleValue();\n\n live.addBar(new BaseBar(time, open, max, min, close, vol));\n }\n\n return series;\n }", "@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n while (!sh.liftReady && time.milliseconds() < 1500) {\n }\n //\n sh.pivotPID(650, true, .07/650, .01, .01/650, 2);\n sh.pivotPID(640, false, .07/640, .01, .01/640, 2);\n\n\n\n }", "public float getSat() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 4);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 4);\n\t\t}\n\t}", "private void startHeavyLifting(int first, int count)\n {\n }", "private State<T> createMiddleStates(final State<T> sinkState) {\n\n\t\t\tState<T> lastSink = sinkState;\n\t\t\twhile (currentPattern.getPrevious() != null) {\n\t\t\t\tlastSink = convertPattern(lastSink);\n\t\t\t\tcurrentPattern = currentPattern.getPrevious();\n\n\t\t\t\tfinal Time currentWindowTime = currentPattern.getWindowTime();\n\t\t\t\tif (currentWindowTime != null && currentWindowTime.toMilliseconds() < windowTime) {\n\t\t\t\t\t// the window time is the global minimum of all window times of each state\n\t\t\t\t\twindowTime = currentWindowTime.toMilliseconds();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn lastSink;\n\t\t}", "FuelingStation createFuelingStation();", "public double getFeedforeward() {\n return 0.0;\n }", "@Test\r\n\tpublic void exerciseMovingAverage() {\n\t\tList<Integer> temparaturArray = Arrays.asList(8, 7, 6, 6, 7, 7, 8, 10, 13, 16, 10, 20, 23, 26, 30, 29, 27, 45, 24, 23, 20, 18, 15, 11);\r\n\t\tObservable<Integer> temparaturSequence = Observable\r\n\t\t\t\t.interval(0, 1L, TimeUnit.HOURS, testScheduler)\r\n\t\t\t\t.take(temparaturArray.size())\r\n\t\t\t\t.map(i -> temparaturArray.get(i.intValue()));\r\n\t\t\r\n\t\t// TODO: calculate the moving average (SMA) of the given temperature sequence (each hour of a single day).\r\n\t\t// use the previous three values for each data point.\r\n // HINT: use a suitable overload of the same method used in \"Batching\"\r\n // and then calculate the average of each batch using LINQ\r\n // HINT: don't forget to pass the scheduler\r\n\t\tObservable<Double> movingAverage = Observable.empty();\r\n\r\n\t\t// verify\r\n\t\tTestSubscriber<Double> testSubscriber = new TestSubscriber<>();\r\n\t\tmovingAverage.subscribe(testSubscriber);\r\n\r\n\t\t// let the time elapse until completion\r\n\t\ttestScheduler.advanceTimeBy(1, TimeUnit.DAYS);\r\n\t\t\r\n\t\tlog(testSubscriber.getOnNextEvents());\r\n\t\t\r\n\t\ttestSubscriber.assertNoErrors();\r\n\t\ttestSubscriber.assertCompleted();\r\n\t\t\r\n\t\t// expected values:\r\n\t\tList<Double> expected = Arrays.asList(\r\n\t\t\t\t7.0, 6.333333333333333, 6.333333333333333, 6.666666666666667, 7.333333333333333, \r\n\t\t\t\t8.333333333333334, 10.333333333333334, 13.0, 13.0, 15.333333333333334, \r\n\t\t\t\t17.666666666666668, 23.0, 26.333333333333332, 28.333333333333332, \r\n\t\t\t\t28.666666666666668, 33.666666666666664, 32.0, 30.666666666666668, \r\n\t\t\t\t22.333333333333332, 20.333333333333332, 17.666666666666668, 14.666666666666666, \r\n\t\t\t\t// the last two values have limited input, i.e.\r\n\t\t\t\t// (15+11)/2 and (11)/1\r\n\t\t\t\t13.0, 11.0);\r\n\t\ttestSubscriber.assertReceivedOnNext(expected);\r\n\t\t\r\n\t}", "protected void initFirstFlow() {\n\t\tSet<Long> edges = graph.getEdges();\n\t\t// in the AIGraph implementation. the integer value\n\t\t// for unassigned attributes is -1\n\t\tint null_representation = -1;\n\t\tfor (Long eID : edges) {\n\t\t\t// only if the edge has no flow, then set it to zero\n\t\t\t// else let it be it's given value\n\t\t\tif (f(eID) == null_representation) {\n\t\t\t\tf_set(eID, 0);\n\t\t\t}\n\t\t}\n\t}", "public void pull() {\r\n\t\tcurrentSpeed = speed.get((speed.indexOf(currentSpeed)+1)%3); \r\n\t\tSystem.out.println(\"Speed of fan changed to: \" + currentSpeed);\r\n\t}", "public void stepForward() {\n\t\tposition = forwardPosition();\n\t}", "@Override\r\n protected double computeValue()\r\n {\n return interpFlow.getValue(Scheduler.getCurrentTime());\r\n }", "private void planDynamicStairs() throws GameActionException, HungryException {\r\n\t\tInteger fluxHeight = gameMap.get(fluxInfo.location).totalHeight;\r\n\t\tif (fluxHeight == fluxHeightWhenStairsPlanned){\r\n\t\t\tif (DEBUG) System.out.println(\"No need to plan stairs now\");\r\n\t\t\t//return; /* No return for now. Always plan stairs, so no stupid block lockups will occur */\r\n\t\t}\r\n\t\t\r\n\t\tif (DEBUG) System.out.println(\"-----TOWER-----\");\r\n\t\tDirection randDir = navigation.getRandomDirection();\r\n\t\tMapLocation start1 = fluxInfo.location.add(randDir).add(randDir);\r\n\t\tMapLocation start2 = fluxInfo.location.subtract(randDir).subtract(randDir);\r\n\t\tif ((gameMap.get(start1) == null) || (gameMap.get(start2) == null))\r\n\t\t\t/* unlucky - start position wasn't scanned yet */\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfluxHeightWhenStairsPlanned = fluxHeight;\r\n\t\t\r\n\t\tList<MapLocation> fluxPath1 = navigation.findPathUsingAStar(gameMap, start1, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath1);\r\n\t\tList<MapLocation> fluxPath2 = navigation.findPathUsingAStar(gameMap, start2, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath2);\r\n\t\tCollections.reverse(fluxPath1);\r\n\t\tCollections.reverse(fluxPath2);\r\n\t\tList<MapLocation> result = new ArrayList<MapLocation>();\r\n\t\twhile ((fluxPath1.size() > 0) && (fluxPath2.size() > 0) && (fluxPath1.get(0).equals(fluxPath2.get(0)))){\r\n\t\t\tresult.add(fluxPath1.remove(0));\r\n\t\t\tfluxPath2.remove(0);\r\n\t\t}\r\n\t\tCollections.reverse(result);\r\n\t\tif (result.size() >= stairs.size())\r\n\t\t\t/* prefer fresh data, but not too short */\r\n\t\t\tstairs = result;\r\n\t\tif (DEBUG) System.out.println(result);\r\n\t\tif (DEBUG) System.out.println(navigation.changePathToDirections(result));\r\n\t\tif (DEBUG) System.out.println(\"----/TOWER-----\");\r\n\t}", "private boolean parseForecasts(String rawData) {\n if (rawData == null) {\n return false;\n }\n\n if (!forecasts.isEmpty()) {\n forecasts.clear();\n }\n\n try {\n // Make a json array from the response string\n JSONObject jsonObj = new JSONObject( rawData );\n\n locationName = jsonObj.getString(\"LocationName\");\n waveModelName = jsonObj.getJSONObject(\"WaveModel\").getString(\"Description\");\n waveModelRun = jsonObj.getJSONObject(\"WaveModel\").getString(\"ModelRun\");\n\n // We need to save the model run for later so we can check for updates\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEEE MMMM dd, yyyy HHZ\");\n try {\n mLastFetchDate = formatter.parse(waveModelRun.replaceAll(\"z$\", \"+0000\"));\n\n // Add the hindcasting offset\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(mLastFetchDate);\n calendar.add(Calendar.HOUR_OF_DAY, 5);\n mLastFetchDate = calendar.getTime();\n } catch (Exception e) {\n return false;\n }\n\n windModelName = jsonObj.getJSONObject(\"WindModel\").getString(\"Description\");\n windModelRun = jsonObj.getJSONObject(\"WindModel\").getString(\"ModelRun\");\n\n // Get alllllll of the forecast data!\n JSONArray forecastJsonAray = jsonObj.getJSONArray(\"ForecastData\");\n dayCount = 0;\n int forecastOffset = 0;\n for (int i = FORECAST_DATA_BEGIN_INDEX; i < FORECAST_DATA_COUNT; i++) {\n Forecast newForecast = new Forecast();\n\n // Grab the next forecast object from the raw array\n JSONObject rawForecast = forecastJsonAray.getJSONObject(i);\n\n newForecast.date = rawForecast.getString(\"Date\");\n newForecast.time = rawForecast.getString(\"Time\");\n\n newForecast.minimumBreakingHeight = rawForecast.getDouble(\"MinimumBreakingHeight\");\n newForecast.maximumBreakingHeight = rawForecast.getDouble(\"MaximumBreakingHeight\");\n newForecast.windSpeed = rawForecast.getDouble(\"WindSpeed\");\n newForecast.windDirection = rawForecast.getDouble(\"WindDirection\");\n newForecast.windCompassDirection = rawForecast.getString(\"WindCompassDirection\");\n\n ApiApiMessagesSwellMessage primarySwell = new ApiApiMessagesSwellMessage();\n primarySwell.setWaveHeight(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"WaveHeight\"));\n primarySwell.setPeriod(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"Period\"));\n primarySwell.setDirection(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"Direction\"));\n primarySwell.setCompassDirection( rawForecast.getJSONObject(\"PrimarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.primarySwellComponent = primarySwell;\n\n ApiApiMessagesSwellMessage secondarySwell = new ApiApiMessagesSwellMessage();\n secondarySwell.setWaveHeight(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"WaveHeight\"));\n secondarySwell.setPeriod(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"Period\"));\n secondarySwell.setDirection(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"Direction\"));\n secondarySwell.setCompassDirection(rawForecast.getJSONObject(\"SecondarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.secondarySwellComponent = secondarySwell;\n\n ApiApiMessagesSwellMessage tertiarySwell = new ApiApiMessagesSwellMessage();\n tertiarySwell.setWaveHeight(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"WaveHeight\"));\n tertiarySwell.setPeriod(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"Period\"));\n tertiarySwell.setDirection(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"Direction\"));\n tertiarySwell.setCompassDirection(rawForecast.getJSONObject(\"TertiarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.tertiarySwellComponent = tertiarySwell;\n\n if (newForecast.time.equals(\"01 AM\") || newForecast.time.equals(\"02 AM\")) {\n dayIndices[dayCount] = i - FORECAST_DATA_BEGIN_INDEX - forecastOffset;\n dayCount++;\n } else if (forecasts.size() == 0) {\n dayIndices[dayCount] = i - FORECAST_DATA_BEGIN_INDEX - forecastOffset;\n dayCount++;\n }\n\n forecasts.add(newForecast);\n }\n } catch ( JSONException e ) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "public Point previous(Point point)\n {\n assert(_index >= 0);\n assert(_index < _pattern.length);\n\n apply(point);\n\n // Don't need to code defensively. Long live assertions.\n if (--_index == -1) _index = _pattern.length - 1;\n\n return point;\n }", "private float toFlowX(float x){\n if(XAngle==0) XAngle=x;\n int weight=PreferenceHelper.weight;\n float flow= (XAngle*weight+x)/((weight+1f));\n XAngle=flow;\n\n return flow;\n }", "StateVector smooth(StateVector snS, StateVector snP) {\n if (debug) System.out.format(\"StateVector.smooth of filtered state %d %d, using smoothed state %d %d and predicted state %d %d\\n\", kLow, kUp,\n snS.kLow, snS.kUp, snP.kLow, snP.kUp);\n StateVector sS = this.copy();\n\n // solver.setA defines the input matrix and checks whether it is singular. \n // A copy is needed because the input gets modified.\n if (!solver.setA(snP.helix.C.copy())) {\n SquareMatrix invrs = KalTrack.mToS(snP.helix.C).fastInvert();\n if (invrs == null) {\n logger.warning(\"StateVector:smooth, inversion of the covariance matrix failed\");\n snP.helix.C.print();\n for (int i=0; i<5; ++i) { // Fill the inverse with something not too crazy and continue . . .\n for (int j=0; j<5; ++j) {\n if (i == j) {\n Cinv.unsafe_set(i,j,1.0/snP.helix.C.unsafe_get(i,j));\n } else {\n Cinv.unsafe_set(i, j, 0.);\n snP.helix.C.unsafe_set(i, j, 0.);\n }\n }\n } \n } else {\n if (debug) {\n KalTrack.mToS(snP.helix.C).print(\"singular covariance?\");\n invrs.print(\"inverse\");\n invrs.multiply(KalTrack.mToS(snP.helix.C)).print(\"unit matrix?\"); \n }\n for (int i=0; i<5; ++i) {\n for (int j=0; j<5; ++j) {\n Cinv.unsafe_set(i, j, invrs.M[i][j]);\n }\n }\n }\n } else {\n solver.invert(Cinv);\n }\n\n CommonOps_DDRM.multTransB(helix.C, sS.F, tempM);\n CommonOps_DDRM.mult(tempM, Cinv, tempA);\n\n vecToM(snS.helix.a.dif(snP.helix.a), tempV);\n CommonOps_DDRM.mult(tempA, tempV, tempV2);\n sS.helix.a = helix.a.sum(mToVec(tempV2));\n if (debug) {\n System.out.println(\"StateVector:smooth, inverse of the covariance:\");\n Cinv.print(\"%11.6e\");\n CommonOps_DDRM.mult(snP.helix.C, Cinv, tempM);\n System.out.format(\"Unit matrix?? \");\n tempM.print();\n System.out.format(\"Predicted helix covariance: \");\n snP.helix.C.print();\n System.out.format(\"This helix covariance: \");\n helix.C.print();\n System.out.format(\"Matrix F \");\n sS.F.print();\n System.out.format(\"tempM \");\n tempM.print();\n System.out.format(\"tempA \");\n tempA.print();\n System.out.format(\"Difference of helix parameters tempV: \");\n tempV.print();\n System.out.format(\"tempV2 \");\n tempV2.print();\n sS.helix.a.print(\"new helix parameters\");\n }\n\n CommonOps_DDRM.subtract(snS.helix.C, snP.helix.C, tempM);\n CommonOps_DDRM.multTransB(tempM, tempA, Cinv);\n CommonOps_DDRM.mult(tempA, Cinv, tempM);\n CommonOps_DDRM.add(helix.C, tempM, sS.helix.C);\n \n if (debug) sS.print(\"Smoothed\");\n return sS;\n }", "@Override\n public void periodic()\n {\n if(AutoIntake)\n intake(-0.2f, -0.5f);\n }", "public short fitsOnBeginning(Tile tile);", "public Point next(Point point)\n {\n assert(_index >= 0);\n assert(_index < _pattern.length);\n\n apply(point);\n\n // Don't need to code defensively. Long live assertions.\n if (++_index == _pattern.length) _index = 0;\n\n return point;\n }", "public Vector process(AudioPreProcessor in) throws IllegalArgumentException, IOException\n {\n //check in\n if(in == null)\n throw new IllegalArgumentException(\"the audio preprocessor must not be a null value\");\n\n //check for correct input format\n if(in.getSampleRate() != sampleRate)\n throw new IllegalArgumentException(\"sample rates of inputstream differs from sample rate of the sone processor\");\n\n Vector sone = new Vector();\n\n int samplesRead = in.append(inputData, hopSize, hopSize);\n\n while (samplesRead == hopSize)\n {\n //move data in window (overleap)\n for (int i = hopSize, j = 0; i < windowSize; j++, i++)\n inputData[j] = inputData[i];\n\n //read new data\n samplesRead = in.append(inputData, hopSize, hopSize);\n\n //process the current window\n sone.add(processWindow(inputData, 0));\n }\n\n return sone;\n }", "public void startFeeding() {\n motor.set(FEED_SPEED);\n }", "ShapeState apply(int tick);", "public E nextStep() {\r\n\t\tthis.current = this.values[Math.min(this.current.ordinal() + 1, this.values.length - 1)];\r\n\t\treturn this.current;\r\n\t}", "public void run(){\n this.p_absoluteTemperature = 0.001;\n //this.p_temperatureFactor = 7.5;\n this.p_temperatureFactor = 10;\n \n // Set original and current temperature\n this.temperatureInitial = 100;\n this.temperature = 100;\n \n runAlgorithm();\n }", "public void homogenize() {\n\t\tif (DoubleComparison.eq(w, 0)){\n\t\t\tthrow new RuntimeException(\"Can't homogenize points at infinity (last component zero)\");\n\t\t}\n\n\t\tthis.x = x / w;\n\t\tthis.y = y / w;\n\t\tthis.z = z / w;\n\t\tthis.w = 1;\n\t}", "public void shadeTra(int n)\n{\n switch(n) //select trajectory which needs to be shaded\n {\n case 1: \n Trajectory = Trajectorywd;\n break; \n\n case 2: \n Trajectory = Trajectorywk;\n break;\n }\n shadePoint();\n}", "private static FunctionCycle findCycleWithFloydsInternal(IntUnaryOperator func, int x0) {\n\n int t = func.applyAsInt(x0);\n int h = func.applyAsInt(func.applyAsInt(x0));\n\n // find point inside the cycle\n while (t != h) {\n t = func.applyAsInt(t);\n h = func.applyAsInt(func.applyAsInt(h));\n }\n\n h = x0;\n\n while (h != t) {\n t = func.applyAsInt(t);\n h = func.applyAsInt(h);\n }\n\n final int startPoint = t;\n int length = 1;\n h = func.applyAsInt(h);\n\n while (t != h) {\n h = func.applyAsInt(h);\n ++length;\n }\n\n return new FunctionCycle(startPoint, length);\n }", "public void processData(int newVal) {\n\t\tif(samplePoints[counter] < 0) {\n\t\t\tsamplePoints[counter] = newVal;\n\t\t\tlastAverage = newVal;\n\t\t} else {\n\t\t\tdouble newAverage = lastAverage + ((newVal - samplePoints[counter]) / SAMPLE_POINTS);\n\t\t\tdouble difference = 10 * Math.abs(newAverage - lastAverage);\n\t\t\tsamplePoints[counter] = newVal;\n\t\t\tlastAverage = newAverage;\n\t\t\tif(tookOff) {\n\t\t\t\tif(difference > DIFFERENCE_THRESHOLD || System.currentTimeMillis() - startTime > 16000) {\n\t\t\t\t\t//The robot is landing\n\t\t\t\t\tSound.beep();\n\t\t\t\t\tziplineController.resumeThread();\n\t\t\t\t\ttookOff = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(difference < DIFFERENCE_THRESHOLD) {\n\t\t\t\t\tdifferenceCounter--;\n\t\t\t\t} else {\n\t\t\t\t\tdifferenceCounter = DIFFERENCE_POINTS_COUNTER;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(differenceCounter < 0) {\n\t\t\t\t\t//The robot is now in the air.\n\t\t\t\t\tSound.beep();\n\t\t\t\t\ttookOff = true;\n\t\t\t\t\tstartTime = System.currentTimeMillis();\n\t\t\t\t\tziplineController.resumeThread();\n\t\t\t\t\tArrays.fill(samplePoints, -1);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcounter = (counter + 1) % SAMPLE_POINTS;\n\t}", "public Point movePoint(){\n\t\tSystem.out.println(\"Enter new zero point for figure\");\n\t\tthis.in = new Scanner(System.in);\n\t\tString temp = in.nextLine();\n\t\tString[] data = temp.trim().split(\" \");\n\t\tint a = Integer.parseInt(data[0]);\n\t\tint\tb = Integer.parseInt(data[1]);\n\t\tPoint p = new Point(a, b);\n\t\treturn p;\n\t}", "@Override\n\t\tpublic float getInterpolation(float input) {\n\t\t\t\n//\t\t\tfloat t = a*(float) Math.sin(Math.PI * 2/2.8f * input);\n//\t\t\tLog.d(\"debug\", \"input = \"+input+\",,\"+ \"t = \"+t);\n//\t\t\treturn t ;\n\t\t\treturn input;\n\t\t}", "long getTimeUntilNextRise(Coordinates coord, double horizon, long time) throws AstrometryException;", "void makeService(int loc_temp,int des_temp,ArrayList<Coordinate> path)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint last_direction = 0;\r\n\t\t\tint[] shortest_path = new int[6400];\r\n\t\t\tint j_current = loc_temp % 80;\r\n\t\t\tint i_current = loc_temp / 80;\r\n\t\t\tBFS.setShortest(des_temp,shortest_path,BFS.adj_const);\r\n\t\t\tint temp = shortest_path[loc_temp];\r\n\t\t\twhile(temp != -1)\r\n\t\t\t{\r\n\t\t\t\tint length_min = BFS.getShortest(temp, des_temp,BFS.adj_const);\r\n\t\t\t\tint direction = -1;\r\n\t\t\t\tint flow_min = Main.MAX_INT;\r\n\t\t\t\tif((i_current-1)>=0 && BFS.adj_const[(i_current-1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current-1][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current-1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 0;//up\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current-1][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif((i_current+1)<80 && BFS.adj_const[(i_current+1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current+1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 1;//down\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tif((j_current-1)>=0 && BFS.adj_const[i_current*80+j_current-1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current-1][0]<flow_min)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current-1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 2;//left\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current-1][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif((j_current+1)<80 && BFS.adj_const[i_current*80+j_current+1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][0]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current+1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 3;//right\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tLight light = Traffic.findLight(i_current,j_current);\r\n\t\t\t\tif(light != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tboolean first = true;\r\n\t\t\t\t\twhile(!leaveLight(light,last_direction,direction))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmeet_light = true;\r\n\t\t\t\t\t\tif(first)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Waiting at a traffic light\");\r\n\t\t\t\t\t\t\tfirst = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmeet_light = false;\r\n\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Going through a traffic light\");\r\n\t\t\t\t}\r\n\t\t\t\tswitch(direction)\r\n\t\t\t\t{\r\n\t\t\t\tcase 0 ://up\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current-1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current-1][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1 ://down\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current+1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 ://left\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current-1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current-1][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 ://right\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current+1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t\tlast_direction = direction;\r\n\t\t\t\tloc = new Coordinate(i_current,j_current);\r\n\t\t\t\tpath.add(loc);\r\n\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc);\r\n\t\t\t\ttemp = shortest_path[i_current*80+j_current];\r\n\t\t\t}\t\t\r\n\t\t\tSystem.out.println(\"Passenger\" + passenger.loc + passenger.des + \": Taxi-\" + id + \" arrives at \" + des);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");;\r\n\t\t}\r\n\t}", "public void startAttack() {\n if(toSpot == 0) {\n \tst = new RedAlienState.Attacking(this.x, this.y);\n toSpot++;\n this.column = this.x;\n this.row = this.y;\n isAttacking = true;\n }\n }", "@Test\n\tpublic void MovingAverage() {\n\t\tList<Double> high = new ArrayList<Double>();\n\t\t// high = highPriceList();\n\t\tfor (Double data2 : high) {\n\t\t\tSystem.out.println(data2);\n\t\t}\n\t\t// double[] testData = { 1, 2, 3, 4, 5, 5, 4, 3, 2, 1 };\n\t\tint[] windowSizes = { 3 };\n\n\t\tfor (int windSize : windowSizes) {\n\t\t\tStock_data_controller ma = new Stock_data_controller();\n\t\t\tma.Stock_controller(windSize);\n\t\t\tfor (double x : high) {\n\t\t\t\tma.newNum(x);\n\t\t\t\tSystem.out.println(\"Next number = \" + x + \", SimpleMovingAvg = \" + ma.getAvg());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\r\n\tpublic void nextStep() {\n\t\tif (this.oldX == this.coord.x && this.oldY == this.coord.y) { \r\n\t\t\tthis.currentPoint = (int) (Math.random()*this.patrol.size());\r\n\t\t\tthis.targetX = this.patrol.get(currentPoint).x;\r\n\t\t\tthis.targetY = this.patrol.get(currentPoint).y;\r\n\r\n\t\t}\r\n\r\n\t\t// target point reached, make new random target point\r\n\t\tif (this.targetX == this.coord.x && this.targetY == this.coord.y) {\r\n\t\t\tif (this.currentPoint < patrol.size() - 1)\r\n\t\t\t\tthis.currentPoint++;\r\n\t\t\telse\r\n\t\t\t\tthis.currentPoint = 0;\r\n\r\n\t\t\tthis.targetX = this.patrol.get(currentPoint).x;\r\n\t\t\tthis.targetY = this.patrol.get(currentPoint).y;\r\n\t\t}\r\n\t\tint step = (this.speed == Speed.fast ? 8 : 4);\r\n\t\t// int stepX = (int) (1 + Math.random() * step);\r\n\t\t// int stepY = (int) (1 + Math.random() * step);\r\n\t\tint x0 = (int) (this.coord.getX());\r\n\t\tint y0 = (int) (this.coord.getY());\r\n\r\n\t\tint dx = this.targetX - x0;\r\n\t\tint signX = Integer.signum(dx); // get the sign of the dx (1-, 0, or\r\n\t\t\t\t\t\t\t\t\t\t// +1)\r\n\t\tint dy = this.targetY - y0;\r\n\t\tint signY = Integer.signum(dy);\r\n\t\tthis.nextX = x0 + step * signX;\r\n\t\tthis.nextY = y0 + step * signY;\r\n\t\tthis.oldX = this.coord.x;\r\n\t\tthis.oldY = this.coord.y;\r\n\t\t// System.err.println(\"targetX,targetY \"+targetX+\" \"+targetY);\r\n\t}", "@Test\n public void multipleShocksOnSameData() {\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER1);\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(absoluteShift, relativeShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.65, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "public interface Series {\n int getNext();\n void reset();\n void setStart(int x);\n\n\n}", "protected Shingle(final Shingle shingle) {\n List<Double> data = new ArrayList<Double>(shingle.size());\n for (Double f : shingle.data) {\n data.add(f);\n }\n setData(data);\n }", "public void fallDetectionV2(MovementInstance movementInstance){\n double acceleration = movementInstance.getAccelerationVector();\n switch (state){\n case INIT_STATE:\n // Acceleration considered as free fall if it has value lower than 0.42G ~ 0.63G\n if (acceleration < 0.63){\n state = FallingState.FREE_FALL_DETECTION_STATE;\n }\n break;\n case FREE_FALL_DETECTION_STATE:\n //Loading data to Dateset List for 4 seconds\n flDataset.add(movementInstance);\n if(Instant.now().toEpochMilli() - flDataset.get(0).getInstanceTime() > 4000){\n Log.println(Log.DEBUG, TAG, \"FREE_FALL_DETECTED\");\n state = FallingState.IMPACT_DETECTION_STATE;\n }\n break;\n case IMPACT_DETECTION_STATE:\n //Max is Impact maximum G\n MovementInstance max = flDataset.stream().max(Comparator\n .comparing(MovementInstance::getAccelerationVector))\n .orElseThrow(NoSuchElementException::new);\n /* Min is free Fall minimum G: filter values before the Impact (max)\n and find if there is free fall (min) prior to impact */\n MovementInstance min = flDataset.stream()\n .filter(s -> s.getInstanceTime() < max.getInstanceTime())\n .min(Comparator.comparing(MovementInstance::getAccelerationVector))\n .orElseThrow(NoSuchElementException::new);\n /* Duration should be under 0.8sec and Impact > 2.02G ~ 3.1G according to statistics.\n We calculate the duration between the lowest free fall G and the highest impact G */\n long duration = max.getInstanceTime() - min.getInstanceTime();\n if (duration > 250 && duration < 800 && max.getAccelerationVector() > 2.02){\n Log.println(Log.DEBUG, TAG, \"IMPACT_DETECTED - Falling Duration: \" +duration);\n boolean isMotionless = flDataset.stream()\n //Get values that are 1 sec after the impact (filter out any bounces)\n .filter(s -> s.getInstanceTime() > max.getInstanceTime() + 1000)\n //if the remaining values show motionless behaviour then true/next state\n .noneMatch(s -> s.getAccelerationVector() < 0.90 || s.getAccelerationVector() > 1.10);\n if (isMotionless){\n Log.println(Log.DEBUG, TAG, \"IMMOBILITY_DETECTED\");\n state = FallingState.IMMOBILITY_DETECTION_STATE;\n }\n else {\n //Clear fall dataset list and reset states if motion is detected\n flDataset.clear();\n //Reset\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n state = FallingState.INIT_STATE;\n }\n }\n else {\n //Clear fall dataset list and reset states if duration or max G is incorrect.\n flDataset.clear();\n //Reset\n Log.println(Log.DEBUG, TAG, \"Resetting...\");\n state = FallingState.INIT_STATE;\n }\n break;\n case IMMOBILITY_DETECTION_STATE:\n // Trigger Countdown Alarm\n Intent intent = new Intent();\n intent.setAction(FALL_RECEIVER);\n sendBroadcast(intent);\n Log.println(Log.DEBUG, TAG, \"Alarm Triggered!!!\");\n state = FallingState.INIT_STATE;\n break;\n }\n }", "@Override\r\n\t\tpublic T setFirst(T first) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.setFirst(first);\r\n\t\t\t}\r\n\t\t}", "public void initShoulder(){\r\n do{\r\n int currentShoulderPosition = motorShoulder.getCurrentPosition();\r\n posShoulder = currentShoulderPosition + DELTA_SHOULDER;\r\n motorShoulder.setTargetPosition(posShoulder);\r\n motorShoulder.setPower(POWER_SHOULDER_SLOW);\r\n\r\n //System.out.println(\"posShoulder = \" + posShoulder);\r\n } while(!sensorShoulder.isPressed());\r\n\r\n motorShoulder.setPower(STOP);\r\n resetShoulderEncoder();\r\n posShoulder = 0;\r\n }", "public com.twc.bigdata.views.avro.viewing_info.Builder setFurthestPoint(java.lang.Integer value) {\n validate(fields()[5], value);\n this.furthest_point = value;\n fieldSetFlags()[5] = true;\n return this; \n }", "public double calculateSpread(Token token) {\n\t\t\n\t\treturn token.getEndIndex() - token.getBeginIndex();\n\t}", "int getFirstTick();", "@Test\n public void convertAFby() {\n DistEventType x = DistEventType.LocalEvent(\"x\", 0);\n DistEventType y = DistEventType.LocalEvent(\"y\", 0);\n\n TemporalInvariantSet synInvs = new TemporalInvariantSet();\n synInvs.add(new AlwaysFollowedInvariant(x, y, \"t\"));\n List<dynoptic.invariants.BinaryInvariant> dynInvs = DynopticMain\n .synInvsToDynInvs(synInvs);\n assertTrue(dynInvs.size() == 1);\n\n BinaryInvariant dInv = dynInvs.iterator().next();\n assertTrue(dInv instanceof AlwaysFollowedBy);\n assertTrue(dInv.getFirst().equals(x));\n assertTrue(dInv.getSecond().equals(y));\n }", "public Series removeDelayedTrend(int depth)\n {\n if(depth<1 || depth>=size)\n throw new IndexOutOfBoundsException();\n Series oscillator = new Series();\n oscillator.x = new double[oscillator.size = size - depth];\n if(oscillator.size>1)\n oscillator.r = new double[oscillator.size - 1];\n for(int t = 0; t<oscillator.size; t++)\n {\n oscillator.x[t] = x[t + depth] - movingAverage(depth, t + depth);\n if(t>0)\n oscillator.r[t - 1] = Math.log(oscillator.x[t]/oscillator.x[t - 1]);\n }\n return oscillator;\n }", "@Override\r\n\tprotected NewlyAllocatedFlowSet entryInitialFlow() {\n\t\treturn new NewlyAllocatedFlowSet();\r\n\t}", "public Observable<Data> start(Sensor sensor){\n return Observable.interval(DELAY, DELAY, TimeUnit.MILLISECONDS).map(aLong -> {\n DataTypeInt dataTypeInt = new DataTypeInt(DateTime.getDateTime(), getStatus());\n return new Data(sensor, dataTypeInt);\n });\n }", "public Point apply(Point point)\n {\n assert(_index >= 0);\n assert(_index < _pattern.length);\n\n point.move(_pattern[_index]);\n\n return point;\n }", "public java.lang.Integer getFurthestPoint() {\n return furthest_point;\n }", "private synchronized void update() {\n nPoints++;\n int n = points.size();\n if (n < 1) {\n return;\n }\n PathPoint p = points.get(points.size() - 1); // take last point\n if (p.getNEvents() == 0) {\n return;\n }\n if (n > length) {\n removeOldestPoint(); // discard data beyond range length\n }\n n = n > length ? length : n; // n grows to max length\n float t = p.t - firstTimestamp; // t is time since cluster formed, limits absolute t for numerics\n st += t;\n sx += p.x;\n sy += p.y;\n stt += t * t;\n sxt += p.x * t;\n syt += p.y * t;\n// if(n<length) return; // don't estimate velocityPPT until we have all necessary points, results very noisy and send cluster off to infinity very often, would give NaN\n float den = (n * stt - st * st);\n if (den != 0) {\n valid = true;\n xVelocity = (n * sxt - st * sx) / den;\n yVelocity = (n * syt - st * sy) / den;\n } else {\n valid = false;\n }\n }", "public MixedRadioSourceEstimator(\n final List<? extends ReadingLocated<P>> readings,\n final P initialPosition) {\n super(readings);\n mInitialPosition = initialPosition;\n }", "private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }", "public void solveFlow() {\n for(int ix=1;ix<cols-1;ix++) {\n int x0=ix*resolution+resolution/2;\n for(int iy=1;iy<rows-1;iy++) {\n int y0=iy*resolution+resolution/2;\n int ig=iy*cols+ix;\n //y0Z=iy*resolution+resolution/2;\n //igz=iy*cols+ix;\n\n // prepare vectors fx, fy, ft\n getnext9(dxr,fx,ig,0); // dx red\n //getnext9(dxg,fx,ig,9); // dx green\n //getnext9(dxb,fx,ig,18);// dx blue\n getnext9(dyr,fy,ig,0); // dy red\n //getnext9(dyg,fy,ig,9); // dy green\n //getnext9(dyb,fy,ig,18);// dy blue\n getnext9(dtr,ft,ig,0); // dt red\n //getnext9(dtg,ft,ig,9); // dt green\n //getnext9(dtb,ft,ig,18);// dt blue\n\n // solve for (flowx, flowy) such that\n // fx flowx + fy flowy + ft = 0\n solveSectFlow(ig);\n\n // smoothing\n sflowx[ig]+=(flowx[ig]-sflowx[ig])*wflow;\n sflowy[ig]+=(flowy[ig]-sflowy[ig])*wflow;\n\n float u=df*sflowx[ig];\n float v=df*sflowy[ig];\n //float u=df*sflowx[ig];\n //float v=df*sflowy[ig];\n\n float a=sqrt(u*u+v*v);\n\n // register new vectors\n if(a>= minRegisterFlowVelocity) \n {\n field[ix][iy] = new PVector(u,v);\n\n // REMOVED FROM drawColorFlow() to here\n if(a>=minDrawParticlesFlowVelocity) { \n \n // display flow when debugging\n if (drawOpticalFlow) \n {\n stroke(255.0f, 0.0f, 0.0f);\n line(x0,y0,x0+u,y0+v);\n } \n\n // same syntax as memo's fluid solver (http://memo.tv/msafluid_for_processing)\n float mouseNormX = (x0+u) * invKWidth;// / kWidth;\n float mouseNormY = (y0+v) * invKHeight; // kHeight;\n float mouseVelX = ((x0+u) - x0) * invKWidth;// / kWidth;\n float mouseVelY = ((y0+v) - y0) * invKHeight;// / kHeight; \n\n particleManager.addForce(1-mouseNormX, mouseNormY, -mouseVelX, mouseVelY);\n }\n }\n }\n }\n }", "public void frontUp(){\n frontSolenoid.set(DoubleSolenoid.Value.kForward);\n }", "public static double predict(LinkedList<Double> series)\n\t{\n\t\tdouble nextValue = 0;\n\t\tdouble lastValue = 0;\n\t\tif (S0 == 0)\n\t\t{\n\t\t\tfor (int i=0; i<series.size()-1; i++)\n\t\t\t\tS0 += series.get(i);\n\t\t\tS0 /= series.size()-1;\t\n\t\t}\n\t\tlastValue = series.get(series.size()-1);\n\t\tnextValue = S0 + alpha * (lastValue - S0);\n\t\tS0 = nextValue;\n\t\treturn nextValue;\n\t}", "public int step() {\n ArrayList<Integer> copy = new ArrayList<Integer>();\n for (int i = 1; i < register.size(); i++) { \n copy.add(register.get(i));\n }\n int tapNum = register.get(register.size()-tap-1);\n int begin = register.get(0);\n if (tapNum == 1 ^ begin == 1) {\n copy.add(1);\n }\n else {\n copy.add(0);\n }\n register.clear();\n register.addAll(copy);\n return register.get(register.size()-1);\n }", "private int forwardPosition() {\n\t\treturn (position + 1) % (maxPosition + 1);\n\t}", "@Override\n\tpublic void travel(float strafe, float vertical, float forward) {\n\t\tif (this.isInWater()) {\n\t\t\tthis.moveRelative(strafe, vertical, forward, 0.02F);\n\t\t\tthis.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);\n\t\t\tthis.motionX *= 0.800000011920929D;\n\t\t\tthis.motionY *= 0.800000011920929D;\n\t\t\tthis.motionZ *= 0.800000011920929D;\n\t\t} else if (this.isInLava()) {\n\t\t\tthis.moveRelative(strafe, vertical, forward, 0.02F);\n\t\t\tthis.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);\n\t\t\tthis.motionX *= 0.5D;\n\t\t\tthis.motionY *= 0.5D;\n\t\t\tthis.motionZ *= 0.5D;\n\t\t} else {\n\t\t\tfloat f = 0.91F;\n\n\t\t\tif (this.onGround) {\n\t\t\t\t//f = this.world.getBlockState(new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ))).getBlock().slipperiness * 0.91F;\n\t\t\t\tBlockPos underPos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ));\n\t\t\t\tIBlockState underState = this.world.getBlockState(underPos);\n\t\t\t\tf = underState.getBlock().getSlipperiness(underState, this.world, underPos, this) * 0.91F;\n\t\t\t}\n\n\t\t\tfloat f1 = 0.16277136F / (f * f * f);\n\t\t\tthis.moveRelative(strafe, vertical, forward, this.onGround ? 0.1F * f1 : 0.02F);\n\t\t\tf = 0.91F;\n\n\t\t\tif (this.onGround) {\n\t\t\t\t//f = this.world.getBlockState(new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ))).getBlock().slipperiness * 0.91F;\n\t\t\t\tBlockPos underPos = new BlockPos(MathHelper.floor(this.posX), MathHelper.floor(this.getEntityBoundingBox().minY) - 1, MathHelper.floor(this.posZ));\n\t\t\t\tIBlockState underState = this.world.getBlockState(underPos);\n\t\t\t\tf = underState.getBlock().getSlipperiness(underState, this.world, underPos, this) * 0.91F;\n\t\t\t}\n\n\t\t\tthis.move(MoverType.SELF, this.motionX, this.motionY, this.motionZ);\n\t\t\tthis.motionX *= (double)f;\n\t\t\tthis.motionY *= (double)f;\n\t\t\tthis.motionZ *= (double)f;\n\t\t}\n\n\t\tthis.prevLimbSwingAmount = this.limbSwingAmount;\n\t\tdouble d1 = this.posX - this.prevPosX;\n\t\tdouble d0 = this.posZ - this.prevPosZ;\n\t\tfloat f2 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F;\n\n\t\tif (f2 > 1.0F) {\n\t\t\tf2 = 1.0F;\n\t\t}\n\n\t\tthis.limbSwingAmount += (f2 - this.limbSwingAmount) * 0.4F;\n\t\tthis.limbSwing += this.limbSwingAmount;\n\t}", "public void adjustInitialPosition() {\n\n //TelemetryWrapper.setLine(1,\"landFromLatch...\");\n runtime.reset();\n double maxLRMovingDist = 200.0; //millimeters\n double increamentalDist = 50.0;\n while ( runtime.milliseconds() < 5000 ) {\n int loops0 = 0;\n while ((loops0 < 10) && ( mR.getNumM() == 0 )) {\n mR.update();\n loops0 ++;\n }\n if (mR.getNumM() <= 1) {\n int loops = 0;\n while ( mR.getNumM() <= 1 )\n driveTrainEnc.moveLeftRightEnc(increamentalDist, 2000);\n continue;\n } else if ( mR.getHAlignSlope() > 2.0 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED,Math.atan(mR.getHAlignSlope()),2000);\n continue;\n } else if (! mR.isGoldFound()) {\n\n driveTrainEnc.moveLeftRightEnc(increamentalDist,2000);\n continue;\n } else if ( mR.getFirstGoldAngle() > 1.5 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED, mR.getFirstGoldAngle(),2000);\n continue;\n }\n }\n driveTrainEnc.stop();\n }" ]
[ "0.5255287", "0.5006115", "0.48756278", "0.47965848", "0.46959758", "0.4585363", "0.45333195", "0.4499434", "0.44767672", "0.43752035", "0.43751094", "0.43726677", "0.43550646", "0.4339562", "0.43240553", "0.4323405", "0.42338902", "0.41960025", "0.41920283", "0.4191493", "0.41716123", "0.41706023", "0.41567975", "0.4156475", "0.41535532", "0.41516963", "0.41436198", "0.4135527", "0.41252765", "0.41215613", "0.41165912", "0.41134155", "0.40914783", "0.4079144", "0.40727797", "0.40723816", "0.40637222", "0.40478316", "0.40350953", "0.40277234", "0.402713", "0.4016377", "0.40105054", "0.4003495", "0.4000854", "0.39973742", "0.39951512", "0.39843804", "0.39842469", "0.39842218", "0.39828688", "0.39813423", "0.398098", "0.39773533", "0.397733", "0.39754426", "0.39734843", "0.3973291", "0.39721367", "0.39672866", "0.39649224", "0.3964582", "0.3961785", "0.3961606", "0.39556167", "0.39544263", "0.39537162", "0.3949897", "0.3947591", "0.39380798", "0.3936744", "0.39364332", "0.39361832", "0.39319128", "0.39316356", "0.3929542", "0.3920816", "0.39200658", "0.39179337", "0.39137477", "0.39117065", "0.3910285", "0.39097628", "0.3907086", "0.39028734", "0.39022517", "0.3900848", "0.39006862", "0.3897224", "0.3888583", "0.3888348", "0.38880783", "0.38872075", "0.38861734", "0.38856807", "0.38824394", "0.3878025", "0.38752142", "0.38751402", "0.3875022", "0.3872302" ]
0.0
-1
Given a shingle builder, extrapolate the stream into the future to produce a forecast. This method assumes you are passing in the shingle builder used to preprocess points before adding them to this forest.
public double[] extrapolateBasic(ShingleBuilder builder, int horizon) { return extrapolateBasic(builder.getShingle(), horizon, builder.getInputPointSize(), builder.isCyclic(), builder.getShingleIndex()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void warmup(ConsolidatedSnapshot snapshot, double[] forecasts);", "public static void main(String[] args) {\n\n final StreamsBuilder builder = new StreamsBuilder();\n\n // get and set properties\n RtdStreamProperties rtdStreamProperties = new RtdStreamProperties();\n Properties props = rtdStreamProperties.getProperties();\n\n props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());\n props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, SpecificAvroSerde.class);\n\n // BusPosition serializer/deserializer\n final Serde<BusPositionFeed> serdeBusPosition = new SpecificAvroSerde<>();\n serdeBusPosition.configure((Map) props, false);\n\n // create key/value store for bus positions\n final StoreBuilder<KeyValueStore<String, BusPositionFeed>> busPositionStore = Stores.keyValueStoreBuilder(\n Stores.persistentKeyValueStore(\"busPositionStore\"),\n Serdes.String(),\n Serdes.serdeFrom(serdeBusPosition.serializer(), serdeBusPosition.deserializer()));\n\n builder.addStateStore(busPositionStore);\n\n // stream positions from the rtd-bus-position topic\n final KStream<String, BusPositionFeed> rtdBusPositionStream = builder.stream(\"rtd-bus-position\");\n\n // calculate the speed using the Haversine transform\n final KStream<String, BusPositionSpeed> rtdBusPositionStreamEnriched =\n rtdBusPositionStream.transform(new HaversineTransformerSupplier(\"busPositionStore\"), \"busPositionStore\");\n\n // remove any enriched records with impossible speeds (i.e. > 140 mph), add the Uber H3 hexagon, and write\n // those records to the rtd-bus-position-enriched topic.\n rtdBusPositionStreamEnriched\n .filter((key, busPositionSpeed) -> busPositionSpeed.getMilesPerHour() < 140)\n .mapValues(busPositionSpeed -> {\n\n H3Core h3 = null;\n String hexAddr = \"\";\n try {\n // a resolution of 12 divides the land into hexagons that are about 307 square meters\n // See https://github.com/uber/h3/blob/master/docs/core-library/restable.md and plug the hexagon\n // area into https://www.wolframalpha.com/ to translate\n\n h3 = H3Core.newInstance();\n hexAddr = h3.geoToH3Address(busPositionSpeed.getLocation().getLat(),\n busPositionSpeed.getLocation().getLon(),\n 12);\n\n } catch (IOException e) {\n LOG.error(\"Error creating H3 address for location: \" + busPositionSpeed.getLocation());\n LOG.error(e.getMessage());\n }\n\n busPositionSpeed.setH3(hexAddr);\n return busPositionSpeed;\n })\n .to(\"rtd-bus-position-enriched\");\n\n // run it\n final Topology topology = builder.build();\n LOG.info(topology.describe().toString()); // write out the topology so it can be visualized in https://zz85.github.io/kafka-streams-viz/\n final KafkaStreams streams = new KafkaStreams(topology, props);\n streams.cleanUp();\n streams.start();\n\n // Add shutdown hook to respond to SIGTERM and gracefully close Kafka Streams\n Runtime.getRuntime().addShutdownHook(new Thread(streams::close));\n\n }", "public static void main(String[] args) throws Exception {\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // use event time for the application\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n // configure watermark interval\n env.getConfig().setAutoWatermarkInterval(1000L);\n\n // ingest sensor stream\n DataStream<SensorReading> readings = env\n // SensorSource generates random temperature readings\n .addSource(new SensorSource())\n // assign timestamps and watermarks which are required for event time\n .assignTimestampsAndWatermarks(new SensorTimeAssigner());\n\n // filter out sensor measurements with temperature below 25 degrees\n DataStream<SensorReading> filteredReadings = readings\n .filter(r -> r.temperature >= 25);\n\n // the above filter transformation using a FilterFunction instead of a lambda function\n // DataStream<SensorReading> filteredReadings = readings\n // .filter(new TemperatureFilter(25));\n\n // project the reading to the id of the sensor\n DataStream<String> sensorIds = filteredReadings\n .map(r -> r.id);\n\n // the above map transformation using a MapFunction instead of a lambda function\n // DataStream<String> sensorIds = filteredReadings\n // .map(new IdExtractor());\n\n // split the String id of each sensor to the prefix \"sensor\" and sensor number\n DataStream<String> splitIds = sensorIds\n .flatMap((FlatMapFunction<String, String>)\n (id, out) -> { for (String s: id.split(\"_\")) { out.collect(s);}})\n // provide result type because Java cannot infer return type of lambda function\n .returns(Types.STRING);\n\n // the above flatMap transformation using a FlatMapFunction instead of a lambda function\n // DataStream<String> splitIds = sensorIds\n // .flatMap(new IdSplitter());\n\n // print result stream to standard out\n splitIds.print();\n\n // execute application\n env.execute(\"Basic Transformations Example\");\n }", "public Event createModelFromMultpleTSVline(HashSet<String[]> gatheredValues,\n String provenanceInfo,\n char separator,\n DateTimeFormatter dateTimeFormatter,\n boolean filterFrom,\n LocalDate fromDate,\n boolean filterTo,\n LocalDate toDate,\n boolean filterByKeyword,\n String keyword) {\n\n Event event = null;\n boolean firstLine = true;\n for (String[] values : gatheredValues) {\n if (firstLine) {\n event = new Event(values[0], provenanceInfo);\n firstLine = false;\n }\n //fill the attributes\n //add uri\n event.addURI(values[0]);\n\n //add label after removing the language tag\n if (values[1].contains(\"@\"))\n event.addLabel(values[1].substring(0, values[1].indexOf(\"@\")));\n else\n event.addLabel(values[1]);\n\n\n // 1214-07-27^^http://www.w3.org/2001/XMLSchema#date\n //incomplete date 1863-##-##^^http://www.w3.org/2001/XMLSchema#date\n String date = values[2].replace(\"##\", \"01\");\n if (values[2].contains(\"^\"))\n date = date.substring(0, date.indexOf(\"^\"));\n\n try {\n LocalDate localDate = LocalDate.parse(date, dateTimeFormatter);\n //check date against user input parameters\n if (filterFrom) { //&& filterTo) {\n //if (localDate.isAfter(toDate) || localDate.isBefore(fromDate)) {\n if (localDate.isBefore(fromDate)) {\n return null;\n }\n }\n if (filterTo) {\n if (localDate.isAfter(toDate)) {\n return null;\n }\n }\n event.addDate(localDate);\n } catch (DateTimeParseException e) {\n //System.out.println(values[0] + \" \" + date);\n return null;\n }\n\n\n\n //50.5833^^http://www.w3.org/2001/XMLSchema#float\t3.225^^http://www.w3.org/2001/XMLSchema#float\n //event.setLat(Double.valueOf(values[3].substring(0, values[3].indexOf(\"^\"))));\n //event.setLon(Double.valueOf(values[4].substring(0, values[4].indexOf(\"^\"))));\n if (values.length>4) {\n String latString = values[3];\n if (latString.contains(\"^\"))\n latString = latString.substring(0, latString.indexOf(\"^\"));\n String longString = values[4];\n if (longString.contains(\"^\"))\n longString = longString.substring(0, longString.indexOf(\"^\"));\n\n Pair<Double, Double> p = new Pair<>(\n Double.valueOf(latString),\n Double.valueOf(longString)\n );\n event.addCoordinates(p);\n }\n if (values.length>5) {\n event.addSame(values[5]);\n }\n if (values.length>6) {\n Location location = new Location(values[6], provenanceInfo);\n event.addLocation(location);\n }\n }\n\n //filter labels by keyword\n if(filterByKeyword) {\n if (!event.getLabels().stream().anyMatch(label -> label.trim().toLowerCase().contains(keyword.toLowerCase()))) {\n return null;\n } /*else {\n System.out.println(keyword + \" found for \" + event.getLabels());\n }*/\n }\n\n return event;\n }", "public static void main(String[] args) throws Exception {\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\r\n\r\n // use event time for the application\r\n env.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime);\r\n\r\n // switch messages disable filtering of sensor readings for a specific amount of time\r\n DataStream<Tuple2<String, Long>> filterSwitches = env\r\n .fromElements(\r\n // forward readings of sensor_2 for 10 seconds\r\n Tuple2.of(\"sensor_2\", 10_000L),\r\n // forward readings of sensor_7 for 1 minute\r\n Tuple2.of(\"sensor_7\", 60_000L));\r\n\r\n // ingest sensor stream\r\n DataStream<SensorReading> readings = env\r\n // SensorSource generates random temperature readings\r\n .addSource(new SensorSource());\r\n\r\n DataStream<SensorReading> forwardedReadings = readings\r\n // connect readings and switches\r\n .connect(filterSwitches)\r\n // key by sensor ids\r\n .keyBy(r -> r.id, s -> s.f0)\r\n // apply filtering CoProcessFunction\r\n .process(new ReadingFilter());\r\n\r\n forwardedReadings.print();\r\n\r\n env.execute(\"Filter sensor readings\");\r\n }", "@Override\n public void forecast(int numFuturePoints) {\n\n int startPoint = 0, endPoint = actual.length;\n double lastValue = actual[startPoint],forecast;\n double[][] trainMatrix = new double[trainPoints + validationPoints][2];\n trainMatrix[0][0] = actual[startPoint];\n trainMatrix[0][1] = lastValue;\n\n for (int i = startPoint + 1; i < endPoint; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n\n lastValue = optAlpha * actual[i] + (1 - optAlpha) * lastValue;\n }\n\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n\n forecastDataSet = new DataSet();\n startPoint = actual.length;\n Observation observation;\n double forecastValue, lowerBound, upperBound;\n\n for (int i = startPoint; i < startPoint + numFuturePoints; i++) {\n forecastValue = lastValue;\n\n lastValue = optAlpha * forecastValue + (1 - optAlpha) * lastValue;\n\n if (forecastValue < 0) {\n forecastValue = 0l;\n lowerBound = 0l;\n upperBound = 0l;\n } else {\n forecastValue = BiasnessHandler.adjustBiasness(forecastValue, accuracyIndicators.getBias());\n lowerBound = forecastValue - errorBound;\n upperBound = forecastValue + errorBound;\n }\n\n observation = new Observation();\n observation.setIndependentValue(IndependentVariable.SLICE, i - startPoint);\n observation.setDependentValue(forecastValue);\n observation.setLowerDependentValue(lowerBound > 0 ? lowerBound : 0);\n observation.setUpperDependentValue(upperBound);\n forecastDataSet.add(observation);\n\n }\n }", "public static void main(String[] args) {\n neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0,\n 10.00);\n feedGas.addComponent(\"nitrogen\", 1.03);\n feedGas.addComponent(\"CO2\", 1.42);\n feedGas.addComponent(\"methane\", 83.88);\n feedGas.addComponent(\"ethane\", 8.07);\n feedGas.addComponent(\"propane\", 3.54);\n feedGas.addComponent(\"i-butane\", 0.54);\n feedGas.addComponent(\"n-butane\", 0.84);\n feedGas.addComponent(\"i-pentane\", 0.21);\n feedGas.addComponent(\"n-pentane\", 0.19);\n feedGas.addComponent(\"n-hexane\", 0.28);\n feedGas.addComponent(\"water\", 0.0);\n feedGas.addComponent(\"TEG\", 0);\n feedGas.createDatabase(true);\n feedGas.setMixingRule(10);\n feedGas.setMultiPhaseCheck(true);\n\n Stream dryFeedGas = new Stream(\"dry feed gas\", feedGas);\n dryFeedGas.setFlowRate(11.23, \"MSm3/day\");\n dryFeedGas.setTemperature(30.4, \"C\");\n dryFeedGas.setPressure(52.21, \"bara\");\n StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil(dryFeedGas);\n Stream waterSaturatedFeedGas = new Stream(saturatedFeedGas.getOutStream());\n saturatedFeedGas.setName(\"water saturator\");\n neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n feedTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02, 0.98 });\n\n Stream TEGFeed = new Stream(\"lean TEG to absorber\", feedTEG);\n TEGFeed.setFlowRate(6.1 * 1100.0, \"kg/hr\");\n TEGFeed.setTemperature(35.4, \"C\");\n TEGFeed.setPressure(52.21, \"bara\");\n\n SimpleTEGAbsorber absorber = new SimpleTEGAbsorber(\"SimpleTEGAbsorber\");\n absorber.addGasInStream(waterSaturatedFeedGas);\n absorber.addSolventInStream(TEGFeed);\n absorber.setNumberOfStages(10);\n absorber.setStageEfficiency(0.35);\n\n Stream dehydratedGas = new Stream(absorber.getGasOutStream());\n dehydratedGas.setName(\"dry gas from absorber\");\n Stream richTEG = new Stream(absorber.getSolventOutStream());\n\n ThrottlingValve glycol_flash_valve = new ThrottlingValve(richTEG);\n glycol_flash_valve.setName(\"Rich TEG HP flash valve\");\n glycol_flash_valve.setOutletPressure(4.9);\n\n Heater richGLycolHeaterCondeser = new Heater(glycol_flash_valve.getOutStream());\n richGLycolHeaterCondeser.setName(\"rich TEG preheater\");\n richGLycolHeaterCondeser.setOutTemperature(273.15 + 35.5);\n\n Heater richGLycolHeater = new Heater(richGLycolHeaterCondeser.getOutStream());\n richGLycolHeater.setName(\"rich TEG heater HP\");\n richGLycolHeater.setOutTemperature(273.15 + 62.0);\n\n Separator flashSep = new Separator(richGLycolHeater.getOutStream());\n flashSep.setName(\"degasing separator\");\n Stream flashGas = new Stream(flashSep.getGasOutStream());\n flashGas.setName(\"gas from degasing separator\");\n Stream flashLiquid = new Stream(flashSep.getLiquidOutStream());\n flashLiquid.setName(\"liquid from degasing separator\");\n\n Heater richGLycolHeater2 = new Heater(flashLiquid);\n richGLycolHeater2.setName(\"LP rich glycol heater\");\n richGLycolHeater2.setOutTemperature(273.15 + 139.0);\n richGLycolHeater2.setOutPressure(1.23);\n\n Mixer mixerTOreboiler = new Mixer(\"reboil mxer\");\n mixerTOreboiler.addStream(richGLycolHeater2.getOutStream());\n\n Heater heaterToReboiler = new Heater(mixerTOreboiler.getOutStream());\n heaterToReboiler.setOutTemperature(273.15 + 206.6);\n\n Separator regenerator2 = new Separator(heaterToReboiler.getOutStream());\n\n Stream gasFromRegenerator = new Stream(regenerator2.getGasOutStream());\n\n Heater sepregenGasCooler = new Heater(gasFromRegenerator);\n sepregenGasCooler.setOutTemperature(273.15 + 109.0);\n sepregenGasCooler.setOutPressure(1.23);\n//\t\tsepregenGasCooler.setEnergyStream(richGLycolHeaterCondeser.getEnergyStream());\n\n Separator sepRegen = new Separator(sepregenGasCooler.getOutStream());\n\n Stream liquidRegenReflux = new Stream(sepRegen.getLiquidOutStream());\n\n Recycle resycle2 = new Recycle(\"reflux resycle\");\n resycle2.addStream(liquidRegenReflux);\n\n Heater coolerRegenGas = new Heater(sepRegen.getGasOutStream());\n coolerRegenGas.setOutTemperature(273.15 + 35.5);\n\n Separator sepregenGas = new Separator(coolerRegenGas.getOutStream());\n\n Stream gasToFlare = new Stream(sepregenGas.getGasOutStream());\n\n Stream liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream());\n\n Stream hotLeanTEG = new Stream(regenerator2.getLiquidOutStream());\n\n neqsim.thermo.system.SystemInterface stripGas = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n stripGas.setMolarComposition(new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 });\n\n Stream strippingGas = new Stream(\"stripGas\", stripGas);\n strippingGas.setFlowRate(70.0, \"kg/hr\");\n strippingGas.setTemperature(206.6, \"C\");\n strippingGas.setPressure(1.23, \"bara\");\n\n WaterStripperColumn stripper = new WaterStripperColumn(\"TEG stripper\");\n stripper.addGasInStream(strippingGas);\n stripper.addSolventInStream(hotLeanTEG);\n stripper.setNumberOfStages(10);\n stripper.setStageEfficiency(0.5);\n\n Recycle resycle3 = new Recycle(\"gas stripper resycle\");\n resycle3.addStream(stripper.getGasOutStream());\n\n Pump hotLeanTEGPump = new Pump(stripper.getSolventOutStream());\n hotLeanTEGPump.setName(\"hot lean TEG pump\");\n hotLeanTEGPump.setOutletPressure(20.0);\n\n Heater coolerhOTteg = new Heater(hotLeanTEGPump.getOutStream());\n coolerhOTteg.setName(\"hot lean TEG cooler\");\n coolerhOTteg.setOutTemperature(273.15 + 116.8);\n\n Heater coolerhOTteg2 = new Heater(coolerhOTteg.getOutStream());\n coolerhOTteg2.setName(\"medium hot lean TEG cooler\");\n coolerhOTteg2.setOutTemperature(273.15 + 89.3);\n\n Heater coolerhOTteg3 = new Heater(coolerhOTteg2.getOutStream());\n coolerhOTteg3.setName(\"lean TEG cooler\");\n coolerhOTteg3.setOutTemperature(273.15 + 44.85);\n\n Pump hotLeanTEGPump2 = new Pump(coolerhOTteg3.getOutStream());\n hotLeanTEGPump2.setName(\"lean TEG HP pump\");\n hotLeanTEGPump2.setOutletPressure(52.21);\n\n Stream leanTEGtoabs = new Stream(hotLeanTEGPump2.getOutStream());\n leanTEGtoabs.setName(\"lean TEG to absorber\");\n\n neqsim.thermo.system.SystemInterface pureTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n pureTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 });\n\n Stream makeupTEG = new Stream(\"lean TEG to absorber\", pureTEG);\n makeupTEG.setFlowRate(1e-6, \"kg/hr\");\n makeupTEG.setTemperature(35.4, \"C\");\n makeupTEG.setPressure(52.21, \"bara\");\n\n Calculator makeupCalculator = new Calculator(\"makeup calculator\");\n makeupCalculator.addInputVariable(dehydratedGas);\n makeupCalculator.addInputVariable(flashGas);\n makeupCalculator.addInputVariable(gasToFlare);\n makeupCalculator.addInputVariable(liquidToTrreatment);\n makeupCalculator.setOutputVariable(makeupTEG);\n\n StaticMixer makeupMixer = new StaticMixer(\"makeup mixer\");\n makeupMixer.addStream(leanTEGtoabs);\n makeupMixer.addStream(makeupTEG);\n\n Recycle resycleLeanTEG = new Recycle(\"lean TEG resycle\");\n resycleLeanTEG.addStream(makeupMixer.getOutStream());\n\n neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();\n operations.add(dryFeedGas);\n operations.add(saturatedFeedGas);\n operations.add(waterSaturatedFeedGas);\n operations.add(TEGFeed);\n operations.add(absorber);\n operations.add(dehydratedGas);\n operations.add(richTEG);\n operations.add(glycol_flash_valve);\n operations.add(richGLycolHeaterCondeser);\n operations.add(richGLycolHeater);\n operations.add(flashSep);\n operations.add(flashGas);\n operations.add(flashLiquid);\n operations.add(richGLycolHeater2);\n operations.add(mixerTOreboiler);\n operations.add(heaterToReboiler);\n operations.add(regenerator2);\n operations.add(gasFromRegenerator);\n operations.add(sepregenGasCooler);\n operations.add(sepRegen);\n operations.add(liquidRegenReflux);\n operations.add(resycle2);\n\n operations.add(coolerRegenGas);\n operations.add(sepregenGas);\n operations.add(gasToFlare);\n operations.add(liquidToTrreatment);\n operations.add(hotLeanTEG);\n operations.add(strippingGas);\n operations.add(stripper);\n\n operations.add(resycle3);\n operations.add(hotLeanTEGPump);\n operations.add(coolerhOTteg);\n operations.add(coolerhOTteg2);\n operations.add(coolerhOTteg3);\n operations.add(hotLeanTEGPump2);\n operations.add(leanTEGtoabs);\n operations.add(makeupCalculator);\n operations.add(makeupTEG);\n operations.add(makeupMixer);\n operations.add(resycleLeanTEG);\n\n operations.run();\n richGLycolHeater2.getOutStream().getFluid().display();\n System.out.println(\"Energy reboiler \" + heaterToReboiler.getDuty());\n mixerTOreboiler.addStream(liquidRegenReflux);\n mixerTOreboiler.addStream(resycle3.getOutStream());\n //\n operations.run();\n absorber.replaceSolventInStream(resycleLeanTEG.getOutStream());\n operations.run();\n // richGLycolHeater2.getOutStream().getFluid().display();\n\n System.out.println(\"Energy reboiler 2 \" + heaterToReboiler.getDuty());\n\n System.out.println(\"wt lean TEG after stripper \"\n + ((WaterStripperColumn) operations.getUnit(\"TEG stripper\")).getSolventOutStream().getFluid()\n .getPhase(\"aqueous\").getWtFrac(\"TEG\"));\n\n operations.save(\"c:/temp/TEGprocessSimple.neqsim\");\n }", "private boolean parseForecasts(String rawData) {\n if (rawData == null) {\n return false;\n }\n\n if (!forecasts.isEmpty()) {\n forecasts.clear();\n }\n\n try {\n // Make a json array from the response string\n JSONObject jsonObj = new JSONObject( rawData );\n\n locationName = jsonObj.getString(\"LocationName\");\n waveModelName = jsonObj.getJSONObject(\"WaveModel\").getString(\"Description\");\n waveModelRun = jsonObj.getJSONObject(\"WaveModel\").getString(\"ModelRun\");\n\n // We need to save the model run for later so we can check for updates\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEEE MMMM dd, yyyy HHZ\");\n try {\n mLastFetchDate = formatter.parse(waveModelRun.replaceAll(\"z$\", \"+0000\"));\n\n // Add the hindcasting offset\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(mLastFetchDate);\n calendar.add(Calendar.HOUR_OF_DAY, 5);\n mLastFetchDate = calendar.getTime();\n } catch (Exception e) {\n return false;\n }\n\n windModelName = jsonObj.getJSONObject(\"WindModel\").getString(\"Description\");\n windModelRun = jsonObj.getJSONObject(\"WindModel\").getString(\"ModelRun\");\n\n // Get alllllll of the forecast data!\n JSONArray forecastJsonAray = jsonObj.getJSONArray(\"ForecastData\");\n dayCount = 0;\n int forecastOffset = 0;\n for (int i = FORECAST_DATA_BEGIN_INDEX; i < FORECAST_DATA_COUNT; i++) {\n Forecast newForecast = new Forecast();\n\n // Grab the next forecast object from the raw array\n JSONObject rawForecast = forecastJsonAray.getJSONObject(i);\n\n newForecast.date = rawForecast.getString(\"Date\");\n newForecast.time = rawForecast.getString(\"Time\");\n\n newForecast.minimumBreakingHeight = rawForecast.getDouble(\"MinimumBreakingHeight\");\n newForecast.maximumBreakingHeight = rawForecast.getDouble(\"MaximumBreakingHeight\");\n newForecast.windSpeed = rawForecast.getDouble(\"WindSpeed\");\n newForecast.windDirection = rawForecast.getDouble(\"WindDirection\");\n newForecast.windCompassDirection = rawForecast.getString(\"WindCompassDirection\");\n\n ApiApiMessagesSwellMessage primarySwell = new ApiApiMessagesSwellMessage();\n primarySwell.setWaveHeight(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"WaveHeight\"));\n primarySwell.setPeriod(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"Period\"));\n primarySwell.setDirection(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"Direction\"));\n primarySwell.setCompassDirection( rawForecast.getJSONObject(\"PrimarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.primarySwellComponent = primarySwell;\n\n ApiApiMessagesSwellMessage secondarySwell = new ApiApiMessagesSwellMessage();\n secondarySwell.setWaveHeight(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"WaveHeight\"));\n secondarySwell.setPeriod(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"Period\"));\n secondarySwell.setDirection(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"Direction\"));\n secondarySwell.setCompassDirection(rawForecast.getJSONObject(\"SecondarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.secondarySwellComponent = secondarySwell;\n\n ApiApiMessagesSwellMessage tertiarySwell = new ApiApiMessagesSwellMessage();\n tertiarySwell.setWaveHeight(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"WaveHeight\"));\n tertiarySwell.setPeriod(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"Period\"));\n tertiarySwell.setDirection(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"Direction\"));\n tertiarySwell.setCompassDirection(rawForecast.getJSONObject(\"TertiarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.tertiarySwellComponent = tertiarySwell;\n\n if (newForecast.time.equals(\"01 AM\") || newForecast.time.equals(\"02 AM\")) {\n dayIndices[dayCount] = i - FORECAST_DATA_BEGIN_INDEX - forecastOffset;\n dayCount++;\n } else if (forecasts.size() == 0) {\n dayIndices[dayCount] = i - FORECAST_DATA_BEGIN_INDEX - forecastOffset;\n dayCount++;\n }\n\n forecasts.add(newForecast);\n }\n } catch ( JSONException e ) {\n e.printStackTrace();\n return false;\n }\n return true;\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void singleShock() {\n MarketDataShock shock = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(shock);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.5, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "public void updatePredictions (long currTime, TimeSeries inputSeries)\n {\n\n// TODO: decide if this is necessary, it's in PPALg >>\n this.state.clearPredictionsFrom (currTime + stepSize);\n//this.state.clearPredictions();\n\n TimeSeries timeSeries = (TimeSeries) inputSeries.clone();\n\n // if timeSeries is shorter than the minimum stream do nothing.\n if (timeSeries.size() < minStreamLength)\n return;\n\n // trim the first <minPeriod> number of elements from the timeSeries.\n // this removes non-periodicity that is seen in simulators first few elements.\n\n timeSeries.trimFromStart(minPeriodLength);\n\n df.addText (\"First trim of time series : \" + timeSeries.shortToString());\n\n // find the best shift of the time series against iteself that leads to the most matching\n ArrayList shiftGraph = findBestShiftGraph (timeSeries);\n\n // trim the shifted graph to make sure we aren't starting in the middle of an event\n int amountTrimmed = trimShiftGraph (shiftGraph);\n\n df.addText (\"Trim amount : \" + amountTrimmed);\n df.addText (\"final, trimmed shift graph : \" + shiftGraph.toString());\n\n // the offset is the total amount of the time series we have discarded, it is the offset\n // to the leading edge of a periodic repeating occurence\n int offset = amountTrimmed + minPeriodLength;\n\n // create a new periodic event object\n PeriodicEvent pe = getPeriod (shiftGraph, offset);\n\n if (pe == null || pe.getEvent().isEmpty())\n {\n df.addText (\" Periodic event is null \");\n return;\n }\n\n df.addText (\" Periodic Event is : \" + pe.toString());\n\n // get the current time from which we will extrapolate\n long time = currTime;\n\n int period = pe.getPeriod();\n ArrayList event = pe.getEvent();\n\n // if we divide the timeSeries into portions the size of the time period, how much is left over?\n // for this we do not consider the trimmed amount.\n int timeSeriesSize = timeSeries.size() - amountTrimmed;\n\n if (timeSeriesSize <= period)\n return;\n int remainder = getRemainder (timeSeriesSize, period);\n df.addText (\"remainder is : \" + remainder);\n\n // cycle through the remaining portion of the last period adding any predictions based on\n // our periodic event that we have identified.\n // must subtract 1 since index is zero-base, & reaminder is one-based\n for (int i = remainder -1 ; i < event.size(); i++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (i >= 0 && event.get (i) != null)\n {\n prediction = ((Double) event.get(i)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (i)\n\n int extrapolationCount = 2;\n\n // We make <j> additional extapolation into the future beyond the last period fragment\n while (extrapolationCount > 0)\n {\n for (int j = 0; j < event.size(); j++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (event.get (j) != null)\n {\n prediction = ((Double) event.get(j)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (j)\n\n extrapolationCount--;\n } // end while (extapoliationCount)\n\n\n state.updateError (timeSeries, currTime);\n }", "FuelingStation createFuelingStation();", "@ParameterizedTest\n @ValueSource(booleans = { true, false })\n public void testRunConditionalWorkflowSuccessPreviousResponse(Boolean predicateTest) {\n StepWorkflow.ConditionalBuilder<Integer, Integer> andSometimesConditional = successfulBuilderOfSupplierDataOne.andSometimes(subStepSupplierDataTwo);\n StepWorkflow.Builder<Object> butOnlyIfBuilder = andSometimesConditional.butOnlyIf(new Object(), ignored -> predicateTest);\n assertEquals(subStepSupplierDataOne, butOnlyIfBuilder.start.step);\n assertNotNull(butOnlyIfBuilder.start.next);\n assertEquals(butOnlyIfBuilder.start.next.step, butOnlyIfBuilder.end.step);\n assertNull(butOnlyIfBuilder.end.next);\n\n // Create and validate then() Builder\n StepWorkflow.Builder<Integer> thenBuilder = butOnlyIfBuilder.then(subStepSupplierDataThree);\n assertEquals(subStepSupplierDataOne, thenBuilder.start.step);\n assertNotNull(thenBuilder.start.next);\n assertEquals(subStepSupplierDataOne, thenBuilder.start.step);\n assertEquals(subStepSupplierDataThree, thenBuilder.end.step);\n assertNotNull(thenBuilder.start.next.step);\n assertNull(thenBuilder.end.next);\n\n // Run and validate build()\n StepWorkflow<Integer> buildStepWorkflow = thenBuilder.build();\n assertEquals(thenBuilder.start, buildStepWorkflow.start);\n assertEquals(thenBuilder.end, buildStepWorkflow.end);\n\n // Call run() and validate return StepWorkflowResponse\n StepWorkflowResponse<Integer> response = buildStepWorkflow.run();\n assertTrue(response.wasSuccessful());\n assertEquals(DATA_THREE, response.getData());\n assertNull(response.getException());\n }", "public static void main(String[] args) throws Exception {\n final StreamExecutionEnvironment env =\n StreamExecutionEnvironment.getExecutionEnvironment();\n\n env.setRestartStrategy(RestartStrategies.fixedDelayRestart(1000, 1000));\n env.enableCheckpointing(1000);\n env.setParallelism(1);\n env.disableOperatorChaining();\n\n boolean useEventTime = true;\n if(useEventTime){\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n }\n\n // Data Processor\n // Kafka consumer properties\n Properties kafkaProperties = new Properties();\n kafkaProperties.setProperty(\"bootstrap.servers\", \"localhost:9092\");\n kafkaProperties.setProperty(\"group.id\", \"oscon-demo-group\");\n\n // Create Kafka Consumer\n FlinkKafkaConsumer09<KeyedDataPoint<Double>> kafkaConsumer =\n new FlinkKafkaConsumer09<>(\"sensors\", new DataPointSerializationSchema(), kafkaProperties);\n\n // Add it as a source\n SingleOutputStreamOperator<KeyedDataPoint<Double>> sensorStream = env.addSource(kafkaConsumer);\n\n if(useEventTime){\n sensorStream = sensorStream.assignTimestampsAndWatermarks(new SensorDataWatermarkAssigner());\n }\n\n // Write this sensor stream out to InfluxDB\n sensorStream\n .addSink(new InfluxDBSink<>(\"sensors\"));\n\n // Compute a windowed sum over this data and write that to InfluxDB as well.\n sensorStream\n .keyBy(\"key\")\n .timeWindow(Time.seconds(1))\n .sum(\"value\")\n .addSink(new InfluxDBSink<>(\"summedSensors\"));\n\n // execute program\n env.execute(\"OSCON Example\");\n }", "static <T> EagerFutureStream<T> eagerFutureStreamFrom(Stream<CompletableFuture<T>> stream) {\n\t\treturn new EagerReact(ThreadPools.getSequential(),new AsyncRetryExecutor(ThreadPools.getSequentialRetry()),false)\n\t\t\t\t\t\t\t\t\t.fromStream(stream);\n\t}", "@Test\n public void multipleSeparateShocks() {\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER2);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(absoluteShift, relativeShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.5, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2.1, FN.foo(env, SEC2).getValue(), DELTA);\n }", "@SuppressWarnings(\"unchecked\")\n public static void apply(StreamExecutionEnvironment env) throws Exception {\n if (env.getConfiguration().get(PythonOptions.PYTHON_OPERATOR_CHAINING_ENABLED)) {\n final Field transformationsField =\n StreamExecutionEnvironment.class.getDeclaredField(\"transformations\");\n transformationsField.setAccessible(true);\n final List<Transformation<?>> transformations =\n (List<Transformation<?>>) transformationsField.get(env);\n transformationsField.set(env, optimize(transformations));\n }\n }", "private static Runnable makeStreamGang(String[] wordList, TestsToRun choice) {\n\t\tswitch (choice) {\n\t\tcase SEQUENTIAL_STREAM:\n\t\t\treturn new SearchWithSequentialStream(wordList, mInputStrings);\n\t\tcase PARALLEL_STREAM:\n\t\t\treturn new SearchWithParallelStream(wordList, mInputStrings);\n\t\t}\n\t\treturn null;\n\t}", "static <T> EagerFutureStream<T> of(T value) {\n\t\treturn eagerFutureStream((Stream) Stream.of(value));\n\t}", "@Test\n public void multipleShocksOnSameDataReversed() {\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(relativeShift, absoluteShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.6, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "Sticker.Factory getStickerFactory();", "public final StreamedFixtureBuilder<T> fromStream(final FixtureStream stream) {\n\t\t\treturn new StreamedFixtureBuilder<T>(this, stream.asSourceStream());\n\t\t}", "public void makeStochastic() {\n \n double sum = 0.0;\n \n for(T row : getFirstDimension()) {\n \n // sum all values\n for(T col : getMatches(row)) {\n \n if(get(row, col)!=null) {\n sum += get(row, col);\n }\n \n }\n }\n \n \n for(T row : getFirstDimension()) {\n \n // sum all values\n for(T col : getMatches(row)) {\n \n if(get(row, col)!=null) {\n set(row, col, get(row, col)/sum);\n }\n \n }\n }\n }", "private void doLine()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\t\tDecimalFormat df = new DecimalFormat(\"#0,00\");\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\t\t\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\t\t\n\t\t// Steigung m und Achsenabschnitt b berechnen\n//\t\tdouble m = 0.;\n//\t\tif ((x2-x1)!=0)\n//\t\t\tm = (y2-y1)/(x2-x1);\n//\t\tdouble b = y1 - (m * x1);\n\t\t\n\t\t// Abstand zwischen beiden Koordinaten d\n\t\tdouble dsquare = Math.pow((x2-x1),2) + Math.pow((y2-y1),2);\n\t\tdouble d = Math.sqrt(dsquare);\n\n\t\t// Zeit t [s] berechnen, die für die Distanz d unter gegebener Geschwindigkeit benötigt wird.\n\t\tdouble t = d / toolSpeed;\n\t\tdouble steps = Math.ceil(t) +1;\n\t\t\n\t\twhile (steps>0 && !terminate)\n\t\t{\n\t\t\tdouble x,y, currentTime=0;\n\t\t\tif (t != 0)\n\t\t\tcurrentTime = elapsedTime / t;\n\t\t\t\n\t\t\tx = (x2-x1) * currentTime + x1;\n\t\t\ty = (y2-y1) * currentTime + y1;\n\t\t\tubisenseData.setPosition(new Point3D(\tDouble.parseDouble(df.format(x)),\n\t\t\t \tDouble.parseDouble(df.format(y)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long)(elapsedTime*SLEEP_INTERVAL));\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tnotifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\tif (elapsedTime > t)\n\t\t\t\telapsedTime = t;\n\t\t\t\n\t\t\tsteps--;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n ParameterTool params = ParameterTool.fromPropertiesFile(args[0]);\n\n // create streaming environment\n final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // enable event time processing\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n env.getConfig().setAutoWatermarkInterval(1000L);\n\n // enable fault-tolerance, 60s checkpointing\n env.enableCheckpointing(60000);\n\n // enable restarts\n env.setRestartStrategy(RestartStrategies.fixedDelayRestart(50, 500L));\n env.setStateBackend(new RocksDBStateBackend(\"file:///tmp/rocks_state_store\"));\n\n Properties kParams = params.getProperties();\n kParams.setProperty(\"group.id\", UUID.randomUUID().toString());\n //kParams.setProperty(\"group.id\", \"FLINK_KAFKA_GROUP\");\n DataStream<ObjectNode> inputStream = env.addSource(new FlinkKafkaConsumer010<>(params.getRequired(\"topic\"), new JSONDeserializationSchema(), kParams)).name(\"Kafka 0.10 Source\");\n\n DataStream<PlaneModel> planes = inputStream\n .assignTimestampsAndWatermarks(new PlaneTimestampExtractor())\n .keyBy(jsonNode -> jsonNode.get(\"icao\").textValue())\n .map(new PlaneMapper())\n .name(\"Timestamp -> KeyBy ICAO -> Map\");\n\n DataStream<Tuple2<Integer,PlaneModel>> keyedPlanes = planes\n .keyBy(\"icao\")\n .window(TumblingEventTimeWindows.of(Time.seconds(5)))\n .apply(new PlaneWindow())\n .name(\"Tumbling Window\");\n\n // Print plane stream to stdout\n keyedPlanes.print();\n\n DataStream<Tuple2<Integer,PlaneModel>> military_planes = keyedPlanes.filter(new MilitaryPlaneFilter())\n .name(\"Military Plane Filter\");\n military_planes.print();\n\n // At this point, build a stream that stores all the active (seen in the last\n // 60 seconds) ICAOs in our current airspace, and store in a single well known\n // queryable key. Emit every 5 seconds. This stream is only here to populate \n // the managed state, but if you use the print sink you'll get the array of \n // ICAOs as a string for debugging.\n DataStream<String> airspace = keyedPlanes.windowAll(SlidingEventTimeWindows.of(Time.seconds(60), Time.seconds(5)))\n .apply(new AirspaceWindow())\n .keyBy(0) // this will always be the 'AIRPLANE' key\n .map(new AirspaceMapper()); // mapper to store state\n\n airspace.print();\n\n String app_name = String.format(\"Streaming Planes <- Kafka Topic: %s\", params.getRequired(\"topic\"));\n env.execute(app_name);\n\n }", "@Test\n public void multipleShocksOnSameData() {\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER1);\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(absoluteShift, relativeShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.65, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }", "public Builder setEtaToFirstWaypoint(\n com.google.protobuf.Timestamp.Builder builderForValue) {\n if (etaToFirstWaypointBuilder_ == null) {\n etaToFirstWaypoint_ = builderForValue.build();\n onChanged();\n } else {\n etaToFirstWaypointBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "public static TwitterStream firehose(TwitterStreamConfiguration tws, \n TwitterStreamHandler handler) throws IOException, OAuthException {\n \n //build get params\n HttpParams getParams = new BasicHttpParams();\n if (tws.getCount() != null) getParams.setIntParameter(\"count\", tws.getCount());\n if (tws.isDelimited()) getParams.setParameter(\"delimited\", tws.getDelimited());\n //send request\n HttpRequestBase conn = buildConnection(FIREHOSE_URL, getParams, tws);\n return new TwitterStream(conn, handler);\n }", "private double predictFromTraining(Instances training) {\n\t\tdouble predictedValue = -1;\n\t\ttry{\n\t\t\t// new forecaster\n\t WekaForecaster forecaster = new WekaForecaster();\n\n\t // Set the targets we want to forecast\n\t forecaster.setFieldsToForecast(\"count\");\n\t \n\t // Default underlying classifier is SMOreg (SVM) - we'll use\n\t // gaussian processes for regression instead\n\t forecaster.setBaseForecaster(new GaussianProcesses());\n\t forecaster.getTSLagMaker().setTimeStampField(\"date\"); // date time stamp\n\t \n\t //System.out.println(dateFormat.format(new Date()) + \" buildForecaster\");\n\t \n\t // build the model\n\t forecaster.buildForecaster(training, System.out);\n\n\t //System.out.println(dateFormat.format(new Date()) + \" primeForecaster\");\n\t \n\t forecaster.primeForecaster(training);\n\t \n\t //System.out.println(dateFormat.format(new Date()) + \" forecaster.forecast\");\n\t \n\t // forecast for 1 unit beyond the end of the\n\t // training data\n\t List<List<NumericPrediction>> forecast = forecaster.forecast(1, System.out);\n\t \n\t //System.out.println(dateFormat.format(new Date()) + \" forecast.get\");\n\t \n\t // Getting the prediction:\n\t List<NumericPrediction> predsAtStep = forecast.get(0);\n\t NumericPrediction predForTarget = predsAtStep.get(0);\n \t//System.out.print(\"\" + predForTarget.predicted() + \" \");\n \tpredictedValue = predForTarget.predicted();\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn predictedValue;\n\t}", "protected Shingle(final Shingle shingle) {\n List<Double> data = new ArrayList<Double>(shingle.size());\n for (Double f : shingle.data) {\n data.add(f);\n }\n setData(data);\n }", "private AggResult parse(MeasuredData measuredData, AggResult dest) {\n measuredData.data.computeIfPresent(MetricNames.SEND_QUEUE, (comp, data) -> {\n parseQueueResult((Map<String, Number>) data, dest.getSendQueueResult());\n return data;\n });\n measuredData.data.computeIfPresent(MetricNames.RECV_QUEUE, (comp, data) -> {\n parseQueueResult((Map<String, Number>) data, dest.getRecvQueueResult());\n return data;\n });\n if (firstTasks.contains(measuredData.task)) {\n measuredData.data.computeIfPresent(MetricNames.DURATION, (comp, data) -> {\n dest.addDuration(((Number) data).longValue());\n return data;\n });\n }\n if (rawTopo.get_spouts().containsKey(measuredData.component)) {\n Map<String, Object> data = (Map<String, Object>) measuredData.data.get(MetricNames.COMPLETE_LATENCY);\n if (data != null) {\n data.forEach((stream, elementStr) -> {\n String[] elements = ((String) elementStr).split(\",\");\n int cnt = Integer.valueOf(elements[0]);\n if (cnt > 0) {\n double val = Double.valueOf(elements[1]);\n double val_2 = Double.valueOf(elements[2]);\n ((SpoutAggResult) dest).getCompletedLatency().computeIfAbsent(stream, (k) -> new CntMeanVar())\n .addAggWin(cnt, val, val_2);\n }\n });\n }\n } else {\n Map<String, Object> data = (Map<String, Object>) measuredData.data.get(MetricNames.TASK_EXECUTE);\n if (data != null) {\n data.forEach((stream, elementStr) -> {\n String[] elements = ((String) elementStr).split(\",\");\n int cnt = Integer.valueOf(elements[0]);\n if (cnt > 0) {\n double val = Double.valueOf(elements[1]);\n double val_2 = Double.valueOf(elements[2]);\n ((BoltAggResult) dest).getTupleProcess().computeIfAbsent(stream, (k) -> new CntMeanVar())\n .addAggWin(cnt, val, val_2);\n }\n });\n }\n }\n return dest;\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate void buildAndSubmit() throws Exception\r\n {\r\n TopologyBuilder builder = new TopologyBuilder();\r\n builder.setSpout(RANDOM_SENTENCE_SPOUT_ID, new RandomSentenceSpout(), 1);\r\n builder.setBolt(KAFKA_BOLT_ID, new KafkaBolt(topologyConfig), 1).shuffleGrouping(RANDOM_SENTENCE_SPOUT_ID);\r\n builder.setBolt(HBASE_UPDATE_BOLT_ID, HBaseUpdateBolt.make(topologyConfig), 1).shuffleGrouping(RANDOM_SENTENCE_SPOUT_ID);\r\n \r\n Config conf = new Config(); \r\n conf.setDebug(false);\r\n \r\n StormSubmitter.submitTopology(\"jason-hbase-storm\", conf, builder.createTopology());\r\n }", "public void testApply() {\n \t\tCalendar dateTime = new GregorianCalendar();\n \t\tdateTime.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\t\t// Monday\n \t\tSystem.out.println(dateTime.toString());\n\t\tForecastData data = new ForecastData(dateTime, 35.0, 0.0, 0.0, 0.0, 0.0, 0.0, 37.0, 0.0, 0.0);\n \t\t\n \t\tFilter shouldPass = new Filter(\"pass\");\n \t\tFilter shouldFail = new Filter(\"fail\");\n \t\tFilter emptyFilter = new Filter(\"empty\");\n \t\tFilter multipleDays = new Filter(\"multipleDays\");\n \t\tFilter wrongDay = new Filter(\"wrongDay\");\n \t\tFilter noConditions = new Filter(\"noConditions\");\n \t\tFilter noTimes = new Filter(\"noTimes\");\n \t\t\n \t\tConditionRule cR = new ConditionRule(ConditionRule.conditions[0], 30, 45);\t\t// Temperature 30 -> 45\n \t\tTimeRule tR = new TimeRule(TimeRule.days[0]);\t\t\t// Monday\n \t\tTimeRule tR2 = new TimeRule(TimeRule.days[1]);\t\t\t// Tuesday\n \t\tConditionRule cR2 = new ConditionRule(ConditionRule.conditions[4], 35, 45);\t\t// Cloud Cover 35 -> 45\n \t\tConditionRule bad = new ConditionRule(ConditionRule.conditions[0], 0, 5);\t\t// Temperature 0 -> 5\n \t\t\n \t\tshouldPass.addRule(cR);\n \t\tshouldPass.addRule(cR2);\n \t\tshouldPass.addRule(tR);\n \t\t\n \t\tshouldFail.addRule(cR2);\n \t\tshouldFail.addRule(bad);\n \t\tshouldFail.addRule(tR2);\n \t\t\n \t\tmultipleDays.addRule(cR);\n \t\tmultipleDays.addRule(tR);\n \t\tmultipleDays.addRule(tR2);\n \t\t\n \t\twrongDay.addRule(cR);\n \t\twrongDay.addRule(cR2);\n \t\twrongDay.addRule(tR2);\n \t\t\n \t\tnoConditions.addRule(tR);\n \t\tnoConditions.addRule(tR2);\n \t\t\n \t\tnoTimes.addRule(cR);\n \t\tnoTimes.addRule(cR2);\n \t\t\n \t\tassertTrue(shouldPass.apply(data));\n \t\tassertFalse(emptyFilter.apply(data));\n \t\tassertFalse(shouldFail.apply(data));\n \t\tassertTrue(multipleDays.apply(data));\n \t\tassertFalse(wrongDay.apply(data));\n \t\tassertFalse(noConditions.apply(data));\n \t\tassertFalse(noTimes.apply(data));\t\n \t}", "public static void main(String[] args) throws Exception {\n var env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // Set to 1 for now\n //env.setParallelism(1);\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n Properties props = new PropReader().getProps();\n props.setProperty(\"bootstrap.servers\", KAFKA_ADDRESS);\n props.setProperty(\"group.id\", KAFKA_GROUP);\n //env.enableCheckpointing(50000);\n //env.getConfig().setLatencyTrackingInterval(1000);\n env.getConfig().setLatencyTrackingInterval(5L);\n\n\n // Create tbe Kafka Consumer here\n FlinkKafkaConsumer010<Order> consumer = new FlinkKafkaConsumer010<Order>(IN_TOPIC,\n new OrderDeserializationSchema()\n , props);\n // uid - Grafana , name - flink.\n DataStream<Order> orderStream = env.addSource(consumer).name(\"Subscribe Trades/Orders\").uid(\"Subscribe_Trades_Orders\");// .setParallelism(1)\n // printOrTest(orderStream);\n // create a Producer for positionsByAct\n FlinkKafkaProducer010<FlatOrder> producer =\n new FlinkKafkaProducer010<FlatOrder>\n (KAFKA_ADDRESS,\n OUT_TOPIC,\n new FlatOrderSerializationSchema());\n producer.setWriteTimestampToKafka(true);\n\n //// create a Producer for positionsBySymbol\n FlinkKafkaProducer010<FlatOrder> producer2 =\n new FlinkKafkaProducer010<FlatOrder>\n (KAFKA_ADDRESS,\n OUT_TOPIC_1,\n new FlatOrderSerializationSchema());\n producer2.setWriteTimestampToKafka(true);\n\n // Allocations are by Cusip, so keyBy Cusip.\n // flatten the structure by extracting allocations for account, sub account,cusip and quantity .\n // Convert to RichFlatMap and add a guage maetric.\n DataStream<FlatOrder> flatmapStream = orderStream\n .keyBy(order -> order.getOrderId())\n .flatMap(new MyGuage())\n .name(\"flatten the orders\").uid(\"flatten the orders\").assignTimestampsAndWatermarks(new BoundedOutOfOrdernessGenerator())\n .keyBy(flatOrder -> flatOrder.getCusip())\n .window(TumblingEventTimeWindows.of(Time.minutes(1)))\n .allowedLateness(Time.seconds(10))\n .sum(\"quantity\").name(\" Aggregate Quantity By Cusip/Symbol\").uid(\"Aggregate Quantity By Cusip/Symbol\");\n // .setParallelism(4)\n //.process(new AddQty()).name(\" Aggregate Quantity By Cusip/Symbol\").uid(\"Aggregate Quantity By Cusip/Symbol\");\n flatmapStream.addSink(producer2).name(\" Publish to positionsBySymbol\").uid(\"Publish to positionsBySymbol\");// publish to positionsBySymbol.\n printOrTest(flatmapStream);\n\n // Task # 2 : PositionByAccount\n DataStream<FlatOrder> flatCompositeMapStream = orderStream.keyBy(order -> order.getOrderId())\n .flatMap(new MyGuage()).assignTimestampsAndWatermarks(new BoundedOutOfOrdernessGenerator()).name(\"Assign Watermarks\").uid(\"Assign Watermarks\")\n .keyBy(flatOrder -> new CompositeKey( flatOrder.getCusip(),flatOrder.getAccount(),flatOrder.getSubAccount()))\n .window(TumblingEventTimeWindows.of(Time.minutes(3)))\n .allowedLateness(Time.seconds(10))\n .sum(\"quantity\").name(\"Aggregate Qty by Cusip/Acct/Subacct Composite key\").uid(\"Aggregate Qty by Cusip/Acct/Subacct Composite key\");\n printOrTest(flatCompositeMapStream);\n flatCompositeMapStream.addSink(producer).name(\"Publish to positionsByAct\").uid(\"Publish to positionsByAct\");\n\n env.execute(\"Order Processor \");\n }", "private void establishPairings() {\n int splineIdx = 0;\n double splineDist = 0.0;\n double seqDist = 0.0;\n Pt pt;\n Pt prevSeq = sequence.get(0);\n Pt prevSpline;\n for (int seqIdx=0; seqIdx < sequence.size(); seqIdx++) {\n\n // part 1: get pt and seqDist set up correctly\n pt = sequence.get(seqIdx);\n seqDist += prevSeq.distance(pt);\n prevSeq = pt;\n\n // part 2: find index of spline point that is just past where we\n // want to be, then find the interpolated point between our\n // known point and that spline point. Set the \"tween\" attribute\n // of the sequence point.\n double additionalDist = 0.0;\n prevSpline = spline.get(splineIdx);\n Pt spt;\n for (int sidx = splineIdx; sidx < spline.size(); sidx++) {\n\tspt = spline.get(sidx);\n\tadditionalDist = spt.distance(prevSpline);\n\tif (additionalDist + splineDist >= seqDist) {\n\t // the target point is between splineIdx and sidx\n\t Pt target = Functions.getPointAtDistance(spline, splineIdx, splineDist, 1, seqDist);\n\t pt.setAttribute(\"tween\", target);\n\t break;\n\t} else if (sidx >= (spline.size() -1)) {\n\t pt.setAttribute(\"tween\", spline.getLast());\n\t}\n\tprevSpline = spt;\n\tsplineIdx = sidx;\n\tsplineDist += additionalDist;\n }\n }\n }", "Optional<StreamEntity> convert(StravaStream[] streams, Long activityId, StravaUserEntity stravaUserEntity) {\n StravaStream latLngStream = null;\n for(StravaStream stravaStream : streams) {\n if (stravaStream != null && LATLNG.equals(stravaStream.getType())) {\n latLngStream = stravaStream;\n }\n }\n\n if(latLngStream == null) {\n logger.warn(\"Did not find latlng stream in streams from Strava for activity id {}\", activityId);\n return Optional.empty();\n }\n\n StreamEntity streamEntity = new StreamEntity();\n streamEntity.setActivityId(activityId);\n streamEntity.setStravaUsername(stravaUserEntity.getStravaUsername());\n\n try {\n List<LatLng> latLngList = latLngStream.getData()\n .stream()\n .map(latLngPair -> new LatLng(latLngPair.get(0), latLngPair.get(1)))\n .collect(Collectors.toList());\n\n String latLngStreamString = objectMapper.writeValueAsString(latLngList);\n streamEntity.setLatLngStream(latLngStreamString);\n\n return Optional.of(streamEntity);\n }\n catch(JsonProcessingException e) {\n throw new IllegalArgumentException(\"While serializing lat-lng stream\", e);\n }\n }", "public void apply(com.esotericsoftware.spine.Skeleton r27) {\n /*\n r26 = this;\n r0 = r26;\n r7 = r0.events;\n r0 = r26;\n r2 = r0.listeners;\n r0 = r2.size;\n r23 = r0;\n r20 = 0;\n L_0x000e:\n r0 = r26;\n r2 = r0.tracks;\n r2 = r2.size;\n r0 = r20;\n if (r0 < r2) goto L_0x0019;\n L_0x0018:\n return;\n L_0x0019:\n r0 = r26;\n r2 = r0.tracks;\n r0 = r20;\n r17 = r2.get(r0);\n r17 = (com.esotericsoftware.spine.AnimationStatePR.TrackEntry) r17;\n if (r17 != 0) goto L_0x002a;\n L_0x0027:\n r20 = r20 + 1;\n goto L_0x000e;\n L_0x002a:\n r2 = 0;\n r7.size = r2;\n r0 = r17;\n r5 = r0.time;\n r0 = r17;\n r4 = r0.lastTime;\n r0 = r17;\n r0 = r0.endTime;\n r18 = r0;\n r0 = r17;\n r6 = r0.loop;\n if (r6 != 0) goto L_0x0047;\n L_0x0041:\n r2 = (r5 > r18 ? 1 : (r5 == r18 ? 0 : -1));\n if (r2 <= 0) goto L_0x0047;\n L_0x0045:\n r5 = r18;\n L_0x0047:\n r0 = r17;\n r0 = r0.previous;\n r25 = r0;\n r0 = r17;\n r2 = r0.mixDuration;\n r3 = 0;\n r2 = (r2 > r3 ? 1 : (r2 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x018b;\n L_0x0056:\n r0 = r17;\n r2 = r0.mixTime;\n r0 = r17;\n r3 = r0.mixDuration;\n r8 = r2 / r3;\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r2 < 0) goto L_0x006d;\n L_0x0066:\n r8 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = 0;\n r0 = r17;\n r0.mixDuration = r2;\n L_0x006d:\n if (r25 != 0) goto L_0x00e0;\n L_0x006f:\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.mix(r3, r4, r5, r6, r7, r8);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r9 = \"none -> \";\n r3.<init>(r9);\n r0 = r17;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \": \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n L_0x009a:\n r21 = 0;\n r0 = r7.size;\n r24 = r0;\n L_0x00a0:\n r0 = r21;\n r1 = r24;\n if (r0 < r1) goto L_0x0196;\n L_0x00a6:\n if (r6 == 0) goto L_0x01d1;\n L_0x00a8:\n r2 = r4 % r18;\n r3 = r5 % r18;\n r2 = (r2 > r3 ? 1 : (r2 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x00d6;\n L_0x00b0:\n r2 = r5 / r18;\n r0 = (int) r2;\n r16 = r0;\n r0 = r17;\n r2 = r0.listener;\n if (r2 == 0) goto L_0x00c6;\n L_0x00bb:\n r0 = r17;\n r2 = r0.listener;\n r0 = r20;\n r1 = r16;\n r2.complete(r0, r1);\n L_0x00c6:\n r21 = 0;\n r0 = r26;\n r2 = r0.listeners;\n r0 = r2.size;\n r24 = r0;\n L_0x00d0:\n r0 = r21;\n r1 = r24;\n if (r0 < r1) goto L_0x01db;\n L_0x00d6:\n r0 = r17;\n r2 = r0.time;\n r0 = r17;\n r0.lastTime = r2;\n goto L_0x0027;\n L_0x00e0:\n r0 = r25;\n r11 = r0.time;\n r0 = r25;\n r2 = r0.loop;\n if (r2 != 0) goto L_0x00f6;\n L_0x00ea:\n r0 = r25;\n r2 = r0.endTime;\n r2 = (r11 > r2 ? 1 : (r11 == r2 ? 0 : -1));\n if (r2 <= 0) goto L_0x00f6;\n L_0x00f2:\n r0 = r25;\n r11 = r0.endTime;\n L_0x00f6:\n r0 = r17;\n r2 = r0.animation;\n if (r2 != 0) goto L_0x0144;\n L_0x00fc:\n r0 = r25;\n r9 = r0.animation;\n r0 = r25;\n r13 = r0.loop;\n r14 = 0;\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r15 = r2 - r8;\n r10 = r27;\n r12 = r11;\n r9.mix(r10, r11, r12, r13, r14, r15);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r0 = r25;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \" -> none: \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n L_0x012f:\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r2 < 0) goto L_0x009a;\n L_0x0135:\n com.badlogic.gdx.utils.Pools.free(r25);\n r2 = 0;\n r0 = r17;\n r0.previous = r2;\n r2 = 0;\n r0 = r17;\n r0.mixDuration = r2;\n goto L_0x009a;\n L_0x0144:\n r0 = r25;\n r9 = r0.animation;\n r0 = r25;\n r13 = r0.loop;\n r14 = 0;\n r10 = r27;\n r12 = r11;\n r9.apply(r10, r11, r12, r13, r14);\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.mix(r3, r4, r5, r6, r7, r8);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r0 = r25;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \" -> \";\n r3 = r3.append(r9);\n r0 = r17;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \": \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n goto L_0x012f;\n L_0x018b:\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.apply(r3, r4, r5, r6, r7);\n goto L_0x009a;\n L_0x0196:\n r0 = r21;\n r19 = r7.get(r0);\n r19 = (com.esotericsoftware.spine.Event) r19;\n r0 = r17;\n r2 = r0.listener;\n if (r2 == 0) goto L_0x01af;\n L_0x01a4:\n r0 = r17;\n r2 = r0.listener;\n r0 = r20;\n r1 = r19;\n r2.event(r0, r1);\n L_0x01af:\n r22 = 0;\n L_0x01b1:\n r0 = r22;\n r1 = r23;\n if (r0 < r1) goto L_0x01bb;\n L_0x01b7:\n r21 = r21 + 1;\n goto L_0x00a0;\n L_0x01bb:\n r0 = r26;\n r2 = r0.listeners;\n r0 = r22;\n r2 = r2.get(r0);\n r2 = (com.esotericsoftware.spine.AnimationStatePR.AnimationStateListener) r2;\n r0 = r20;\n r1 = r19;\n r2.event(r0, r1);\n r22 = r22 + 1;\n goto L_0x01b1;\n L_0x01d1:\n r2 = (r4 > r18 ? 1 : (r4 == r18 ? 0 : -1));\n if (r2 >= 0) goto L_0x00d6;\n L_0x01d5:\n r2 = (r5 > r18 ? 1 : (r5 == r18 ? 0 : -1));\n if (r2 < 0) goto L_0x00d6;\n L_0x01d9:\n goto L_0x00b0;\n L_0x01db:\n r0 = r26;\n r2 = r0.listeners;\n r0 = r21;\n r2 = r2.get(r0);\n r2 = (com.esotericsoftware.spine.AnimationStatePR.AnimationStateListener) r2;\n r0 = r20;\n r1 = r16;\n r2.complete(r0, r1);\n r21 = r21 + 1;\n goto L_0x00d0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.esotericsoftware.spine.AnimationStatePR.apply(com.esotericsoftware.spine.Skeleton):void\");\n }", "public static void main(String[] args) throws Exception {\n\t\tfinal StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n\n /* if you would like to use runtime configuration properties, uncomment the lines below\n * DataStream<String> input = createSourceFromApplicationProperties(env);\n */\n\n\t\tDataStream<String> input = createSourceFromStaticConfig(env);\n\n\t\t// Kinesis Firehose sink\n\t\tinput.addSink(createFirehoseSinkFromStaticConfig());\n\n\t\t// If you would like to use runtime configuration properties, uncomment the lines below\n\t\t// input.addSink(createFirehoseSinkFromApplicationProperties());\n\n\t\tenv.execute(\"Flink Streaming Java API Skeleton\");\n\t}", "@Override\n\tpublic void run() {\n\t\tspacing = checkDimensions(spacingString, input.numDimensions(), \"Spacings\");\n\t\tscales = Arrays.stream(scaleString.split(regex)).mapToInt(Integer::parseInt)\n\t\t\t.toArray();\n\t\tDimensions resultDims = Views.addDimension(input, 0, scales.length - 1);\n\t\t// create output image, potentially-filtered input\n\t\tresult = opService.create().img(resultDims, new FloatType());\n\n\t\tfor (int s = 0; s < scales.length; s++) {\n\t\t\t// Determine whether or not the user would like to apply the gaussian\n\t\t\t// beforehand and do it.\n\t\t\tRandomAccessibleInterval<T> vesselnessInput = doGauss ? opService.filter()\n\t\t\t\t.gauss(input, scales[s]) : input;\n\t\t\tIntervalView<FloatType> scaleResult = Views.hyperSlice(result, result\n\t\t\t\t.numDimensions() - 1, s);\n\t\t\topService.filter().frangiVesselness(scaleResult, vesselnessInput, spacing,\n\t\t\t\tscales[s]);\n\t\t}\n\t}", "public AftSurvivalRegPredictStreamOp(BatchOperator model, Params params) {\n\t\tsuper(model, AFTModelMapper::new, params);\n\t}", "public Builder addTransitFlights(\n com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.transitFlight.Builder builderForValue) {\n if (transitFlightsBuilder_ == null) {\n ensureTransitFlightsIsMutable();\n transitFlights_.add(builderForValue.build());\n onChanged();\n } else {\n transitFlightsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public interface StreamDefinitionBuilder {\n\n public String define();\n\n public String getStreamId();\n\n public String getStreamName();\n\n public String getStreamVersion();\n\n}", "List<TradeInstruction> decideTrades(ConsolidatedSnapshot snapshot, double[] forecasts);", "@Override\n public WorkflowInstance xapply() throws Exception {\n Long workflowInstanceId = null;\n if (StringUtils.isNotBlank(workflowInstance)) {\n try {\n workflowInstanceId = Long.parseLong(workflowInstance);\n } catch (NumberFormatException e) {\n // The workflowId is not a long value and might be the media package identifier\n wfConfig.put(IngestServiceImpl.LEGACY_MEDIAPACKAGE_ID_KEY, workflowInstance);\n }\n }\n\n if (workflowInstanceId != null) {\n return ingestService.ingest(mp, trimToNull(workflowDefinition), wfConfig, workflowInstanceId);\n } else {\n return ingestService.ingest(mp, trimToNull(workflowDefinition), wfConfig);\n }\n }", "@Override\n protected void process(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor,\n StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater) {\n ComplexEventChunk<StreamEvent> returnEventChunk = new ComplexEventChunk<StreamEvent>(false);\n synchronized (this) {\n while (streamEventChunk.hasNext()) {\n StreamEvent event = streamEventChunk.next();\n streamEventChunk.remove();\n\n // Variable value of the latest event\n double value = ((Number) attributeExpressionExecutors[0].execute(event)).doubleValue();\n eventStack.add(event);\n\n // Create an object holding latest event value and insert into valueStack and valueStackLastL\n AttributeDetails newInput = new AttributeDetails();\n newInput.setValue(value);\n valueStack.add(newInput);\n\n switch (extremaType) {\n case MINMAX:\n // Retain only maxPreBound+maxPostBound events\n if (eventStack.size() > maxPreBound + maxPostBound) {\n eventStack.remove();\n valueRemoved = valueStack.remove();\n }\n currentMax = maxDequeIterator(newInput);\n currentMin = minDequeIterator(newInput);\n // Find whether current max satisfies preBoundChange, postBoundChange conditions and output value if\n // so\n if (newInput.getValue() <= currentMax.getMaxThreshold() && !currentMax.isOutputAsRealMax()\n && currentMax.isEligibleForRealMax()) {\n StreamEvent returnEvent = findIfActualMax(newInput);\n if (returnEvent != null) {\n returnEventChunk.add(returnEvent);\n }\n }\n // Find whether current min satisfies preBoundChange, postBoundChange conditions and output value if\n // so\n if (newInput.getValue() >= currentMin.getMinThreshold() && !currentMin.isOutputAsRealMin()\n && currentMin.isEligibleForRealMin()) {\n StreamEvent returnEvent = findIfActualMin(newInput);\n if (returnEvent != null) {\n returnEventChunk.add(returnEvent);\n }\n }\n break;\n case MAX:\n // Retain only maxPreBound+maxPostBound events\n if (eventStack.size() > maxPreBound + maxPostBound) {\n eventStack.remove();\n valueRemoved = valueStack.remove();\n }\n currentMax = maxDequeIterator(newInput);\n // Find whether current max satisfies preBoundChange, postBoundChange conditions and output value if\n // so\n if (newInput.getValue() <= currentMax.getMaxThreshold() && !currentMax.isOutputAsRealMax()\n && currentMax.isEligibleForRealMax()) {\n StreamEvent returnEvent = findIfActualMax(newInput);\n if (returnEvent != null) {\n returnEventChunk.add(returnEvent);\n }\n }\n break;\n case MIN:\n // Retain only maxPreBound+maxPostBound events\n if (eventStack.size() > maxPreBound + maxPostBound) {\n eventStack.remove();\n valueRemoved = valueStack.remove();\n }\n currentMin = minDequeIterator(newInput);\n // Find whether current min satisfies preBoundChange, postBoundChange conditions and output value if\n // so\n if (newInput.getValue() >= currentMin.getMinThreshold() && !currentMin.isOutputAsRealMin()\n && currentMin.isEligibleForRealMin()) {\n StreamEvent returnEvent = findIfActualMin(newInput);\n if (returnEvent != null) {\n returnEventChunk.add(returnEvent);\n }\n }\n break;\n }\n }\n }\n nextProcessor.process(returnEventChunk);\n }", "protected void smooth() {\n if (!timer.isRunning() || sequence == null) {\n return;\n }\n if (spline == null) {\n spline = Functions.getSpline(sequence, numSplinePoints, 4);\n error = Double.MAX_VALUE;\n establishPairings();\n } else if (error < ERROR_TOLERANCE) {\n if (numSplinePoints <= 4) {\n\tspline = null;\n\terror = Double.MAX_VALUE;\n\ttimer.stop();\n\treturn;\n }\n \n numSplinePoints = Math.min(numSplinePoints - 4, 4);\n error = Double.MAX_VALUE;\n\n spline = Functions.getSpline(sequence, numSplinePoints, 4);\n establishPairings();\n }\n\n error = 0.0;\n int ptCnt = 0;\n for (Pt pt : sequence) {\n Pt destination = (Pt) pt.getAttribute(\"tween\");\n\n if (pt.distance(destination) < 1.0) {\n\tpt.setLocation(destination.getX(), destination.getY());\n } else {\n\tdouble dx = (destination.getX() - pt.getX()) / C;\n\tdouble dy = (destination.getY() - pt.getY()) / C;\n\tpt.setLocation(pt.getX() + dx , pt.getY() + dy);\n\terror += Math.hypot(dx, dy);\n }\n ptCnt++;\n }\n \n }", "public void processDeadSingle(BaseSingle deadSingle) {\n\n // Formation before the transformation\n BaseSingle[][] formationBefore = aliveTroopsFormation.clone();\n\n // Introduce a morale loss.\n morale -= GameplayUtils.moraleLossDueToDeadSoldier(aliveTroopsMap.size());\n\n // Change the formation of the unit to maintain the frontline.\n int index = aliveTroopsMap.get(deadSingle);\n aliveTroopsMap.remove(deadSingle);\n int row = index / width;\n int col = index % width;\n aliveTroopsFormation[row][col] = null;\n\n while (true) {\n if (row < aliveTroopsFormation.length - 1 && aliveTroopsFormation[row + 1][col] != null) {\n // If there is someone alive behind, move that person up\n swapTwoTroopPositions(row, col, row + 1, col);\n row += 1;\n } else if ((col > 0) && (col < width / 2) && aliveTroopsFormation[row][col - 1] != null) {\n swapTwoTroopPositions(row, col, row, col - 1);\n col -= 1;\n } else if ((col < width - 1) && (col >= width / 2) && aliveTroopsFormation[row][col + 1] != null) {\n swapTwoTroopPositions(row, col, row, col + 1);\n col += 1;\n } else if (aliveTroopsMap.size() >= width * (row + 1) && col == 0) {\n // If there are still more people in the last row, we shall pick the next left-most person to fill in\n // the spot\n int farLeftCol = 0;\n for (int i = 0; i < width; i++) {\n if (aliveTroopsFormation[row + 1][i] != null) {\n farLeftCol = i;\n break;\n }\n }\n swapTwoTroopPositions(row, col, row + 1, farLeftCol);\n break;\n } else if (aliveTroopsMap.size() >= width * (row + 1) && col == width - 1) {\n // If there are still more people in the last row, we shall pick the next right-most person to fill in\n // the spot\n int farRightCol = 0;\n for (int i = width - 1; i >= 0; i--) {\n if (aliveTroopsFormation[row + 1][i] != null) {\n farRightCol = i;\n break;\n }\n }\n swapTwoTroopPositions(row, col, row + 1, farRightCol);\n break;\n } else {\n break;\n }\n }\n\n\n // Check formations, and fix the formation if necessary\n if (TestUtils.checkFormation(this)) {\n if (gameSettings.isCountWrongFormationChanges()) {\n env.getMonitor().count(MonitorEnum.WRONG_FORMATION_CHANGES);\n Log.info(\"Formation transformation looks wrong\");\n Log.info(\"Formation before:\");\n Log.info(TestUtils.formationString(formationBefore));\n Log.info(\"Formation after:\");\n Log.info(TestUtils.formationString(aliveTroopsFormation));\n }\n reorderTroopsWithWidth(width);\n }\n }", "public ForecastParameters make_analyst_fcparams (RJGUIController.XferAnalystView xfer) {\n\n\t\tForecastParameters new_fcparams = new ForecastParameters();\n\t\tnew_fcparams.setup_all_default();\n\n\t\tif (xfer.x_autoEnableParam == AutoEnable.DISABLE) {\n\t\t\treturn new_fcparams;\n\t\t}\n\n\t\tnew_fcparams.set_analyst_control_params (\n\t\t\tForecastParameters.CALC_METH_AUTO_PDL,\t\t// generic_calc_meth\n\t\t\tForecastParameters.CALC_METH_AUTO_PDL,\t\t// seq_spec_calc_meth\n\t\t\tForecastParameters.CALC_METH_AUTO_PDL,\t\t// bayesian_calc_meth\n\t\t\tanalyst_inj_text.isEmpty() ? ForecastParameters.INJ_TXT_USE_DEFAULT : analyst_inj_text\n\t\t);\n\n\t\tif (!( xfer.x_useCustomParamsParam )) {\n\t\t\treturn new_fcparams;\n\t\t}\n\n\t\tnew_fcparams.set_analyst_mag_comp_params (\n\t\t\ttrue,\t\t\t\t\t\t\t\t\t\t// mag_comp_avail\n\t\t\taafs_fcparams.mag_comp_regime,\t\t\t\t// mag_comp_regime\n\t\t\tfetch_fcparams.mag_comp_params\t\t\t\t// mag_comp_params\n\t\t);\n\n\t\tnew_fcparams.set_analyst_seq_spec_params (\n\t\t\ttrue,\t\t\t\t\t\t\t\t\t\t// seq_spec_avail\n\t\t\tfetch_fcparams.seq_spec_params\t\t\t\t// seq_spec_params\n\t\t);\n\n\t\tif (custom_search_region == null) {\n\t\t\treturn new_fcparams;\n\t\t}\n\n\t\tnew_fcparams.set_analyst_aftershock_search_params (\n\t\t\ttrue,\t\t\t\t\t\t\t\t\t\t// the_aftershock_search_avail\n\t\t\tcustom_search_region,\t\t\t\t\t\t// the_aftershock_search_region\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT,\t\t// the_min_days\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT,\t\t// the_max_days\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT,\t\t// the_min_depth\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT,\t\t// the_max_depth\n\t\t\tForecastParameters.SEARCH_PARAM_OMIT\t\t// the_min_mag\n\t\t);\n\t\t\n\t\treturn new_fcparams;\n\t}", "@Test\n\tpublic void testSyntheticStreamTupleBuilder() throws ParseException {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.SYNTHETIC_STREAM);\n\n\t\tfinal Tuple tuple = tupleBuilder.buildTuple(SYNTHETIC_STREAM_TEST_LINE);\n\n\t\tAssert.assertNotNull(tuple);\n\t\tAssert.assertEquals(\"2so3r7lmmlt2204\", tuple.getKey());\n\n\t\tfinal Hyperrectangle exptectedBox = new Hyperrectangle(23.000566996237414,23.000566996237414,\n\t\t\t\t17.782247471059588,17.782247471059588,33.20003060813562,33.20003060813562,\n\t\t\t\t96.82571259235081,96.82571259235081);\n\n\t\tAssert.assertEquals(exptectedBox, tuple.getBoundingBox());\n\t\tAssert.assertEquals(\"y9ucczzo53\", new String(tuple.getDataBytes()));\n\t}", "public Forecasting withTrainingSettings(ForecastingTrainingSettings trainingSettings) {\n this.trainingSettings = trainingSettings;\n return this;\n }", "private void buildDaily(SummaryProvider.Summary summary, int log_id, String suffix,\n long midnight, int dataIndex, Bundle bundle) {\n ArrayList<DetailProvider.Detail> details = detailDB.getDetails(context, log_id);\n double[] raw_xdata = new double[details.size() + 2];\n double[] raw_ydata = new double[details.size() + 2];\n\n // set the first x and y values\n int xstart = bundle.getInt(\"xorigin\" + suffix, 0);\n raw_xdata[0] = xstart - 3600;\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[0] = 0.0f; break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[0] = 0.0f; break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[0] = details.get(0).getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[0] = details.get(0).getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[0] = UtilsMisc.getValueinRange(details.get(0).getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n\n // set the y values from the detail records\n for (int i = 1; i < details.size() + 1; i++) {\n DetailProvider.Detail detail = details.get(i-1);\n raw_xdata[i] = UtilsDate.getTimeSeconds((detail.getTimestamp() * 1000) - midnight);\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[i] = detail.getWatts_generated(); break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[i] = detail.getWatts_now();break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[i] = detail.getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[i] = detail.getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[i] = UtilsMisc.getValueinRange(detail.getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n }\n\n // set the last y value\n int xend = UtilsDate.getTimeSeconds(details.get(details.size()-1).getTimestamp()* 1000 - midnight);\n raw_xdata[details.size()+1] = xend + 1;\n switch (dataIndex) {\n case Constants.DATA_WATTHOURS :\n raw_ydata[details.size() + 1] = summary.getGenerated_watts(); break;\n case Constants.DATA_WATTSNOW:\n raw_ydata[details.size() + 1] = 0.0f; break;\n case Constants.DATA_TEMPERATURE:\n raw_ydata[details.size() + 1] = details.get(details.size()-1).getTemperature() - 273; break;\n case Constants.DATA_WIND:\n raw_ydata[details.size() + 1] = details.get(details.size()-1).getWind_speed(); break;\n case Constants.DATA_CLOUDS:\n raw_ydata[details.size() + 1] =\n UtilsMisc.getValueinRange(details.get(details.size()-1).getClouds(), 1.0f, 100.0f); break;\n default :\n break;\n }\n\n LinearInterpolation lp = new LinearInterpolation(raw_xdata, raw_ydata);\n int time = xstart;\n ArrayList<Integer> xList = new ArrayList<>();\n ArrayList<Float> yList = new ArrayList<>();\n while (time < xend) {\n float yval = (float) lp.interpolate(time);\n xList.add(time);\n yList.add(yval);\n time += Integer.parseInt(sharedPreferences.getString(Constants.MONITORING_FREQUENCY, \"5\")) * 60; // seconds\n }\n\n int[] xdata = Ints.toArray(xList);\n float[] ydata = Floats.toArray(yList);\n bundle.putIntArray(\"xdata\" + suffix, xdata);\n bundle.putFloatArray(\"ydata\" + suffix, ydata);\n\n switch (dataIndex) {\n case Constants.DATA_TEMPERATURE:\n case Constants.DATA_WIND:\n case Constants.DATA_CLOUDS:\n smooth_plot(bundle, true, suffix);\n }\n }", "public static void main(String[] args) throws Exception {\n StreamExecutionEnvironment stenv = StreamExecutionEnvironment.getExecutionEnvironment();\n EnvironmentSettings settings = EnvironmentSettings.newInstance().useBlinkPlanner().inStreamingMode().build();\n\n StreamTableEnvironment fsTableEnv = StreamTableEnvironment.create(stenv, settings);\n stenv.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n FlinkKafkaConsumer<String> consumer = new FlinkKafkaConsumer<String>(\"my_topic_flink4\",\n new SimpleStringSchema(),\n PropertiesUtil.getConsumerProperties());\n consumer.assignTimestampsAndWatermarks(WatermarkStrategy.forBoundedOutOfOrderness(Duration.ofSeconds(1000)));\n\n DataStreamSource<String> dataStream = stenv.addSource(consumer);\n\n TableEnvironment tableEnv = TableEnvironment.create(settings);\n String name = \"hive\";\n String defaultDatabase = \"myflink\";\n String hiveConfDir = \"flink/src/main/resources/\";\n\n Catalog hive = new HiveCatalog(name, defaultDatabase, hiveConfDir);\n tableEnv.registerCatalog(name, hive);\n\n\n// tableEnv.executeSql(\"create table order_db (userId string ,userName string,productName string,producrdate string) \").print();\n\n\n dataStream.map(new MapFunction<String, Object>() {\n @Override\n public Object map(String s) throws Exception {\n List<Order> list = JSON.parseArray(s, Order.class);\n for (Order order : list) {\n String sql=\"insert into order_db(userId ,userName,productName,productdate)values(\" + order.getUserId() + \",\" + order.getUserName() + \",\" + order.getProductName()\n + \",\" + order.getDate() + \")\";\n System.out.println(sql);\n tableEnv.executeSql(sql).print();\n }\n tableEnv.executeSql(\"select * from order_db\").print();\n return \"\";\n }\n }).addSink(new SinkFunction<Object>() {\n @Override\n public void invoke(Object value, Context context) throws Exception {\n\n }\n });\n stenv.execute(\"flinkkafkastart\");\n\n\n }", "@Test\n public void convertAFby() {\n DistEventType x = DistEventType.LocalEvent(\"x\", 0);\n DistEventType y = DistEventType.LocalEvent(\"y\", 0);\n\n TemporalInvariantSet synInvs = new TemporalInvariantSet();\n synInvs.add(new AlwaysFollowedInvariant(x, y, \"t\"));\n List<dynoptic.invariants.BinaryInvariant> dynInvs = DynopticMain\n .synInvsToDynInvs(synInvs);\n assertTrue(dynInvs.size() == 1);\n\n BinaryInvariant dInv = dynInvs.iterator().next();\n assertTrue(dInv instanceof AlwaysFollowedBy);\n assertTrue(dInv.getFirst().equals(x));\n assertTrue(dInv.getSecond().equals(y));\n }", "public interface DataStreamClient {\n\n Logger LOG = LoggerFactory.getLogger(DataStreamClient.class);\n\n /** Return Client id. */\n ClientId getId();\n\n /** Return Streamer Api instance. */\n DataStreamApi getDataStreamApi();\n\n /**\n * send to server via streaming.\n * Return a completable future.\n */\n\n /** To build {@link DataStreamClient} objects */\n class Builder {\n private ClientId clientId;\n private DataStreamClientRpc dataStreamClientRpc;\n private RaftProperties properties;\n private Parameters parameters;\n\n private Builder() {}\n\n public DataStreamClientImpl build(){\n if (clientId == null) {\n clientId = ClientId.randomId();\n }\n if (properties != null) {\n if (dataStreamClientRpc == null) {\n final SupportedDataStreamType type = RaftConfigKeys.DataStream.type(properties, LOG::info);\n dataStreamClientRpc = DataStreamClientFactory.cast(type.newFactory(parameters))\n .newDataStreamClientRpc(clientId, properties);\n }\n }\n return new DataStreamClientImpl(clientId, properties, dataStreamClientRpc);\n }\n\n public Builder setClientId(ClientId clientId) {\n this.clientId = clientId;\n return this;\n }\n\n public Builder setParameters(Parameters parameters) {\n this.parameters = parameters;\n return this;\n }\n\n public Builder setDataStreamClientRpc(DataStreamClientRpc dataStreamClientRpc){\n this.dataStreamClientRpc = dataStreamClientRpc;\n return this;\n }\n\n public Builder setProperties(RaftProperties properties) {\n this.properties = properties;\n return this;\n }\n }\n\n}", "@Test\n public void testRun() {\n System.out.println(\"run\");\n FluorescenceImporter importer = null;\n try {\n FluorescenceFixture tf = new FluorescenceFixture();\n importer = new FluorescenceImporter(tf.testData());\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Importing dataset\");\n importer.setProgressHandle(ph);\n \n importer.run();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n \n //FluorescenceDataset dataset = importer.getDataset();\n Dataset<? extends Instance> plate = importer.getDataset();\n System.out.println(\"inst A1 \"+ plate.instance(0).toString());\n System.out.println(\"plate \"+plate.toString());\n Dataset<Instance> output = new SampleDataset<Instance>();\n output.setParent((Dataset<Instance>) plate);\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Analyzing dataset\");\n // AnalyzeRunner instance = new AnalyzeRunner((Timeseries<ContinuousInstance>) plate, output, ph);\n // instance.run();\n \n }", "public static _float parse(javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n _float object = new _float();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n object.set_float(java.lang.Float.NaN);\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.microsoft.com/2003/10/Serialization/\",\n \"float\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.set_float(org.apache.axis2.databinding.utils.ConverterUtil.convertToFloat(\n content));\n } else {\n object.set_float(java.lang.Float.NaN);\n\n reader.getElementText(); // throw away text nodes if any.\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public HalfMarathon(String date, String startTime, int numOfWaterStations,int changingFacilities, Place place, String venueName,RunEntry entry) {\n super(date, startTime,entry);\n this.numOfWaterStations = numOfWaterStations; \n this.place = place; \n venue = new Park(venueName, changingFacilities) {\n @Override\n public void place(Place place) {\n this.place = place;\n\n }\n };\n }", "private USGS_AftershockForecast makeForecast (GUICalcProgressBar progress, double minDays, RJ_AftershockModel the_model, String name) {\n\n\t\t// Check for null model\n\n\t\tif (the_model == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Start time of forecast is from forecastStartTimeParam\n\t\t\n\t\tInstant eventDate = Instant.ofEpochMilli(get_cur_mainshock().getOriginTime());\n\t\tdouble startTime = eventDate.toEpochMilli() + minDays*ComcatOAFAccessor.day_millis;\n\t\tInstant startDate = Instant.ofEpochMilli((long)startTime);\n\n\t\t// Begin timer\n\n\t\tStopwatch watch = Stopwatch.createStarted();\n\n\t\t// Announce we are processing the model\n\t\t\t\n\t\tif (progress != null) {\n\t\t\tprogress.setIndeterminate(true, \"Calculating \" + name + \"...\");\n\t\t}\n\n\t\t// Calculate the forecast for the model\n\n\t\tUSGS_AftershockForecast forecast;\n\t\tif (gui_top.get_include_m4()) {\n\t\t\tdouble[] min_mags = new double[5];\n\t\t\tmin_mags[0] = 3.0;\n\t\t\tmin_mags[1] = 4.0;\n\t\t\tmin_mags[2] = 5.0;\n\t\t\tmin_mags[3] = 6.0;\n\t\t\tmin_mags[4] = 7.0;\n\t\t\tforecast = new USGS_AftershockForecast(the_model, gui_model.get_cur_aftershocks(), min_mags, eventDate, startDate);\n\t\t} else {\n\t\t\tforecast = new USGS_AftershockForecast(the_model, gui_model.get_cur_aftershocks(), eventDate, startDate);\n\t\t}\n\n\t\t// Display timing\n\t\t\t\n\t\tSystem.out.println(\"Took \" + watch.elapsed(TimeUnit.SECONDS) + \"s to compute aftershock table for \" + name);\n\t\twatch.stop();\n\n\t\t// Return the forecast\n\n\t\treturn forecast;\n\t}", "public Event createModelFromTSVline(String[] values, String provenanceInfo) {\n Event event = new Event(values[0], provenanceInfo);\n\n //fill the attributes\n event.addURI(values[0]);\n\n event.addLabel(values[1]);\n\n // 1214-07-27^^http://www.w3.org/2001/XMLSchema#date\n event.addDate(LocalDate.parse(values[2].substring(0, values[2].indexOf(\"^\"))));\n\n //50.5833^^http://www.w3.org/2001/XMLSchema#float\t3.225^^http://www.w3.org/2001/XMLSchema#float\n //event.setLat(Double.valueOf(values[3].substring(0, values[3].indexOf(\"^\"))));\n //event.setLon(Double.valueOf(values[4].substring(0, values[4].indexOf(\"^\"))));\n Pair<Double, Double> p = new Pair<>(\n Double.valueOf(values[3].substring(0, values[3].indexOf(\"^\"))),\n Double.valueOf(values[4].substring(0, values[4].indexOf(\"^\")))\n );\n event.addCoordinates(p);\n\n event.addSame(values[5]);\n Location location = new Location(values[6], provenanceInfo);\n event.addLocation(location);\n\n return event;\n }", "@SafeVarargs\n\tstatic <T> EagerFutureStream<T> of(T... values) {\n\t\treturn eagerFutureStream((Stream) Stream.of(values));\n\t}", "Builder withTreatment(TrafficTreatment treatment);", "static <T> EagerFutureStream<T> eagerFutureStream(Stream<T> stream) {\n\t\tif (stream instanceof FutureStream)\n\t\t\treturn (EagerFutureStream<T>) stream;\n\t\tEagerReact er = new EagerReact(\n\t\tThreadPools.getCurrentThreadExecutor(), RetryBuilder.getDefaultInstance()\n\t\t.withScheduler(ThreadPools.getSequentialRetry()),false);\n\t\t\n\t\treturn new EagerFutureStreamImpl<T>(er,\n\t\t\t\tstream.map(CompletableFuture::completedFuture)).sync();\n\t}", "protected void startForecaster(final WekaForecaster forecaster) {\n if (m_runThread == null) {\n synchronized (this) {\n m_startBut.setEnabled(false);\n m_stopBut.setEnabled(true);\n }\n \n m_runThread = new ForecastingThread(forecaster, null); \n \n m_runThread.setPriority(Thread.MIN_PRIORITY);\n m_runThread.start();\n }\n }", "public static Facts parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {\r\n Facts object =\r\n new Facts();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n try {\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n\r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix == null ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\") + 1);\r\n\r\n if (!\"Facts\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (Facts) ExtensionMapper.getTypeObject(\r\n nsUri, type, reader);\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.List handledAttributes = new java.util.ArrayList();\r\n\r\n\r\n reader.next();\r\n\r\n java.util.ArrayList list1 = new java.util.ArrayList();\r\n\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n\r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\", \"fact\").equals(reader.getName())) {\r\n\r\n\r\n // Process the array and step past its final element's end.\r\n\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)) {\r\n list1.add(null);\r\n reader.next();\r\n } else {\r\n list1.add(Fact.Factory.parse(reader));\r\n }\r\n //loop until we find a start element that is not part of this array\r\n boolean loopDone1 = false;\r\n while (!loopDone1) {\r\n // We should be at the end element, but make sure\r\n while (!reader.isEndElement())\r\n reader.next();\r\n // Step out of this element\r\n reader.next();\r\n // Step to next element event.\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n if (reader.isEndElement()) {\r\n //two continuous end elements means we are exiting the xml structure\r\n loopDone1 = true;\r\n } else {\r\n if (new javax.xml.namespace.QName(\"\", \"fact\").equals(reader.getName())) {\r\n\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\", \"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)) {\r\n list1.add(null);\r\n reader.next();\r\n } else {\r\n list1.add(Fact.Factory.parse(reader));\r\n }\r\n } else {\r\n loopDone1 = true;\r\n }\r\n }\r\n }\r\n // call the converter utility to convert and set the array\r\n\r\n object.setFact((Fact[])\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(\r\n Fact.class,\r\n list1));\r\n\r\n } // End of if for expected property start element\r\n\r\n else {\r\n\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static void main(String[] args) {\n HoodieHiveConfiguration apiConfig =\n HoodieHiveConfiguration.newBuilder().hadoopConfiguration(new Configuration())\n .hivedb(\"tmp\").hiveJdbcUrl(\"jdbc:hive2://localhost:10010/\").jdbcUsername(\"hive\")\n .jdbcPassword(\"hive\").build();\n\n HoodieDatasetReference datasetReference =\n new HoodieDatasetReference(\"clickstream\", \"hdfs:///data/tables/user.clickstream\",\n \"raw\");\n\n // initialize the strategies\n PartitionStrategy partitionStrategy = new DayBasedPartitionStrategy();\n SchemaStrategy schemaStrategy = new ParseSchemaFromDataStrategy();\n\n // Creates a new dataset which reflects the state at the time of creation\n HoodieHiveDatasetSyncTask datasetSyncTask =\n HoodieHiveDatasetSyncTask.newBuilder().withReference(datasetReference)\n .withConfiguration(apiConfig).partitionStrategy(partitionStrategy)\n .schemaStrategy(schemaStrategy).build();\n\n // Sync dataset\n datasetSyncTask.sync();\n }", "public Forecasting withValidationDataSize(Double validationDataSize) {\n this.validationDataSize = validationDataSize;\n return this;\n }", "public void create() {\n // 1\n Stream.of(unitOfWorks);\n // 2\n Arrays.stream(unitOfWorks);\n // 3\n Stream.of(unitOfWorks[0], unitOfWorks[1], unitOfWorks[2]);\n //4\n Stream.Builder<UnitOfWork> unitOfWorkBuilder = Stream.builder();\n unitOfWorkBuilder.accept(unitOfWorks[0]);\n unitOfWorkBuilder.accept(unitOfWorks[1]);\n unitOfWorkBuilder.accept(unitOfWorks[2]);\n Stream<UnitOfWork> unitOfWorkStream = unitOfWorkBuilder.build();\n\n }", "public void setup() \n{\n size(1600, 1000, P2D); \n\n List<Feature> trwd = GeoJSONReader.loadData(this, \"Weekday.geojson\");\n Trajectorywd = MapUtils.createSimpleMarkers(trwd);\n\n List<Feature> trwk = GeoJSONReader.loadData(this, \"Weekend.geojson\");\n Trajectorywk = MapUtils.createSimpleMarkers(trwk);\n\n //map displaying weekday and weekend data with StamenMap as a basemap\n map1 = new UnfoldingMap(this, \"Weekday\", 40, 100, 670, 600, true, false, new StamenMapProvider.TonerLite());\n map1.zoomAndPanTo(BeijingLocation, 12);\n map1.addMarkers(Trajectorywd); \n \n map2 = new UnfoldingMap(this, \"Weekend\", 900, 100, 670, 600, true, false, new StamenMapProvider.TonerLite());\n map2.zoomAndPanTo(BeijingLocation, 12); \n map2.addMarkers(Trajectorywk);\n\n //map displaying weekday and weekend data with ThunderforestMap as a basemap\n map3 = new UnfoldingMap(this, \"Weekday\", 40, 100, 670, 600, true, false, new ThunderforestProvider.Transport());\n map3.zoomAndPanTo(BeijingLocation, 12);\n map3.addMarkers(Trajectorywd); \n\n map4 = new UnfoldingMap(this, \"Weekend\", 900, 100, 670, 600, true, false, new ThunderforestProvider.Transport());\n map4.zoomAndPanTo(BeijingLocation, 12); \n map4.addMarkers(Trajectorywk);\n\n mapwd = map1;\n mapwk = map2;\n MapUtils.createDefaultEventDispatcher(this, mapwd, mapwk, map1, map2, map3, map4);\n \n data1 = loadData(\"weekends.csv\");\n data2 = loadData(\"weekdays.csv\");\n\n //String datestarts = \"20090329\"; // 2009 03 7/8/14/15/21/22/28/29 \n rawdata = new ArrayList<ArrayList<Movement>>(); \n // Arraylist for interesting places: coordinates and names \n interestlo= new ArrayList<Location>(\n Arrays.asList(new Location(39.99f, 116.26f), new Location(40.01f, 116.30f), new Location(39.989f, 116.306f), \n new Location(40.00f, 116.32f), new Location(40.064f, 116.582f), new Location(40.068f, 116.129f), \n new Location(40.0261f, 116.388f), new Location(39.915f, 116.316f ), new Location(39.927f, 116.383f)));\n interestna= new ArrayList<String>(\n Arrays.asList(\"Summer Palace\", \"Yuanmingyuan Ruins Park\", \"Peking University\", \"Tsinghua University\", \"Capital Airport\", \n \"Beiqing Jiaoye Xiuxian Park\", \"Dongxiaokou Forest Park\", \"Yuyuantan Park\", \"Beihai Park\"));\n //The location of pointer for defining threshold \n pointerXt = width-180;\n pointerXd = width-20;\n filefolder = dataPath(\"\");\n println(filefolder);\n readFile();\n// f = new PFrame();\n compimage=loadImage(\"compass.png\");\n\n font = createFont(\"calibrib.ttf\", 50);\n textFont(font);\n\n drawslider();\n// switchButton = controlP5.addToggle(\"switchmode\")\n// .setPosition(80, 50)\n// .setSize(60, 30)\n// .setValue(modeswitch);\n \n logo = loadImage(\"beijing.png\");\n}", "private FlowSpeakerData buildFlowIngressCommand(Switch sw, FlowEndpoint ingressEndpoint) {\n List<Action> actions = new ArrayList<>(buildTransformActions(\n ingressEndpoint.getInnerVlanId(), sw.getFeatures()));\n actions.add(new PortOutAction(getOutPort(flowPath, flow)));\n\n FlowSpeakerDataBuilder<?, ?> builder = FlowSpeakerData.builder()\n .switchId(ingressEndpoint.getSwitchId())\n .ofVersion(OfVersion.of(sw.getOfVersion()))\n .cookie(flowPath.getCookie())\n .table(OfTable.INGRESS)\n .priority(getPriority(ingressEndpoint))\n .match(buildIngressMatch(ingressEndpoint, sw.getFeatures()))\n .instructions(buildInstructions(sw, actions));\n\n if (sw.getFeatures().contains(SwitchFeature.RESET_COUNTS_FLAG)) {\n builder.flags(Sets.newHashSet(OfFlowFlag.RESET_COUNTERS));\n }\n return builder.build();\n }", "public static void main(String[] args) {\n\t\tStream<Integer> numStream = numbers.stream();\n\t\t\n\t\t// numStream.forEach(System.out::println); // here stream is closed\n\t\t// numStream.forEach(System.out::println); // this line with throw java.lang.IllegalStateException: stream has already been operated upon or closed\n\t\t\n\t\t// Flux has the similary concepts cannot use the same flux steam multiple times.\n\t\t// Flux<Integer> fluxStream = Flux.fromStream(numStream);\n\t\t\n//\t\tfluxStream.subscribe(\n//\t\t\t\tLamdaUtil.onNext(),\n//\t\t\t\tLamdaUtil.onError(),\n//\t\t\t\tLamdaUtil.onComplete()\n//\t\t\t\t);\n\t\t\n//\t\tfluxStream.subscribe(\n//\t\t\t\tLamdaUtil.onNext(),\n//\t\t\t\tLamdaUtil.onError(),\n//\t\t\t\tLamdaUtil.onComplete()\n//\t\t\t\t);// this line with throw ERROR :stream has already been operated upon or closed\n\t\t\n\t\t// to reuse the same data several times we need to use supplier with every time new stream\n\t\t\n\t\tFlux<Integer> numSupplierStream = Flux.fromStream(() -> numbers.stream());\n\t\tnumSupplierStream.subscribe(\n\t\t\t\tLamdaUtil.onNext(),\n\t\t\t\tLamdaUtil.onError(),\n\t\t\t\tLamdaUtil.onComplete()\n\t\t\t\t);\n\t\tnumSupplierStream.subscribe(\n\t\t\t\tLamdaUtil.onNext(),\n\t\t\t\tLamdaUtil.onError(),\n\t\t\t\tLamdaUtil.onComplete()\n\t\t\t\t);\n\t\t\n\t}", "String scheduleHarvesting(String dsID, DateTime ingestionDate, IngestFrequency frequency,\n boolean isfull) throws RepoxException;", "static <T> EagerFutureStream<T> react(Supplier<T> value) {\n\t\treturn new EagerReact(ThreadPools.getSequential(),new AsyncRetryExecutor(ThreadPools.getSequentialRetry()),false).react(value);\n\t}", "@Test\n\tvoid testFrontRunning_BSS_Put_Fut_Put(){\n\t\tTradeForDataGen firmOrderPast = initializeData(\"Buy\",\"2020-10-05 9:05:38\",\"Facebook\", \"Put\",130, 18444.31, \"Citi Global Markets\", \"Citi\" );\n\t\ttradeList.add(firmOrderPast);\n\t\tTradeForDataGen clientOrder = initializeData(\"Sell\",\"2020-10-05 9:05:42\",\"Facebook\", \"Futures\",9500, 18444.43, \"Client\", \"Citi\" );\n\t\ttradeList.add(clientOrder);\n\t\tTradeForDataGen firmOrderFuture = initializeData(\"Sell\",\"2020-10-05 9:05:50\",\"Facebook\", \"Put\",130, 18500.31, \"Citi Global Markets\", \"Citi\" );\n\t\ttradeList.add(firmOrderFuture);\n\t\t\n\t\tDetectFrontRunning tester = new DetectFrontRunning();\n\t\tdetectedTrades = tester.detectFrontRunning(tradeList);\n\t\tassertEquals(detectedTrades.size(), 1);\n\t\tassertEquals(detectedTrades.get(0).getScenario(), \"FR3-BSS\");\n\t}", "private void returnForecast() {\n\t\tif (callback != null) {\n\t\t\t// use the callback to prevent the client\n\t\t\tif (callback.get() != null) {\n\t\t\t\t// yep, we use a weakReference\n\t\t\t\tcallback.get().forecastLoaded(forecasts);\n\t\t\t}\n\t\t\tif (forecasts.isEmpty()&&reload) {\n\t\t\t\tupdateForecastRequest();\n\t\t\t} else {\n\t\t\t\t// then ask the serviceupdater to update data\n\t\t\t\t// but update only if one day of difference between the last update and now is more\n\t\t\t\t// than one day\n\t\t\t\tString strLastUpdate = MyApplication.instance.getServiceManager().getForecastServiceUpdater().getLastUpdate(this.woeid);\n\t\t\t\tLog.e(\"ForecastServiceData\", \"strLastUpdate \" + strLastUpdate);\n\t\t\t\ttry {\n\t\t\t\t\t// empty data base case and empty SharedPreference\n\t\t\t\t\tif (strLastUpdate.equals(\"null\")) {\n\t\t\t\t\t\tupdateForecastRequest();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// current case\n SimpleDateFormat sdf=MyApplication.instance.getServiceManager().getForecastServiceUpdater().getDateFormatForLastUpdate();\n\t\t\t\t\t\tDate lastUpdate = sdf.parse(strLastUpdate);\n\t\t\t\t\t\tif (new Date().getTime() - lastUpdate.getTime() > 1000 * 60 * 60 * 24) {\n\t\t\t\t\t\t\t// if the last update was one day ago, then make an automatic update\n\t\t\t\t\t\t\tupdateForecastRequest();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\tExceptionManager.manage(new ExceptionManaged(this.getClass(), R.string.exc_date_parsing, e));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n Properties props = new Properties();\n props.put(StreamsConfig.APPLICATION_ID_CONFIG, \"branch-output-dumper\");\n props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, Resources.getInstance().getConfig(KAFKA_BOOTSTRAP_SERVER));\n props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());\n props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass());\n\n final StreamsBuilder builder = new StreamsBuilder();\n KStream<String, String> stream = builder.stream(\"simple-input\");\n\n /* Here, the stream's branches are defined. */\n KStream<String, String>[] branches = stream.branch(\n // A branch for \"a\"\n (key, value) -> value.toLowerCase().startsWith(\"a\"),\n // A branch for \"b\"\n (key, value) -> value.toLowerCase().startsWith(\"b\"),\n // And a branch for everything else.\n (key, value) -> true\n );\n \n // Add a transformation for all the branches.\n branches[0].foreach((key, value) -> System.out.printf(\"Starts with A: %s\\n\", value));\n branches[1].foreach((key, value) -> System.out.printf(\"Starts with B: %s\\n\", value));\n branches[2].foreach((key, value) -> System.out.printf(\"Starts with something else: %s\\n\", value));\n\n final Topology topology = builder.build();\n\n final KafkaStreams streams = new KafkaStreams(topology, props);\n\n final CountDownLatch latch = new CountDownLatch(1);\n Runtime.getRuntime().addShutdownHook(new Thread(\"streams-shutdown-hook\") {\n @Override\n public void run() {\n streams.close();\n latch.countDown();\n }\n });\n\n try {\n streams.start();\n latch.await();\n } catch (Throwable e) {\n System.exit(1);\n }\n\n System.exit(0);\n }", "public Forecasting() {\n }", "public HalfMarathon(String date, String startTime, int numOfWaterStations, Place place, String venueName,RunEntry entry) {\n super(date, startTime,entry);\n this.numOfWaterStations = numOfWaterStations;\n this.place = place;\n \n venue = new Town(venueName) {\n @Override\n public void place(Place place) {\n this.place = place;\n\n }\n };\n }", "static <T> EagerFutureStream<T> eagerFutureStream(CompletableFuture<T> value) {\n\t\treturn new EagerReact(ThreadPools.getSequential(),new AsyncRetryExecutor(ThreadPools.getSequentialRetry()),false)\n\t\t\t\t\t\t\t\t\t.fromStream(Stream.of(value));\n\t}", "public static void fromValues() {\n final ComposableFuture<String> immediateFuture = ComposableFutures.fromValue(\"immediate value\");\n\n // A future which contains immediate error that we have. Note that the generic not related to the exception\n final ComposableFuture<String> immediateError = ComposableFutures.fromError(new IOException(\"sucks\"));\n\n // A future being created from ob1k's Try object.\n final ComposableFuture<String> futureFromTry = ComposableFutures.fromTry(Try.fromValue(\"try\"));\n\n // .submit() gives you the ability sending tasks to a thread-pool (not always), and receiving a future back.\n // note the boolean being passed, .submit() contains few overloads, one accepts thread-pool, one accepts task only\n // and runs it on the same thread, and one accepts boolean telling if to run the task on ob1k's thread-pool or not.\n // if you need to do sync IO, always pass true.\n final ComposableFuture<String> futureFromSync = ComposableFutures.submit(true, () -> \"sync io\");\n\n // .schedule() schedules a task on specified time. The task will occur only once,\n // same as ScheduledExecutorService#schedule()\n final ComposableFuture<String> scheduledTask = ComposableFutures.schedule(() ->\n \"do some operation in the future\", 5, SECONDS);\n }", "private void scout() {\n\t\ttargetFlower = null;\n\t\t// fly to flower if nearby\n\t\tif(foundFlower()) {\n\t\t\tstate = \"TARGETING\";\n\t\t}\n\t\t// otherwise keep scouting\n\t\telse{\n\t\t\t// change angle randomly during flight\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "@Nonnull\n public static UBL23WriterBuilder <ForecastType> forecast ()\n {\n return UBL23WriterBuilder.create (ForecastType.class);\n }", "public void computeForecasts (GUICalcProgressBar progress, RJGUIController.XferForecastMod xfer) {\n\n\t\t// Save the catalog parameters\n\n\t\tcat_forecastStartTimeParam = xfer.x_forecastStartTimeParam;\n\t\tcat_forecastEndTimeParam = xfer.x_forecastEndTimeParam;\n\n\t\t// Compute the aftershock forecasts\n\n\t\tseqSpecForecast = makeForecast (progress, cat_forecastStartTimeParam, cur_model, \"Seq. Specific\");\n\t\tgenericForecast = makeForecast (progress, cat_forecastStartTimeParam, genericModel, \"Generic\");\n\t\tbayesianForecast = makeForecast (progress, cat_forecastStartTimeParam, bayesianModel, \"Bayesian\");\n\n\t\t// Remove the model-specific message\n\t\t\n\t\tif (progress != null) {\n\t\t\t//progress.setIndeterminate(true);\n\t\t\t//progress.setProgressMessage(\"Plotting...\");\n\t\t\tprogress.setIndeterminate(true, \"Plotting...\");\n\t\t}\n\n\t\t// Pre-compute elements for expected aftershock MFDs.\n\n\t\tgui_view.precomputeEAMFD (progress, cat_forecastStartTimeParam, cat_forecastEndTimeParam);\n\n\t\treturn;\n\t}", "@Test\n public void testSavingsPlanCoveredUsage() throws Exception {\n Line line = new Line(LineItemType.SavingsPlanCoveredUsage, \"us-east-1\", \"us-east-1a\", \"Amazon Elastic Compute Cloud\", \"BoxUsage:t2.micro\", \"RunInstances\", \"$0.0116 per On Demand Linux t2.micro Instance Hour\", PricingTerm.none, \"2019-12-01T00:00:00Z\", \"2019-12-01T01:00:00Z\", \"1\", \"0.0116\", \"\");\n String arn = \"arn:aws:savingsplans::123456789012:savingsplan/abcdef70-abcd-5abc-4k4k-01236ab65555\";\n SavingsPlanArn spArn = SavingsPlanArn.get(arn);\n line.setSavingsPlanCoveredUsageFields(\"2019-11-08T00:11:15:04.000Z\", \"2020-11-07T11:15:03.000Z\", arn, \"0.0083\", \"NoUpfront\", \"0.0116\");\n ProcessTest test = new ProcessTest(line, Result.hourly, 31);\n Datum[] expected = {\n new Datum(CostType.savings, a2, Region.US_EAST_1, Datum.us_east_1a, ec2Instance, Operation.savingsPlanSavingsNoUpfront, \"t2.micro\", 0.0033, 0),\n new Datum(CostType.recurring, a2, Region.US_EAST_1, Datum.us_east_1a, ec2Instance, Operation.savingsPlanBonusNoUpfront, \"t2.micro\", null, spArn, 0.0083, 1.0),\n };\n test.run(\"2019-12-01T00:00:00Z\", expected);\n\n // Partial Upfront\n line = new Line(LineItemType.SavingsPlanCoveredUsage, \"us-east-1\", \"us-east-1a\", \"Amazon Elastic Compute Cloud\", \"BoxUsage:t2.micro\", \"RunInstances\", \"$0.0116 per On Demand Linux t2.micro Instance Hour\", PricingTerm.none, \"2019-12-01T00:00:00Z\", \"2019-12-01T01:00:00Z\", \"1\", \"0.0116\", \"\");\n line.setSavingsPlanCoveredUsageFields(\"2019-11-08T00:11:15:04.000Z\", \"2020-11-07T11:15:03.000Z\", \"arn:aws:savingsplans::123456789012:savingsplan/abcdef70-abcd-5abc-4k4k-01236ab65555\", \"0.0083\", \"PartialUpfront\", \"0.0116\");\n test = new ProcessTest(line, Result.hourly, 31);\n expected = new Datum[]{\n new Datum(CostType.savings, a2, Region.US_EAST_1, Datum.us_east_1a, ec2Instance, Operation.savingsPlanSavingsPartialUpfront, \"t2.micro\", 0.0033, 0),\n new Datum(CostType.recurring, a2, Region.US_EAST_1, Datum.us_east_1a, ec2Instance, Operation.savingsPlanBonusPartialUpfront, \"t2.micro\", null, spArn, 0.0083, 1.0),\n };\n test.run(\"2019-12-01T00:00:00Z\", expected);\n \n // All Upfront\n line = new Line(LineItemType.SavingsPlanCoveredUsage, \"us-east-1\", \"us-east-1a\", \"Amazon Elastic Compute Cloud\", \"BoxUsage:t2.micro\", \"RunInstances\", \"$0.0116 per On Demand Linux t2.micro Instance Hour\", PricingTerm.none, \"2019-12-01T00:00:00Z\", \"2019-12-01T01:00:00Z\", \"1\", \"0.0\", \"\");\n line.setSavingsPlanCoveredUsageFields(\"2019-11-08T00:11:15:04.000Z\", \"2020-11-07T11:15:03.000Z\", \"arn:aws:savingsplans::123456789012:savingsplan/abcdef70-abcd-5abc-4k4k-01236ab65555\", \"0.0083\", \"AllUpfront\", \"0.0116\");\n test = new ProcessTest(line, Result.hourly, 31);\n expected = new Datum[]{\n new Datum(CostType.savings, a2, Region.US_EAST_1, Datum.us_east_1a, ec2Instance, Operation.savingsPlanSavingsAllUpfront, \"t2.micro\", 0.0033, 0),\n new Datum(CostType.recurring, a2, Region.US_EAST_1, Datum.us_east_1a, ec2Instance, Operation.savingsPlanBonusAllUpfront, \"t2.micro\", null, spArn, 0.0083, 1.0),\n };\n test.run(\"2019-12-01T00:00:00Z\", expected);\n \n // No Upfront Lambda\n line = new Line(LineItemType.SavingsPlanCoveredUsage, \"ap-northeast-1\", \"\", \"AWS Lambda\", \"APN1-Lambda-GB-Second\", \"Invoke\", \"AWS Lambda - Total Compute - Asia Pacific (Tokyo)\", PricingTerm.onDemand, \"2019-12-01T00:00:00Z\", \"2019-12-01T01:00:00Z\", \"2.4\", \"0.00004\", \"\");\n line.setSavingsPlanCoveredUsageFields(\"2019-11-08T00:11:15:04.000Z\", \"2020-11-07T11:15:03.000Z\", \"arn:aws:savingsplans::123456789012:savingsplan/abcdef70-abcd-5abc-4k4k-01236ab65555\", \"0.000036\", \"NoUpfront\", \"0.00004\");\n test = new ProcessTest(line, Result.hourly, 31);\n expected = new Datum[]{\n new Datum(CostType.recurring, a2, Region.AP_NORTHEAST_1, null, lambda, Operation.savingsPlanBonusNoUpfront, \"Lambda-GB-Second\", null, spArn, 0.000036, 2.4),\n new Datum(CostType.savings, a2, Region.AP_NORTHEAST_1, null, lambda, Operation.savingsPlanSavingsNoUpfront, \"Lambda-GB-Second\", 0.000004, 0),\n };\n test.run(\"2019-12-01T00:00:00Z\", expected);\n \n }", "public static void main(String[] args) throws Exception {\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // Add source of cards\n DataStream<Card> cards = env.addSource(new CardGeneratingSource()).name(\"Card Source\");\n\n // Add task to count them\n DataStream<Count> counts = cards.keyBy(Card::getTable).process(new CardCounter()).name(\"Card counter\");\n\n // Add sink for counts that just prints\n counts.addSink(new CountPrinter()).name(\"Count sink\");\n\n // Add a cheating player who consumes the current count and makes bets based on it\n DataStream<Bet> cheaterBets = counts.process(new Cheater(1)).name(\"Cheater bets\");\n cheaterBets.addSink(new BetPrinter()).name(\"Cheater bets sink\");\n\n // Add two fair players who bet randomly\n DataStream<Bet> fairerBets1 = counts.process(new Fairer(2)).name(\"Fair bets 1\");\n fairerBets1.addSink(new BetPrinter()).name(\"Fair bets 1 sink\");\n DataStream<Bet> fairerBets2 = counts.process(new Fairer(3)).name(\"Fair bets 2\");\n fairerBets2.addSink(new BetPrinter()).name(\"Fair bets 2 sink\");\n\n // Add a cheating detector: coprocess the count and players bets to determine who is cheating\n DataStream<Bet> allBets = cheaterBets.union(fairerBets1, fairerBets2);\n ConnectedStreams<Count, Bet> countsNBets = counts.connect(allBets);\n DataStream<CheatingAlert> cheatingAlerts = countsNBets.keyBy(Count::getKey, Bet::getPlayerId).process(new CardCountingDetector());\n cheatingAlerts.addSink(new CheatingAlertSink());\n\n env.execute(\"Count Cards\");\n }", "public static void main(String[] args) throws Exception {\n ExecutionEnvironment env = ExecutionEnvironment.createLocalEnvironment();\n env.getConfig().disableSysoutLogging();\n env.setParallelism(4);\n\n /********** DATA LOADING ***************/\n //Load the data set\n DataFlink<DataInstance> data = DataFlinkLoader.open(env,\"./datasets/BigSensorReadings.arff\");\n\n int nRooms = 10;\n\n /********** Model Definition ************/\n DAG fireDetectorModel = creatBigFireDectectorModel(data.getAttributes(),nRooms);\n\n /********** Model Learning ************/\n //Define the learning engine (distributed Variational Message Passing) and the parameters\n dVMP svb = new dVMP();\n svb.setBatchSize(1000);\n svb.setOutput(true);\n svb.setDAG(fireDetectorModel);\n\n //Specify the associated constraints (encoding prior knowledge)\n for (int i = 0; i < nRooms; i++) {\n Variable sensorT1 = fireDetectorModel.getVariables().getVariableByName(\"SensorTemp1_\"+i);\n Variable sensorT2 = fireDetectorModel.getVariables().getVariableByName(\"SensorTemp2_\"+i);\n svb.addParameterConstraint(new Constraint(\"alpha\", sensorT1, 0.0));\n svb.addParameterConstraint(new Constraint(\"alpha\", sensorT2, 0.0));\n svb.addParameterConstraint(new Constraint(\"beta1\", sensorT1, 1.0));\n svb.addParameterConstraint(new Constraint(\"beta1\", sensorT2, 1.0));\n\n Variable temp = fireDetectorModel.getVariables().getVariableByName(\"Temperature_\"+i);\n svb.addParameterConstraint(new Constraint(\"alpha | {Fire_\"+i+\" = 0}\", temp, 0.0));\n svb.addParameterConstraint(new Constraint(\"beta1 | {Fire_\"+i+\" = 0}\", temp, 1.0));\n\n }\n\n //Set-up the learning phase\n svb.initLearning();\n\n //Perform Learning\n Stopwatch watch = Stopwatch.createStarted();\n svb.updateModel(data);\n System.out.println(watch.stop());\n\n\n //Print the learnt model\n System.out.println(svb.getLearntBayesianNetwork());\n\n }", "public DeliveryParcelDraftBuilder trackingData(\n Function<com.commercetools.importapi.models.orders.TrackingDataBuilder, com.commercetools.importapi.models.orders.TrackingDataBuilder> builder) {\n this.trackingData = builder.apply(com.commercetools.importapi.models.orders.TrackingDataBuilder.of()).build();\n return this;\n }", "public ProductionLine buildFromFile(String path) throws ParserConfigurationException, IOException, SAXException {\n Document doc = DocumentBuilderFactory\n .newInstance()\n .newDocumentBuilder()\n .parse(new File(path));\n doc.getDocumentElement().normalize();\n\n HashMap<String, ProductionUnit> productionUnits = new HashMap<>();\n\n // Get list of stages\n NodeList stageNodes = doc.getElementsByTagName(\"ProductionStage\");\n\n // Loop through stages\n for (int i = 0; i < stageNodes.getLength(); i++) {\n\n Node node = stageNodes.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element stage = (Element) node;\n\n // Create station\n String name = stage.getElementsByTagName(\"Name\").item(0).getTextContent();\n\n ProductionStage productionStage = getStage(productionUnits, name);\n\n if (productionStage == null) continue;\n\n NodeList predecessors = stage.getElementsByTagName(\"Predecessors\");\n if (predecessors.getLength() > 0) {\n Node sNode = predecessors.item(0);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element ePredecessors = (Element) sNode;\n NodeList stages = ePredecessors.getElementsByTagName(\"Stage\");\n for (int j = 0; j < stages.getLength(); j++) {\n productionStage.addPredecessor(getStage(productionUnits, stages.item(j).getTextContent()));\n }\n }\n }\n\n NodeList successors = stage.getElementsByTagName(\"Successors\");\n if (successors.getLength() > 0) {\n Node sNode = successors.item(0);\n if (node.getNodeType() == Node.ELEMENT_NODE) {\n Element eSuccessors = (Element) sNode;\n NodeList stages = eSuccessors.getElementsByTagName(\"Stage\");\n for (int j = 0; j < stages.getLength(); j++) {\n productionStage.addSuccessor(getStage(productionUnits, stages.item(j).getTextContent()));\n }\n }\n }\n\n NodeList input = stage.getElementsByTagName(\"Input\");\n if (input.getLength() > 0) {\n InterStageStorage storage = getStorage(productionUnits, input.item(0).getTextContent());\n if (storage == null) continue;\n storages.add(storage);\n productionStage.setInput(storage);\n } else {\n // All stages except beginning\n productionStage.updateState(ProductionStage.State.IDLE);\n }\n\n NodeList output = stage.getElementsByTagName(\"Output\");\n if (output.getLength() > 0) {\n InterStageStorage storage = getStorage(productionUnits, output.item(0).getTextContent());\n if (storage == null) continue;\n storages.add(storage);\n productionStage.setOutput(storage);\n }\n\n stages.add(productionStage);\n }\n }\n return this;\n }", "@Override\n\tprotected void createExtraStreams() {\n\n\t\t// Crea un store global para procesar los datos de todas las instancias de\n\t\t// vessels agregados por vesselType\n\t\t/*-aggByVesselType = builder.globalTable(vesselsAggByVesselTypeTopic,\n\t\t\t\tConsumed.with(Serdes.String(), hashMapSerdeAggregationVesselTypeInVessel));-*/\n\n\t\tvesselType = builder.globalTable(vesselTypeTopic);\n\n\t\t// vesselTypeEvents = builder.stream(vesselTypeUpdatedTopic);\n\n\t\trealtimeVessel = builder.stream(realtimeVesselsTopic);\n\t}", "@NonNull\n default T feed(@NonNull FeederBuilder<?> feederBuilder, String numberOfRecords) {\n return ScalaFeeds.apply(this, feederBuilder, numberOfRecords);\n }", "@Test\n\tpublic void testForex2DTupleBuilder() throws ParseException {\n\t\t\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.FOREX_2D);\n\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(FOREX_LINE, \"1\");\n\n\t\tAssert.assertNotNull(tuple1);\n\t\tAssert.assertEquals(Integer.toString(1), tuple1.getKey());\n\t\t\n\t\tAssert.assertEquals(2, tuple1.getBoundingBox().getDimension());\n\t\tAssert.assertEquals(tuple1.getBoundingBox().getCoordinateHigh(1), 1.05752d, 0.1);\n\t}", "public void makeRowStochastic() {\n \n for(T row : getFirstDimension()) {\n \n double sum = 0.0;\n \n // sum all values of the current row\n for(T col : getMatches(row)) {\n \n sum += get(row, col);\n \n }\n \n // divide each value by the sum\n for(T col : getMatches(row)) {\n \n set(row, col, get(row, col) / sum);\n \n }\n }\n \n }", "private void sleep() {\n\t\ttargetFlower = null;\n\t\tif(startForaging()) {\n\t\t\t// add food to bee's crop for upcoming foraging run\n\t\t\tif(food < startingCrop){\n\t\t\t\thive.food -= (startingCrop - food);\n\t\t\t\tfood = startingCrop;\n\t\t\t}\n\t\t\tif(startScouting() || hive.dancingBees.size() <= 0) {\n\t\t\t\tstate = \"SCOUTING\";\n\t\t\t\tcurrentAngle = RandomHelper.nextDoubleFromTo(0, 2*Math.PI);\n\t\t\t}\n\t\t\telse{ // else follow a dance\n\t\t\t\t// if bee follows dance, store angle and distance in the bee object\n\t\t\t\tint index = RandomHelper.nextIntFromTo(0, hive.dancingBees.size() - 1);\n\t\t\t\tNdPoint flowerLoc = space.getLocation(hive.dancingBees.get(index).targetFlower);\n\t\t\t\tNdPoint myLoc = space.getLocation(this);\n\t\t\t\tdouble ang = SpatialMath.calcAngleFor2DMovement(space, myLoc, flowerLoc);\n\t\t\t\tdouble dist = space.getDistance(flowerLoc, myLoc);\n\t\t\t\t\n\t\t\t\t// start following dance at correct angle\n\t\t\t\tcurrentAngle = ang;\n\t\t\t\tfollowDist = dist;\n\t\t\t\tstate = \"FOLLOWING\";\n\t\t\t}\n\t\t}\n\t\telse { // continue sleeping\n\t\t\thive.food -= lowMetabolicRate/2;\n\t\t\thover(grid.getLocation(hive));\n\t\t\t// update energy and food storage\n\t\t\tif(food > startingCrop){\n\t\t\t\tfood -= foodTransferRate;\n\t\t\t\thive.food += foodTransferRate;\n\t\t\t}\n\t\t}\n\t}", "private void showFloatingView() {\n Intent intent = new Intent(getApplication(), ScrollingService.class);\r\n// intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\r\n intent.putStringArrayListExtra(\"data\", newfeed);\r\n startService(intent);\r\n\r\n }", "MakeflowFactory getMakeflowFactory();", "public void eval() {\n \n //The tube that is coming next\n Tube nextTube = null;\n \n //Looks at each tube's rightmost position and determines if it is greater than\n //then: 1/3 Screen width + middle of bird. In essence, it finds the closest \n //tube that the bird hasn't crossed yet and sets that as the 'nextTube'\n for (final Tube tube : tubes)\n if (tube.position + TUBE_WIDTH > WIDTH / 3 - BIRD_WIDTH / 2\n && (nextTube == null || tube.position < nextTube.position))\n nextTube = tube;\n \n //Looks at each bird. If it isn't dead, will give the proper inputs for each\n //of its 4 input neurons\n for (final Bird bird : birds) {\n if (bird.dead)\n continue;\n\n //array of 4 doubles to be used for the input neurons\n final double[] input = new double[4];\n //First input is relative to current bird's height\n input[0] = bird.height / HEIGHT;\n \n //If there is no tube in sight, set the input values to defaults...\n if (nextTube == null) {\n input[1] = 0.5;\n input[2] = 1.0;\n } \n //Otherwise, set the input values to next tube's coordinates\n else {\n input[1] = nextTube.height / HEIGHT;\n input[2] = nextTube.position / WIDTH;\n }\n //Fourth input is set to 1.0, which refers to the pipe gap\n input[3] = 1.0;\n\n //if output is greater than 0.5, the bird flaps\n final double[] output = bird.genome.evaluateNetwork(input);\n if (output[0] > 0.5)\n bird.flap = true;\n }\n }", "public void animateRailToStation(Train train){\n\t}", "private void doPoint()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\t\tubisenseData.setPosition(new Point3D(\tx1/100,\n\t\t\t\t\t\t\t\t\t\t\t\ty1/100,\n\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\n\t\twhile (elapsedTime < toolDuration && !this.terminate)\n\t\t{\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long)(elapsedTime*SLEEP_INTERVAL));\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tthis.notifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "@Test\n\tvoid testFrontRunning_BSS_Put_ES_Put(){\n\t\tTradeForDataGen firmOrderPast = initializeData(\"Buy\",\"2020-10-05 9:05:38\",\"Facebook\", \"Put\",130, 18444.31, \"Citi Global Markets\", \"Citi\" );\n\t\ttradeList.add(firmOrderPast);\n\t\tTradeForDataGen clientOrder = initializeData(\"Sell\",\"2020-10-05 9:05:42\",\"Facebook\", \"ES\",9500, 18444.43, \"Client\", \"Citi\" );\n\t\ttradeList.add(clientOrder);\n\t\tTradeForDataGen firmOrderFuture = initializeData(\"Sell\",\"2020-10-05 9:05:50\",\"Facebook\", \"Put\",130, 18500.31, \"Citi Global Markets\", \"Citi\" );\n\t\ttradeList.add(firmOrderFuture);\n\t\t\n\t\tDetectFrontRunning tester = new DetectFrontRunning();\n\t\tdetectedTrades = tester.detectFrontRunning(tradeList);\n\t\tassertEquals(detectedTrades.size(), 1);\n\t\tassertEquals(detectedTrades.get(0).getScenario(), \"FR3-BSS\");\n\t}", "protected void reevaluateForecaster(final String name, \n final WekaForecaster forecaster, final Instances trainHeader) {\n \n if (!trainHeader.equalHeaders(m_instances)) {\n JOptionPane.showMessageDialog(null, \"Data used to train this forecaster \" +\n \"is not compatible with the currently loaded data:\\n\\n\" \n + trainHeader.equalHeadersMsg(m_instances), \"Unable to reevaluate model\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n if (m_runThread == null) {\n synchronized (this) {\n m_startBut.setEnabled(false);\n m_stopBut.setEnabled(true);\n }\n \n m_runThread = new ForecastingThread(forecaster, name);\n ((ForecastingThread)m_runThread).setConfigureAndBuild(false);\n \n m_runThread.setPriority(Thread.MIN_PRIORITY);\n m_runThread.start();\n }\n }\n }", "public org.drip.product.calib.ProductQuoteSet calibQuoteSet (\n\t\tfinal org.drip.state.representation.LatentStateSpecification[] aLSS)\n\t{\n\t\ttry {\n\t\t\treturn null == floaterLabel() ? new org.drip.product.calib.FixedStreamQuoteSet (aLSS) : new\n\t\t\t\torg.drip.product.calib.FloatingStreamQuoteSet (aLSS);\n\t\t} catch (java.lang.Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n private <T extends Event> Stream<T> makeStream(StreamMaker sm, Class<T> type) {\n\n Stream<T> stream = app.createStream(type);\n stream.setName(sm.getName());\n\n if (sm.getKeyFinder() != null)\n stream.setKey((KeyFinder<T>) sm.getKeyFinder());\n else if (sm.getKeyDescriptor() != null)\n stream.setKey(sm.getKeyDescriptor());\n\n return stream;\n }" ]
[ "0.5121364", "0.5016315", "0.4839551", "0.4742877", "0.4627618", "0.45025828", "0.4476247", "0.44275588", "0.43629158", "0.4342639", "0.43328956", "0.43296412", "0.4315549", "0.42889965", "0.42791077", "0.42779905", "0.42613816", "0.4255931", "0.42268756", "0.42144233", "0.42087498", "0.41986305", "0.4197747", "0.41864452", "0.4168389", "0.4154524", "0.41485783", "0.4136794", "0.4133689", "0.41156554", "0.40878087", "0.4082615", "0.40822032", "0.40781885", "0.40743536", "0.40684792", "0.40664485", "0.40660092", "0.40558213", "0.40543187", "0.40470672", "0.40435338", "0.4034759", "0.40273094", "0.40089613", "0.40013334", "0.4000217", "0.3999533", "0.39977914", "0.39844307", "0.3983504", "0.39747742", "0.39738074", "0.39572233", "0.3952486", "0.3946462", "0.39392963", "0.3937416", "0.3918711", "0.39180413", "0.39163095", "0.39134082", "0.39124689", "0.39114484", "0.39009625", "0.38907215", "0.38885292", "0.38871852", "0.38860524", "0.38751155", "0.38733065", "0.38694677", "0.38688585", "0.38643196", "0.38619193", "0.38570762", "0.38532552", "0.38490295", "0.3848628", "0.3848544", "0.38475406", "0.3847526", "0.38424012", "0.38390672", "0.38376355", "0.38324705", "0.38179818", "0.38148606", "0.3814195", "0.3813751", "0.38074565", "0.38048983", "0.38040444", "0.38013485", "0.38000536", "0.37994894", "0.37967417", "0.37957135", "0.37921354", "0.3791107" ]
0.4011011
44
For each tree in the forest, follow the tree traversal path and return the leaf node if the standard Euclidean distance between the query point and the leaf point is smaller than the given threshold. Note that this will not necessarily be the nearest point in the tree, because the traversal path is determined by the random cuts in the tree. If the same leaf point is found in multiple trees, those results will be combined into a single Neighbor in the result. If sequence indexes are disabled for this forest, then the list of sequence indexes will be empty in returned Neighbors.
public List<Neighbor> getNearNeighborsInSample(double[] point, double distanceThreshold) { checkNotNull(point, "point must not be null"); checkArgument(distanceThreshold > 0, "distanceThreshold must be greater than 0"); if (!isOutputReady()) { return Collections.emptyList(); } Function<RandomCutTree, Visitor<Optional<Neighbor>>> visitorFactory = tree -> new NearNeighborVisitor(point, distanceThreshold); return traverseForest(point, visitorFactory, Neighbor.collector()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void searchForNearest(KdNode kdNode, Point2D p, RectHV rectangle) {\n int comparison;\n // 2 rectangles that will store the coordinates of the rectangles that are delimited by kdNode's children,\n // used in order to calculate the distance to them and see if it's worth looking down the path inside them as well\n // (i.e. if the distance from point p to the rectangle is less than the distance to an already established nearest)\n RectHV rectLeftBelow, rectRightAbove;\n\n if (kdNode.point.equals(p)) {\n // if the point we're looking at actually equals the query point, we return here,\n // as we can no longer find a distance lower than 0\n nearest = kdNode.point;\n return;\n }\n\n // if the point in the current node is closer to the searched node, we update nearest\n if (p.distanceSquaredTo(kdNode.point) < p.distanceSquaredTo(nearest))\n nearest = kdNode.point;\n\n if (kdNode.dimension) { // if this KdNode is vertical (root.dimension == true), then we have left/right rectangles\n rectLeftBelow = new RectHV(rectangle.xmin(), rectangle.ymin(),\n kdNode.point.x(), rectangle.ymax());\n rectRightAbove = new RectHV(kdNode.point.x(), rectangle.ymin(),\n rectangle.xmax(), rectangle.ymax());\n }\n else { // if this KdNode is horizontal (root.dimension == false), then we have below/above rectangles\n rectLeftBelow = new RectHV(rectangle.xmin(), rectangle.ymin(),\n rectangle.xmax(), kdNode.point.y());\n rectRightAbove = new RectHV(rectangle.xmin(), kdNode.point.y(),\n rectangle.xmax(), rectangle.ymax());\n }\n // we look at which rectangle is nearest to the query point, in order to go down that path first\n comparison = Double.compare(rectLeftBelow.distanceSquaredTo(p),\n rectRightAbove.distanceSquaredTo(p));\n\n if (comparison < 0) { // if distance to left/lower rectangle is lower than to right/upper\n if (kdNode.left != null) {\n if (rectLeftBelow.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.left, p, rectLeftBelow);\n }\n // if it's larger than to nearest, the distance to the other\n // rectangle will certainly be even larger, so we return here\n else return;\n }\n if (kdNode.right != null) {\n if (rectRightAbove.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.right, p, rectRightAbove);\n }\n // else return; // return statement not needed, if (comparison < 0) statement terminates here anyway\n }\n }\n else { // comparison < 0, the opposite situation holds: distance to right/upper rectangle is lower than to left/lower\n if (kdNode.right != null) {\n if (rectRightAbove.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.right, p, rectRightAbove);\n }\n else return;\n }\n if (kdNode.left != null) {\n if (rectLeftBelow.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.left, p, rectLeftBelow);\n }\n }\n\n }\n }", "private void search(int offset, MetricSpaceObject query, ResultCollector collector, double parentToQueryDistance) {\n buffer.position(offset);\n\n //the node should consist of a pointer to each child node then the point data, then the value data\n double nodeRadius = buffer.getDouble();\n double parentToThisDistance = buffer.getDouble();\n int left = buffer.getInt();\n int right = buffer.getInt();\n \n double searchRadius = collector.getRadius();\n\n //check if we can skip a distance calculation using the triangle inequality\n if (!optimise || Double.isNaN(parentToQueryDistance)\n || Math.abs(parentToThisDistance - parentToQueryDistance) <= nodeRadius + searchRadius)\n {\n int vantagePointId = buffer.getInt();\n double distance = query.getDistance(vantagePointId);\n\n if (distance <= searchRadius) {\n //this point is within the distance threshold to the query object, so add it to the results\n collector.add(new SearchResult(query.getObjectID(), vantagePointId, distance));\n \n //update the search radius in case the add changed it\n searchRadius = collector.getRadius();\n }\n\n if (left != 0 && distance <= nodeRadius + searchRadius) {\n //points within a distance threshold to the query object could be inside the radius,\n //so search the left subtree\n search(left, query, collector, distance);\n }\n\n if (right != 0 && distance >= nodeRadius - searchRadius) {\n //points within a distance threshold to the query object could be outside the radius,\n //so search the right subtree\n search(right, query, collector, distance);\n }\n }\n else if (right != 0) {\n search(right, query, collector, Double.NaN);\n }\n }", "public SegmentTreeNode<T> getNode (int target) {\n\t\t// have we narrowed down?\n\t\tif (left == target) {\n\t\t\tif (right == left+1) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// press onwards\n\t\tint mid = (left+right)/2;\n\n\t\tif (target < mid) { return lson.getNode (target); }\n\t\treturn rson.getNode (target);\n\t}", "DbSearchConstraints.Leaf getTopLeafConstraint() {\n if (constraints instanceof DbSearchConstraints.Intersection) {\n DbSearchConstraints.Intersection and = (DbSearchConstraints.Intersection) constraints;\n return and.getLeafChild();\n } else if (constraints instanceof DbSearchConstraints.Union) {\n DbSearchConstraints top = new DbSearchConstraints.Intersection();\n constraints = top.and(constraints);\n return ((DbSearchConstraints.Intersection) constraints).getLeafChild();\n } else {\n return (DbSearchConstraints.Leaf) constraints;\n }\n }", "private Node<?> findClosestAncestor(ZQuadTree<?> tree, long quad) {\n assert ZQuad.isAncestor(this.quad, quad);\n if (this.size <= tree.splitThreshold || this.quad == quad) {\n return this;\n } else {\n Node<?>[] children = (Node<?>[]) data;\n for (int i = 0; i < kJunctionChildCount; i++) {\n Node<?> child = children[i];\n if (child != null && ZQuad.isAncestor(child.quad, quad))\n return child.findClosestAncestor(tree, quad);\n }\n return kEmpty;\n }\n }", "@SuppressWarnings(\"null\")\n\tpublic static Node optimalIterativeSolution (Node Tree, int target) {\n\t\tNode curr = Tree;\n\t\tNode Closest = null;\n\t\tClosest.val = Integer.MAX_VALUE;\n\t\twhile (curr != null) {\n\t\t\tif (Math.abs(target - Closest.val) > Math.abs(target - curr.val)) {\n\t\t\t\tClosest = curr;\n\t\t\t} else if (target < curr.val) {\n\t\t\t\tcurr = curr.left;\n\t\t\t} else if (target > curr.val) {\n\t\t\t\tcurr = curr.right;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn Closest;\n\t}", "public BiNode findLeaf( int value )\n {\n return _root.findLeaf( value );\n }", "public abstract Collection<T> getMatchesAboveThreshold(T first,\n double similarityThreshold);", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "public Set<? extends Position> findNearest(Position position, int k);", "public Node getBestSuccessor(){\n\t\t// Send false to the method to not save the neighbors.\n\t\treturn state.neighborWithlowestAttachNo(false);\n\t}", "private void findNeighbour(int offset) {\n TreeNodeImpl node = (TreeNodeImpl) projectTree.getLastSelectedPathComponent();\n TreePath parentPath = projectTree.getSelectionPath().getParentPath();\n NodeList list = (NodeList) node.getParent().children();\n\n for (int i = 0; i < list.size(); ++i) {\n if (list.get(i).equals(node)) {\n if (offset > 0 && i < list.size() - offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n if (offset < 0 && i >= offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n }\n }\n }", "private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}", "public int scoreLeafNode();", "public List<Grid.Index> extractFeatureIndices(int threshold) {\n\t\n\t\tList<Grid.Index> indices = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0 ; i < width(); i++) {\n\t\t\tfor (int j = 0; j < height(); j++) {\n\t\t\t\tif (Math.abs(valueAt(i, j)) >= threshold) {\n\t\t\t\t\tindices.add(new Grid.Index(i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn indices;\n\t}", "public boolean findBestMatch() {\n\t\t\tif(nodes.size() >= nodeLimit) return false;\n\n\t\t\tdouble bestScore = 0.0;\n\t\t\tint bestLight = -1;\n\t\t\tfor(int p = 0; p < lights.size(); p++) {\n\t\t\t\tif(nodeIndex.contains(p)) continue;\n\t\t\t\tdouble score = scoreByDistance(lights.get(p));\n\t\t\t\tif(score != Double.NaN && score > bestScore) {\n\t\t\t\t\tbestScore = score;\n\t\t\t\t\tbestLight = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(bestLight >= 0) {\n\t\t\t\taddNode(bestLight);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public List<Segmentation> getSegmentationsForCVTesting(double threshold)\n\t\t\tthrows InvalidParametersException {\n\n\t\t// Check that we have a stroke\n\t\tif (m_stroke == null) {\n\t\t\tthrow new InvalidParametersException();\n\t\t}\n\n\t\tList<Integer> allCorners = getInitialCorners();\n\t\tList<Integer> subset = new ArrayList<Integer>();\n\n\t\t// Find the best subset of corners using the given feature subset\n\t\t// selection algorithm\n\t\tsubset = sbfsForCVTesting(allCorners, m_stroke, m_objFunction,\n\t\t\t\tthreshold);\n\n\t\tList<Segmentation> combinedSegmentations = segmentStroke(m_stroke,\n\t\t\t\tsubset, S_SEGMENTER_NAME, 0.80);\n\n\t\treturn combinedSegmentations;\n\t}", "private int first_leaf() { return n/2; }", "private void removeSmallRoots(int threshold) {\n\t\tArrayList<Root> smallRoots = new ArrayList<Root>();\n\t\tfor (Root r: allRoots) {\n\t\t\tif (r.volume() < threshold) {\n\t\t\t\tsmallRoots.add(r);\n\t\t\t}\n\t\t}\n\t\tfor (Root r: smallRoots) {\n\t\t\tallRoots.remove(r);\n\t\t}\n\t}", "private void GreedySearch(){\n\n Queue<Node> expanded = new LinkedList<>();\n ArrayList<Node> fringe = new ArrayList<>();\n ArrayList<Node> fringeTemp = new ArrayList<>();\n\n\n Node current = startNode;\n\n while(expanded.size() < 1000){\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal is reached.\n solutionPath(current);\n expanded.add(current);\n printExpanded(expanded);\n System.exit(0);\n }\n\n\n boolean b = cycleCheck(current,expanded);\n\n if(!b) {\n expanded.add(current);\n }\n\n if(!b){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n\n }\n }\n\n if(current.getDigit().last_changed != 1){\n\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n }\n\n\n\n for(Node n : fringe){\n heuristicSetter(n);\n\n }\n\n fringeTemp.addAll(fringe);\n //now all the nodes in fringe have the heuristic value.\n //We can get the last added minm\n Node minm;\n if(fringeTemp.size() != 0){\n minm = fringeTemp.get(0);\n }else{\n break;\n }\n for(int i = 1; i<fringeTemp.size(); i++){\n if(fringeTemp.get(i).getHeuristic() <= minm.getHeuristic()){\n minm = fringeTemp.get(i);\n }\n }\n\n //now we have the minm for the next stage.\n current = minm;\n fringeTemp.remove(minm);\n fringe.clear();\n }\n\n //While loop ends\n System.out.println(\"No solution found.\");\n printExpanded(expanded);\n\n\n\n }", "public void prune(double belowThreshold) {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n if(get(first, second)<belowThreshold) {\n set(first, second, 0.0);\n }\n \n }\n \n }\n \n }", "private Node<T> getHelper(int treeIndex) {\n Node<T> currentNode = this.root;\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n int nextBranch = treeIndex / b;\n\n //down\n currentNode = currentNode.get(nextBranch);\n treeIndex = treeIndex % b;\n }\n return currentNode.get(treeIndex);\n }", "public NodeEntry<Boolean, Node> find(T data) {\n\t\tif (this.numberOfNodes == 0)\n\t\t\t// Return the header as the second parameter\n\t\t\t// to indicate that the returned false was\n\t\t\t// as a result of querying data to an empty\n\t\t\t// list.\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\n\t\t// Begin with the header and traverse the list\n\t\t// using right pointers at every visited node.\n\t\tNode currentNode = this.header;\n\t\tNode nodeToCompare = null;\n\t\tNode leftNeighbor = null;\n\t\tint currentLevel = this.listLevel;\n\t\twhile (currentLevel > 1) {\n\t\t\tnodeToCompare = currentNode.nextNodes.get(currentLevel);\n\t\t\tif (nodeToCompare != null) {\n\t\t\t\tif (data.compareTo(nodeToCompare.data) > 0) {\n\t\t\t\t\tcurrentNode = nodeToCompare;\n\t\t\t\t} else if (data.compareTo(nodeToCompare.data) < 0) {\n\t\t\t\t\tcurrentLevel--;\n\t\t\t\t} else\n\t\t\t\t\treturn new NodeEntry<Boolean, Node>(true, nodeToCompare);\n\t\t\t} else currentLevel--;\n\t\t}\n\n\t\t// If the query value is found to be the smallest in the\n\t\t// list, we'd hit the bottom of the list through header.\n\t\t// Return the header as the left hand neighbor for the\n\t\t// position where the query data can be inserted later.\n\t\tif (currentNode.equals(this.header) &&\n\t\t\tcurrentNode.nextNodes.get(1).data.compareTo(data) >= 0) {\n\t\t\treturn new NodeEntry<Boolean, Node>(false, this.header);\n\t\t}\n\n\t\t// Otherwise, continue traversing the remaining nodes\n\t\t// until the last visited node's data value is found\n\t\t// to be equal to or greater than the query.\n\t\twhile (!currentNode.equals(this.sentinel)) {\n\t\t\tif (currentNode.data.compareTo(data) > 0) {\n\t\t\t\t// Return the node immediately before the possible\n\t\t\t\t// position where the data could have been found.\n\t\t\t\t// This can be used for inserting a new node to the\n\t\t\t\t// list containing the same data value as the query.\n\t\t\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t\t\t} else if (currentNode.data.compareTo(data) < 0) {\n\t\t\t\t// This is where we enter this while loop,\n\t\t\t\t// so we protect ourselves from losing the\n\t\t\t\t// track of the immediate left neighbor.\n\t\t\t\tleftNeighbor = currentNode;\n\t\t\t\tcurrentNode = currentNode.nextNodes.get(1);\n\t\t\t} else {\n\t\t\t\treturn new NodeEntry<Boolean, Node>(true, currentNode);\n\t\t\t}\n\t\t}\n\n\t\t// After reaching the sentinel, return the last node\n\t\t// in the list as the position where the data may be\n\t\t// inserted into the list.\n\t\treturn new NodeEntry<Boolean, Node>(false, leftNeighbor);\n\t}", "private QuadTree[] findChild(QuadTree parent) {\n double point1_lon = parent.ullon;\n double point1_lat = parent.ullat;\n double point2_lon = (parent.lrlon + parent.ullon) / 2;\n double point2_lat = parent.ullat;\n double point3_lon = parent.ullon;\n double point3_lat = (parent.ullat + parent.lrlat) / 2;\n double point4_lon = (parent.lrlon + parent.ullon) / 2;\n double point4_lat = (parent.ullat + parent.lrlat) / 2;\n double point5_lon = (parent.lrlon + parent.ullon) / 2;\n double point5_lat = parent.lrlat;\n double point6_lon = parent.lrlon;\n double point6_lat = parent.lrlat;\n double point7_lon = parent.lrlon;\n double point7_lat = (parent.ullat + parent.lrlat) / 2;\n QuadTree ul, ur, ll, lr;\n if (parent.name.equals(\"root\")) {\n ul = new QuadTree(\"1\", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);\n ur = new QuadTree(\"2\", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);\n ll = new QuadTree(\"3\", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);\n lr = new QuadTree(\"4\", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);\n } else {\n ul = new QuadTree(parent.name + \"1\", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);\n ur = new QuadTree(parent.name + \"2\", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);\n ll = new QuadTree(parent.name + \"3\", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);\n lr = new QuadTree(parent.name + \"4\", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);\n }\n QuadTree[] child = new QuadTree[4];\n child[0] = ul;\n child[1] = ur;\n child[2] = ll;\n child[3] = lr;\n return child;\n }", "private int getNearestNode(LatLng vic) {\n\t\tint node = 0;\n\t\tfor(int j=0; j<nodeList.size()-1; j++){\n\t\t\tdouble dist1 = getWeight(vic, nodeList.get(node));\n\t\t\tdouble dist2 = getWeight(vic, nodeList.get(j));\n\t\t\tif(dist1 > dist2){\n\t\t\t\tnode = j;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}", "public T search(T target) {\n\t\t\n\t\tBSTNode<T> tmp = root;\n\t\twhile(tmp != null) {\n\t\t\tint c = tmp.data.compareTo(target);\n\t\t\t\n\t\t\tif (c == 0) return tmp.data;\n\t\t\ttmp = c < 0 ? tmp.left: tmp.right;\n\t\t}\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate List<Integer> sbfsForCVTesting(List<Integer> corners,\n\t\t\tStroke stroke, IObjectiveFunction objFunction, double threshold) {\n\n\t\tdouble currError = Double.MAX_VALUE;\n\n\t\tList<Integer> cornerSubset = new ArrayList<Integer>(corners);\n\t\tList<List<Integer>> cornerSubsetList = new ArrayList<List<Integer>>(\n\t\t\t\tcornerSubset.size());\n\t\tList<Double> errorList = new ArrayList<Double>(cornerSubset.size());\n\n\t\tList<List<Integer>> forwardOnSubset = new ArrayList<List<Integer>>();\n\n\t\tint n = -1;\n\n\t\twhile (cornerSubset.size() > 2) {\n\n\t\t\t// Go backward\n\t\t\tList<Object> backResults = prevBestSubset(cornerSubset, stroke,\n\t\t\t\t\tobjFunction);\n\t\t\tList<Integer> backSubset = (List<Integer>) backResults.get(0);\n\t\t\tdouble backError = (Double) backResults.get(1);\n\n\t\t\t// Go forward (if possible)\n\t\t\tint forwardCorner = -1;\n\t\t\tdouble forwardError = Double.MAX_VALUE;\n\t\t\tif (cornerSubset.size() < corners.size() - 1) {\n\t\t\t\tList<Object> forwardResults = nextBestCorner(cornerSubset,\n\t\t\t\t\t\tcorners, stroke, objFunction);\n\t\t\t\tforwardCorner = (Integer) forwardResults.get(0);\n\t\t\t\tforwardError = (Double) forwardResults.get(1);\n\t\t\t}\n\n\t\t\tif (forwardCorner != -1 && forwardError < errorList.get(n - 1)\n\t\t\t\t\t&& !alreadySeenSubset(cornerSubset, forwardOnSubset)) {\n\n\t\t\t\tforwardOnSubset.add(new ArrayList<Integer>(cornerSubset));\n\t\t\t\tcornerSubset.add(forwardCorner);\n\t\t\t\tCollections.sort(cornerSubset);\n\n\t\t\t\tcurrError = forwardError;\n\t\t\t\tn--;\n\t\t\t} else {\n\t\t\t\tcornerSubset = backSubset;\n\t\t\t\tcurrError = backError;\n\t\t\t\tn++;\n\t\t\t}\n\n\t\t\tif (cornerSubsetList.size() <= n) {\n\t\t\t\tcornerSubsetList.add(new ArrayList<Integer>(cornerSubset));\n\t\t\t\terrorList.add(currError);\n\t\t\t} else {\n\t\t\t\tcornerSubsetList.set(n, new ArrayList<Integer>(cornerSubset));\n\t\t\t\terrorList.set(n, currError);\n\t\t\t}\n\t\t}\n\n\t\tList<Integer> bestSubset = null;\n\n\t\tdouble d1Errors[] = new double[errorList.size()];\n\t\tfor (int i = 1; i < errorList.size(); i++) {\n\t\t\tdouble deltaError = errorList.get(i) / errorList.get(i - 1);\n\t\t\td1Errors[i] = deltaError;\n\t\t}\n\n\t\tfor (int i = 1; i < d1Errors.length; i++) {\n\t\t\tif (d1Errors[i] > threshold) {\n\t\t\t\tbestSubset = cornerSubsetList.get(i - 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (bestSubset == null) {\n\t\t\tbestSubset = cornerSubsetList.get(0);\n\t\t}\n\n\t\tCollections.sort(bestSubset);\n\n\t\treturn bestSubset;\n\t}", "public int getMyNearbyThreshold() {\n return myNearbyThreshold;\n }", "private KeyedItem findLeftMost(BinarySearchTree tree){\r\n\t\t\r\n\t\t//return the root when we find that we reached the leftmost child\r\n\t\tif(tree.getLeftChild() == null){\r\n\t\t\treturn tree.getRoot();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//keep going. has more left children\r\n\t\t\treturn findLeftMost(tree.getLeftChild());\r\n\t\t}\r\n\t}", "public ArrayList<SearchNode> neighbors() {\n ArrayList<SearchNode> neighbors = new ArrayList<SearchNode>();\n // StdOut.println(\"before: \" + this.snBoard);\n Iterable<Board> boards = new ArrayList<Board>();\n boards = this.snBoard.neighbors();\n // StdOut.println(\"after: \" + this.snBoard);\n for (Board b: boards) {\n // StdOut.println(b);\n // StdOut.println(\"checking: \"+b);\n // StdOut.println(\"checking father: \"+this.getPredecessor());\n if (this.getPredecessor() == null) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // sn.addMovesToPriority(this.priority - this.snBoard.hamming()+1);\n neighbors.add(sn);\n } else { \n if (!b.equals(this.getPredecessor().snBoard)) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n neighbors.add(sn);\n }\n }\n \n }\n return neighbors;\n }", "public Node getNearestNode(Point mousePos,\n\t\t\tPredicate<OsmPrimitive> isSelectablePredicate) {\n\t\treturn null;\n\t}", "public static boolean testTree(Case c, Node tree) {\n\t\tif (tree.isLeaf) {\n\t\t\t// If this is a result node, return whether the tree result matches the true classification\n\t\t\treturn c.isHealthy == tree.isHealthy;\n\t\t}\n\t\telse {\n\t\t\t// Else, we find the appropriate value, and then compare that to the threshold to recurse on the correct subtree\n\t\t\tdouble value = 0;\n\t\t\tswitch (tree.attribute) {\n\t\t\tcase K:\n\t\t\t\tvalue = c.k;\n\t\t\t\tbreak;\n\t\t\tcase Na:\n\t\t\t\tvalue = c.na;\n\t\t\t\tbreak;\n\t\t\tcase CL:\n\t\t\t\tvalue = c.cl;\n\t\t\t\tbreak;\n\t\t\tcase HCO3:\n\t\t\t\tvalue = c.hco3;\n\t\t\t\tbreak;\n\t\t\tcase Endotoxin:\n\t\t\t\tvalue = c.endotoxin;\n\t\t\t\tbreak;\n\t\t\tcase Aniongap:\n\t\t\t\tvalue = c.aniongap;\n\t\t\t\tbreak;\n\t\t\tcase PLA2:\n\t\t\t\tvalue = c.pla2;\n\t\t\t\tbreak;\n\t\t\tcase SDH:\n\t\t\t\tvalue = c.sdh;\n\t\t\t\tbreak;\n\t\t\tcase GLDH:\n\t\t\t\tvalue = c.gldh;\n\t\t\t\tbreak;\n\t\t\tcase TPP:\n\t\t\t\tvalue = c.tpp;\n\t\t\t\tbreak;\n\t\t\tcase BreathRate:\n\t\t\t\tvalue = c.breathRate;\n\t\t\t\tbreak;\n\t\t\tcase PCV:\n\t\t\t\tvalue = c.pcv;\n\t\t\t\tbreak;\n\t\t\tcase PulseRate:\n\t\t\t\tvalue = c.pulseRate;\n\t\t\t\tbreak;\n\t\t\tcase Fibrinogen:\n\t\t\t\tvalue = c.fibrinogen;\n\t\t\t\tbreak;\n\t\t\tcase Dimer:\n\t\t\t\tvalue = c.dimer;\n\t\t\t\tbreak;\n\t\t\tcase FibPerDim:\n\t\t\t\tvalue = c.fibPerDim;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Recursion\n\t\t\tif (value < tree.threshold) {\n\t\t\t\treturn testTree(c, tree.lessThanChildren);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn testTree(c, tree.greaterThanChildren);\n\t\t\t}\n\t\t}\n\t}", "private Root compareRoots(ArrayList<Root> touchRoots, ArrayList<Coord> circs) {\n\t\tfor (Root r: touchRoots) {\n\t\t\tif (r.isSeed) {\n\t\t\t\tfor(Root touch:touchRoots) {\n\t\t\t\t\ttouch.touchseed = true;\n\t\t\t\t}\n\t\t\t\treturn r;\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Determine if one of the roots started at a very close z-value\n\t\t * and do not choose this one (this would occur with lateral roots).\n\t\t */\n\t\tint z = circs.get(0).z;\n\t\tArrayList<Root> smallRoot = new ArrayList<Root>();\n\t\tfor (Root r:touchRoots) {\n\t\t\tif (z-r.firstZ < 10) {\n\t\t\t\tsmallRoot.add(r);\n\t\t\t}\n\t\t}\n\t\tif (touchRoots.size()-smallRoot.size() == 1) {\n\t\t\ttouchRoots.removeAll(smallRoot);\n\t\t\treturn touchRoots.get(0);\n\t\t}\n\t\telse if(touchRoots.size() > smallRoot.size()) {\n\t\t\ttouchRoots.removeAll(smallRoot);\n\t\t}\n\n\t\t/*\n\t\t * If there is still more than one root that is touching, score\n\t\t * each root based on the amount of voxels in the root that touch\n\t\t * the voxels in the blob. Return the one with the highest score.\n\t\t * \n\t\t */\n\t\tint maxScore = 0;\n\t\tArrayList<Root> best = new ArrayList<Root>();\n\t\tfor (Root r:touchRoots) {\n\t\t\tint rootScore = 0;\n\t\t\tfor (Coord c1:r.lastLevel) {\n\t\t\t\tfor (Coord c2:circs){\n\t\t\t\t\tif (isTouching(c1,c2)) {\n\t\t\t\t\t\trootScore++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (rootScore > maxScore) {\n\t\t\t\tmaxScore = rootScore;\n\t\t\t\tbest.clear();\n\t\t\t\tbest.add(r);\n\t\t\t}\n\t\t\telse if(rootScore == maxScore) {\n\t\t\t\tbest.add(r);\n\t\t\t}\n\t\t}\n\n\t\tif(best.size() == 1) {\n\t\t\treturn best.get(0);\n\t\t}\n\t\t/*\n\t\t * If two roots have the same score (very unlikely) return the \n\t\t * larger root.\n\t\t */\n\t\telse{\n\t\t\tint maxSize = 0;\n\t\t\tRoot ro = best.get(0);\n\t\t\tfor(Root r:best) {\n\t\t\t\tif(r.lastLevel.size() > maxSize) {\n\t\t\t\t\tmaxSize = r.lastLevel.size();\n\t\t\t\t\tro = r;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ro;\n\t\t}\n\t}", "private A deleteLargest(int subtree) {\n return null; \n }", "@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }", "protected abstract Set<T> findNeighbors(T node, Map<T, T> parentMap);", "KDNode(Datum[] datalist) throws Exception{\r\n\r\n\t\t\t/*\r\n\t\t\t * This method takes in an array of Datum and returns \r\n\t\t\t * the calling KDNode object as the root of a sub-tree containing \r\n\t\t\t * the above fields.\r\n\t\t\t */\r\n\r\n\t\t\t// ADD YOUR CODE BELOW HERE\t\t\t\r\n\t\t\t\r\n\t\t\tif(datalist.length == 1) {\r\n\t\t\t\t\r\n\t\t\t\tleaf = true;\r\n\t\t\t\tleafDatum = datalist[0];\r\n\t\t\t\tlowChild = null;\r\n\t\t\t\thighChild = null;\r\n\t\t\t\tnumLeaves ++;\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\t}else {\r\n\t\r\n\t\t\t\tint dim = 0;\r\n\t\t\t\tint range = 0;\r\n\t\t\t\tint max = 0;\r\n\t\t\t\tint min = 0;\r\n\t\t\t\tint Max = 0;\r\n\t\t\t\tint Min = 0;\r\n\t\t\t\tfor(int i = 0; i < k; i++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tmax = datalist[0].x[i];\r\n\t\t\t\t\tmin = datalist[0].x[i];\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int j = 0; j < datalist.length; j++) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(datalist[j].x[i] >= max) {\r\n\t\t\t\t\t\t\tmax = datalist[j].x[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(datalist[j].x[i] <= min) {\r\n\t\t\t\t\t\t\tmin = datalist[j].x[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(max - min >= range) {\r\n\t\t\t\t\t\trange = max - min;\r\n\t\t\t\t\t\tMax = max;\r\n\t\t\t\t\t\tMin = min;\r\n\t\t\t\t\t\tdim = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(range == 0) {\r\n\t\t\t\t\tleaf = true;\r\n\t\t\t\t\tleafDatum = datalist[0];\r\n\t\t\t\t\tlowChild = null;\r\n\t\t\t\t\thighChild = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tnumLeaves ++;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t//if greatest range is zero, all points are duplicates\r\n\t\t\t\t\r\n\t\t\t\tsplitDim = dim;\r\n\t\t\t\tsplitValue = (double)(Max + Min) / 2.0;\t//get the split dim and value\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tArrayList<Datum> lList = new ArrayList<Datum>();\r\n\t\t\t\tint numL = 0;\r\n\t\t\t\tArrayList<Datum> hList = new ArrayList<Datum>();\r\n\t\t\t\tint numH = 0;\r\n\t\t\t\r\n\t\t\t\tfor(int i = 0; i < datalist.length; i ++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(datalist[i].x[splitDim] <= splitValue) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlList.add(datalist[i]);\r\n\t\t\t\t\t\t\tnumL ++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\thList.add(datalist[i]);\r\n\t\t\t\t\t\tnumH ++;\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t//get the children list without duplicate but with null in the back\r\n\t\t\t\t\t//Don't check duplicates in children Nodes!!!\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tlowChild = new KDNode( lList.toArray(new Datum[numL]) );\r\n\t\t\t\thighChild = new KDNode( hList.toArray(new Datum[numH]) );\t//create the children nodes\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// ADD YOUR CODE ABOVE HERE\r\n\r\n\t\t}", "public Node pred(int time) {\n\t\tNode x = root;\n\t\tNode y = null;\n\t\twhile(x != null) {\n\t\t\tint tx = x.getTime();\n\t\t\tif (tx <= time) {\n\t\t\t\ty = x; // y points to the deepest node (yet found) that is bigger than k. Might be the predecessor.\n\t\t\t\tx = x.getRight();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tx = x.getLeft();\n\t\t\t}\n\t\t}\n\t\treturn y;\n\t}", "public List<Integer> _closestKValues(TreeNode root, double target, int k) {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfinal double targetValue = target;\n\t\tQueue<Integer> heap = new PriorityQueue<>(k, new Comparator<Integer>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\n\t\t\t\tif (Math.abs(arg0 - targetValue) > Math.abs(arg1 - targetValue))\n\t\t\t\t\treturn 1;\n\t\t\t\telse if (Math.abs(arg0 - targetValue) < Math.abs(arg1 - targetValue))\n\t\t\t\t\treturn -1;\n\t\t\t\telse\n\t\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\taddToHeap(root, heap);\n\t\tfor(int i=0; i<k; i++) {\n list.add(heap.poll());\n }\n\t\treturn list;\n\t}", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public BSTNode search(int value){ //The value to search for.\n BSTNode current = root;\n \n // While we don't have a match\n while(current!=null){\n \n // If the value is less than current, go left.\n if(value < current.value){\n current = current.left;\n }\n \n // If the value is more than current, go right.\n else if(value > current.value){\n current = current.right;\n }\n \n // We have a match!\n else{\n break;\n }\n }\n return current;\n }", "public ArrayList<Record> near()\n {\n int count = 0;\n ArrayList<Record> closest = new ArrayList<>();\n System.out.println(\"Community Centres that are 5km or less to your location are: \");\n for(Record i: cCentres)\n {\n //latitude and longitude for each centre\n double lat2 = Double.parseDouble(i.getValue(4));\n double lon2 = Double.parseDouble(i.getValue(3));\n ;\n //distance\n double dist = calcDist(lat2, lon2, cCentres);\n if(dist<=5)\n {\n System.out.println(i + \", Distance: \" + dist + \" km\");\n closest.add(i);\n }\n }\n return closest;\n }", "public List<Integer> closestKValues(TreeNode root, double target, int k) {\n\t\tQueue<Integer> list = new LinkedList<>();\n\t\tStack<TreeNode> stk = new Stack<>();\n\t\twhile (!stk.isEmpty() || root != null) {\n\t\t\tif (root != null) {\n\t\t\t\tstk.push(root);\n\t\t\t\troot = root.left;\n\t\t\t} else {\n\t\t\t\tTreeNode node = stk.pop();\n\t\t\t\tif (list.size() < k) {\n\t\t\t\t\tlist.add(node.val);\n\t\t\t\t} else {\n\t\t\t\t\tint val = list.peek();\n\t\t\t\t\tif (Math.abs(val - target) > Math.abs(node.val - target)) {\n\t\t\t\t\t\tlist.poll();\n\t\t\t\t\t\tlist.add(node.val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\troot = node.right;\n\t\t\t}\n\t\t}\n\t\treturn new ArrayList<>(list);\n\t}", "public Point getClosest(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMax = 0.0;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint furthermost = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance > distanceMax){\n\t\t\t\t\tdistanceMax = distance;\n\t\t\t\t\tfurthermost = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn furthermost;\n\t\t}", "public static UniformCostSearchNode search(UniformCostSearchNode root){\n PriorityQueue<UniformCostSearchNode> frontier = new PriorityQueue<UniformCostSearchNode>();\n\n // hash set for fast verification of closed nodes\n HashSet<UniformCostSearchNode> closed = new HashSet<UniformCostSearchNode>();\n\n closed.add(root);\n frontier.add(root);\n\n while(frontier.size() != 0){\n UniformCostSearchNode current = frontier.remove();\n if(current.isGoalState()){\n System.out.println(\"UCS Nodes explored: \" + closed.size());\n return current;\n }\n\n for(UniformCostSearchNode neighbor : current.getNeighbors()){\n if(!closed.contains(neighbor)) {\n if (!frontier.contains(neighbor)) {\n frontier.add(neighbor);\n }\n }\n }\n }\n\n System.out.println(\"UCS Search failed, nodes explored: \" + closed.size());\n // search failed\n return null;\n }", "public BinTree induceTree(int[] partition, int[] features) {\r\n\t\t// if the partition is empty, we can not return a tree\r\n\t\tif (partition.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// check if all entries in partition belong to the same class. If so,\r\n\t\t// return node, labeled with class value\r\n\t\t// you may want to check if pruning is applicable here (and then just\r\n\t\t// return the majority class).\r\n\t\tint[] classCnt = new int[classes.length];\r\n\t\tString sameValue = null;\r\n\t\tboolean sameClass = true;\r\n\t\tfor (int p = 0; p < partition.length; p++) {\r\n\t\t\tString targetValue = output[partition[p]];\r\n\t\t\tfor (int n = 0; n < classes.length; n++) {\r\n\t\t\t\tif (targetValue.equals(classes[n])) {\r\n\t\t\t\t\tclassCnt[n]++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (p == 0)\r\n\t\t\t\tsameValue = targetValue;\r\n\t\t\telse {\r\n\t\t\t\tif (!sameValue.equalsIgnoreCase(targetValue)) {\r\n\t\t\t\t\tsameClass = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (sameClass) {\r\n\t\t\treturn new BinTree(sameValue);\r\n\t\t} else {\r\n\t\t\tint max = 0;\r\n\t\t\tfor (int n = 1; n < classes.length; n++)\r\n\t\t\t\tif (classCnt[max] < classCnt[n])\r\n\t\t\t\t\tmax = n;\r\n\t\t\tif ((double) classCnt[max] / (double) partition.length > 0.50\r\n\t\t\t\t\t|| partition.length < 5) { // if more than 50% of samples\r\n\t\t\t\t\t\t\t\t\t\t\t\t// in partition are of the same\r\n\t\t\t\t\t\t\t\t\t\t\t\t// class OR fewer than 5 samples\r\n\t\t\t\tSystem.out.print(\".\");\r\n\t\t\t\treturn new BinTree(classes[max]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if no features are available, we can not return a tree\r\n\t\tif (features.length == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// class values are not equal so we select a particular feature to split\r\n\t\t// the partition\r\n\t\tint selectedFeature = selectFeature(partition, features);\r\n\r\n\t\t// create new partition of samples\r\n\t\t// use only corresponding subset of full partition\r\n\t\tint[] partTrue = matches(partition, selectedFeature, true);\r\n\t\tint[] partFalse = matches(partition, selectedFeature, false);\r\n\t\t// remove the feature from the new set (to be sent to subtrees)\r\n\t\tint[] nextFeatures = new int[features.length - 1];\r\n\t\tint cnt = 0;\r\n\t\tfor (int f = 0; f < features.length; f++) {\r\n\t\t\tif (features[f] != selectedFeature)\r\n\t\t\t\tnextFeatures[cnt++] = features[f];\r\n\t\t}\r\n\t\t// construct the subtrees using the new partitions and reduced set of\r\n\t\t// features\r\n\t\tBinTree branchTrue = induceTree(partTrue, nextFeatures);\r\n\t\tBinTree branchFalse = induceTree(partFalse, nextFeatures);\r\n\r\n\t\t// if either of the subtrees failed, we have confronted a problem, use\r\n\t\t// the most likely class value of the current partition\r\n\t\tBinTree defaultTree = null;\r\n\t\tif (branchTrue == null || branchFalse == null) {\r\n\t\t\t// indicate a majority vote\r\n\t\t\tint[] freq = new int[classes.length];\r\n\t\t\tint most = 0;\r\n\t\t\tfor (int c = 0; c < classes.length; c++) {\r\n\t\t\t\tint[] pos = matches(partition, classes[c]);\r\n\t\t\t\tfreq[c] = pos.length;\r\n\t\t\t\tif (freq[c] >= freq[most])\r\n\t\t\t\t\tmost = c;\r\n\t\t\t}\r\n\t\t\t// the majority class value can replace any null trees...\r\n\t\t\tdefaultTree = new BinTree(classes[most]);\r\n\t\t\tif (branchTrue == null && branchFalse == null)\r\n\t\t\t\treturn defaultTree;\r\n\t\t\telse\r\n\t\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\t\treturn new BinTree(labelFeature(selectedFeature),\r\n\t\t\t\t\t\t(branchTrue == null ? defaultTree : branchTrue),\r\n\t\t\t\t\t\t(branchFalse == null ? defaultTree : branchFalse));\r\n\t\t} else { // if both subtrees were successfully created we can either\r\n\t\t\tif (branchTrue.classValue != null && branchFalse.classValue != null) {\r\n\t\t\t\tif (branchTrue.classValue.equals(branchFalse.classValue)) {\r\n\t\t\t\t\t// return the the current node with the classlabel common to\r\n\t\t\t\t\t// both subtrees, or\r\n\t\t\t\t\treturn new BinTree(branchTrue.classValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// return the unlabeled node with subtrees attached\r\n\t\t\treturn new BinTree(labelFeature(selectedFeature), branchTrue,\r\n\t\t\t\t\tbranchFalse);\r\n\t\t}\r\n\t}", "private AStarNode getMinFScore(ArrayList<AStarNode> openSet) {\n AStarNode save = null;\n for (AStarNode neighbor : openSet) { //linear search\n if (save == null) {\n save = neighbor;\n } else {\n if (save.getFScore() > neighbor.getFScore())\n save = neighbor;\n }\n }\n return save;\n }", "public List<Integer> distanceK(TreeNode root, TreeNode target, int K) {\n List<Integer> res = new ArrayList();\n if (root == null || target == null || K < 0)\n return res;\n map = new HashMap();\n buildChildParentMap(root, null);\n\n Queue<TreeNode> q = new LinkedList();\n q.add(null);\n q.add(target);\n\n Set<TreeNode> seen = new HashSet();\n seen.add(target);\n seen.add(null);\n\n int d = 0;\n\n while (!q.isEmpty()) {\n TreeNode n = q.poll();\n if (n == null) {\n if (d == K) {\n while (!q.isEmpty()) {\n res.add(q.poll().val);\n }\n break;\n }\n q.add(null);\n d++;\n } else {\n if (!seen.contains(n.left)) {\n seen.add(n.left);\n q.add(n.left);\n }\n if (!seen.contains(n.right)) {\n seen.add(n.right);\n q.add(n.right);\n }\n TreeNode par = map.get(n);\n if (!seen.contains(par)) {\n seen.add(par);\n q.add(par);\n }\n }\n }\n\n return res;\n }", "@Override\r\n\tpublic List<Node<T>> getLongestPathFromRootToAnyLeaf() {\r\n\t\tList<Node<T>> camino = new LinkedList<Node<T>>();// La lista que se\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// retornara\r\n\t\tint prof = 1;// La profundidad actual\r\n\t\tNode<T> ret = null;// El nodo mas profundo\r\n\t\tret = LongestPathRec(raiz, prof, ret);// Metodo\r\n\t\t\t\t\t\t\t\t\t\t\t\t// auxiliar que\r\n\t\t\t\t\t\t\t\t\t\t\t\t// busca el nodo\r\n\t\t\t\t\t\t\t\t\t\t\t\t// mas profundo\r\n\t\treturn completaCamino(ret, camino);// Metodo auxiliar que crea el camino\r\n\t\t\t\t\t\t\t\t\t\t\t// hacia el nodo mas profundo\r\n\t}", "public SimilarityMatrix<T> makeBinary(double threshold) {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n if(get(first, second)>threshold) {\n set(first, second, 1.0);\n } else {\n set(first, second, 0.0);\n }\n \n }\n \n }\n \n return this;\n }", "private Cluster getNearestCluster(BasicEvent event) {\n float minDistance = Float.MAX_VALUE;\n Cluster closest = null;\n float currentDistance = 0;\n for (Cluster c : clusters) {\n float rX = c.radiusX;\n float rY = c.radiusY; // this is surround region for purposes of dynamicSize scaling of cluster size or aspect ratio\n if (dynamicSizeEnabled) {\n rX *= surround;\n rY *= surround; // the event is captured even when it is in \"invisible surround\"\n }\n float dx, dy;\n if ((dx = c.distanceToX(event)) < rX && (dy = c.distanceToY(event)) < rY) { // needs instantaneousAngle metric\n currentDistance = dx + dy;\n if (currentDistance < minDistance) {\n closest = c;\n minDistance = currentDistance;\n c.distanceToLastEvent = minDistance;\n c.xDistanceToLastEvent = dx;\n c.yDistanceToLastEvent = dy;\n }\n }\n }\n return closest;\n }", "LinkedListSortedNeighborSet obtainKNeighbors(int paraObjectIndex) {\n LinkedListSortedNeighborSet tempNeighborSet = new LinkedListSortedNeighborSet();\n tempNeighborSet.setNeighborThreshold(k);\n\n for (int i = 0; i < formalContext.trainingFormalContext.length; i++) {\n//\t\t\tSystem.out.println(\"u: \" + paraObjectIndex);\n if (i != paraObjectIndex) {\n//\t\t\t\tSystem.out.println(\"v: \" + i);\n Measures tempSimilarityMetric = new Measures(formalContext.trainingFormalContext[paraObjectIndex],\n formalContext.trainingFormalContext[i]);\n double tempSimilarity = tempSimilarityMetric.jaccardSimilarity();\n//\t\t\t\tSystem.out.println(\"Similarity: \" + tempSimilarity);\n tempNeighborSet.topKSortedInsert(i, tempSimilarity);\n//\t\t\t\tSystem.out.println(\"\" + tempNeighborSet.toString());\n } // End if\n } // End for\n return tempNeighborSet;\n }", "public int largestSmaller(TreeNode root, int target) {\n if(root == null) {\n return (int)(-1 * Math.pow(2, 31));\n }\n TreeNode nextNode = root;\n Deque<TreeNode> stack = new LinkedList<>();\n List<Integer> result = new ArrayList<>();\n while(nextNode != null || !stack.isEmpty()) {\n if(nextNode != null) {\n stack.offerFirst(nextNode);\n nextNode = nextNode.left;\n }\n else {\n nextNode = stack.pollFirst();\n result.add(nextNode.key);\n nextNode = nextNode.right;\n }\n }\n int i = 0;\n for(i = result.size() - 1; i >= 0; i--) {\n if(result.get(i) < target) {\n break;\n }\n }\n if(i == -1) {\n return Integer.MIN_VALUE;\n }\n return result.get(i);\n }", "public List<T> wantedNodesIterative(Predicate<T> p) {\n //PART 4 \n if(root == null){\n return null;\n }\n LinkedList<TreeNode<T>> stack = new LinkedList<>();\n stack.add(root);\n \n List<T> wantedNodes =new LinkedList<>();\n TreeNode<T> current;\n \n while(!stack.isEmpty()){\n current = stack.pop();\n if(p.check(current.data)){\n wantedNodes.add(current.data);\n }\n if(current.right != null){\n stack.addFirst(current.right);\n }\n if(current.left != null){\n stack.addFirst(current.left);\n }\n }\n return wantedNodes;\n }", "public final Node getNearestNode(Point p) {\n double minDistanceSq = Double.MAX_VALUE;\n Node minPrimitive = null;\n for (Node n : getData().nodes) {\n if (n.deleted || n.incomplete)\n continue;\n Point sp = getPoint(n.eastNorth);\n double dist = p.distanceSq(sp);\n if (minDistanceSq > dist && dist < snapDistance) {\n minDistanceSq = p.distanceSq(sp);\n minPrimitive = n;\n }\n // prefer already selected node when multiple nodes on one point\n else if(minDistanceSq == dist && n.selected && !minPrimitive.selected)\n {\n minPrimitive = n;\n }\n }\n return minPrimitive;\n }", "public KdTree(final int depthThreshold, final int triangleThreshold) {\n root = null;\n this.depthThreshold = depthThreshold;\n this.triangleThreshold = triangleThreshold;\n }", "public Collection<Node> getNearestNodes(Point point,\n\t\t\tCollection<Node> affectedNodes,\n\t\t\tPredicate<OsmPrimitive> isSelectablePredicate) {\n\t\treturn null;\n\t}", "public Node closestPrecedingNode(int id);", "Node<T> findDeepestNegativeSubtree() {\n Node<T> minSubtreeRoot = root;\n int maxHeight = 0;\n\n Queue<Node<T>> pendingNodes = new ArrayDeque<>();\n pendingNodes.addAll(root.getChildren());\n\n while (pendingNodes.size() > 0) {\n Node<T> currNode = pendingNodes.poll();\n T currNodeSubtreeWeight = currNode.getSubtreeWeight();\n\n if (operations.compare(currNodeSubtreeWeight, operations.getZero()) == -1 && currNode.getHeight() > maxHeight) {\n minSubtreeRoot = currNode;\n maxHeight = currNode.getHeight();\n }\n\n pendingNodes.addAll(currNode.getChildren());\n }\n\n return minSubtreeRoot;\n }", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "public static UniformCostSearchNode searchBnB(UniformCostSearchNode root){\n PriorityQueue<UniformCostSearchNode> frontier = new PriorityQueue<UniformCostSearchNode>();\n\n // hash set for fast verification of closed nodes\n HashSet<UniformCostSearchNode> closed = new HashSet<UniformCostSearchNode>();\n\n int upperBoundCost = Integer.MAX_VALUE;\n\n frontier.add(root);\n\n while(frontier.size() != 0){\n UniformCostSearchNode current = frontier.remove();\n if(current.isGoalState()){\n System.out.println(\"UCS B&B Nodes explored: \" + closed.size());\n return current;\n }\n\n // implicitly pruning the frontier\n if(current.getCost() >= upperBoundCost){\n // skipping due to bounding\n continue;\n }\n\n closed.add(current);\n\n PriorityQueue<UniformCostSearchNode> toAdd = new PriorityQueue<UniformCostSearchNode>();\n for(UniformCostSearchNode neighbor : current.getNeighbors()){\n toAdd.add(neighbor);\n }\n\n while(toAdd.size() != 0) {\n UniformCostSearchNode neighbor = toAdd.remove();\n if (neighbor.getCost() < upperBoundCost) {\n if (neighbor.isGoalState()) {\n // bounding\n upperBoundCost = neighbor.getCost();\n }\n frontier.add(neighbor);\n }\n }\n }\n\n System.out.println(\"UCS B&B Search failed, nodes explored: \" + closed.size());\n // search failed\n return null;\n }", "public abstract LinkedList<Integer> getNeighbours(int index);", "public Stack<Node> retrieve_fastest_path() {\r\n return findPath(initial_node, end_node);\r\n }", "@Test\n public void testContains()\n {\n example.insert(6);\n example.insert(12);\n example.insert(3);\n example.insert(0);\n example.insert(10);\n assertEquals(true, example.contains(0));\n //Test leaf of tree\n example2.insert(1);\n example2.insert(2);\n example2.insert(3);\n example2.insert(4);\n example2.insert(5);\n assertEquals(true, example2.contains(5));\n //Test negative case \n example3.insert(1);\n example3.insert(2);\n example3.insert(3);\n example3.insert(4);\n example3.insert(5);\n assertEquals(false, example2.contains(12));\n }", "public List<SearchNode> expand() {\n\n List<SearchNode> neighbours = new ArrayList<>();\n\n if (this.getX() > 0) {\n SearchNode left = new SearchNode(this.getX() - 1, this.getY(), this.getDepth() + 1);\n neighbours.add(left);\n }\n if (this.getX() < 14) {\n SearchNode right = new SearchNode(this.getX() + 1, this.getY(), this.getDepth() + 1);\n neighbours.add(right);\n }\n if (this.getY() > 0) {\n SearchNode up = new SearchNode(this.getX(), this.getY() - 1, this.getDepth() + 1);\n neighbours.add(up);\n }\n if (this.getY() < 14) {\n SearchNode down = new SearchNode(this.getX(), this.getY() + 1, this.getDepth() + 1);\n neighbours.add(down);\n }\n\n return neighbours;\n }", "treeNode selectNode(treeNode root, MTRandom clustererRandom){\n\t\t\n\t\t//random number between 0 and 1\n\t\tdouble random = clustererRandom.nextDouble();\n\t\t\n\t\twhile(!isLeaf(root)){\n\t\t\tif(root.lc.cost == 0 && root.rc.cost == 0){\n\t\t\t\tif(root.lc.n == 0){\n\t\t\t\t\troot = root.rc;\n\t\t\t\t} else if(root.rc.n == 0){\n\t\t\t\t\troot = root.lc;\n\t\t\t\t}else if(random < 0.5){\n\t\t\t\t\trandom = clustererRandom.nextDouble();\n\t\t\t\t\troot = root.lc;\n\t\t\t\t} else {\t\t\n\t\t\t\t\trandom = clustererRandom.nextDouble();\t\t\n\t\t\t\t\troot = root.rc;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\tif(random < root.lc.cost/root.cost){\n\t\t\t\n\t\t\t\t\troot = root.lc;\n\t\t\t\t} else {\t\t\n\n\t\t\t\t\troot = root.rc;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn root;\n\t}", "private double efficientLInfinityDistance(Instance one, Instance two, double threshold) {\n\n double attributeDistance;\n double maxDistance = 0;\n\n for (int i = 0; i < one.numAttributes() - 1; i++) {\n attributeDistance = Math.abs(one.value(i) - two.value(i));\n\n if (attributeDistance > maxDistance) {\n maxDistance = attributeDistance;\n }\n if (maxDistance > threshold) {\n return Double.MAX_VALUE;\n }\n }\n\n return maxDistance;\n }", "public String[] search() {\n\t\t\n\t\troot.setScore(0);\n\t\tleaves = 0;\n\t\t\n\t\t/*\n\t\t * Interrupt the think() thread so we can have the updated game tree\n\t\t */\n\t\t\n\t\tString[] move = new String[2];\n\t\t\n\t\t// Find the max or min value for the white or black player respectively\n\t\tfloat val = alphaBeta(root, max_depth, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, player);\n\t\t\n\t\t// Retrieve the move that has the min/max vlaue\n\t\tArrayList<Node> moves = root.getChildren();\n\t\tfor(Node n : moves) {\n\t\t\tif(Float.compare(n.value, val) == 0) {\n\t\t\t\tint[] m = new int[6];\n\t\t\t\tint encodedM = n.move;\n\t\t\t\t\n\t\t\t\t// Decode the move\n\t\t\t\tfor(int i = 0; i < 6; i++) {\n\t\t\t\t\tm[i] = encodedM & 0xf;\n\t\t\t\t\tencodedM >>= 4;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Convert the array into a string array with the format [0] => \"a7-b7\", [1] => \"b5\"\n\t\t\t\tmove[0] = ((char)(m[0] + 97)) + \"\" + (m[1]) + \"-\" + ((char)(m[2] + 97)) + \"\" + (m[3]);\n\t\t\t\tmove[1] = ((char)(m[4] + 97)) + \"\" + (m[5]);\n\t\t\t\t\n\t\t\t\t// Play the move on the AI's g_board, set the root to this node and break out of the loop\n\t\t\t\tg_board.doMove(n.move);\n\t\t\t\t\n\t\t\t\t// Reset the root rather than set it to a branch since we can currently only achieve a depth of 2-ply\n\t\t\t\troot.getChildren().clear();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(leaves <= 2000) {\n\t\t\tmax_depth++;\n\t\t}\n\t\t\n\t\t/*\n\t\t * Start the think() thread\n\t\t */\n\t\t\n\t\treturn move;\n\t}", "@Override\n public List<STPoint> nearestNeighbor(STPoint needle, STPoint boundValues, int n, int dim) {\n\n STPoint min = new STPoint(needle.getX()-boundValues.getX(), needle.getY()-boundValues.getY(), needle.getT()-boundValues.getT());\n STPoint max = new STPoint(needle.getX()+boundValues.getX(), needle.getY()+boundValues.getY(), needle.getT()+boundValues.getT());\n\n STRegion range = new STRegion(min, max);\n List<STPoint> allPoints = range(range);\n\n Quicksort qs = new Quicksort();\n\n qs.sortNearPoints(needle, allPoints, 0, allPoints.size() - 1, dim);\n\n allPoints.remove(0);//remove itself\n while(allPoints.size() > n){\n allPoints.remove(allPoints.size()-1);\n }\n\n if(allPoints.size()< 1){return null;}////\n\n return allPoints;\n }", "public static TreeNode smallestLarger(TreeNode root, int target) {\n\t\tTreeNode smallestLarger = null;\n\t\tTreeNode cur = root;\n\t\twhile (cur != null) {\n\t\t\tif (cur.val <= target) {\n\t\t\t\tcur = cur.right;\n\t\t\t} else {\n\t\t\t\tsmallestLarger = cur;\n\t\t\t\tcur = cur.left;\n\t\t\t}\n\t\t}\n\t\treturn smallestLarger;\n\t}", "public Grid filterSmallValues(int threshold) {\n\t\n\t\tassert(threshold > 0);\n\t\t\n\t\tint[][] newGrid = new int[width()][height()];\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tif (Math.abs(valueAt(i, j)) < threshold) {\n\t\t\t\t\tnewGrid[i][j] = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewGrid[i][j] = valueAt(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Grid(newGrid);\n\t}", "public int my_leaf_count();", "public static void main(String[] args) {\n Node root = new Node(10);\n root.right = new Node(-3);\n root.right.right = new Node(11);\n\n Node l1 = root.left = new Node(5);\n l1.right = new Node(2);\n l1.right.right = new Node(1);\n\n l1.left = new Node(3);\n l1.left.right = new Node(-2);\n l1.left.left = new Node(3);\n\n int k = 7;\n List<Node> path = new ArrayList<>();\n findPath(root, 7, path); //O(n^2) in worst, O(nlogn) if tree is balanced.\n\n }", "double getLowerThreshold();", "float getThreshold();", "public static Vertex breathFirstSearch(Graph g, Vertex root) {\n\n for (Vertex v : g) {\n v.seen = false;\n v.parent = null;\n v.distance = Integer.MAX_VALUE;\n }\n\n Queue<Vertex> queue = new LinkedList<Vertex>();\n root.seen = true;\n root.distance = 0;\n queue.add(root);\n Vertex maxDistNode = null;\n while (!queue.isEmpty()) {\n Vertex current = queue.remove();\n\n for (Edge e : current.Adj) {\n Vertex other = e.otherEnd(current);\n if (!other.seen) {\n other.seen = true;\n other.distance = current.distance + 1;\n other.parent = current;\n queue.add(other);\n }\n }\n maxDistNode = current;\n }\n return maxDistNode;\n }", "private static LinkedList<Integer> localSearch2Opt(File fileNameWithPath, int kNeighborHood ) throws Exception{\n\t\t\n\t\tString traceString = \"\";\n\t\tdouble bestCost = Double.POSITIVE_INFINITY;\n\t\tLinkedList<Integer> bestTspList = null;\n\t\tdouble bestCycleTime = Double.POSITIVE_INFINITY;\n\n\t\tif (Project.runId == -1 )\n\t\t\tProject.runId = 1;\n\n\t\t/* \n\t\t * read the file and build the cost table\n\t\t */\n parseEdges(fileNameWithPath);\n\n /*\n\t\t * time starts once you read the data\n */\n\t\tdouble baseTime = System.nanoTime();\n\n\t\t/*\n\t\t * invoking furthest insertion algorithm to get the tsp\n\t\t */\n\t\tlong startNodeSeed = (long)(1000.0*generator.nextDouble());\n\t\tLinkedList<Integer> currentTspList = FurthestInsertion.generateTSP(Project.sourceGTree,startNodeSeed);\n\t\t\n\t\tdouble currentTspCost = tspCost(currentTspList);\n\n\t\tbestTspList = currentTspList;\n\t\tbestCost = currentTspCost;\n\t\tbestCycleTime = System.nanoTime() - baseTime;\n\n\t\t/* print the trace file */\n\t\ttraceString = String.format(\"%.2f, %d\",Math.round(((System.nanoTime()-baseTime)/nanosecs)*100.0)/100.0,Math.round(bestCost));\n\t\tprintTrace(runId,traceString);\n\n\t\t/*\n\t\t * remove the last node as it matches the first\n\t\t */\n\t\tcurrentTspList.removeLast();\n\n\t\twhile ( true )\n\t\t{\n\t\t\t/*\n\t\t\t * reached cutoff time\n\t\t\t */\n\t\t\tif ( System.nanoTime()-baseTime >= Project.cutoffTimeSeconds*nanosecs ) {\n\t\t\t\ttimedOut=true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdouble cycleStartTime = System.nanoTime();\n\n\t\t\tLinkedList<Integer> newTspList = currentTspList;\n\n\t\t\t/* do a 2 opt search in current k=5 neighborhood to get a newtsp */\n\t\t\t/* 1. Pick the first random element in the current tsp */\n\t\t\tint element2 = (int)((double)(newTspList.size()-1) * generator.nextDouble());\n\t\t\tint element1 = element2 - 1;\n\t\t\tif ( element1 == -1 ){\n\t\t\t\telement1 = newTspList.size()-1;\n\t\t\t}\n\t\t\t\n int delta;\n\n\t\t\t/*\n\t\t\t * search in the neighborhood specified\n * if not specified search all\n\t\t\t */\n if ( kNeighborHood != -1 ) {\n\t\t\t /* We want to search in the specified k=n neighborhoods of element1 */\n\t\t\t delta= (int)(2*kNeighborHood*generator.nextDouble()) - kNeighborHood;\n } else {\n\t\t\t delta= (int)((newTspList.size()-1)*generator.nextDouble()) - (int)(newTspList.size()/2);\n\t\t\t}\n\n\t\t\tif ( delta == 0 ) {\n\t\t\t\tdelta = 2;\n\t\t\t} else if ( delta == 1 ) {\n\t\t\t\tdelta = 2;\n\t\t\t} else if ( delta == -1) {\n\t\t\t\tdelta = -2; }\n\n\t\t\tint element4 = element2 + delta;\n\n\t\t\tif ( element4 < 0 ) {\n\t\t\t\telement4 = newTspList.size()+element4;\n\t\t\t}else if ( element4 >= newTspList.size() ) {\n\t\t\t\telement4 = element4-(newTspList.size()-1);\n\t\t\t}\n\n\t\t\tint element3 = element4 -1;\n\t\t\tif ( element3 == -1 ){\n\t\t\t\telement3 = newTspList.size()-1;\n\t\t\t}\n\n\n\t\t\t/* \n\t\t\t * the new tsp will have element2->element4.......element1->element3....\n\t\t\t */\n\t\t\tInteger vertex_3 = newTspList.get(element3);\n\t\t\tnewTspList.set(element3,newTspList.get(element2));\n\t\t\tnewTspList.set(element2,vertex_3);\n\n\t\t\t/*\n\t\t\t * from element2+1 to element3-1 swap to reverse their order\n\t\t\t */\n\t\t\twhile ( element2 < element3 ){\n\t\t\t\telement3 = element3-1;\n\t\t\t\tif ( element3 == -1 ) {\n\t\t\t\t\telement3 = newTspList.size()-1;\n\t\t\t\t}\n\n\t\t\t\telement2 = element2 + 1;\n\t\t\t\tif ( element2 == newTspList.size() ) {\n\t\t\t\t\telement3 = 0;\n\t\t\t\t}\n\n\t\t\t\tInteger tempVertex = newTspList.get(element2);\n\t\t\t\tnewTspList.set(element2,newTspList.get(element3));\n\t\t\t\tnewTspList.set(element3,tempVertex);\n\n\t\t\t}\n\n\t\t\tdouble newTspCost = tspCost(newTspList);\n\n\t\t\t/* if new local search solution is better than eariler take the search and continue search\n\t\t\t */\n\t\t\tif ( newTspCost <= currentTspCost ){\n\t\t\t\tcurrentTspList = newTspList;\n\t\t\t\tcurrentTspCost = newTspCost;\n\t\t\t} else {\n\t\t\t/* if new local search solution is not better than eariler \n\t\t\t */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\t//Subtract the start time from the finish time to get the actual algorithm running time; divide by 10e6 to convert to milliseconds\n\t\t\tdouble cycleTime = (System.nanoTime()-cycleStartTime);\n\n\t\t\t/* first improvement , take the best each time */\n\t\t\tif ( newTspCost < bestCost ) {\n\t\t\t\tbestCost = newTspCost;\n\t\t\t\tbestTspList = newTspList;\n\t\t\t\tbestCycleTime = cycleTime;\n\t\t\t\t/* print the trace file */\n\t\t\t\ttraceString = String.format(\"%.2f, %d\",Math.round(((System.nanoTime()-baseTime)/nanosecs)*100.0)/100.0,Math.round(bestCost));\n\t\t\t\tappendToTraceFile(runId,traceString);\n\n\t\t\t\tif ( bestCost <= optimalCost )\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\t/* print the sol file */\n\t\tprintSol(runId,bestTspList,bestCost);\n\n\t\t/* print the tab results file */\n\t\tappendTabResults(runId,bestCycleTime,bestCost,bestTspList);\n\n\t\treturn bestTspList;\n\n\t}", "public static TreeNode largestSmaller(TreeNode root, int target) {\n\t\tTreeNode largestSmaller = null;\n\t\tTreeNode cur = root;\n\t\twhile (cur != null) {\n\t\t\tif (cur.val < target) {\n\t\t\t\tlargestSmaller = cur;\n\t\t\t\tcur = cur.right;\n\t\t\t} else {\n\t\t\t\tcur = cur.left;\n\t\t\t}\n\t\t}\n\t\treturn largestSmaller;\n\t}", "private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }", "public Set<? extends Position> findNearest(\n\t\t\tPosition position, int k, double distance);", "private ProblemModel findCheapestNode(){\n\t\tProblemModel ret = unvisitedPM.peek();\n\t\t\n\t\tfor(ProblemModel p : unvisitedPM){ \n\t\t\t//f(s) = depth + cost to make this move\n\t\t\tif(p.getCost() + p.getDepth() <= ret.getCost() + ret.getDepth()) ret = p;\n\t\t}\n\t\tunvisitedPM.remove(ret);\n\t\treturn ret;\n\t}", "public T getPater(T target) {\r\n int index = getIndex(target);\r\n if (index * 2 + 1 >= SIZE) {\r\n return null;\r\n } else if (tree[index * 2 + 1] == null) {\r\n return null;\r\n } else {\r\n return tree[index * 2 + 1];\r\n }\r\n }", "@Override\n\tpublic List<Sector> solve() {\n\n\t\tQueue<TspNode> queue = new PriorityBlockingQueue<TspNode>(getInitialNodes());\n\n\t\t// start with max bound and no best path\n\t\tAtomicInteger bound = new AtomicInteger(Integer.MAX_VALUE);\n\t\tAtomicReference<List<Sector>> bestPath = new AtomicReference<>();\n\n\t\tConsumer<TspNode> nodeConsumer = node -> {\n\t\t\tsynchronized (bound) {\n\t\t\t\tif(node.getPath().size() == sectors.size() && node.getBound() < bound.get()) {\n\t\t\t\t\tbestPath.set(node.getPath());\n\t\t\t\t\tbound.set(node.getBound());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsectors.stream()\n\t\t\t\t.filter(s -> !node.getPath().isEmpty() && !node.getPath().contains(s))\n\t\t\t\t.map(s -> {\n\t\t\t\t\tList<Sector> newPath = new ArrayList<>(node.getPath());\n\t\t\t\t\tnewPath.add(s);\n\t\t\t\t\treturn new TspNode(newPath, getBoundForPath(newPath));\n\t\t\t\t})\n\t\t\t\t.filter(newNode -> newNode.getBound() <= bound.get())\n\t\t\t\t.forEach(queue::add);\n\t\t};\n\t\t\n\t\tSupplier<TspNode> nodeSupplier = () -> {\n\t\t\t\tsynchronized(queue){\n\t\t\t\t\treturn queue.isEmpty() ? new TspNode(new ArrayList<>(), Integer.MAX_VALUE) : queue.poll();\n\t\t\t\t}\n\t\t};\n\t\t\n\t\tStream.generate(nodeSupplier)\n\t\t\t.parallel()\n\t\t\t.peek(nodeConsumer)\n\t\t\t.filter(s -> s.getBound() > bound.get())\n\t\t\t.findAny();\n\t\t\n\t\t// if queue is empty and we haven't returned, then either we found no complete paths\n\t\t// (bestPath will be null), or the very last path we checked is the best path\n\t\t// (unlikely, but possible), in which case return it.\n\t\treturn bestPath.get();\n\t}", "private int minChild(int ind)\n {\n int bestChild = kthChild(ind, 1);\n int k =2;\n int pos = kthChild(ind, k);\n while ((k <= d) && (pos < heapSize)){\n if(heap[pos] < heap[bestChild])\n {\n bestChild = pos;\n }\n else {\n pos = kthChild(ind, k++);\n }\n }\n return bestChild;\n\n }", "private int minChild(int ind) {\n int bestChild = kthChild(ind, 1);\n int k = 2;\n int pos = kthChild(ind, k);\n while ((k <= 2) && (pos < heapSize)) {\n if (heap[pos] < heap[bestChild])\n bestChild = pos;\n pos = kthChild(ind, k++);\n }\n return bestChild;\n }", "public AVLNode findMin() {\n\t\tif (this.empty()) {\n\t\t\treturn null;\n\t\t}\n\t\tAVLNode min = (AVLNode) this.root;\n\t\twhile (min.getLeft().getHeight() != -1) {\n\t\t\tmin = (AVLNode) min.getLeft();\n\t\t}\n\t\treturn min;\n\t}", "private int kthSmallestTreeNode(Tree tree, int k){\n List<Integer> values = new ArrayList<>();\n List<Integer> arr = printTree(tree, values);\n System.out.println(\"\\nPrinting out the whole list created by In order traversal\\n\");\n System.out.print(arr);\n return arr.get(k);\n}", "private Actor nearestThreat(float search_distance) {\n\t\t//ArrayList<Actor> threats = new ArrayList<Actor>();\n\t\tPriorityQueue<Actor> threats = new PriorityQueue<Actor>(10, new RiskAssessor());\n\n\t\tfor (Actor a: Actor.actors) {\n\t\t\t// Don't be scared of yourself\n\t\t\tif (a == this)\n\t\t\t\tcontinue;\n\n\t\t\t// do not consider these types threats\n\t\t\tif (a instanceof PowerUp)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// Do not consider our own bullets threats\n\t\t\tif (a instanceof Bullet || a.parentId == id)\n\t\t\t\tcontinue;\n\n\t\t\tVector displacement = position.differenceOverEdge(a.position);\n\n\t\t\tif (displacement.magnitude2() > search_distance * search_distance)\n\t\t\t\tcontinue;\n\n\t\t\t// If the threat is a player we do not continue a threat until we are much closer\n\t\t\tif (a instanceof PlayerShip &&\n\t\t\t\t\tdisplacement.magnitude2() > MIN_PLAYER_SHIP_DISTANCE * MIN_PLAYER_SHIP_DISTANCE)\n\t\t\t\tcontinue;\n\n\t\t\tthreats.add(a);\n\t\t}\n\n\t\tswitch(threats.size()) {\n\t\tcase(0):\n\t\t\treturn null;\n\t\tdefault:\n\t\t\treturn threats.remove();\n\t\t}\n\t}", "private void findDetectivePath() {\n Cell current, next;\n detectivePath = new ArrayDeque<>();\n clearVisitedMarks();\n current = detective;\n current.visited = true;\n\n while (true) {\n next = nextNotVisitedCell(current);\n if (next == killer) {\n detectivePath.addLast(current);\n detectivePath.addLast(next);\n break;\n } else if (next != null) {\n detectivePath.addLast(current);\n current = next;\n current.visited = true;\n } else {\n current = detectivePath.pollLast();\n }\n }\n detectivePath.pollFirst();\n }", "public Integer getLeaf() {\n return leaf;\n }", "private int threshFind(int[] ray){\n int min = 0;\n int max = 0;\n for(int i = 0; i < ray.length; i++){\n if(min > ray[i]) min = ray[i];\n else if(max < ray[i]) max = ray[i];\n }\n\n return (min + max) / 2;\n }", "private KdTreeNode nearestInKDTree(KdTreeNode current, Point goal, KdTreeNode best, int idx) {\n if (current == null) {\n return best;\n }\n\n if (Point.distance(current.point, goal) < Point.distance(best.point, goal)) {\n best = current;\n }\n\n KdTreeNode goodSide = current.right;\n KdTreeNode badSide = current.left;\n if (KdTree.comparePoints(goal, current.point, idx) < 0) {\n goodSide = current.left;\n badSide = current.right;\n }\n int newIdx = idx ^ 1;\n best = this.nearestInKDTree(goodSide, goal, best, newIdx);\n\n double bestPossibleDis = 0;\n if (idx == 0) {\n bestPossibleDis = Math.pow(goal.getX() - current.point.getX(), 2);\n } else {\n bestPossibleDis = Math.pow(goal.getY() - current.point.getY(), 2);\n }\n if (bestPossibleDis < Point.distance(best.point, goal)) {\n best = this.nearestInKDTree(badSide, goal, best, newIdx);\n }\n\n return best;\n }", "@SuppressWarnings(\"null\")\n\tpublic static void optimalRecursiveSolution (Node Tree, int target) {\n\t\tNode Closest = null;\n\t\tClosest.val = Integer.MAX_VALUE;\n\t\tNode ret = recursiveHelper(Tree, target, Closest);\n\t\tSystem.out.println(String.format(\"%d\", ret.val));\n\t}", "public Node findClosest(int search_key){\n\n Node current, closest; //จำตำแหน่ง node ตอนนี้\n closest = current = root; // เก็บตำแหน่ง node ที่ใกล้ค่าที่หามากสุด\n int min_diff = Integer.MAX_VALUE; // ตัวเปรียบเทียบคสาต่าง\n while (current!= null){ // Use while loop to traverse from root to the closest leaf\n if (search_key == current.key){ //ถ้าเจอก็ return\n return current;\n }\n else{\n if(Math.abs(current.key - search_key) < min_diff){ //หาค่าความต่าง ถ้าอันใหม่ต่างน้อยกว่า แสดงว่าใกล้กว่า\n min_diff = Math.abs(current.key - search_key);\n closest = current;\n }\n\n }\n\n if(search_key < current.key) // กำหยดว่าจะลงไปในทิศทางไหนของ subtree\n {current = current.left;}\n else{current = current.right;}\n }\n\n\n\n return closest;\n }", "private Hit getLevelHit(final Ray r, final TestCounter c) {\n double minDist = Double.POSITIVE_INFINITY;\n Triangle curBest = null;\n for(final Triangle t : tri) {\n final double dist = t.hit(r, c);\n if(r.isValidDistance(dist) && dist < minDist) {\n minDist = dist;\n curBest = t;\n }\n }\n return new Hit(r, curBest, minDist, c);\n }", "@Override\n public Optional<Node<T>> findBy(T value) {\n Optional<Node<T>> rsl = Optional.empty();\n Queue<Node<T>> data = new LinkedList<>();\n data.offer(this.root);\n while (!data.isEmpty()) {\n Node<T> el = data.poll();\n if (el.eqValues(value)) {\n rsl = Optional.of(el);\n break;\n }\n for (Node<T> child : el.leaves()) {\n data.offer(child);\n }\n }\n return rsl;\n }", "public static <E extends Comparable> TreeNode<E> findNode(TreeNode<E> root, E value) {\r\n TreeNode node = root;\r\n \r\n while(node != null) {\r\n int compare = value.compareTo(node.getValue());\r\n \r\n if(compare == 0) {\r\n return node;\r\n } else if(compare < 0) {\r\n node = node.getLeft();\r\n } else {\r\n node = node.getRight();\r\n }\r\n }\r\n \r\n return null;\r\n }", "public static Node findClosestLeaf(Node node, int search_key){\n\n if(search_key==node.key){ //เมื่อเจอ return ค่า\n return node;\n }\n else if(search_key>node.key){ //ถ้า search_key มากกว่า node.key ตอนนี้ แสดงว่า อยู่ทางด้านขวา\n if(node.right!=null){ //ถ้า node ตอนนี้มี right-subtree เรียก recursive โดยส่ง right-subtree\n return findClosestLeaf(node.right, search_key);\n }\n else {return node;} //ถ้า node ตอนนี้มีไม่มี right-subtree แสดงว่า node ตอนนีใกล้ search_key ที่สุด\n }\n else { //ถ้า search_key น้อยกว่า node.key ตอนนี้ แสดงว่า อยู่ทางด้านซ้าย\n if(node.left!=null){ //ถ้า node ตอนนี้มี left-subtree เรียก recursive โดยส่ง left-subtree\n return findClosestLeaf(node.left, search_key);\n }\n else{ return node;} ////ถ้า node ตอนนี้มีไม่มี left-subtree แสดงว่า node ตอนนีใกล้ search_key ที่สุด\n }\n\n }", "public void findEdgesAndThreshold() {\n\t\tActiveImageConverter.convertToGray16();\n\t\tContrastEnhancer enhancer = new ContrastEnhancer();\n\t\tenhancer.equalize(ActiveImage);\n\t\tActiveImageProcessor = ActiveImage.getProcessor();\n\t\tActiveImageProcessor.findEdges();\n\t\tActiveImageProcessor.sqr(); // turns the gradient into gradient squared\n\t\tActiveImageProcessor.sqr(); // further enhances the good edges\n\t\tenhancer.equalize(ActiveImage);\n\t\tdouble mean = ActiveImage.getStatistics().mean;\n\t\tdouble max = ActiveImage.getStatistics().max;\n\t\tActiveImageProcessor.setThreshold(mean*8,max,ActiveImageProcessor.OVER_UNDER_LUT);\n\t\tif(userInput)\n\t\t{\n\t\t\tIJ.run(ActiveImage,\"Threshold...\",\"\");\n\t\t\tnew WaitForUserDialog(\"OK\").show();\n\t\t\tif (WindowManager.getWindow(\"Threshold\")!= null){\n\t\t\t\tIJ.selectWindow(\"Threshold\");\n\t\t\t\tIJ.run(\"Close\"); \n\t\t\t}\n\t\t}\n\t\tIJ.run(ActiveImage,\"Convert to Mask\",\"\");\n\t\tIJ.run(ActiveImage,\"Skeletonize\",\"\");\n\t\treturn;\n\t}", "private List<Point> neighboursFiltering(List<Point> points) {\n Point nearest = points.get(0);\n HeartDistance calculator = new HeartDistance();\n return points.stream().filter(p -> calculator.calculate(p,nearest) < NEIGHBOURS_THRESHOLD).collect(Collectors.toList());\n }" ]
[ "0.5162531", "0.5108999", "0.50980055", "0.50951916", "0.49922147", "0.49720109", "0.49585208", "0.49506947", "0.49430865", "0.4820293", "0.48199305", "0.47725886", "0.47534275", "0.47354066", "0.47035497", "0.4689258", "0.46651784", "0.46431828", "0.4629883", "0.46276474", "0.46211126", "0.4614395", "0.4604009", "0.45910427", "0.45794237", "0.45746252", "0.45603645", "0.45405275", "0.45371756", "0.4533136", "0.45284384", "0.45184195", "0.4514718", "0.45085537", "0.45013162", "0.44912893", "0.44831", "0.44806957", "0.4464595", "0.44622463", "0.4445972", "0.44456783", "0.4437516", "0.44359857", "0.44342768", "0.44322255", "0.44245744", "0.44143805", "0.44077083", "0.43950576", "0.4387538", "0.43802387", "0.437751", "0.4374022", "0.4372512", "0.4370508", "0.43686396", "0.43669254", "0.4358739", "0.43578574", "0.43513605", "0.43505913", "0.4349258", "0.4341339", "0.43381414", "0.43357953", "0.4329487", "0.43173072", "0.43168974", "0.43149066", "0.43142048", "0.42978963", "0.4293396", "0.42919978", "0.42905158", "0.42893362", "0.42866972", "0.42847866", "0.42837512", "0.42833415", "0.42823148", "0.42822316", "0.42819518", "0.4278987", "0.42558876", "0.4248252", "0.4247759", "0.42445576", "0.42364162", "0.4233977", "0.42319724", "0.4223445", "0.4219366", "0.42188928", "0.42133528", "0.4210562", "0.42074335", "0.42051548", "0.42016795", "0.42007846" ]
0.49715206
6
For each tree in the forest, follow the tree traversal path and return the leaf node. Note that this will not necessarily be the nearest point in the tree, because the traversal path is determined by the random cuts in the tree. If the same leaf point is found in multiple trees, those results will be combined into a single Neighbor in the result. If sequence indexes are disabled for this forest, then sequenceIndexes will be empty in the returned Neighbors.
public List<Neighbor> getNearNeighborsInSample(double[] point) { return getNearNeighborsInSample(point, Double.POSITIVE_INFINITY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node<T> getHelper(int treeIndex) {\n Node<T> currentNode = this.root;\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n int nextBranch = treeIndex / b;\n\n //down\n currentNode = currentNode.get(nextBranch);\n treeIndex = treeIndex % b;\n }\n return currentNode.get(treeIndex);\n }", "ASTNode getNextLeafOrBranch() {\n return getNextLeafOrBranch(0, children.size());\n }", "public Node getBestSuccessor(){\n\t\t// Send false to the method to not save the neighbors.\n\t\treturn state.neighborWithlowestAttachNo(false);\n\t}", "private Position<E> firstLeaf(){\n\t\tPosition<E> aux=null;\n\t\tif(tree.isEmpty())\n\t\t\treturn aux;\n\t\telse\n\t\t\taux=tree.root();\n\t\twhile(this.tree.hasLeft(aux)){\n\t\t\taux=tree.left(aux);\n\t\t}\n\t\treturn aux;\n\t}", "@Override\r\n\tpublic List<List<Node<T>>> getPathsFromRootToAnyLeaf() {\r\n\t\tList<Node<T>> listaHojas = new LinkedList<Node<T>>();// Lista con todas\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// las hojas\r\n\t\t// del arbol\r\n\t\tlistaHojas = listaHojas(raiz, listaHojas);// Hojas\r\n\t\tList<List<Node<T>>> listaFinal = new LinkedList<List<Node<T>>>();// Lista\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// con\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// todos\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// los\r\n\t\t// caminos de la\r\n\t\t// raiz a las hojas\r\n\t\tfor (int i = 1; i <= listaHojas.size(); i++) {\r\n\t\t\tList<Node<T>> lista = new LinkedList<Node<T>>();\r\n\t\t\tlistaFinal.add(completaCamino(listaHojas.get(i), lista));// Crea\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// los\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// caminos\r\n\t\t}\r\n\t\treturn listaFinal;\r\n\t}", "@Override\r\n\tpublic List<Node<T>> getLongestPathFromRootToAnyLeaf() {\r\n\t\tList<Node<T>> camino = new LinkedList<Node<T>>();// La lista que se\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// retornara\r\n\t\tint prof = 1;// La profundidad actual\r\n\t\tNode<T> ret = null;// El nodo mas profundo\r\n\t\tret = LongestPathRec(raiz, prof, ret);// Metodo\r\n\t\t\t\t\t\t\t\t\t\t\t\t// auxiliar que\r\n\t\t\t\t\t\t\t\t\t\t\t\t// busca el nodo\r\n\t\t\t\t\t\t\t\t\t\t\t\t// mas profundo\r\n\t\treturn completaCamino(ret, camino);// Metodo auxiliar que crea el camino\r\n\t\t\t\t\t\t\t\t\t\t\t// hacia el nodo mas profundo\r\n\t}", "private Node<?> findClosestAncestor(ZQuadTree<?> tree, long quad) {\n assert ZQuad.isAncestor(this.quad, quad);\n if (this.size <= tree.splitThreshold || this.quad == quad) {\n return this;\n } else {\n Node<?>[] children = (Node<?>[]) data;\n for (int i = 0; i < kJunctionChildCount; i++) {\n Node<?> child = children[i];\n if (child != null && ZQuad.isAncestor(child.quad, quad))\n return child.findClosestAncestor(tree, quad);\n }\n return kEmpty;\n }\n }", "public Nodo getNextHijo() {\n Nodo result = null;\n Vector<Nodo> hijos = this.getHijos();\n int lastIndex = hijos.size() - 1;\n if (this.nextChildIndex <= lastIndex) {\n result = hijos.get(this.nextChildIndex);\n this.nextChildIndex++;\n }\n return result;\n }", "private int first_leaf() { return n/2; }", "private Node<T> finnNode(int indeks) {\n int k = antall / 2;\n int i = 0;\n\n Node<T> node = hode;\n\n if (indeks <= k)\n while (i++ != indeks) node = node.neste;\n else {\n node = hale;\n i = antall - 1;\n while (i-- != indeks) node = node.forrige;\n }\n\n return node;\n }", "BTNode<T> getRoot();", "public BiNode findLeaf( int value )\n {\n return _root.findLeaf( value );\n }", "public Integer getLeaf() {\n return leaf;\n }", "private TreeNode traverseTree(Instance i) {\n TreeNode next = root;\n while (next != null && !next.isLeafNode()) {\n Attribute a = next.split.attribute;\n if (a.isNominal()) {\n next = next.nominals()[(int) i.value(a)];\n } else {\n if (i.value(a) < next.split.splitPoint) {\n next = next.left();\n } else {\n next = next.right();\n }\n }\n }\n return next;\n }", "public RMShape getAncestor(int anIndex) { return anIndex==0? getParent() : getParent().getAncestor(anIndex-1); }", "private TraverseData traverse(int treeIndex) {\n Node<T> newRoot = new Node<>(branchingFactor);\n Node<T> currentNode = this.root;\n Node<T> currentNewNode = newRoot;\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n TraverseData data = traverseOneLevel(\n new TraverseData(currentNode, currentNewNode, newRoot, treeIndex, b));\n currentNode = data.currentNode;\n currentNewNode = data.currentNewNode;\n treeIndex = data.index;\n }\n return new TraverseData(currentNode, currentNewNode, newRoot, treeIndex, 1);\n }", "public abstract LinkedList<Integer> getNeighbours(int index);", "abstract K getFirstLeafKey();", "abstract K getFirstLeafKey();", "private int getRoot(int index) {\n while(index < nodes.length && index != nodes[index]) {\n index = nodes[index];\n }\n return nodes[index];\n }", "public Stack<Node> retrieve_fastest_path() {\r\n return findPath(initial_node, end_node);\r\n }", "private void findNeighbour(int offset) {\n TreeNodeImpl node = (TreeNodeImpl) projectTree.getLastSelectedPathComponent();\n TreePath parentPath = projectTree.getSelectionPath().getParentPath();\n NodeList list = (NodeList) node.getParent().children();\n\n for (int i = 0; i < list.size(); ++i) {\n if (list.get(i).equals(node)) {\n if (offset > 0 && i < list.size() - offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n if (offset < 0 && i >= offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n }\n }\n }", "public boolean isLeaf();", "public boolean isLeaf();", "public boolean isLeaf();", "public boolean isLeaf();", "Node<K, V> getRoot(BTree<K, V> btree) throws IOException;", "public BTreeNode<E> findDonor() {\n\t\tint index = parent.children.indexOf(this);\n\t\tBTreeNode<E> right = parent.getChild(index + 1);\n\t\tBTreeNode<E> left = parent.getChild(index - 1);\n\t\tif (index == 0) {\n\t\t\treturn right;\n\t\t}\n\t\telse if ( (index == parent.children.size() - 1) || left.dataSize() >= right.dataSize()) {\n\t\t\treturn left;\n\t\t}\n\t\telse {\n\t\t\treturn right;\n\t\t}\n\t}", "public final Optional<SpanLeaf> getLeaf(int pos){\n indexClose(pos, \"pos\", 0, getEnd());\n\n /// Gets the last span leaf\n if (pos == getEnd()){\n Span span = this;\n while (span instanceof SpanNode){\n SpanNode<?> parent = (SpanNode<?>)span;\n if (parent.isEmpty()){\n return Optional.empty();\n }\n span = parent.get(parent.size() - 1);\n }\n return Optional.of((SpanLeaf) span);\n }\n\n Range<Integer> range = getRange();\n if (range.contains(pos)){\n /// Binary serach setup\n int low = 0;\n int high = size() - 1;\n int mid;\n Span span;\n while (low <= high){\n /// Get index\n mid = (low + high) / 2;\n span = get(mid);\n\n Range<Integer> child = span.getRange();\n if (child.lowerEndpoint() > pos){\n high = mid - 1;\n } else if (child.upperEndpoint() <= pos){\n low = mid + 1;\n } else {\n /// Find span, but recurives if leaf not found yet.\n return span instanceof SpanLeaf?\n Optional.of((SpanLeaf) span):\n ((SpanNode<?>)span).getLeaf(pos);\n }\n }\n }\n /// exception for not found. Somehow the code can end up here.\n throw new IndexOutOfBoundsException(pos + \" is not between :\" + range);\n }", "public abstract int getNeighboursNumber(int index);", "public IRNode getRoot(IRNode subtree);", "public MatchTreeNode<T> getLongestMatchingNode(List<String> path) {\n MatchTreeNode<T> node = root;\n\n for (String name : path) {\n MatchTreeNode<T> child = node.child(name);\n if (child == null) {\n break;\n }\n node = child;\n }\n\n return node;\n }", "public SegmentTreeNode<T> getNode (int target) {\n\t\t// have we narrowed down?\n\t\tif (left == target) {\n\t\t\tif (right == left+1) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// press onwards\n\t\tint mid = (left+right)/2;\n\n\t\tif (target < mid) { return lson.getNode (target); }\n\t\treturn rson.getNode (target);\n\t}", "private ProblemModel findCheapestNode(){\n\t\tProblemModel ret = unvisitedPM.peek();\n\t\t\n\t\tfor(ProblemModel p : unvisitedPM){ \n\t\t\t//f(s) = depth + cost to make this move\n\t\t\tif(p.getCost() + p.getDepth() <= ret.getCost() + ret.getDepth()) ret = p;\n\t\t}\n\t\tunvisitedPM.remove(ret);\n\t\treturn ret;\n\t}", "TreeNode<T> getParent();", "uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode getAstRoot();", "K getFirstLeafKey() {\r\n return children.get(0).keys.get(0);\r\n }", "TrieNode root();", "private Node<T> finnNode(int indeks){\n Node<T> curr;\n // begin på hode\n if (indeks < antall/2){\n curr= hode;\n for ( int i=0; i<indeks; i++){\n curr= curr.neste;\n }// end for\n }// end if\n else {\n curr= hale;\n for (int i = antall-1; i>indeks; i--){\n curr= curr.forrige;\n }// end for\n }// end else\n return curr;\n }", "DbSearchConstraints.Leaf getTopLeafConstraint() {\n if (constraints instanceof DbSearchConstraints.Intersection) {\n DbSearchConstraints.Intersection and = (DbSearchConstraints.Intersection) constraints;\n return and.getLeafChild();\n } else if (constraints instanceof DbSearchConstraints.Union) {\n DbSearchConstraints top = new DbSearchConstraints.Intersection();\n constraints = top.and(constraints);\n return ((DbSearchConstraints.Intersection) constraints).getLeafChild();\n } else {\n return (DbSearchConstraints.Leaf) constraints;\n }\n }", "public Leaf getFather(Leaf leaf, Leaf root){\n if(root != null && leaf != root){\n if(root.left == leaf || root.right == leaf){\n return root;\n }else if(leaf.getData() < root.getData()){\n return getFather(leaf, root.left);\n }else{\n return getFather(leaf, root.right);\n }\n }else{\n return null;\n }\n }", "private PersistentLinkedList<T> pop() {\n //the latest element won't become empty\n int index = this.treeSize - 1;\n Node<T> newRoot = new Node<>(branchingFactor);\n\n Node<T> currentNode = this.root;\n Node<T> currentNewNode = newRoot;\n\n ArrayList<Node<T>> newNodes = new ArrayList<>();\n newNodes.add(newRoot);\n ArrayList<Integer> newNodesIndices = new ArrayList<>();\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n TraverseData traverseData = traverseOneLevel(\n new TraverseData(currentNode, currentNewNode, newRoot, index, b));\n currentNode = traverseData.currentNode;\n currentNewNode = traverseData.currentNewNode;\n newNodes.add(currentNewNode);\n newNodesIndices.add(index / b);\n index = traverseData.index;\n }\n newNodesIndices.add(index);\n\n for (int i = 0; i < branchingFactor && i < index; i++) {\n currentNewNode.set(i, currentNode.get(i));\n }\n currentNewNode.set(index, null);\n\n if (index == 0) {\n int latestIndex = newNodes.size() - 2;\n newNodes.get(latestIndex).set(newNodesIndices.get(latestIndex), null);\n\n for (int i = latestIndex; i > 0; i--) {\n if (newNodesIndices.get(i) == 0) {\n newNodes.get(i - 1).set(newNodesIndices.get(i - 1), null);\n } else {\n break;\n }\n }\n }\n\n if (newNodes.size() > 1) {\n int nonNullChildren = 0;\n for (Node<T> child : newRoot.children) {\n if (child != null) {\n nonNullChildren++;\n }\n }\n if (nonNullChildren == 1) { //need new root\n newRoot = newRoot.get(0);\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth - 1,\n this.base / branchingFactor, this.treeSize - 1, unusedTreeIndices,\n indexCorrespondingToTheFirstElement, indexCorrespondingToTheLatestElement);\n }\n }\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth, this.base,\n this.treeSize - 1, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }", "private void treeBreadthFirstTraversal() {\n Node currNode = root;\n java.util.LinkedList<Node> queue = new java.util.LinkedList<Node>();\n\n // Highlights the first Node.\n queueNodeSelectAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores Nodes until the queue is empty.\n while (true) {\n\n // Marks that this Node's children should be explored.\n for (int i = 0; i < getNumChildren(); ++i) {\n if (currNode.children[i] != null) {\n queue.addLast(currNode.children[i]);\n queueQueueAddAnimation(currNode.children[i],\n \"Queueing \" + currNode.children[i].key,\n AnimationParameters.ANIM_TIME);\n\n }\n }\n\n // Pops the next Node from the queue.\n if (!queue.isEmpty()) {\n currNode = queue.pop();\n queueListPopAnimation(\"Popped \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n queueNodeSelectAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }\n // If the queue is empty, breaks.\n else break;\n\n }\n }", "public Node findInOrderSuccessor() {\n\n return null;\n }", "public MoveTrieNode getRoot() {\n return root;\n }", "@SuppressWarnings(\"null\")\n\tpublic static Node optimalIterativeSolution (Node Tree, int target) {\n\t\tNode curr = Tree;\n\t\tNode Closest = null;\n\t\tClosest.val = Integer.MAX_VALUE;\n\t\twhile (curr != null) {\n\t\t\tif (Math.abs(target - Closest.val) > Math.abs(target - curr.val)) {\n\t\t\t\tClosest = curr;\n\t\t\t} else if (target < curr.val) {\n\t\t\t\tcurr = curr.left;\n\t\t\t} else if (target > curr.val) {\n\t\t\t\tcurr = curr.right;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn Closest;\n\t}", "public Entity getLeafEntity() {\n Entity e = root;\n if (e == null) {\n if (parent != null) {\n e = parent.get(ContentType.EntityType, null);\n }\n }\n return e;\n }", "public TreeNode getParentNode();", "public boolean isLeaf() {\n return ((getRight() - getLeft()) == 1);\n }", "public BTreeInternalNode splitAt(int index){\n if (parent_id == 0){\n BTreeInternalNode root_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),0,0,0,0,0,0,0,buffer,index_attrs,DB_name,table_name);\n updateParent(root_node.node_id);\n root_node.insertOneKeyPointer(getBiggestKey(),node_id);\n buffer.addNewNode(root_node);\n buffer.newRootNode(root_node.node_id,DB_name,table_name,index_attrs);\n }\n\n BTreeInternalNode new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,0,right_bro_id,0,0,0,0,buffer,index_attrs,DB_name,table_name);\n if (index < key_number -1){\n byte[] temp_key;\n short pt;\n int origin_key_number = key_number;\n for(int i = index + 1; i < origin_key_number; i++){\n pt = getPointer(index+1);\n temp_key = keys.get(index+1);\n new_node.insertOneKeyPointer(temp_key,pt);\n deleteKeyPointer(index+1);\n }\n\n BTreeInternalNode temp_node;\n if(next_id != 0){\n //new node next node id\n new_node.updateNextBro(next_id);\n //new node next node - prior id\n temp_node = (BTreeInternalNode) buffer.getNode(new_node.next_id,DB_name,table_name,index_attrs);\n temp_node.updatePriorBro(new_node.node_id);\n //next key number\n new_node.updateNumberToRight();\n //this next id\n updateNextBro(0);\n updateNextKeyNumber(0);\n }\n updateNumberToLeft();\n\n //neighbor\n //right bro node\n if(right_bro_id != 0){\n BTreeInternalNode origin_right_node = (BTreeInternalNode) buffer.getNode(right_bro_id,DB_name,table_name,index_attrs);\n origin_right_node.updateLeftBro(new_node.node_id);\n }\n updateRightBro(new_node.node_id);\n //left bro\n new_node.updateLeftBro(getHeadNode().node_id);\n //sons'parent id\n BTreeNode temp;\n for (int i = 0; i < new_node.key_number; i ++){\n temp = buffer.getNode(new_node.getPointer(i),DB_name,table_name,index_attrs);\n temp.updateParent(new_node.node_id);\n }\n //freespace\n buffer.addNewNode(new_node);\n return new_node;\n }else{\n return null;\n }\n }", "public FObj findNearestAncestorFObj() {\n FONode par = parent;\n while (par != null && !(par instanceof FObj)) {\n par = par.parent;\n }\n return (FObj) par;\n }", "public static AabbTreeNode insertLeaf(AabbTreeNode treeRoot, IShape shape) {\n if (treeRoot == null || treeRoot.parent != null) {\n // TODO add log message\n // It is necessary to start from tree root, otherwise the inherited cost will be calculated incorrectly\n return treeRoot;\n }\n AabbTreeNode leaf = new AabbTreeNode(shape, treeRoot.enlargedAabbCoefficient);\n\n // Stage 1: find the best sibling for the new leaf\n AabbTreeNode bestSibling = AabbTreeNode.findBestSibling(treeRoot, leaf);\n\n // Stage 2: create a new parent\n AabbTreeNode newTreeRoot = AabbTreeNode.createNewParent(treeRoot, leaf, bestSibling);\n\n // Stage 3: walk back up the tree refitting Aabbs\n AabbTreeNode.refittingTreeRoot(leaf);\n\n return newTreeRoot;\n }", "K getFirstLeafKey() {\r\n return keys.get(0);\r\n }", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "public int scoreLeafNode();", "public ArrayList<SearchNode> neighbors() {\n ArrayList<SearchNode> neighbors = new ArrayList<SearchNode>();\n // StdOut.println(\"before: \" + this.snBoard);\n Iterable<Board> boards = new ArrayList<Board>();\n boards = this.snBoard.neighbors();\n // StdOut.println(\"after: \" + this.snBoard);\n for (Board b: boards) {\n // StdOut.println(b);\n // StdOut.println(\"checking: \"+b);\n // StdOut.println(\"checking father: \"+this.getPredecessor());\n if (this.getPredecessor() == null) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // StdOut.println(\"checking: \"+(this.priority - this.snBoard.hamming()));\n // sn.addMovesToPriority(this.priority - this.snBoard.hamming()+1);\n neighbors.add(sn);\n } else { \n if (!b.equals(this.getPredecessor().snBoard)) {\n SearchNode sn = new SearchNode(b,\n b.hamming(),\n this,\n b.manhattan(),\n this.moves+1);\n neighbors.add(sn);\n }\n }\n \n }\n return neighbors;\n }", "private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}", "abstract boolean isLeaf();", "private TreeNode getBranch(TreeNode treeNode, int sel) {\n TreeNode ret = null;\n int i = 0, prevCardinal = 1;\n if(sel == 0 && !treeNode.isLeaf()){\n return treeNode;\n }\n if(treeNode.isLeaf()){\n return null;\n }\n while(ret == null && i <treeNode.getChildren().length){\n ret = getBranch(treeNode.getChildren()[i], sel - prevCardinal);\n prevCardinal += treeNode.getChildren()[i].getHeight() - getLeafCardinal(treeNode.getChildren()[i]);\n i++;\n }\n return ret;\n }", "public boolean isLeaf() {\r\n return isLeaf;\r\n }", "public abstract TreeNode getNode(int i);", "boolean isLeaf();", "boolean isLeaf();", "boolean isLeaf();", "boolean isLeaf();", "public int returnGraphRoot() {\n\t\tfor(int i = 0; i < sc.getInitPos().size(); i++) {\r\n\t\t\tfor(int j = 0; j < sc.getInitPos().size(); j++) {\r\n\t\t\t\tif(graph[i][j]) {\r\n\t\t\t\t\t//means i -> j\r\n\t\t\t\t\t// therefore we need to see if i has a parent\r\n\t\t\t\t\tboolean hasPred = true;\r\n\t\t\t\t\tint pred = -1;\r\n\t\t\t\t\twhile(hasPred) {\r\n\t\t\t\t\t\tfor(int k = 0; k < sc.getInitPos().size(); k++) {\r\n\t\t\t\t\t\t\tif(graph[k][i]) {\r\n\t\t\t\t\t\t\t\t//k is a parent of i\r\n\t\t\t\t\t\t\t\tpred = k;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(pred == -1) {\r\n\t\t\t\t\t\t\t//i has no predecessor\r\n\t\t\t\t\t\t\thasPred = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\ti = pred;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//TODO: remove i from graph\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public abstract List<AStarNode> getNeighbours();", "public abstract LinkedList<Point> traverse(Grid grid);", "public AVLNode findSuccessor(IAVLNode node) {\n\n\t\tif (node.getRight().getHeight() != -1) {\n\t\t\tAVLTree subtree = new AVLTree(node.getRight());\n\t\t\treturn subtree.findMin();\n\t\t}\n\t\tAVLNode parent = (AVLNode) node.getParent();\n\t\tAVLNode ourNode = (AVLNode) node;\n\t\twhile (parent.getHeight() != -1 && parent == ourNode.getParent() && ourNode.parentSide() != 'L') {\n\t\t\tourNode = parent;\n\t\t\tparent = (AVLNode) ourNode.getParent();\n\t\t}\n\t\treturn parent;\n\t}", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "public ArrayList<UUSearchNode> getSuccessors() {\n\n ArrayList<UUSearchNode> successors = new ArrayList<UUSearchNode>();//this will be returned\n ArrayList<CannibalNode> helper = new ArrayList<CannibalNode>();\n\n if (this.state[2]==1){ //if the boat is on the starting shore\n helper.add(new CannibalNode(this.state[0] - 2, this.state[1],\n this.state[2] - 1, this.depth + 1)); //subtracting <201>\n helper.add(new CannibalNode(this.state[0], this.state[1] - 2,\n this.state[2] - 1, this.depth + 1)); //subtracting <021>\n helper.add(new CannibalNode(this.state[0] - 1, this.state[1] - 1,\n this.state[2] - 1, this.depth + 1)); //subtracting <111>\n helper.add(new CannibalNode(this.state[0] - 1, this.state[1],\n this.state[2] - 1, this.depth + 1)); //subtracting <101>\n helper.add(new CannibalNode(this.state[0], this.state[1] - 1,\n this.state[2] - 1, this.depth + 1)); //subtracting <011>\n }else{ //if the boat is on the opposite shore\n helper.add(new CannibalNode(this.state[0] + 2, this.state[1],\n this.state[2] + 1, this.depth + 1)); //adding <201>\n helper.add(new CannibalNode(this.state[0], this.state[1] + 2,\n this.state[2] + 1, this.depth + 1)); //adding <021>\n helper.add(new CannibalNode(this.state[0] + 1, this.state[1] + 1,\n this.state[2] + 1, this.depth + 1)); //adding <111>\n helper.add(new CannibalNode(this.state[0] + 1, this.state[1],\n this.state[2] + 1, this.depth + 1)); //adding <101>\n helper.add(new CannibalNode(this.state[0], this.state[1] + 1,\n this.state[2] + 1, this.depth + 1)); //adding <011>\n }\n\n //now we check for feasibility and legality\n for(CannibalNode n : helper){\n if(isFeasibleState(n.state) && isLegalState(n.state)){\n successors.add(n);\n }\n }\n return successors;\n }", "TreeNode getTreeNode();", "private KeyedItem findLeftMost(BinarySearchTree tree){\r\n\t\t\r\n\t\t//return the root when we find that we reached the leftmost child\r\n\t\tif(tree.getLeftChild() == null){\r\n\t\t\treturn tree.getRoot();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//keep going. has more left children\r\n\t\t\treturn findLeftMost(tree.getLeftChild());\r\n\t\t}\r\n\t}", "private SkinMetadata _findLeafSkinMetadata(Collection<SkinMetadata> skins)\n {\n List<SkinMetadata> leafSkinMetadata = new ArrayList<SkinMetadata>();\n List<String> parentIds = new ArrayList<String>();\n\n // collect parents skins among the list\n for (SkinMetadata metadata : skins)\n {\n String parentId = metadata.getBaseSkinId();\n if (parentId != null)\n parentIds.add(metadata.getBaseSkinId());\n }\n\n // find leaf skins, which is not in parent list\n for (SkinMetadata metadata : skins)\n {\n String skinId = metadata.getId();\n if (skinId != null && !parentIds.contains(skinId))\n {\n leafSkinMetadata.add(metadata);\n }\n }\n\n // if there are no leaves, return null\n // this is a rare case, almost impossible since there will be\n // at least one skin which is not parent of another\n // but let us cover the corner case if any\n if (leafSkinMetadata.isEmpty())\n return null;\n\n // if there is one leaf skin return that\n // if there are many, return the last one among the leaves\n return leafSkinMetadata.get(leafSkinMetadata.size() - 1);\n }", "public Iterable<Board> solution() {\n\t\tif (goal == null)\n\t\t\treturn null;\n\t\telse {\n\t\t\tfinal Stack<Board> trace = new Stack<Board>();\n\t\t\tSearchNode iter = goal;\n\t\t\twhile (iter != null) {\n\t\t\t\ttrace.push(iter.getBoard());\n\t\t\t\titer = iter.getParent();\n\t\t\t}\n\t\t\treturn trace;\n\t\t}\n\t}", "DendrogramNode<T> getParent();", "private QuadTree[] findChild(QuadTree parent) {\n double point1_lon = parent.ullon;\n double point1_lat = parent.ullat;\n double point2_lon = (parent.lrlon + parent.ullon) / 2;\n double point2_lat = parent.ullat;\n double point3_lon = parent.ullon;\n double point3_lat = (parent.ullat + parent.lrlat) / 2;\n double point4_lon = (parent.lrlon + parent.ullon) / 2;\n double point4_lat = (parent.ullat + parent.lrlat) / 2;\n double point5_lon = (parent.lrlon + parent.ullon) / 2;\n double point5_lat = parent.lrlat;\n double point6_lon = parent.lrlon;\n double point6_lat = parent.lrlat;\n double point7_lon = parent.lrlon;\n double point7_lat = (parent.ullat + parent.lrlat) / 2;\n QuadTree ul, ur, ll, lr;\n if (parent.name.equals(\"root\")) {\n ul = new QuadTree(\"1\", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);\n ur = new QuadTree(\"2\", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);\n ll = new QuadTree(\"3\", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);\n lr = new QuadTree(\"4\", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);\n } else {\n ul = new QuadTree(parent.name + \"1\", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);\n ur = new QuadTree(parent.name + \"2\", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);\n ll = new QuadTree(parent.name + \"3\", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);\n lr = new QuadTree(parent.name + \"4\", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);\n }\n QuadTree[] child = new QuadTree[4];\n child[0] = ul;\n child[1] = ur;\n child[2] = ll;\n child[3] = lr;\n return child;\n }", "private Node findNode(int index){\n Node current = start;\n for(int i = 0; i < index; i++){\n current = current.getNext();\n }\n return current;\n }", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "public int getTreeIndex() {\n\t\treturn tree;\n\t}", "private IAVLNode findSuccessor(IAVLNode node) \r\n\t {\r\n\t\t if(node.getRight().getHeight() != -1) \r\n\t\t\t return minPointer(node.getRight());\r\n\t\t IAVLNode parent = node.getParent();\r\n\t\t while(parent.getHeight() != -1 && node == parent.getRight())\r\n\t\t {\r\n\t\t\t node = parent;\r\n\t\t\t parent = node.getParent();\r\n\t\t }\r\n\t\t return parent;\t \r\n\t\t}", "private static Object getUndirectedLeaf(mxAnalysisGraph aGraph) {\n Object parent = aGraph.getGraph().getDefaultParent();\n Object[] vertices = aGraph.getChildVertices(parent);\n int vertexNum = vertices.length;\n Object currVertex;\n\n for (int i = 0; i < vertexNum; i++) {\n currVertex = vertices[i];\n int edgeCount = aGraph.getEdges(currVertex, parent, true, true, false, true).length;\n\n if (edgeCount <= 1) {\n return currVertex;\n }\n }\n\n return null;\n }", "Node currentNode();", "ArrayList<PathFindingNode> neighbours(PathFindingNode node);", "public Node findSuccessor(int id);", "private KdTreeNode nearestInKDTree(KdTreeNode current, Point goal, KdTreeNode best, int idx) {\n if (current == null) {\n return best;\n }\n\n if (Point.distance(current.point, goal) < Point.distance(best.point, goal)) {\n best = current;\n }\n\n KdTreeNode goodSide = current.right;\n KdTreeNode badSide = current.left;\n if (KdTree.comparePoints(goal, current.point, idx) < 0) {\n goodSide = current.left;\n badSide = current.right;\n }\n int newIdx = idx ^ 1;\n best = this.nearestInKDTree(goodSide, goal, best, newIdx);\n\n double bestPossibleDis = 0;\n if (idx == 0) {\n bestPossibleDis = Math.pow(goal.getX() - current.point.getX(), 2);\n } else {\n bestPossibleDis = Math.pow(goal.getY() - current.point.getY(), 2);\n }\n if (bestPossibleDis < Point.distance(best.point, goal)) {\n best = this.nearestInKDTree(badSide, goal, best, newIdx);\n }\n\n return best;\n }", "public boolean isLeaf(int pcr);", "private Cell breadthFirstSearch(WorldMap worldMap, Cell startCell, CELLTYPE goalType, Hashtable<Cell, Cell> prev) {\n\n\t\t// Using markedSet to avoid re-checking already visited nodes\n\t\tHashSet<Cell> markedSet = new HashSet<Cell>();\n\t\tLinkedList<Cell> queue = new LinkedList<Cell>();\n\n\t\tmarkedSet.add(startCell);\n\t\tqueue.add(startCell);\n\n\t\twhile (!queue.isEmpty()) {\n\t\t\tCell cell = queue.remove();\n\t\t\tif (cell.getCellType() == goalType)\n\t\t\t\treturn cell;\n\t\t\tLinkedList<Cell> neighbors = generateSuccessors(worldMap, cell, goalType);\n\n\t\t\t/*\n\t\t\t * If looking for unexplored, shuffle list. Since the neighbors are\n\t\t\t * always returned NESW, it's best to shuffle the list if ant wants\n\t\t\t * to explore a random portion of the map.\n\t\t\t */\n\t\t\tif (goalType == CELLTYPE.UNEXPLORED)\n\t\t\t\tCollections.shuffle(neighbors, new Random(System.currentTimeMillis()));\n\n\t\t\tfor (Cell neighbor : neighbors)\n\t\t\t\tif (!markedSet.contains(neighbor)) {\n\t\t\t\t\tmarkedSet.add(neighbor);\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t\tprev.put(neighbor, cell);\n\t\t\t\t}\n\t\t}\n\t\t// If reached here, goal type doesn't exist\n\t\treturn null;\n\t}", "boolean isLeaf() {\n return true;\n }", "public boolean isLeaf() {\n\t\t\tif ((this.right.getHeight() == -1) && (this.left.getHeight() == -1)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public BinTreeLeafIterator(BinTree<E> tree) {\n\t\tthis.tree = tree;\n\t\tif(!tree.isEmpty())\n\t\t\tactual=this.firstLeaf();\n\n\t}", "public Node closestPrecedingNode(int id);", "public Git.Entry getRoot() { \n Node c = this; \n while (c.par != null) c = c.par;\n return c.getObject();\n }", "public Jode first() {\n return children().first();\n }", "private TraverseData traverseOneLevel(TraverseData data) {\n Node<T> currentNode = data.currentNode;\n Node<T> currentNewNode = data.currentNewNode;\n int nextBranch = data.index / data.base;\n\n currentNewNode.set(nextBranch, new Node<>(branchingFactor));\n for (int anotherBranch = 0; anotherBranch < branchingFactor; anotherBranch++) {\n if (anotherBranch == nextBranch) {\n continue;\n }\n currentNewNode.set(anotherBranch, currentNode.get(anotherBranch));\n }\n\n //down\n currentNode = currentNode.get(nextBranch);\n currentNewNode = currentNewNode.get(nextBranch);\n return new TraverseData(currentNode, currentNewNode, data.newRoot, data.index % data.base,\n data.base);\n }", "public boolean isLeaf()\n {\n return false;\n }", "public int my_leaf_count();", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "@Override\n\tpublic boolean IsLeaf() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic Node<T> getRoot() {\r\n\t\treturn raiz;\r\n\t}", "public List<SearchNode> expand() {\n\n List<SearchNode> neighbours = new ArrayList<>();\n\n if (this.getX() > 0) {\n SearchNode left = new SearchNode(this.getX() - 1, this.getY(), this.getDepth() + 1);\n neighbours.add(left);\n }\n if (this.getX() < 14) {\n SearchNode right = new SearchNode(this.getX() + 1, this.getY(), this.getDepth() + 1);\n neighbours.add(right);\n }\n if (this.getY() > 0) {\n SearchNode up = new SearchNode(this.getX(), this.getY() - 1, this.getDepth() + 1);\n neighbours.add(up);\n }\n if (this.getY() < 14) {\n SearchNode down = new SearchNode(this.getX(), this.getY() + 1, this.getDepth() + 1);\n neighbours.add(down);\n }\n\n return neighbours;\n }" ]
[ "0.5724155", "0.5614834", "0.558715", "0.5468347", "0.5445982", "0.54417145", "0.5436154", "0.5361559", "0.5324266", "0.52941436", "0.5272459", "0.52657914", "0.52613163", "0.5247987", "0.52049154", "0.51646173", "0.5108276", "0.50824547", "0.50824547", "0.50699383", "0.50476503", "0.50282925", "0.49484438", "0.49484438", "0.49484438", "0.49484438", "0.4940467", "0.49377227", "0.4935465", "0.48603383", "0.48463628", "0.48368612", "0.48263448", "0.48109388", "0.48099077", "0.48071325", "0.4798975", "0.47960657", "0.47900105", "0.47819176", "0.47766", "0.47504646", "0.47375372", "0.47369015", "0.47367418", "0.4732145", "0.4731757", "0.4721104", "0.4720331", "0.47158274", "0.47119492", "0.47113824", "0.47034588", "0.46998775", "0.46973816", "0.46819106", "0.46514878", "0.46431005", "0.4640273", "0.4639648", "0.46288598", "0.46212047", "0.46212047", "0.46212047", "0.46212047", "0.46189094", "0.46188632", "0.46171874", "0.46122107", "0.46098408", "0.4606024", "0.45976445", "0.45945168", "0.45861614", "0.45855686", "0.45828453", "0.45782188", "0.4576617", "0.45742664", "0.4570903", "0.45698214", "0.45693433", "0.45618084", "0.45530006", "0.4552492", "0.45495814", "0.45494422", "0.45459569", "0.45391232", "0.45382464", "0.45327052", "0.45286155", "0.45205915", "0.4519322", "0.45187864", "0.451673", "0.4505028", "0.44936693", "0.44918534", "0.44889218", "0.44880244" ]
0.0
-1
Returns the total number updates to the forest. The count of updates is represented with long type and may overflow.
public long getTotalUpdates() { return executor.getTotalUpdates(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getUpdateCountsCount();", "public int getUpdateCountsCount() {\n return updateCounts_.size();\n }", "public int getUpdateCountsCount() {\n return updateCounts_.size();\n }", "long getUpdateCount();", "public int getNumUpdates() {\n return (Integer) getProperty(\"numUpdates\");\n }", "public int getUpdateCount();", "long getUpdateCounts(int index);", "public long getUpdateCounts(int index) {\n return updateCounts_.get(index);\n }", "public long getUpdateCounts(int index) {\n return updateCounts_.get(index);\n }", "public long getUpdateCount() {\n return updateCount_;\n }", "public long getUpdateCount() {\n return updateCount_;\n }", "public int getUpdateCount() throws SQLException {\n return 0;\r\n }", "@Override\n public int getUpdateCount() throws SQLException {\n int to_return = getUpdateCountInternal();\n update_result = -1;\n return to_return;\n }", "public long countAll() {\n\n AtomicLong total = new AtomicLong();\n solarFlareRepository.count()\n .map(count -> {\n total.set(count);\n return count;\n })\n .block();\n\n return total.get();\n }", "public Flowable<Integer> counts() {\n return createFlowable(b.updateBuilder, db) //\n .flatMap(Tx.flattenToValuesOnly());\n }", "public static long calculateSummary(List<BackflowEntry> entries) {\n Long res = 0L;\n for(BackflowEntry entry : entries) {\n res += entry.getCount();\n }\n return res; \n }", "long countPostings() {\n \tlong result = 0;\n \tfor (Layer layer : layers.values())\n \t\tresult += layer.size();\n \treturn result;\n }", "public int getUpdateCount() throws SQLException {\n return currentPreparedStatement.getUpdateCount();\n }", "public java.util.List<java.lang.Long>\n getUpdateCountsList() {\n return updateCounts_;\n }", "public int getMockUpdatesCount() {\n return instance.getMockUpdatesCount();\n }", "@Override\n\tpublic int getUpdateCount() throws SQLException {\n\t\treturn -1;\n\t}", "public int getTotalCount() {\r\n return root.getTotalCount();\r\n }", "@com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor\n @gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getTotalNumChecks() {\n return ((com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods\")).getTotalNumChecks();\n }", "public abstract long getNumUpdate();", "public Integer getAllCount() {\n\t\tString sql=\"select count(*) from statistics\";\n\t\tint count = (int)getCount(sql);\n\t\treturn count;\n\t}", "public int getMockUpdatesCount() {\n return mockUpdates_.size();\n }", "java.util.List<java.lang.Long> getUpdateCountsList();", "Long getAllCount();", "public int getEntryCount() {\n if (entryBuilder_ == null) {\n return entry_.size();\n } else {\n return entryBuilder_.getCount();\n }\n }", "public double getTotalNodeCount() {\n return this.node.getFullNodeList().values().stream()\n .filter(BaseNode::checkIfConsensusNode).count();\n }", "@com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor\n @gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getTotalNumChecks() {\n return ((com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.database.DBConsistCheckRunPublicMethods\")).getTotalNumChecks();\n }", "int getMockUpdatesCount();", "public int getCount()\r\n {\r\n int answer=0;\r\n answer+=recCount(root);\r\n return answer;\r\n }", "@Override\r\n\tpublic int countAll() {\r\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\tFINDER_ARGS_EMPTY, this);\r\n\r\n\t\tif (count == null) {\r\n\t\t\tSession session = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsession = openSession();\r\n\r\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_SHARE);\r\n\r\n\t\t\t\tcount = (Long)q.uniqueResult();\r\n\r\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\r\n\t\t\t\t\tcount);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\t\tFINDER_ARGS_EMPTY);\r\n\r\n\t\t\t\tthrow processException(e);\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcloseSession(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn count.intValue();\r\n\t}", "public int getTotalCount() {\n return totalCount;\n }", "public long getAllTransactionsCount(){\n\t\tString sql = \"SELECT COUNT(*) FROM \" + TransactionEntry.TABLE_NAME;\n\t\tSQLiteStatement statement = mDb.compileStatement(sql);\n return statement.simpleQueryForLong();\n\t}", "public long numPostingEntries();", "public int countAll() {\n\t\treturn transactionDAO.countAll();\n\t}", "int getEntryCount();", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public int getReaultCount() {\n if (reaultBuilder_ == null) {\n return reault_.size();\n } else {\n return reaultBuilder_.getCount();\n }\n }", "@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}", "@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}", "public int getNumberOfMultiUpdated(Identity owner, Map<String, Long> sinceTimes);", "protected long getLiveSetSize() {\n\t\t// Sum of bytes removed from the containers.\n\t\tlong removed = 0;\n\n\t\tfor (int i = 0; i < sets.length; i++)\n\t\t\tremoved += sets[i].getContainer().getBytesRemoved();\n\n\t\t/*\n\t\t * The total number of butes still alive is the throughput minus the number of\n\t\t * bytes either removed from the container or never added in the first place.\n\t\t */\n\t\tlong size = getThroughput() - removed - producerThreadPool.getBytesNeverAdded();\n\n\t\treturn (size > 0) ? size : 0;\n\t}", "public long getTotalCount() {\n return _totalCount;\n }", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "public int getNumberOfEntries()\r\n\t{\r\n\t\treturn tr.size();\r\n\t}", "public Long getTotalCount() {\r\n return totalCount;\r\n }", "public int getFundsCount() {\n if (fundsBuilder_ == null) {\n return funds_.size();\n } else {\n return fundsBuilder_.getCount();\n }\n }", "public int getFundsCount() {\n if (fundsBuilder_ == null) {\n return funds_.size();\n } else {\n return fundsBuilder_.getCount();\n }\n }", "public Integer count() {\n return this.bst.count();\n }", "@Override\n\tpublic int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_LEGACYDB);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int getVersionsCount();", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_TESTUNIT);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_LOCALRICHINFO);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int getTimeEntryCount()\n throws RedmineException\n {\n return getTimeEntryCount(null);\n }", "public int getthelastupdate() {\n\t\treturn this.getthelastupdate();\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_USERSTATISTICS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int updateCount(double dist);", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(\n\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_PHATVAY);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "@Override\n public int getUpdateCount() throws SQLException {\n return -1;\n }", "public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();\n\t}", "public java.util.List<java.lang.Long>\n getUpdateCountsList() {\n return java.util.Collections.unmodifiableList(updateCounts_);\n }", "public void updateBallCount() {\n mBallCount = (int) NetworkTableInstance.getDefault().getTable(\"SmartDashboard\").getEntry(\"Driver/Set Ball Count\")\n .getDouble(3);\n }", "public int size()\n\t{\n\t\tint size = 0;\n\t\t\n\t\tfor (LinkedList<Entry> list : entries)\n\t\t\tsize += (list == null) ? 0 : list.size();\n\t\t\n\t\treturn size;\n\t}", "public long countAll() {\n\t\treturn super.doCountAll();\n\t}", "public int getNumNucleiToAdd() {\n return updateCount - numNucleiToRemove;\n }", "@Override\n public int getNbChanges()\n {\n return nbChanges;\n }", "public Long getTotalCount() {\n\t\treturn this.totalCount;\n\t}", "@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }", "public int getTotRuptures();", "@Override\r\n\tpublic int getTotal() {\n\t\treturn mapper.count();\r\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CAMPUS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int numberOfRows(){\n int numRows = (int) DatabaseUtils.queryNumEntries(db, TRACKINGS_TABLE_NAME);\n return numRows;\n }", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_APPROVATORE);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_VCMSPORTION);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(\n\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_ANSWER);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception exception) {\n\t\t\t\tfinderCache.removeResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(exception);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public Integer count() {\n\t\tif(cache.nTriples != null)\n\t\t\treturn cache.nTriples;\n\t\treturn TripleCount.count(this);\n\t}", "int getTotalCount();", "public int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_VCAL);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tif (count == null) {\n\t\t\t\t\tcount = Long.valueOf(0);\n\t\t\t\t}\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public static int size(Node root){\r\n int count = 0;\r\n for(int i=0; i<root.children.size(); i++){\r\n Node child = root.children.get(i);\r\n count += size(child);\r\n }\r\n return count + 1;\r\n }", "public int count() {\n\t Query count = getEntityManager().createQuery(\"select count(u) from \" + getEntityClass().getSimpleName() + \" u\");\n\t return Integer.parseInt(count.getSingleResult().toString());\n\t }", "public int countLeaves(){\n return countLeaves(root);\n }", "public int getChanged () {\n int d = getDiff () * 2;\n int s = getSize () * 2;\n\n for (int i = 0; i < references.length; i++) {\n if (references[i] != null) {\n d += references[i].getDiff ();\n s += references[i].getSize ();\n }\n }\n \n // own cluster change is twice as much important than \n // those referenced\n int ret = d * 100 / s;\n if (ret == 0 && d > 0) {\n ret = 1;\n }\n return ret;\n }", "synchronized public int getSize() {\n\t\tint x = 0;\n\t\tfor (Enumeration<PeerNode> e = peersLRU.elements(); e.hasMoreElements();) {\n\t\t\tPeerNode pn = e.nextElement();\n\t\t\tif(!pn.isUnroutableOlderVersion()) x++;\n\t\t}\n\t\treturn x;\n\t}", "public int getEntryCount() {\n return entry_.size();\n }", "public int size()\n\t{\n\t\tint size = 0;\n\t\tfor(List<Registry.Entry> li : this.reg.values())\n\t\t\tsize += li.size();\n\t\treturn size;\n\t}", "public int numNodes()\r\n {\r\n\tint s = 0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t s += nt.numNodes();\r\n\treturn s;\r\n }", "int getReaultCount();" ]
[ "0.74479777", "0.7399936", "0.73825943", "0.73364437", "0.7108443", "0.7106161", "0.690861", "0.6827541", "0.68175256", "0.67690736", "0.67610615", "0.66062427", "0.657586", "0.6460056", "0.64520484", "0.6312614", "0.6301574", "0.62322414", "0.6213658", "0.61954373", "0.61625665", "0.6162057", "0.6144805", "0.6095898", "0.6091617", "0.6083316", "0.60811394", "0.6078679", "0.606374", "0.6061974", "0.605863", "0.6047823", "0.60375595", "0.60353136", "0.6032195", "0.60159945", "0.6002591", "0.59945977", "0.5992153", "0.5990951", "0.5990951", "0.5990951", "0.5990951", "0.5990951", "0.5990951", "0.5990951", "0.5990951", "0.5990951", "0.5990951", "0.5982817", "0.59744436", "0.59744436", "0.5970741", "0.59654033", "0.5943509", "0.59241533", "0.5916529", "0.5915153", "0.5910889", "0.5910889", "0.58984244", "0.58975494", "0.58909166", "0.58833736", "0.58774257", "0.58681643", "0.5865254", "0.5861655", "0.5861355", "0.58606094", "0.5858335", "0.5856832", "0.584801", "0.5847434", "0.58402216", "0.5830546", "0.58260405", "0.5825883", "0.58243823", "0.5821533", "0.58127517", "0.5791928", "0.5781322", "0.5776885", "0.5774598", "0.5774085", "0.57690173", "0.5767003", "0.57572067", "0.5746944", "0.57362384", "0.573527", "0.5729204", "0.5727532", "0.57258695", "0.5717484", "0.57137936", "0.5709573", "0.57094175", "0.5708084" ]
0.7536534
0
le nom est unique
public static boolean existPlayer(String name) throws SQLException, BaseDeDonnéesExcetion, ClassNotFoundException { Connection conn = null; String query = "SELECT * FROM PokerPlayer2 WHERE name = ?"; try { conn = DriverManagerP.getConnection(); PreparedStatement preparedStmt = conn.prepareStatement(query); preparedStmt.setString(1, name); ResultSet result = preparedStmt.executeQuery(); if (result.next()) { return true; } else { return false; } } catch (SQLException e) { throw new SQLException(" impossible to find player " + name + " " + e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUnique();", "private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }", "public boolean isUnique();", "public String unique(int n) {\r\n String name = getModel(n).getName();\r\n int k = 0;\r\n for (int i = 0; i < n; i++) {\r\n if ((getModel(i) != null) && (getModel(i).getName() != null) && (name != null)) {\r\n if (getModel(i).getName().compareTo(name) == 0) {\r\n k++;\r\n }\r\n }\r\n }\r\n\r\n //if (k > 0) {\r\n name += \" \" + Integer.toString(k);\r\n\r\n //}\r\n return name;\r\n }", "String generateUniqueName();", "boolean isIsUnique();", "@objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();", "public void setNomor(String nomor) {\n this.nomor = nomor;\n }", "public void setNom(String nom){\n this.nom = nom;\n }", "boolean isUnique();", "public void setNom(String nom) {\r\n this.nom = nom;\r\n }", "public void setNom(String nom) {\r\n this.nom = nom;\r\n }", "public void setNom(String nom) {\r\n this.nom = nom;\r\n }", "public void setNom(String p_onom);", "public void setNom(String nom) {\n this.nom = nom;\n }", "public void setNom(String nom) {\r\n\t\tthis.nom = nom;\r\n\t}", "public void ordenarXNombreInsercion() {\r\n\t\tfor (int i = 1; i < datos.size(); i++) {\r\n\t\t\tfor (int j = i; j>0 && ( (datos.get(j-1).compare(datos.get(j-1), datos.get(j)))==(1) ); j--) {\r\n\t\t\t\tJugador temp = datos.get(j);\r\n\t\t\t\tdatos.set(j, datos.get(j-1));\r\n\t\t\t\tdatos.set(j-1, temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private String getUniqueNodeName() {\n return String.format(\"N%d\", uniqueNode++);\n }", "public void setNom(String nom) {\n\t\tthis.nom = nom;\n\t}", "public void setNom(String nom) {\n\t\tthis.nom = nom;\n\t}", "public void setNom(String nom) {\n\t\tthis.nom=nom;\n\t}", "boolean duplicatedUsername(String username);", "public boolean verificaUnicidadeNome() {\n\t\tif(!EntidadesDAO.existeNome(entidades.getNome())) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "private void verificaNome() {\r\n\t\thasErroNome(nome.getText());\r\n\t\tisCanSave();\r\n\t}", "public String inseriscinome()\n {\n String nome;\n \n do\n {\n System.out.println(\"--Inserisci il nome utente--\");\n nome=input.nextLine();\n }\n while(nome.isEmpty());\n \n return nome;\n }", "public void insere (String nome)\n {\n //TODO\n }", "public void setNom(final String nom) {\n\t\tthis.nom = nom;\n\t}", "Ris(String nome) {\n this.nome = nome;\n }", "private void validationNom(String nameGroup) throws FormValidationException {\n\t\tif (nameGroup != null && nameGroup.length() < 3) {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Le nom d'utilisateur doit contenir au moins 3 caractères.\");\n\t\t\tthrow new FormValidationException(\n\t\t\t\t\t\"Le nom d'utilisateur doit contenir au moins 3 caractères.\");\n\t\t}\n\n\t\t// TODO checker si le nom exist pas ds la bdd\n\t\t// else if (){\n\t\t//\n\t\t// }\n\t}", "boolean isUniqueAttribute();", "@Override\n protected void checkElementNameUnique(Element element)\n {\n }", "public void setNom ( String nouveauNom ) {\n if ( nouveauNom == null ) {\n nom = NOM_BIDON;\n } else {\n nom = nouveauNom;\n }\n }", "public String createNewName() {\n\t\treturn null;\n\t}", "public void setNomDistrito(String nomDistrito);", "private void generarNombre() {\r\n\t\tthis.nombre = NOMBRES[(int) (Math.random() * NOMBRES.length)];\r\n\t}", "public java.lang.String getUniqueName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIQUENAME$10, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + nomor;\n\t\treturn result;\n\t}", "public void nommerHeros() {\n\t\tSystem.out.println(\"\\nComment voulez vous appeler votre personnage ?\");\n\t\tthis.nom = Clavier.entrerClavierString();\n\t\tSystem.out.println(\"\\n*********Bienvenue dans le labyrinthe \" + getNom()+\"*********\");\n\t}", "public void setNombreCompleto(String nombreCompleto);", "public boolean supportsUnique() {\n \t\treturn true;\n \t}", "@Override\r\n public int hashCode() {\r\n return nome.hashCode();\r\n }", "public String getUniqueIdentifier(){\n return (streetAddress + aptNumber + zip).toLowerCase().replaceAll(\"\\\\s+\",\"\"); \n }", "private static String localUnique(){\n\t\tfinal long counterValue = instanceCounter.getAndIncrement();\n\t\tString unique = uniqueTop + String.format(\"%08d\", counterValue);\n\t\treturn unique;\t\t\n\t}", "String uniqueId();", "public void setNom(String nouveauNom) {\r\n if (nouveauNom == null) {\r\n nom = NOM_BIDON;\r\n \r\n } else {\r\n nom = nouveauNom;\r\n }\r\n }", "@Override\n public void setNom(String nom) {\n this.nom = nom;\n }", "public static String makeUniqueName( String root )\n {\n if ( null == root || root.trim().length() == 0 )\n root = \"rxname\";\n int count;\n synchronized ( getInstance().getClass())\n {\n count = ms_counter++;\n }\n return root + count;\n }", "private void actualizarNombre(Persona persona){\n \n String nombre=IO_ES.leerCadena(\"Inserte el nombre\");\n persona.setNombre(nombre);\n }", "public String getNom() {\r\n\t\treturn nom;\r\n\t}", "public String getNom() {\r\n\t\treturn nom;\r\n\t}", "private boolean isNameUnique(String name) {\n boolean isUnique = true;\n for (User user : this.users) {\n if (user.getName().equals(name)) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n }", "public boolean isUniqueA() {\n return true;\n }", "public String getNom() {\r\n return nom;\r\n }", "public Repertoire(String nom) throws mesExceptions {\r\n super(nom);\r\n nbElem = 0;\r\n }", "private String checkName(String name){\n\n if(name.isBlank()){\n name = \"guest\";\n }\n int i = 1;\n if(users.contains(name)) {\n while (users.contains(name + i)) {\n i++;\n }\n name+=i;\n }\n return name;\n }", "boolean isUnique(TextField inputPartNumber);", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "public static String nomNouvelEtat(String etatCourant, Set<String> nomEtats) {\n int cpt = 1;\n while (nomEtats.contains(etatCourant + \"-\" + cpt)) {\n cpt++;\n }\n return etatCourant + \"-\" + cpt;\n }", "public String getNom() {\r\n return nom;\r\n }", "public Nombre() {\n char v[] = { 'a', 'e', 'i', 'o', 'u' };\n char c[] = { 'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'ñ', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x',\n 'y', 'z' };\n vocales = new Letras(v);\n consonantes = new Letras(c);\n r = new Random();\n }", "public void setNombre(String nom) {\n this.nombre = nom;\n }", "public String getNom() {\n\t\treturn nom;\n\t}", "public String getNom() {\n\t\treturn nom;\n\t}", "public Namer(boolean unique) {\r\n randomizer = new Random();\r\n if(unique) {\r\n previousNames = new HashSet();\r\n maxNames = calculateMaxNames();\r\n }\r\n else {\r\n previousNames = null;\r\n maxNames = -1;\r\n }\r\n }", "public String getNom() {\n\t\treturn null;\r\n\t}", "String getUltimoNome();", "public String getNom() {\r\n return nom;\r\n }", "public String getNom() {\r\n return nom;\r\n }", "boolean existe(String nombre);", "String getUniqueID();", "public Boolean isUnique(String search) {\n\t\tfor (int i = 0; i < CarerAccounts.size(); i++) {\n if (CarerAccounts.get(i).getUsername().equals(search)){\n return false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private UniqueIdentifier(){\n\t\t\n\t}", "public String getNomor() {\n return this.nomor;\n }", "public static boolean isUnique(String st) {\n\t\tif(st == null || st==\"\") {\n\t\t\treturn true;\n\t\t}\n\t\tfor(int i=0; i< st.length()-1; i++) {\n\t\t\tif(st.substring(i+1).indexOf(st.substring(i,i+1)) !=-1) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public String getUniqueField() {\n return uniqueField;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn nom;\r\n\t}", "private Ingrediente givenExisteUnIngrediente() {\n\t\tIngrediente ing = new Ingrediente();\n\t\ting.setId_categoriaIngrediente(1);\n\t\ting.setNombre(\"TOMATE\");\n\t\treturn ing;\n\t}", "private void registrar() {\n String nombre = txtNombre.getText();\n if (!nombre.trim().isEmpty()) {\n Alumno a = new Alumno();\n \n // cont++ , ++cont\n// contIds++;\n a.setNombre(nombre);\n a.setId(++contIds);\n \n listaAlumnos.add(a);\n\n lblCantidad.setText(\"Cantidad de nombres: \" + listaAlumnos.size());\n\n txtNombre.setText(null);\n txtNombre.requestFocus();\n // Actualiza la interfaz gráfica de la tabla\n tblNombres.updateUI();\n \n// int cont = 1;\n// System.out.println(\"------------------\");\n// System.out.println(\"Listado de alumnos\");\n// System.out.println(\"------------------\");\n// for (String nom : listaNombres) {\n// System.out.println(cont+\") \"+nom);\n// cont++;\n// }\n// System.out.println(\"------------------\");\n }\n }", "public void asignarNombre(String name);", "public String getNom() {\n\t\treturn this.nom;\r\n\t\t}", "private static boolean isUniqueM1(String str) {\n boolean isUnique = true;\n\n for (int i = 0; i < str.length(); i++) {\n\n for (int j = i + 1; j < str.length(); j++) {\n if (str.charAt(i) == str.charAt(j)) {\n isUnique = false;\n }\n }\n }\n return isUnique;\n }", "public String setUniqueName(final Node node) {\r\n\r\n final String uniqueName = getUniqueName(node.getTextContent().trim());\r\n node.setTextContent(uniqueName);\r\n return uniqueName;\r\n }", "public void setIdMuestra(String nombreMuestra) {\r\n\t\tthis.nombreMuestra = nombreMuestra;\r\n\t}", "public Identificador(String name) {\r\n this.name = name;\r\n }", "@Override\n\tpublic String getNom() {\n\t\treturn null;\n\t}", "protected String getBlankNS() {\n\n return uniqueNS;\n }", "String getNewName();", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"d*REA^ZGOc/_v\");\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"d*REA^ZGOc/_v\";\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, true, stringArray0);\n String string0 = SQLUtil.constraintName(dBUniqueConstraint0);\n assertEquals(\"\", string0);\n }", "public String getNom() {\n return nom;\n }", "public String getNom() {\n return nom;\n }", "public String getNom() {\n return nom;\n }", "public String getNom() {\n return nom;\n }", "public String getNom() {\n return nom;\n }", "public String getNom() {\n return nom;\n }", "public String getNom() {\n return nom;\n }", "private String setUniqueIdentifier(String sUid, Set<Attribute> attrs) {\n\t\tLOG.info(\"BEGIN\");\n\t\tSet<Attribute> currentAttrSet = new HashSet<Attribute>(AttributeUtil\n\t\t\t\t.getCurrentAttributes(attrs));\n\t\tString cUid = AttributeUtil.getNameFromAttributes(currentAttrSet)\n\t\t\t\t.getNameValue();\n\t\tif (cUid.equals(sUid)) {\n\t\t\tsUid = getUniqueIdentifier(cUid);\n\t\t}\n\t\tLOG.info(\"END :: \" + sUid);\n\t\treturn sUid;\n\t}", "public static boolean isNameUnique(int ID, String name) throws IOException {\r\n if (pcQD == null) throw new IOException(\"Can't verify new component\");\r\n for (QuickDic qd : pcQD)\r\n if (qd.getID() != ID && qd.getFirstVal().equalsIgnoreCase(name))\r\n return false;\r\n return true;\r\n }", "public void removeJoueur(String nomJoueur) {\n\t\tif (joueurExiste(nomJoueur)) {\n\t\t\tstats.remove(nomJoueur);\n\t\t}\n\t}", "void rezervasyonYap(String name, String surname, String islem);", "public String makeUniqueName (String name) {\n StringBuffer nameBuf = new StringBuffer(name);\n if (!nameNumberMap.containsKey(name)) {\n // put initial value into map\n nameNumberMap.put(name, 0);\n }\n int num = nameNumberMap.get(name) + 1; // increment number by 1\n nameBuf.append(num);\n nameNumberMap.put(name, num);\n return nameBuf.toString();\n }", "public boolean verificaDuplicidade(String s) {\n\t\tfor (Compromisso c : this.compromisso) {\n\t\t\tif (c.getDataInicio().equals(s)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.65257454", "0.6446752", "0.62881446", "0.6284813", "0.6238906", "0.62387335", "0.6187278", "0.61527085", "0.6104289", "0.6088317", "0.6034969", "0.6013565", "0.6013565", "0.59797", "0.59712666", "0.5953343", "0.5952949", "0.5898384", "0.58944476", "0.58944476", "0.58756226", "0.58657175", "0.58409095", "0.5823073", "0.5803915", "0.58010286", "0.5798019", "0.5787862", "0.5786206", "0.5785078", "0.57832956", "0.5777028", "0.5773383", "0.5761156", "0.57595843", "0.5740161", "0.5737762", "0.5734793", "0.5733281", "0.57239825", "0.5718762", "0.5705425", "0.57011366", "0.5679561", "0.56749177", "0.5661827", "0.5652114", "0.5644572", "0.5636902", "0.5636902", "0.5636529", "0.5634573", "0.56124514", "0.561238", "0.5610872", "0.5610237", "0.56092846", "0.560485", "0.5599582", "0.55925137", "0.5590958", "0.55846584", "0.55846584", "0.55765855", "0.5575846", "0.55671316", "0.5565775", "0.5565775", "0.5561004", "0.55539644", "0.5532944", "0.55306953", "0.55212384", "0.5519836", "0.5516817", "0.55154425", "0.5507379", "0.55028826", "0.5502037", "0.55016774", "0.55005056", "0.5494764", "0.5493133", "0.54818195", "0.5475338", "0.5473457", "0.54694957", "0.54591626", "0.54540163", "0.54540163", "0.54540163", "0.54540163", "0.54540163", "0.54540163", "0.54540163", "0.54402006", "0.5435957", "0.5434352", "0.5430874", "0.5426332", "0.54218143" ]
0.0
-1
Sets up this hourly employee using the specified information. Initially the Employee worked for zero hours.
public Hourly (String eName, String eAddress, String ePhone, String socSecNumber, double rate) { super(eName, eAddress, ePhone, socSecNumber, rate); //IMPLEMENT THIS }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WorkHours() {\n //default if not yet initialised\n this._startingHour=0.00;\n this._endingHour=0.00;\n }", "public HourlyWorker () {\r\n super ();\r\n hours = -1;\r\n hourlyRate = -1;\r\n salary = -1;\r\n }", "public HourlyEmployee( String first, String last, String ssn, double hourlyWage, double hoursWorked )\n\t{\n\t\tsuper( first, last, ssn);\n\t\tsetWage( hourlyWage );\n\t\tsetHours( hoursWorked ); \n\t}", "public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }", "public Employee(String firstName, String secondName, double hourlyRate){\n\t\tthis.firstName = firstName;\n\t\tthis.secondName = secondName;\n\t\tthis.hourlyRate = hourlyRate;\n\t\t\n\t}", "public HourlyWorker() {\n\t\tthis.num_hours = 1;\n\t\tthis.hourly_rate = 0.01;\n\t}", "public void setEHour(int ehour)\r\n\t{\r\n\t\tthis.ehour = ehour;\r\n\t}", "public HourlyDetail() {\n\t\tthis.numberOfShiftBeginning = 0;\n\t\tthis.numberOfShiftEnding = 0;\n\t\tthis.costPerHour = 0;\n\t}", "public Employee(String employeeName, PositionTitle position, boolean salary, double payRate, int employeeShift,\n String startDate, double hrsIn) {\n // ////////////// construct Employees\n this.employeeName = employeeName;\n this.position = position;\n this.salary = salary;\n this.payRate = payRate;\n this.employeeShift = employeeShift;\n this.startDate = startDate;\n this.hrsIn = hrsIn;\n\n }", "public HourlyWorker (String fName, String lName, String empID, double hours, double hourlyRate) {\r\n super (fName, lName, empID);\r\n setHours(hours);\r\n setHourlyRate(hourlyRate);\r\n calculateSalary();\r\n }", "public void setHours(double hours) {\r\n // if hours is negative, hours is 0\r\n if (hours < 0) {\r\n this.hours = 0;\r\n }\r\n else {\r\n this.hours = hours;\r\n }\r\n // calls calculateSalary to update the salary once hours is changed\r\n calculateSalary();\r\n }", "public HourlyEmployee getEmployee() {\n\t\treturn employee;\n\t}", "public TimeInformation createEmployeeTimeInformation(TimeInformation entity) {\r\n\t\tOptional<TimeInformation> employeeTime = repository.findById(entity.getEmployee_ID_Number());\r\n\r\n\t\tif(employeeTime.isPresent()) {\r\n\t\t\treturn this.updateEmployeeTimeInformation( entity);\r\n\t\t} else {\r\n\t\t\tentity = repository.save(entity);\r\n\t\t\treturn entity;\r\n\t\t}\r\n\t}", "Employee(String id, Kitchen kitchen) {\r\n this.id = id;\r\n this.kitchen = kitchen;\r\n this.attendance = \"Present\";\r\n this.password = \"password\";\r\n }", "@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }", "public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }", "public void setUp()\n {\n empl = new SalariedEmployee(\"romeo\", 25.0);\n }", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\n\t}", "public void setHours(int[] hours) {\n if (hours == null)\n hours = new int[] {};\n this.hours = hours;\n }", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"bebexitaHemoxita@gmail.com\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public void setHours(double hours) {\r\n this.hours = hours;\r\n }", "public void setHours(int hours) {\n this.hours = hours;\n }", "public EmployeePay() {\n initComponents();\n setDefaultDateRange();\n updateTable();\n }", "public void setHour(int hour)\n {\n this.hour = hour;\n }", "public static void EmployeeHoursWorked() {\r\n\t\t\r\n\t\tJLabel e5 = new JLabel(\"Employee's Hours Worked:\");\r\n\t\te5.setFont(f);\r\n\t\tGUI1Panel.add(e5);\r\n\t\tGUI1Panel.add(employeeHoursWorked);\r\n\t\te5.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t}", "public void setHours(double hoursWorked){\n if ((hoursWorked >= 0.0) && (hoursWorked <= 168.0))\n hours = hoursWorked;\n else\n throw new IllegalArgumentException(\"Hours worked must be >= 0 and <= 168\");\n }", "public void setEmployee (jkt.hms.masters.business.MasEmployee employee) {\n\t\tthis.employee = employee;\n\t}", "Employee(String name, String profile, int id, String regime) {\n super(name, profile, id);\n this.regime = regime;\n }", "public void setHour(int hour){\n if(hour < 0 || hour > 23) {System.out.println(\"wrong input!\"); return;}\n this.hour = hour;\n }", "public void setOccupiedHours(int hours){\n \t\tif(hours > 0 && hours*60 > 0)\n \t\t\tsetOccupiedMinutes(hours*60);\n \t}", "public void setHour(int hour) \n { \n if (hour < 0 || hour >= 24)\n throw new IllegalArgumentException(\"hour must be 0-23\");\n\n this.hour = hour;\n }", "public Employee(){\r\n this(\"\", \"\", \"\", 0, \"\", 0.0);\r\n }", "public void setHour(int nHour) { m_nTimeHour = nHour; }", "Employee() {\n\t}", "private void hours(){\n \n companyDriver.startHourStage();\n this.close();\n }", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "public void setHours(int x, double h) {\r\n hours[x] = h;\r\n }", "public void setHours(int hours) {\n\t\tthis.hours = hours;\n\t}", "public void setHour(Integer hour) {\n this.hour = hour;\n }", "public User() {\r\n\t\temployee=new HashMap<Integer, Employee>();\r\n\t\tperformance=new HashMap<Employee,String>();\r\n\t}", "private void setUpHashMap(int number)\n {\n switch (number)\n {\n case 1:\n {\n this.hourly.put(\"Today\",new ArrayList<HourlyForecast>());\n break;\n }\n case 2:\n {\n this.hourly.put(\"Today\",new ArrayList<HourlyForecast>());\n this.hourly.put(\"Tomorrow\", new ArrayList<HourlyForecast>());\n break;\n }\n case 3:\n {\n this.hourly.put(\"Today\", new ArrayList<HourlyForecast>());\n this.hourly.put(\"Tomorrow\", new ArrayList<HourlyForecast>());\n this.hourly.put(\"Day After Tomorrow\", new ArrayList<HourlyForecast>());\n break;\n }default:\n break;\n }\n }", "public SalesEmployee(){\n\t\tfirstName = \"unassigned\";\n\t\tlastName = \"unassigned\";\n\t\tppsNumber = \"unassigned\";\n\t\tbikeEmployeeNumber++;\n\t}", "Employee(String empId, String name, int roleId, double basic, double allowancePercentage, double hra){\r\n\t\tthis.empId = empId;\r\n\t\tthis.name = name;\r\n\t\tthis.role.setRoleId(roleId);\r\n\t\tthis.basic = basic;\r\n\t\tthis.allowancePercentage = allowancePercentage;\r\n\t\tthis.hra = hra;\r\n\t}", "public void setHour(int newHour) {\n hour = newHour; // sets the appointment's hour to the input in military time\n }", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public Employee(String firstName, String lastName, Date birthDate, \n Date hireDate, Address Address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.birthDate = birthDate;\n this.hireDate = hireDate;\n this.Address = Address;\n }", "public FullTimeStaffHire(int vacancyNumber, String designation, String jobType, int salary, int workingHour) {\n //Super class constructor is invoked.\n super (vacancyNumber, designation, jobType);\n this.salary = salary;\n this.workingHour = workingHour;\n this.staffName = \"\";\n this.joiningDate = \"\";\n this.qualification = \"\";\n this.appointedBy = \"\";\n this.joined = false;\n }", "public static void doStuff(){\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\n\t\t//As we omitted the argument, this will just create a new numeric ID\n\t\tEntity employee = new Entity(\"Employee\");\n\n\t\temployee.setProperty(\"firstName\", \"Patrick\");\n\t\temployee.setProperty(\"lastName\", \"MacDowell\");\n\n\t\tDate hireDate = new Date();\n\t\temployee.setProperty(\"hireDate\", hireDate);\n\n\t\temployee.setProperty(\"attendedHrTraining\", true);\n\n\t\tdatastore.put(employee);\n\t}", "public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}", "public Employee(String firstName, String lastName, int age, double salary) {\r\n //envoke the super class's constructor\r\n super(firstName, lastName, age);\r\n \r\n //set the instance variables specific to this class. \r\n this.salary = salary;\r\n employeeNumber = nextEmployeeNumber;\r\n nextEmployeeNumber++;\r\n }", "public Employee() {\n\t\tsuper();\n\t}", "public void setHour(int hour) throws InvalidDateException {\r\n\t\tif (hour < 24 & hour >= 0) {\r\n\t\t\tthis.hour = hour;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic hour for the date (between 0 and 23) !\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n HourlyWorker worker1 = new HourlyWorker(\"Adam\", \"G\", \"P0489951\", 30, 15.00);\r\n HourlyWorker worker2 = new HourlyWorker();\r\n\r\n // testing all getters on worker1\r\n System.out.println(\"first name: \" + worker1.getFirstName());\r\n System.out.println(\"last name: \" + worker1.getLastName());\r\n System.out.println(\"employee ID: \" + worker1.getID());\r\n System.out.println(\"hours: \" + worker1.getHours());\r\n System.out.println(\"hourly rate: \" + worker1.getHourlyRate());\r\n System.out.println(\"salary: \" + worker1.getSalary());\r\n System.out.println(\"earnings: \" + worker1.earnings());\r\n System.out.println(worker1.toString());\r\n System.out.println();\r\n\r\n // testing all setters on worker2\r\n System.out.println(worker2.toString());\r\n worker2.setFirstName(\"Erica\");\r\n worker2.setLastName(\"Erikson\");\r\n worker2.setID(\"P0626585\");\r\n worker2.setHours(55);\r\n worker2.setHourlyRate(13.15);\r\n worker2.calculateSalary();\r\n System.out.println(\"earnings: \" + worker2.earnings());\r\n System.out.println(worker2.toString());\r\n System.out.println();\r\n\r\n // testing incorrect input\r\n worker1.setHours(-2443);\r\n worker1.setHourlyRate(-2323);\r\n worker1.calculateSalary();\r\n System.out.println(worker1.toString());\r\n\r\n }", "@Override\r\n\tpublic void updateEmployee(Employee t) {\n\t\t\r\n\t}", "@Before\n public void setUp() {\n e1 = new Employee(\"Pepper Potts\", 16.0, 152);\n e2 = new Employee(\"Nancy Clementine\", 22.0, 140);\n\n }", "public HourlyRecord() {\n\t\tthis(\"hourly_record\", null);\n\t}", "public static WorkTimeEmployee valueOf(Employee employee, List<CustomWorkTime> workTimes) {\n WorkTimeEmployee workTimeEmployee = new WorkTimeEmployee();\n workTimeEmployee.name = employee.fullName();\n workTimeEmployee.workTimes = CustomWorkTime.reduceAndSortWorktimes(workTimes);\n return workTimeEmployee;\n }", "public Employee(String name){\r\n\t\tthis.employeeName = name;\r\n\t\tthis.salary = 0;\r\n\t}", "public Schedule (Employee employee, Date startDate, Date endDate) {\n this.employee = employee;\n this.startDate = startDate;\n this.endDate = endDate;\n }", "public EmployeeInfo() {\n initComponents();\n }", "public Hospital() {\n noOfHospitals++; //increase static var by one each time\n // a constructor is called because you add an object\n this.name = \"Hospital X\";\n this.mainUse = \"unknown\";\n this.qualifiedStaff = 0;\n this.otherStaff = 0;\n this.spaces = 0;\n this.stateFunded = false;\n }", "public void setHours(String hours) {\n this.hours = parseHours(hours);\n }", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }", "public Employee() throws OutOfRangeException { //default constructors have no parameters\n\t\t//must create a default constructor, if a subclass is created\n\t\tthis(\"\",\"\",10.0f,40);\n\t\temployeeCount++;\n\t}", "public void setEmployee(Employee employee) {\r\n this.employee = employee;\r\n\r\n idLabel.setText(Integer.toString(employee.getId()));\r\n firstNameField.setText(employee.getFirstName());\r\n lastNameField.setText(employee.getLastName());\r\n industryField.setText(employee.getIndustry());\r\n workTypeField.setText(employee.getWorkType());\r\n addressField.setText(employee.getAddress());\r\n }", "public Employee(int employeeId, String employeeName, String employeeAddress) {\r\n\t\r\n\t\tthis.employeeId = employeeId;\r\n\t\tthis.employeeName = employeeName;\r\n\t\tthis.employeeAddress = employeeAddress;\r\n\t}", "public void setHour(int hour) throws BlablakidException {\n\t\tif(checkTime(hour,this.minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The hour introduced is wrong : \"+hour);\n\t\t}\n\t\telse {\n\t\tthis.hour = hour;\n\t\t}\n\t}", "@BeforeClass\n\tpublic static void setup() {\n\t\tHotel hotel = new Hotel();\n\t\thotel.setName(\"Hennessy Pub\");\n\t\tfinal DateFormat formatDate = new SimpleDateFormat(\"hh:mm a\");\n\t\tTimeSlot slot = new TimeSlot();\n\t\ttry {\n\t\t\tslot.setEndTime((Date)formatDate.parse(\"2:00 am\"));\n\t\t\tslot.setStartTime((Date)formatDate.parse(\"11:30 am\"));\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tMap<Integer, TimeSlot> timeSlots = new HashMap<>(); \n\t\ttimeSlots.put(1, slot);\n\t\ttimeSlots.put(2, slot);\n\t\ttimeSlots.put(7, slot);\n\t\thotel.setTimeSlotsMap(timeSlots);\n\t\t\n\t\thotelsSampleData.add(hotel);\n\t\t\n\t}", "Employee(String name, String password, String username, String email) {\n this.name = name;\n this.username = username;\n this.email = email;\n this.password = password;\n\n }", "public Employee(String employeeId, String name) {\n this.employeeId = employeeId;\n this.name = name; // TODO fill in code here\n }", "public Employee() {\n\t\tSystem.out.println(\"Employee Contructor Called...\");\n\t}", "public void setEmployee(int index, Person emp) {\n if (index >= 0 && index < employees.length) {\n employees[index] = emp;\n }\n }", "private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setHoursWorked(double hoursWorked){\r\n\t\t// populate the owned hoursWorked from the given \r\n\t\t// function parameter\r\n\t\t\r\n\t\tthis.hoursWorked = hoursWorked;\r\n\t}", "public Staff()\n\t{\n\t\tsuper();\n\t\thourlyRate = 0.0;\n\t}", "public void initiate() {\n\t\tallDepartments.put(HRDepartment.class.getSimpleName(), HRDepartment.getInstance());\n\t\tallDepartments.put(ProductionDepartment.class.getSimpleName(), ProductionDepartment.getInstance());\n\t\tallDepartments.put(WarehousingDepartment.class.getSimpleName(), WarehousingDepartment.getInstance());\n\t\tallDepartments.put(FinanceDepartment.class.getSimpleName(), FinanceDepartment.getInstance());\n\t\tallDepartments.put(MarketingDepartment.class.getSimpleName(), MarketingDepartment.getInstance());\n\t\tallDepartments.put(LogisticsDepartment.class.getSimpleName(), LogisticsDepartment.getInstance());\n\t\tallDepartments.put(ProcurementDepartment.class.getSimpleName(), ProcurementDepartment.getInstance());\n\t\tallDepartments.put(ResearchAndDevelopmentDepartment.class.getSimpleName(), ResearchAndDevelopmentDepartment.getInstance());\n\t\tallDepartments.put(SalesDepartment.class.getSimpleName(), SalesDepartment.getInstance());\n\n\t\tcustomerSatisfaction = CustomerSatisfaction.getInstance();\n\t\tcustomerDemand = CustomerDemand.getInstance();\n\t\texternalEvents = ExternalEvents.getInstance();\n\t\tcompanyEcoIndex = CompanyEcoIndex.getInstance();\n\t\tinternalFleet = InternalFleet.getInstance();\n\t\tbankingSystem = BankingSystem.getInstance();\n\t\tproductSupport = ProductSupport.getInstance();\n\t\temployeeGenerator = EmployeeGenerator.getInstance();\n\t\temployeeGenerator.setDepartment((HRDepartment) allDepartments.get(HRDepartment.class.getSimpleName()));\n\t}", "public void registhourly_employee(Hourly_employee form) throws UserException, ClassNotFoundException, InstantiationException, IllegalAccessException{\n\t\tHourly_employee hrs = hourly_employeeDao.findByHourly_ssn(form.gethourly_ssn());\r\n\t\tString hrsID = hrs.gethourly_ssn();\r\n\t\tString formID = form.gethourly_ssn();\r\n\t\t\r\n\t\tif(hrsID == formID)\r\n\t\t\tthrow new UserException(\"This Employee ID has already been in your Database!\");\r\n\t\t\r\n\t\thourly_employeeDao.add(form);\r\n\t}", "public PTEmployee(String n, String ssnum, String d, double rate, int hours) {\n\t\tsuper(n, ssnum, d);\n\t\tthis.hourlyRate = rate;\n\t\tthis.hoursWrkd = hours;\n\t}", "public void setHours(int noOfHours2) {\n\t\t\tthis.noOfHours=noOfHours2;\r\n\t\t\t\r\n\t\t}", "public void setHour(Pair<Double, Double> value) {\r\n\t\thour = value;\r\n\t}", "public Employee(int empID, String firstName, String lastName, int ssNum,\n Date hireDate, double salary) {\n if (Employee.setOfIDs.contains(empID) || !Employee.isPositive(empID)) {\n this.empID = Employee.generateID();\n } else {\n this.empID = empID;\n }\n Employee.sortType = SortType.SORT_BY_ID;\n Employee.setOfIDs.add(this.empID);\n this.firstName = firstName;\n this.lastName = lastName;\n this.ssNum = ssNum;\n this.hireDate = hireDate;\n this.salary = salary;\n }", "public void setWorkingHour (int newWorkingHour) {\n this.workingHour = newWorkingHour;\n }", "public Employee(){\n this.employeeName = new String();\n this.employeeSalary = null;\n this.employeeProjectList = new ArrayList<String>();\n this.employeeDepartmentLead = new String();\n }", "public Furniture (float pricePerHour, float workedHours)\n {\n\t this.pricePerHour = pricePerHour;\n\t this.workedHours = workedHours;\n }", "public void setEmployees(int _employees){\n employees = _employees;\n }", "public Employee() {\t}", "protected void runEachHour() {\n \n }", "public Hospital(String hospName, String mainUse, int qualifiedStaff, int otherStaff, int spaces) {\n noOfHospitals++;\n this.name = hospName;\n this.mainUse = mainUse;\n this.qualifiedStaff = qualifiedStaff;\n this.otherStaff = otherStaff;\n this.spaces = spaces;\n this.stateFunded = true;\n }", "public Employee() {\n employeeID = genID.incrementAndGet();\n }", "public Appointment(int hour, String description) {\n\n // this refers to the appointment being made\n // hour and description refer to the input parameters\n // this.hour and this.description refer to the object's variables\n this.hour = hour;\n this.description = description;\n }", "public Employee(EmployeeDto e) {\n\t\tthis.id = e.getId();\n\t\tthis.firstName = e.getFirstName();\n this.lastName = e.getLastName();\n\t\tthis.dateOfBirth = e.getDateOfBirth();\n\t\tthis.gender = e.getGender();\n\t\tthis.startDate = e.getStartDate();\n\t\tthis.endDate = e.getEndDate();\n\t\tthis.position = e.getPosition();\n this.monthlySalary = e.getMonthlySalary();\n this.hourSalary = e.getHourSalary();\n this.area = e.getArea();\n this.createdAt = e.getCreatedAt();\n this.modifiedAt = e.getModifiedAt();\n\t}", "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "public void sethourNeed(Integer h){hourNeed=h;}", "public EmployeeList() {\r\n initComponents();\r\n\r\n empName = getEmployeeName();\r\n empPosition = getEmployeePosition();\r\n System.out.println(empName + \"----- \" + empPosition);\r\n details = (ArrayList<String>) setEmployeeDetails(empName, empPosition);\r\n initializeComponents(details);\r\n\r\n }", "public EmployeeTransition() {\n this.id = new UUID(0, 0);\n this.f_name = StringUtils.EMPTY;\n this.l_name = StringUtils.EMPTY;\n this.employeeid = \"-1\";\n this.active = StringUtils.EMPTY;\n this.role = StringUtils.EMPTY;\n this.manager = StringUtils.EMPTY;\n this.password = StringUtils.EMPTY;\n this.createdOn = new Date();\n }", "Employee(int id, String name, String birthDate, int eage, double esalary){\r\n ID=id; \r\n NAME=name; \r\n BIRTHDATE=birthDate; \r\n age=eage; \r\n salary=esalary; \r\n }", "public void addEmployee(EmployeeInfo theEmployee) {\n int targetBucket = calcBucket(theEmployee.getEmployeeNum());\n buckets[targetBucket].add(theEmployee);\n numInTable++;\n }", "public Employee(String employeeFirstName, String employeeLastName, \r\n String employeeEmail, long employeePhoneNumber, \r\n String employeeStatus, double employeeSalary) {\r\n this.employeeFirstName = employeeFirstName;\r\n this.employeeLastName = employeeLastName;\r\n this.employeeEmail = employeeEmail;\r\n this.employeePhoneNumber = employeePhoneNumber;\r\n this.employeeStatus = employeeStatus;\r\n this.dateHired = new Date();\r\n this.employeeAddress = new Address();\r\n this.employeeSalary = employeeSalary;\r\n }", "public HourlyWorker(String name, int age, int year_hired, int num_hours, double hourly_rate) {\n\t\tsuper(name, age, year_hired);\n\t\tthis.num_hours = 1;\n\t\tthis.hourly_rate = 0.01;\n\t\tif (isValidHours(num_hours) && isValidRate(hourly_rate)) {\n\t\t\tthis.num_hours = num_hours;\n\t\t\tthis.hourly_rate = hourly_rate;\n\t\t}\n\t}", "public void instantiateEmployees(ResultSet resultSet) throws SQLException {\n\n\t\t\n\t\twhile (resultSet.next()) {\n\t\t\t// Instantiate\n\t\t\tEmployee employee = new Employee(\n\t\t\t\t\tresultSet.getString(EmployeeColumns.Email.colNr()),\n\t\t\t\t\tresultSet.getString(EmployeeColumns.Name.colNr()),\n\t\t\t\t\tresultSet.getInt(EmployeeColumns.Telephone.colNr())\n\t\t\t\t);\n\t\t\t\n\t\t\t// Add to model\n\t\t\tmodel.addEmployee(employee);\n\t\t}\n\t}" ]
[ "0.6572399", "0.6372769", "0.6227249", "0.60827005", "0.60696644", "0.5986593", "0.58338434", "0.58328253", "0.58035415", "0.56859696", "0.5685693", "0.56583047", "0.565746", "0.56131184", "0.55856866", "0.55722046", "0.5571242", "0.55538297", "0.5544627", "0.55342406", "0.55302995", "0.55187804", "0.55047727", "0.54997325", "0.54828864", "0.5479732", "0.54723907", "0.54591244", "0.5446765", "0.53999835", "0.53984964", "0.53917265", "0.53854287", "0.5374966", "0.5361744", "0.53424424", "0.532917", "0.53070873", "0.52913755", "0.5288492", "0.52670544", "0.5265834", "0.52656436", "0.52506536", "0.5248198", "0.5246172", "0.52312726", "0.5229143", "0.5228916", "0.52276766", "0.52267826", "0.52205515", "0.52183694", "0.5208984", "0.5205247", "0.52003527", "0.51942843", "0.5191631", "0.51538444", "0.51368433", "0.51360226", "0.5135534", "0.51328146", "0.5122995", "0.5122618", "0.51224005", "0.5121322", "0.51199627", "0.5118948", "0.51121616", "0.5108586", "0.51000625", "0.50998735", "0.5097844", "0.5097543", "0.5095719", "0.5087466", "0.50773644", "0.5076285", "0.50686413", "0.5062348", "0.5059094", "0.5052435", "0.5022222", "0.50205725", "0.5019664", "0.5016778", "0.50096726", "0.5007344", "0.5006832", "0.50050586", "0.49978086", "0.4996509", "0.49957108", "0.49905142", "0.49802417", "0.4974717", "0.49699545", "0.4969802", "0.49647188" ]
0.49842796
95
Adds the specified number of hours to this employee's accumulated hours.
public void addHours (int moreHours) { hoursWorked += moreHours; //IMPLEMENT THIS }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(int hours, int minutes) {\n\t\tthis.hours += hours;\n\t\tthis.minutes += minutes;\n\n\t\t// convert each 60 minutes into one hour\n\t\tthis.hours += this.minutes / 60;\n\t\tthis.minutes = this.minutes % 60;\n\t}", "public void addBack(int hours){\n\t\ttimeAllocated+=hours;\n\t}", "public void increaseHour() {\n\t\tthis.total++;\n\t}", "public void addHoursWorked(float hoursWorked){\r\n if (hoursWorked >= 0 && hoursWorked <= 14)\r\n this.hoursWorked += hoursWorked;\r\n else\r\n throw new IllegalArgumentException(\"Hours worked must be 0-14 for 1 day\");\r\n }", "public void update(int hours){\n this.setNbrHours(hours);\n }", "public void setHours(int hours) {\n this.hours = hours;\n }", "public void setHours(int hours) {\n\t\tthis.hours = hours;\n\t}", "public void setHours(double hours) {\r\n this.hours = hours;\r\n }", "public void setOccupiedHours(int hours){\n \t\tif(hours > 0 && hours*60 > 0)\n \t\t\tsetOccupiedMinutes(hours*60);\n \t}", "public void work(int hours) {\n\t\twhile(age++ < RETIREMENT_AGE) {//Method calculates total salary earned\n\n\t\tfor(int i = 1; i<=hours; i++)\n\t\t\tearned += hourlyIncome;\n\t\t\n\t\tfor(int j = 1; j<=OVERTIME; j++)\n\t\t\tearned += hourlyIncome;\n\t\t}\n\t}", "public void addHoursToVolunteer(int volunteerID, String guildName, int hours) throws DALException {\n Date date = new Date();\n facadeDAO.addHoursToVolunteer(volunteerID, guildName, date, hours);\n }", "public void workedOnTODO(int hours){\n\t\ttimeAllocated -=hours;\n\t}", "public void setHours(double hours) {\r\n // if hours is negative, hours is 0\r\n if (hours < 0) {\r\n this.hours = 0;\r\n }\r\n else {\r\n this.hours = hours;\r\n }\r\n // calls calculateSalary to update the salary once hours is changed\r\n calculateSalary();\r\n }", "public JobLog setHours(String hours) {\n this.hours = hours;\n return this;\n }", "public static void addHours (int [] [] ary1)\n {\n\n //Top of table formatting\n\n System.out.println(\"\\nEmployee# Weekly Hours\");\n System.out.println(\"____________________________\");\n\n //Nested for loop steps through the array and sums all the values in each row. It then prints the sums in table format.\n\n int x, y;\n int count1;\n int sum;\n\n for (x = 0; x <= 2; x++)\n {\n\n count1 = 0;\n sum = 0;\n\n System.out.print(\" \");\n\n for (y = 0; y <= 6; y++)\n {\n\n count1++;\n\n if (count1 <= 6)\n sum = sum + ary1[x][y];\n\n }\n\n System.out.printf(\"%-15d\",(x + 1));\n System.out.printf(\"%-15d\\n\",sum);\n\n }\n\n }", "public void addCost(Date hour, float nCost) {\r\n schedule.add(hour);\r\n cost.add(nCost);\r\n }", "public void setHours(int[] hours) {\n if (hours == null)\n hours = new int[] {};\n this.hours = hours;\n }", "public void add(final int hours, final int minutes, final int seconds) {\n Calendar cal = Calendar.getInstance();\n\n cal.setTime(date);\n cal.add(Calendar.SECOND, seconds);\n cal.add(Calendar.MINUTE, minutes);\n cal.add(Calendar.HOUR_OF_DAY, hours);\n set(cal);\n }", "public void setAditionalNightHours(int hours){\r\n\t this.addings = (double)(40*hours);\r\n }", "public double totalHours(){\n return (this._startingHour - this._endingHour);\n }", "public static Date addHours(final Date date, final int hours) {\n return Dates.add(date, hours, Calendar.HOUR_OF_DAY);\n }", "public final native double setHours(int hours) /*-{\n this.setHours(hours);\n return this.getTime();\n }-*/;", "@Override\r\n\tpublic Result add(Employees employees) {\n\t\treturn null;\r\n\t}", "public static final Function<Date,Date> addHours(final int amount) {\r\n return new Add(Calendar.HOUR, amount);\r\n }", "private void loadHours(){\n int hours = 0;\n int minutes = 0;\n for(int i=0; i<24;i++){\n for(int j=0; j<4;j++){\n this.hoursOfTheDay.add(String.format(\"%02d\",hours)+\":\"+ String.format(\"%02d\",minutes));\n minutes+=15;\n }\n hours++;\n minutes = 0;\n }\n }", "public void addEmployee(EmployeeInfo theEmployee) {\n int targetBucket = calcBucket(theEmployee.getEmployeeNum());\n buckets[targetBucket].add(theEmployee);\n numInTable++;\n }", "public void recordHoursWorked(double hrsWorked){\r\n if(hrsWorked<1 || hrsWorked<16)\r\n hoursWorked+=hrsWorked;\r\n else\r\n throw new IllegalArgumentException(\"Hours must be between 1-16 hours\");\r\n }", "public static Date addHours(Date inputDate, int hours) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(inputDate);\n calendar.add(Calendar.HOUR, hours);\n return calendar.getTime();\n }", "public Builder byHour(Collection<Integer> hours) {\n\t\t\tthis.byHour.addAll(hours);\n\t\t\treturn this;\n\t\t}", "@Override\r\n\tpublic void addEmployee(Employee employee) {\n\t\temployees.add(employee);\r\n\t\t\r\n\t}", "void updateTaskHours(int id, float hours);", "public static Date addHour(final Date date, final Integer nHour) {\n\t\tCalendar cal = Calendar.getInstance(); \n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.HOUR_OF_DAY, nHour);\n\t\treturn cal.getTime();\n\t}", "public InactivityTimeout hours(int n) {\n millis += 60 * 60 * n * 1000;\n return this;\n }", "public void addTime(LocalDate date, String hour) {\n spr.addTime(date, hour);\n }", "public static Date sumHours(Date date, int hours) {\n if (hours == 0) {\n return date;\n }\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n calendar.add(Calendar.HOUR, hours);\n return calendar.getTime();\n }", "public void setHours(int noOfHours2) {\n\t\t\tthis.noOfHours=noOfHours2;\r\n\t\t\t\r\n\t\t}", "public static double hoursSpent()\n\t{\n\t\treturn 7.0;\n\t}", "public void setHours(String hours) {\n this.hours = parseHours(hours);\n }", "private void updateTimeEntryHoursSumCache(SpentOn spentOn, double deltaHours)\n {\n synchronized(timeEntryHoursSumDateMap)\n {\n double hours;\n if (timeEntryHoursSumDateMap.containsKey(spentOn))\n {\n hours = timeEntryHoursSumDateMap.get(spentOn)+deltaHours;\n }\n else\n {\n hours = deltaHours;\n }\n timeEntryHoursSumDateMap.put(spentOn,hours);\n }\n }", "public void setHoursWorked ( int hours) {\n\t\tthis.hoursWrkd = hours;\n\t}", "public void addToHeartrate(\tString hr )\r\n\t{\n\t\theartRates.add(validateInteger( hr, \"heartrate\" ) );\r\n\t}", "public Builder byHour(Integer... hours) {\n\t\t\treturn byHour(Arrays.asList(hours));\n\t\t}", "public void addMinutes(int minutes)\n {\n\n int h = minutes / 60;\n int m = minutes - (h * 60);\n\n hour += h;\n\n if (minute == 30 && m == 30)\n {\n minute = 0;\n hour++;\n }\n else\n {\n minute += m;\n }\n }", "public void setHours(int x, double h) {\r\n hours[x] = h;\r\n }", "public void setHours(double hoursWorked){\n if ((hoursWorked >= 0.0) && (hoursWorked <= 168.0))\n hours = hoursWorked;\n else\n throw new IllegalArgumentException(\"Hours worked must be >= 0 and <= 168\");\n }", "public int getHours() {\n return this.hours;\n }", "public void letTimePass(int numHours) throws IllegalArgumentException{\r\n if(numHours < 0){\r\n throw new IllegalArgumentException(\"The number of hours to decrease is non-negative\");\r\n }\r\n else{\r\n for(Auction auctions: values()){\r\n auctions.decrementTimeRemaining(numHours); \r\n }\r\n }\r\n }", "public final native double setHours(int hours, int mins) /*-{\n this.setHours(hours, mins);\n return this.getTime();\n }-*/;", "public WorkHours() {\n //default if not yet initialised\n this._startingHour=0.00;\n this._endingHour=0.00;\n }", "@Override\r\n public boolean setHours(int hours) {\r\n if(hours<0||hours>23)\r\n {\r\n return false;\r\n }\r\n calendar.set(Calendar.HOUR_OF_DAY, hours);\r\n return true;\r\n }", "public void setAddTime(Integer addTime) {\n this.addTime = addTime;\n }", "public double getHours() {\r\n return hours;\r\n }", "public double getHours() {\r\n return hours;\r\n }", "public int getOccupiedHours(){\n \t\treturn getOccupiedMinutes()/60;\n \t}", "public void addEnergy(Energy energy) {\n this.getEnergy().setValue(this.getEnergy().getValue() + energy.getValue());\n }", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "public int[] getHours() {\n int[] hoursArray = {this.hours, this.overtimeHours};\n return hoursArray;\n }", "public static void EmployeeHoursWorked() {\r\n\t\t\r\n\t\tJLabel e5 = new JLabel(\"Employee's Hours Worked:\");\r\n\t\te5.setFont(f);\r\n\t\tGUI1Panel.add(e5);\r\n\t\tGUI1Panel.add(employeeHoursWorked);\r\n\t\te5.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t}", "public void loadHours(String fileName)\r\n\t{\r\n\t\t//try block to try and open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables that will be assigned to the employee. These will be converted after split. \r\n\t\t\tString empID = \"\";\r\n\t\t\tString dailyHours = \"\";\r\n\t\t\tString day = \"\";\r\n\t\t\t//scan for the file \r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop if there is a next line\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//declare the line that was pulled as a single string \r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\t\r\n\t\t\t\t//break the line up by the delimiter (,)\r\n\t\t\t\tString fields[] = line.split(\",\");\r\n\t\t\t\t\r\n\t\t\t\t//assign the first field to day, 2nd to employeeID, and 3rd to dailyHours\r\n\t\t\t\tday = fields[0];\r\n\t\t\t\tempID = fields[1];\r\n\t\t\t\tdailyHours = fields[2];\r\n\t\t\t\t\r\n\t\t\t\t//cycle the Employee arrayList and see which employee ID matches the added ID\r\n\t\t\t\tfor (Employee employee : empList)\r\n\t\t\t\t{\r\n\t\t\t\t\t//selection structure checking if the empID matches the Employee list ID\r\n\t\t\t\t\tif(employee.getEmpoyeeId().equalsIgnoreCase(empID))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//add the hours to the employee object (convert dailyHours to a Double)\r\n\t\t\t\t\t\temployee.addHours(Double.parseDouble(dailyHours));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//now that the hours have been added to that individual employee, the hours need to be added to the date in the \r\n\t\t\t\t\t\t//DailyHours class by calling findEntryByDate\r\n\t\t\t\t\t\taddToDailyReport(day, Double.parseDouble(dailyHours), employee.getSalary());\r\n\t\t\t\t\t}//end employee ID found\r\n\t\t\t\t\t\r\n\t\t\t\t\t//else not found so set to null\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\temployee = null;\r\n\t\t\t\t\t}//end not found \r\n\t\t\t\t}//end for loop cycling the empList\t\r\n\t\t\t}//end the file has no more lines\r\n\t\t}//end try block\r\n\t\t\r\n\t\t//catch block incase try fails for OPENING THE FILE\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch block\t\r\n\t}", "public void add(Employee a)\n\t{\n\t\tif(a == null)\n\t\t\tSystem.out.println(\"ERROR: Object parameter must not be null!\");\n\t\t\t//throw new IllegalArgumentException(\"ERROR: Object parameter must not be null!\");\n\t\telse \n\t\t{\n\t\t\tif(employeeData.length == numOfEmployees)\n\t\t\t{\n\t\t\t\tensureCapacity(numOfEmployees * 2);\n\t\t\t}\n\t\t\t\n\t\t\temployeeData[numOfEmployees] = a;\n\t\t\tnumOfEmployees++;\t\n\t\t}\n\t}", "public int setNumHours(int num_hours) {\n\t\tif (isValidHours(num_hours)) {\n\t\t\tthis.num_hours = num_hours;\n\t\t\tsuper.resetPaid();\n\t\t}\n\t\treturn this.num_hours;\n\t}", "public double getTotalHoursWorkedOnTimesheet() {\n\t\tdouble overallTotal = 0;\n\t\tfor (TimesheetRow ts : timesheetRowList) {\n\t\t\toverallTotal += ts.getTotalHours();\n\t\t}\n\t\treturn overallTotal;\n\t}", "private void addEntry(int hour, int minute, int period, String name) {\n\n //A new instance of GregorianCalendar will initially be set for the time of its creation.\n GregorianCalendar alarmTime = new GregorianCalendar();\n\n alarmTime.set(Calendar.HOUR, hour);\n alarmTime.set(Calendar.MINUTE, minute);\n alarmTime.set(Calendar.SECOND, 0);\n alarmTime.set(Calendar.AM_PM, period);\n\n //If the alarm's time has already happened today reschedule it for tomorrow\n if (alarmTime.before(GregorianCalendar.getInstance())) {\n alarmTime.add(Calendar.DATE, 1);\n }\n\n AlarmTask alarmTask = new AlarmTask(name, entryNumber);\n AlarmTask.schedule(alarmTask, alarmTime.getTime());\n\n AlarmsEntryPanel alarmEntry = new AlarmsEntryPanel(hour, minute, period, name, entryNumber);\n System.out.println(\"Adding new alarm entry: \" + name);\n\n //Validate calls are required to correctly adjust the scroll sliders.\n entryContainerPanel.add(alarmEntry);\n entryContainerPanel.validate();\n entryContainerScrollPane.validate();\n\n entryNumber++;\n }", "public double getTimeEntryTodayHoursSum()\n throws RedmineException\n {\n return getTimeEntryHoursSum(today());\n }", "public void addHero(Hero h) {\r\n if (team.size() < MAX_MEMBER_IN_A_TEAM) {\r\n team.add(h);\r\n }\r\n }", "public final native double setHours(int hours, int mins, int secs) /*-{\n this.setHours(hours, mins, secs);\n return this.getTime();\n }-*/;", "public void addTime(Time a){\n\t\ttimes.add(a);\n\t}", "@Override\r\n public final double getTotalParkingFee(double hours) throws IllegalHoursException {\r\n \r\n int iHours = (int) hours;\r\n \r\n if (hours < 0){\r\n throw new IllegalHoursException();\r\n }\r\n if ( iHours <= getMinHours()){\r\n totalParkingFee = getMinCharge();\r\n } else {\r\n totalParkingFee = getMinCharge() + ((iHours - getMinHours()) * getPerHour());\r\n }\r\n return totalParkingFee;\r\n }", "public void add(byte[] hash) {\n byte[] firstHash = new byte[4];\n added++;\n for (int i = 0; i < 3; i++) {\n System.arraycopy(hash, i * 4, firstHash, 0, 4);\n setBit(firstHash);\n }\n }", "public void addRecords(double hoursDriven, double hr, double vehicleSpeed) {\n x.format(\"Hours\", \" \", \"Distance Traveled\");\n x.format(\"----------------------------------------------------------------------\");\n \n while (hoursDriven >= 1) {\n x.format(\" \" + hr + \" \" + hr * vehicleSpeed + \" miles\");\n hr++;\n hoursDriven--;\n }\n }", "private void addToDailyReport(String day, double empHours, double empPay)\r\n\t{\r\n\t\t//reset singleDay just in case\r\n\t\tDailyHours singleDay = null;\r\n\t\t\r\n\t\t//call the findEntryByDate method to find the date\r\n\t\tsingleDay = findEntryByDate(day);\r\n\t\t\r\n\t\t//if the date is not found, create a new date object.\r\n\t\tif(singleDay == null)\r\n\t\t{\r\n\t\t\t//date not found, so create a new date object\r\n\t\t\tsingleDay = new DailyHours(day);\r\n\t\t\t\r\n\t\t\t//add the day to our inventory\r\n\t\t\tdailyHourLog.add(singleDay);\r\n\t\t}//end create new day \r\n\t\t\r\n\t\t//add the employee hours and pay to that day\r\n\t\tsingleDay.addHours(empHours);\r\n\t\tsingleDay.addPay(empPay,empHours);\r\n\t}", "public void add(int number) {\n sum.add(number);\n }", "public static int totalCreditHours(){\n int total = 0; //stores total credit hours\n for (int credit: courseCredithourList){\n total += credit;\n }\n return total;\n }", "public AbsTime add(RelTime t2) throws ArithmeticException\n {\n // The result of the addition.\n long res;\n // The result of the addition as an object.\n AbsTime resObj;\n\n // Check this for ASAP.\n if (isASAP()) {\n throw new ArithmeticException(\"t2 == ASAP\");\n }\n\n // Check this for NEVER.\n if (isNEVER()) {\n // Never plus anything gives never.\n resObj = NEVER;\n } else {\n // Add the offset. Check for a negative result.\n res = itsValue + t2.itsValue;\n if (res <= 0) {\n throw new ArithmeticException(\"overflow\");\n }\n resObj = new AbsTime(res);\n }\n\n // Return the new time.\n return resObj;\n }", "public void addTime(long time)\r\n {\r\n listOfTimes.add(time);\r\n }", "private int getHours() {\n //-----------------------------------------------------------\n //Preconditions: none.\n //Postconditions: returns the value for the data field hours.\n //-----------------------------------------------------------\n\n return this.hours;\n\n }", "public void createHourly(String name, String math, String say, String iq, double hours, double wage) {\n workers.add(new HourlyWorker(name, math, say, iq, hours, wage));\n }", "public void setEHour(int ehour)\r\n\t{\r\n\t\tthis.ehour = ehour;\r\n\t}", "public final native double setUTCHours(int hours) /*-{\n this.setUTCHours(hours);\n return this.getTime();\n }-*/;", "public static Date addHours(final Date date, final int amount) {\n final Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n calendar.add(Calendar.HOUR_OF_DAY, amount);\n return calendar.getTime();\n }", "public double getHours(){\n return hours;\n }", "public void addOccupants(int numOfOccupants)\n { occupants+= numOfOccupants;\n }", "public int getHours() {\r\n return FormatUtils.uint8ToInt(mHours);\r\n }", "public void setNumberOfHoursWorked(int numberOfHoursWorked) {\n this.numberOfHoursWorked = numberOfHoursWorked;\n }", "public void addEmployee(Map<String, String> employee) {\r\n\t\tEmployee employees = new Employee(Integer.parseInt(employee.get(\"id\")), employee.get(\"name\"));\r\n\t\temployee1.put(Integer.parseInt(employee.get(\"id\")), employees);\r\n\t}", "public void addEnergy(int e){\n if(e + energy < 0)\n energy = 0;\n else if(e + energy > MAX_ENERGY)\n energy = MAX_ENERGY;\n else\n energy += e;\n }", "public void increaseEntered() {\n numTimesEntered++;\n }", "public void advanceHour(long hour) {\n clock = Clock.offset(clock, Duration.ofHours(hour));\n }", "public com.exacttarget.wsdl.partnerapi.HourlyRecurrence addNewHourlyRecurrence()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.HourlyRecurrence target = null;\n target = (com.exacttarget.wsdl.partnerapi.HourlyRecurrence)get_store().add_element_user(HOURLYRECURRENCE$0);\n return target;\n }\n }", "public void add (EmpEachShift empEachShift) {\n\t\tempEachShiftList.add(empEachShift);\n\t}", "public void workingHours(String monitoringText) {\r\n Path filePath = Paths.get(monitoringText);\r\n String[] lines = ReadFromFile.readFile(filePath.toAbsolutePath().toString());\r\n for (String line : lines) {\r\n String[] line1 = line.split(\"\\t\");\r\n if (line1[0].equals(registerNumber)) {\r\n workingHours.add(Integer.parseInt(line1[1]));\r\n workingHours.add(Integer.parseInt(line1[2]));\r\n workingHours.add(Integer.parseInt(line1[3]));\r\n workingHours.add(Integer.parseInt(line1[4]));\r\n }\r\n }\r\n }", "public void addHouse(House h) {\n\t\tObject[][] newContents = new Object[this.contents.length + 1][2];\n\n\t\tfor (int i = 0; i < this.contents.length; i++) {\n\t\t\tnewContents[i][0] = this.contents[i][0];\n\t\t\tnewContents[i][1] = this.contents[i][1];\n\t\t}\n\t\t\n\t\tnewContents[this.contents.length][0] = h.getZipCode();\n\t\tnewContents[this.contents.length][1] = h.getCity();\n\t\t\n\t\tHouse[] newHousesArray = new House[this.housesArray.length + 1];\n\t\tfor (int i = 0; i < this.housesArray.length; i++) {\n\t\t\tnewHousesArray[i] = this.housesArray[i];\n\t\t}\n\t\t\n\t\tnewHousesArray[this.housesArray.length] = h;\n\t\t\n\t\tthis.housesArray = newHousesArray;\n\t\t\n\t\tthis.contents = newContents;\n\t\t\n\t\tthis.fireTableDataChanged();\n\t}", "public int getHours(){\n return (int) totalSeconds/3600;\n }", "public AbsTime add(long t2) throws ArithmeticException\n {\n return add(RelTime.factory(t2));\n }", "public static void addEndTime(double time) {\n endTimeTotal = endTimeTotal + time;\n if (time > maxEndTime) {\n maxEndTime = time;\n }\n }", "@Override\n public double getCost(int hours) {\n\n if (hours < 2) {\n\n return 30;\n } else if (hours < 4) {\n\n return 70;\n } else if (hours < 24) {\n\n return 100;\n } else {\n\n int days = hours / 24;\n return days * 100;\n }\n }", "public void displayOfficeHours(){\n\t\tSystem.out.println(\"office hours \" + this.officeHourDay + \" from \" + (this.officeHourTime) + \" to \" + (this.officeHourTime + 2));\n\t}", "public void setHour(int newHour) {\n hour = newHour; // sets the appointment's hour to the input in military time\n }", "public void setEstimatedHours(java.lang.Object estimatedHours) {\n this.estimatedHours = estimatedHours;\n }", "public void setCreditHours(int creditHours) {\n this.creditHours = creditHours;\n }" ]
[ "0.68432117", "0.6761693", "0.6676665", "0.6287085", "0.62647", "0.6188421", "0.60651594", "0.605404", "0.6049683", "0.597879", "0.5945047", "0.5907558", "0.5868181", "0.575357", "0.5728706", "0.57276565", "0.5713381", "0.56326157", "0.56292015", "0.56174165", "0.5590566", "0.5576291", "0.5544579", "0.553397", "0.5521452", "0.5516916", "0.5472253", "0.5471584", "0.54626584", "0.54426557", "0.54407924", "0.5402187", "0.5361071", "0.5347475", "0.5330528", "0.5303482", "0.5288047", "0.5285668", "0.52826405", "0.5253584", "0.5242224", "0.52369606", "0.52320117", "0.5227724", "0.5225297", "0.5223428", "0.5219704", "0.51983005", "0.51914364", "0.5169129", "0.51070833", "0.51003575", "0.51003575", "0.5047913", "0.5031993", "0.49960816", "0.49939236", "0.49922484", "0.4991926", "0.49791586", "0.4956433", "0.49503356", "0.49462986", "0.49452418", "0.494047", "0.492124", "0.49174583", "0.49067715", "0.4903177", "0.48990428", "0.4898867", "0.48874372", "0.48847347", "0.487104", "0.48693612", "0.48676768", "0.4865141", "0.48573628", "0.4855003", "0.48518255", "0.4848271", "0.48426172", "0.4814747", "0.48034865", "0.48027015", "0.479431", "0.4789687", "0.4788805", "0.47852743", "0.47793642", "0.47778913", "0.47736803", "0.4773189", "0.4767199", "0.47520062", "0.4751632", "0.4750172", "0.47483355", "0.474245", "0.47160363" ]
0.6505855
3
Computes and returns the pay for this hourly employee. Hourly workers are paid according to the number of hours worked at a set Rate. Once they have been paid, the number of hours worked is reset.
public double pay() { double pay = hoursWorked * payRate; hoursWorked = 0; return pay; //IMPLEMENT THIS }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double calculatePay() \r\n\t{\r\n\t\treturn (payRate*hoursWorked);\r\n\t}", "@Override\n\tpublic int calculateSalary() {\n\t\treturn this.getPaymentPerHour() * this.workingHours;\n\t}", "int weeklyPay(int hoursWorked, int hourlyRate) {\n if (hoursWorked < 0 || hourlyRate < 0) {\n return 0;\n }\n\n if (hoursWorked > 40) {\n //return (hoursWorked * hourlyRate) + ((hoursWorked - 40) * (hourlyRate * 2)); //logic error - incorrect answer\n //return (40 * hourlyRate) + ((hoursWorked - 40) * (hourlyRate * 2)); //works\n return (hoursWorked * hourlyRate) + ((hoursWorked - 40) * hourlyRate); //also works\n }\n else {\n return hoursWorked * hourlyRate;\n }\n }", "@Override\n public double calculatePay(double numHours) {\n double hourlyRate = this.getSalary() / (40 * 52);\n return hourlyRate * 40 + hourlyRate * 1.5 * (numHours - 40);\n }", "protected double getPay() {\n\t\tint extraHrs = 0;\n\t\tif (this.hoursWrkd > 40) {\n\t\t\textraHrs = this.hoursWrkd - 40;\n\t\t\treturn (hourlyRate * 40) + (extraHrs * (hourlyRate * 1.5));\n\t\t} else {\n\t\t\treturn hoursWrkd * hourlyRate;\n\t\t}\t\t\n\t}", "private double calculate(boolean salary, double employeeShift, double hrsIn, double payRate){\n\n if (salary){// --------- Salaried employee\n return payRate * hrsIn;\n }\n\n if (employeeShift == 2){\n payRate = payRate * 0.05 + payRate;// ------------ adjust payRate for 2nd shift --------\n\n }\n\n if (employeeShift == 3){\n payRate = payRate * 0.10 + payRate;// ------------ adjust payRate for 3rd shift --------\n\n }\n\n if (hrsIn <= 40) {//----------- check for overtime\n return hrsIn * payRate;//--------No O.T.\n }\n else{// ----------- Calculate O.T. rate\n double otHrs = hrsIn - 40;\n double otRate = payRate * 1.5;\n return (payRate * 40) + (otHrs * otRate);\n }\n }", "@Override\n public double calculatePay(double nmHrs) {\n //52 weeks in a year and 40 hours per week\n double hrRate = getSalary() / (40*52);\n //calculate their weekly pay\n double paycheck = 40 * hrRate;\n //determine if they worked overtime and calculate it\n if (nmHrs > 40) {\n double OT = nmHrs - 40;\n double OTMoney = OT * (hrRate*1.5);\n return OTMoney + paycheck;\n }\n //else return their normal weekly paycheck\n else {\n return paycheck;\n }\n\n }", "public String payWorker() {\n\t\tString ret;\n\t\tif (!super.payWorker().isEmpty()) {\n\t\t\tNumberFormat formatter = new DecimalFormat(\"#0.00\");\n\t\t\tret = getName() + \" is an hourly Worker and is paid \" + formatter.format(getPayment());\n\t\t\tSystem.out.println(ret);\n\t\t\tthis.num_hours = 0;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\tret = getName() + \" has already been paid and needs to work more hours this week.\";\n\t\t\tSystem.out.println(ret);\n\t\t\treturn ret;\n\t\t}\n\t}", "@Override\n public double calculatePayDay()\n {\n double perWeekEarned = hourlyRate * hoursPerWeek;\n return (double)Math.round(perWeekEarned * 100) / 100;\n }", "public double calculatePayment (int hours);", "@Override\r\n\tpublic void calculateSalary() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t salary = hoursWorked * hourlyWages;\r\n\t\t this.setSalary(salary);\r\n\t}", "public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }", "public void calculateSalary() {\n if (hours < 0 || hourlyRate < 0) {\r\n salary = -1;\r\n }\r\n else if (hours > 40) {\r\n salary = 40 * hourlyRate;\r\n }\r\n else {\r\n salary = hours * hourlyRate;\r\n }\r\n }", "@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }", "public HourlyWorker (String fName, String lName, String empID, double hours, double hourlyRate) {\r\n super (fName, lName, empID);\r\n setHours(hours);\r\n setHourlyRate(hourlyRate);\r\n calculateSalary();\r\n }", "private static void hourlyEmployeeEarningReport(final HourlyEmployee hourlyEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(hourlyEmployee.getFirstName()).append(\" \").append(hourlyEmployee.getLastName());\r\n\r\n\t\tdouble weeklyPayAmount = 40 * hourlyEmployee.getHourlyRate();\r\n\r\n\t\t// Rate will be doubled if it’s beyond 40 hours/week.\r\n\t\tif (hourlyEmployee.getWeeklyWorkedHours() > 40) {\r\n\t\t\tdouble overtime = hourlyEmployee.getWeeklyWorkedHours() - 40;\r\n\t\t\tdouble overtimePay = overtime * (hourlyEmployee.getHourlyRate() * 2);\r\n\t\t\tweeklyPayAmount += overtimePay;\r\n\t\t}\r\n\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(weeklyPayAmount));\r\n\t}", "public double salaryPay() {\n\t\treturn overtimePay() + getSalary();\n\t}", "public double calculateSalary(double hoursWorked) {\n\t\tif(hoursWorked<=getNormalWorkweek()){\n\t\t\treturn ((getHourlyRate()*(hoursWorked))+(calculateOvertime(hoursWorked)));\n\t\t}else{\n\t\t\treturn ((getHourlyRate()*(getNormalWorkweek()))+(calculateOvertime(hoursWorked)));\n\t\t}\n\t}", "public double calculatePay() {\n\t\treturn 0;\r\n\t}", "public double pay(){\n\t\treturn payRate;\n\t}", "public static int computeEmpWageForCompany(String company ,int empRate,int numOfDays,int maxHrs) {\n\n int empHrs = 0;\n int totalEmpHrs = 0;\n int totalWorkingDays = 0;\n\n while (totalEmpHrs < maxHrs && totalWorkingDays < numOfDays) {\n totalWorkingDays ++;\n System.out.println(\"Day:\" + totalWorkingDays);\n\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_PART_TIME:\n System.out.println(\"Empcheck is 1 (parttime)\");\n empHrs = 4;\n break;\n case IS_FULL_TIME:\n System.out.println(\"Empcheck is 2 (fulltime)\");\n empHrs = 8;\n break;\n default:\n System.out.println(\"Empcheck is 0\");\n empHrs = 0;\n }\n totalEmpHrs = (totalEmpHrs + empHrs);\n System.out.println(\"Day : \" +totalWorkingDays+ \"Employee hours:\" + empHrs);\n }\n int totalEmpWage =totalEmpHrs * empRate;\n System.out.println(\"Total Employee wage for company : \" +company+ \"is \"+totalEmpWage);\n return totalEmpWage;\n }", "private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }", "public void work(int hours) {\n\t\twhile(age++ < RETIREMENT_AGE) {//Method calculates total salary earned\n\n\t\tfor(int i = 1; i<=hours; i++)\n\t\t\tearned += hourlyIncome;\n\t\t\n\t\tfor(int j = 1; j<=OVERTIME; j++)\n\t\t\tearned += hourlyIncome;\n\t\t}\n\t}", "public double earnings() {\r\n double earnings;\r\n double overtime;\r\n double overtimeRate = hourlyRate * 1.5;\r\n\r\n // if hours, hourlyRate, or salary is negative (default numerical values are -1) earnings is -1\r\n if (hours < 0 || hourlyRate < 0 || salary < 0) {\r\n earnings = -1;\r\n }\r\n else if (hours > 40) {\r\n overtime = (hours - 40) * overtimeRate;\r\n earnings = overtime + salary;\r\n }\r\n else {\r\n earnings = salary;\r\n }\r\n\r\n return earnings;\r\n }", "@Override\n public double calculateSalary(){\n return this.horas_trabajadas*EmployeeByHours.VALOR_HORA;\n }", "public HourlyWorker() {\n\t\tthis.num_hours = 1;\n\t\tthis.hourly_rate = 0.01;\n\t}", "public int getEmpRatePerHour()\t{\n\t\treturn EMP_RATE_PER_HOUR;\n\t}", "public int calculatePayDollarsPerHour() {\n int dollarsPerHour = BASE_RATE_DOLLARS_PER_HOUR;\n\n if (getHeight() >= TALL_INCHES && getWeight() < THIN_POUNDS)\n dollarsPerHour += TALL_THIN_BONUS_DOLLARS_PER_HOUR;\n if (isCanTravel())\n dollarsPerHour += TRAVEL_BONUS_DOLLARS_PER_HOUR;\n if (isSmokes())\n dollarsPerHour -= SMOKER_DEDUCTION_DOLLARS_PER_HOUR;\n\n return dollarsPerHour;\n }", "public double calculateWeeklyPay(){\r\n double weeklyPay = salary / 52.0;\r\n return weeklyPay;\r\n }", "@Override\n\tpublic Money hourlyCostRate() {\n\t\treturn costRate().hourly();\n\t}", "public HourlyWorker(String name, int age, int year_hired, int num_hours, double hourly_rate) {\n\t\tsuper(name, age, year_hired);\n\t\tthis.num_hours = 1;\n\t\tthis.hourly_rate = 0.01;\n\t\tif (isValidHours(num_hours) && isValidRate(hourly_rate)) {\n\t\t\tthis.num_hours = num_hours;\n\t\t\tthis.hourly_rate = hourly_rate;\n\t\t}\n\t}", "@Override\n public double earnings() {\n if (getHours() < 40)\n return getWage() * getHours();\n else\n return 40 * getWage() + ( getHours() - 40 ) * getWage() * 1.5;\n }", "public double getPayment() {\n\t\treturn getNumHours() * getHourlyRates();\n\t}", "@Override\n public double getCost(int hours) {\n\n if (hours < 2) {\n\n return 30;\n } else if (hours < 4) {\n\n return 70;\n } else if (hours < 24) {\n\n return 100;\n } else {\n\n int days = hours / 24;\n return days * 100;\n }\n }", "public static double hoursSpent()\n\t{\n\t\treturn 7.0;\n\t}", "public void determineWeeklyPay(){\r\n weeklyPay = commission*sales;\r\n }", "public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }", "public double getEarnings() {\n//\t\tif (hoursWorked > 40) {\n//\t\t\treturn (40 * hoursWorked) + \n//\t\t\t\t\t((hoursWorked - 40) * wagePerHour * 1.5);\n//\t\t} else {\n//\t\t\treturn hoursWorked * wagePerHour;\n//\t\t}\n\t\t\t\t// condition \n\t\treturn hoursWorked > 40 ? \n\t\t\t\t// condition true \n\t\t\t(40 * wagePerHour) + ((hoursWorked - 40) * wagePerHour * 1.5) \n\t\t\t\t// condition false\n\t\t\t: hoursWorked * wagePerHour;\t\n\t}", "@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}", "public void salary() {\n System.out.print(\"Wage: \");\n double wage = in.nextDouble();\n System.out.print(\"Hours: \");\n double hours = in.nextDouble();\n final double REG_HOURS = 40;\n final double OVERTIME_MULTIPLIER = 0.5;\n\n double salary = wage * hours;\n if (hours > REG_HOURS) {\n salary += (hours - REG_HOURS) * wage * OVERTIME_MULTIPLIER;\n }\n\n System.out.printf(\"\\nYou'll make $%,.2f this week.\\n\\n\", salary);\n }", "double calculateOvertime(double hoursWorked){\n\t\tif(hoursWorked<getNormalWorkweek()){\n\t\t\treturn(0.0);\n\t\t}else{\n\t\t\treturn((getHourlyRate()*2)*(hoursWorked-getNormalWorkweek()));\n\t\t}\n\t}", "public abstract double pay();", "@Override\r\n public int calculateSalary()\r\n {\r\n return weeklySalary*4;\r\n }", "public static void calculateDailyEmpWage()\n {\n\t\tint salary = 0;\n\t\tif(isPresent()){\n\t\t\tint empRatePerHr = 20;\n int PartTimeHrs = 4;\n salary = PartTimeHrs * empRatePerHr;\n\t\t\tSystem.out.println(\"Daily Part time Wage:\" +salary);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Daily Wage:\" +salary);\n\t\t}\n }", "public void getSalary() {\n this.payDay(this.monthlyIncome);\n }", "public static double calculateWage(final int ratePerHrs, final int totalHr)\n {\n return ratePerHrs * totalHr;\n }", "public void payAllEmployeers() {\n\t\t\n\t\tSystem.out.println(\"PAYING ALL THE EMPLOYEES:\\n\");\n\t\t\n\t\tfor(AbsStaffMember staffMember: repository.getAllMembers())\n\t\t{\n\t\t\tstaffMember.pay();\n\t\t\tSystem.out.println(\"\\t- \" + staffMember.getName() + \" has been paid a total of \" + staffMember.getTotalPaid());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\");\n\t}", "public static void main(String[] args) {\n Company myCompany = new Company();\n System.out.println(myCompany.getName());\n Worker oyelowo = new JuniorWorker(989.9);\n Worker Dan = new JuniorWorker(987.8);\n Worker Shane = new MidLevelWorker(34.5);\n Worker Dolan = new SeniorWorker(4567.8);\n Worker Maria = new SeniorWorker(84.3);\n SeniorWorker Sam = new SeniorWorker();\n JuniorWorker jim = new JuniorWorker(\"Jim\", \"HJK\", 1, 345.9);\n System.out.println(jim.getBalance());\n\n\n System.out.println(myCompany.getBalance() + \" \" +myCompany.getAuthorizationKey());\n\n\n\n myCompany.paySalary(1000.0, oyelowo);\n myCompany.paySalary(700.0, Dan);\n myCompany.paySalary(700.0, Dan);\n myCompany.paySalary(700.0, Dan);\n myCompany.paySalary(700.0, Dan);\n myCompany.paySalary(700.0, Dan);\n\n\n System.out.println();\n System.out.println(myCompany.getBalance());\n System.out.println(myCompany.getDebits());\n System.out.println(oyelowo.getBalance(myCompany));\n System.out.println(Dan.getBalance(myCompany));\n\n\n }", "private PtoPeriodDTO accruePto(PtoPeriodDTO init, Employee employee) {\n\n\t\tDouble hoursAllowed = init.getHoursAllowed().doubleValue();\n\t\tDouble daysInPeriod = init.getDaysInPeriod().doubleValue();\n\t\tDouble dailyAccrual = hoursAllowed / daysInPeriod;\n\n\t\tlog.info(\"Daily Accrual Rate for this PTO Period: \" + dailyAccrual);\n\n\t\t// Check what the current date is, take the number of days difference\n\t\t// Since the beginning of the period\n\t\t\n\t\tDate beginDate = determineBeginDate(employee);\t\t\n\t\tDate endDate = ZonedDateTimeToDateConverter.INSTANCE.convert(init.getEndDate());\n\t\tDate today = ZonedDateTimeToDateConverter.INSTANCE.convert(ZonedDateTime.now());\n\t\t\n\t\tLong diff = today.getTime() - beginDate.getTime();\n\t\tLong daysPassed = (long) ((TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS)));\n\t\tlog.info(\"Days Passed: \" + daysPassed);\n\t\tLong hoursAccrued = (long) ((TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS)) * dailyAccrual);\n\t\tlog.info(\"Hours: \" + hoursAccrued);\n\t\tinit.setHoursAccrued(hoursAccrued);\n\t\tinit = deductTimeOff(init);\n\t\treturn init;\n\t\t\n\t}", "public static double cal(final int ratePerHrs, final int totalHrs){\n\tfinal double cal= ratePerHrs*totalHrs;\n\treturn cal;\n}", "@Override\n public double getTotalCommission() {\n double cost = 0.0;\n //increase cost for each report in the order\n for (Report report : reports.keySet()) {\n //report cost depends on the WorkType\n //audits are not capped by max employee count\n //regular orders are limited by max employee count\n int employeeCount = reports.get(report);\n cost += workType.calculateReportCost(report, employeeCount);\n }\n //increase cost of order based on priority\n //critical orders increase based on their critical loading\n //regular orders don't have an effect\n cost = priorityType.loadCost(cost);\n return cost;\n }", "@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }", "public static void empWageForMonth()\n {\n int WagePerHrs = 20;\n double totalSalary = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHr = 0;\n int numWorkingDays = 20;\n double salary = 0;\n for (int day=1; day<=numWorkingDays; day++)\n { \n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHr = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n\n case 2:\n empHr = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHr = 0;\n\n }\t\t \n salary = (empHr * WagePerHrs);\n System.out.println(\"Daily Emp Wages is :\" +salary);\n totalSalary = (totalSalary + salary);\n System.out.println(\"Monthly emp salary:\" +totalSalary);\n\t\t}\n}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \n String emp1, emp2,emp3;\n int hours1, hours2, hours3;\n int xhours1, xhours2, xhours3;\n double rate1, rate2, rate3;\n double gross1, gross2, gross3;\n \n System.out.print(\"Enter first employee: \");\n emp1 = input.next();\n System.out.print(\"Enter second employee: \");\n emp2 = input.next();\n System.out.print(\"Enter third employee: \");\n emp3 = input.next();\n \n System.out.print(\"Enter the normal hours worked by \" + emp1+\" is: \");\n hours1 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by \"+ emp1+\" is: \");\n xhours1 = input.nextInt();\n System.out.print(\"Enter the rate for \" + emp1 + \" is: \");\n rate1 = input.nextDouble();\n gross1 = ((hours1*rate1) + (xhours1*(rate1/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n\",emp1,gross1);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp2);\n hours2 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \"+ emp2);\n xhours2 = input.nextInt();\n System.out.print(\"Enter the rate for : \"+ emp2);\n rate2 = input.nextDouble();\n gross2 = ((hours2*rate2) + (xhours2*(rate2/2)));\n System.out.printf(\"The gross pay for %s is: %2\\n\",emp2, gross2);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp3);\n hours3 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \" + emp3);\n xhours3 = input.nextInt();\n System.out.print(\"Enter the rate for: \" + emp3);\n rate3 = input.nextDouble();\n gross3 = ((hours3*rate3) + (xhours3*(rate3/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n: \",emp3, gross3);\n }", "public float calculate_salary() {\r\n\t\tfloat calculate = 1000 + this.calculate_benefits();\r\n\t\treturn calculate;\r\n\t}", "public static void empWage()\n {\n int WagePerHrs = 20;\n double DailyEmpWage = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHrs;\n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHrs = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n case 2:\n empHrs = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHrs = 0;\n }\n DailyEmpWage = WagePerHrs * empHrs;\n System.out.println(\"Daily Emp Wages is :\" +DailyEmpWage);\n }", "private float[] calculateAllGrossPay()\n {\n int numberEmployees = employees.size();\n float[] allGrossPay = new float[numberEmployees];\n int position = 0;\n Iterator<Employee> emp = employees.iterator();\n while(emp.hasNext())\n {\n myEmployee = emp.next();\n allGrossPay[position] = myEmployee.getHours() * myEmployee.getRate();\n position++;\n }\n return allGrossPay;\n }", "private static void calculateEmployeeWeeklyPay(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException {\r\n\t\tSystem.out.println(\"Enter Employee First Name: \");\r\n\t\tString firstName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Last Name: \");\r\n\t\tString lastName = reader.readLine();\r\n\r\n\t\tSystem.out.println(\"Enter Employee Type (Salaried or Hourly or Commissioned): \");\r\n\t\tString employeeType = reader.readLine();\r\n\r\n\t\tif (employeeType.equalsIgnoreCase(\"Salaried\")) {\r\n\t\t\tSystem.out.println(\"Please enter your monthly salary: \");\r\n\t\t\tdouble monthlySalary = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal SalariedEmployee salariedEmployee = new SalariedEmployee(firstName, lastName, employeeType, monthlySalary, false);\r\n\t\t\temployeeDetails.add(salariedEmployee);\r\n\r\n\t\t\tsalariedEmployeeEarningReport(salariedEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Hourly\")) {\r\n\r\n\t\t\tSystem.out.println(\"Please enter your hourly rate: \");\r\n\t\t\tdouble hourlyRate = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tSystem.out.println(\"Please enter your weekly worked hours: \");\r\n\t\t\tdouble weeklyWorkedHours = Double.parseDouble(reader.readLine());\r\n\r\n\t\t\tfinal HourlyEmployee hourlyEmployee = new HourlyEmployee(firstName, lastName, employeeType, weeklyWorkedHours, hourlyRate, false);\r\n\t\t\temployeeDetails.add(hourlyEmployee);\r\n\r\n\t\t\thourlyEmployeeEarningReport(hourlyEmployee);\r\n\r\n\t\t} else if (employeeType.equalsIgnoreCase(\"Commissioned\")) {\r\n\t\t\tSystem.out.println(\"Please enter your weekly sales amount: \");\r\n\t\t\tdouble weeklySalesAmount = Double.parseDouble(reader.readLine());\r\n\t\t\tfinal CommissionedEmployee commissionedEmployee = new CommissionedEmployee(firstName, lastName, employeeType, weeklySalesAmount, false);\r\n\t\t\temployeeDetails.add(commissionedEmployee);\r\n\r\n\t\t\tcommissionedEmployeeEarningReport(commissionedEmployee);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Invalid employee type\");\r\n\t\t}\r\n\t}", "@Override\r\n public String toString () {\r\n return \"HourlyWorker: \" + hours + \", \" + hourlyRate + \", \" + salary + \", \" + super.toString();\r\n }", "public double earnings()\r\n {\r\n /* write code to return the earnings for a PieceWorker */\r\n return getWage() * getPieces();\r\n }", "@Override \n public double getPaymentAmount() \n { \n return getWeeklySalary(); \n }", "public double getPayRate()\r\n\t{\r\n\treturn payRate;\r\n\t}", "public static double calculateEmployeePension(int employeeSalaryForBenefits) {\n double total = 0;\n try {\n Scanner stdin = new Scanner(System.in);\n\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n stdin.close();\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n Integer yearsEmployed = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if ( Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0]) ) {\n yearsEmployed--;\n }\n\n total = (((employeeSalaryForBenefits * 12) * 0.05) * yearsEmployed);\n\n\n\n\n System.out.println(\"Total pension to receive by employee based on \" + yearsEmployed + \" years with the company \" +\n \"(5% of yearly salary for each year, based on employee's monthly salary of $\" + employeeSalaryForBenefits + \"): \" + total);\n\n }\n catch (NumberFormatException e) {\n e.printStackTrace();\n }\n return total;\n }", "public double calculateChangeToGive() {\r\n\t\treturn amountPaid - amountToPay;\r\n\t}", "public HourlyWorker () {\r\n super ();\r\n hours = -1;\r\n hourlyRate = -1;\r\n salary = -1;\r\n }", "public double getHoursWorked()\r\n\t{\r\n\treturn hoursWorked;\r\n\t}", "public void setHourlyRate (double hourlyRate) {\r\n // if hourlyRate is negative, hourlyRate is 0\r\n if (hourlyRate < 0) {\r\n this.hourlyRate = 0;\r\n }\r\n else {\r\n this.hourlyRate = hourlyRate;\r\n }\r\n // calls calculateSalary to update the salary once hourlyRate is changed\r\n calculateSalary();\r\n }", "public void increaseSalary(double hIncrease,double hThreshold,double wIncrease,double wThreshold){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n System.out.print(\"\\nIncreased Salaries:\\n\");\n pw.print(\"\\nIncreased Salaries:\\n\");\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getRate()=='H'&&e.getSalary()<hThreshold){\n e.setSalary(e.getSalary()+hIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n else if(e.getRate()=='W'&&e.getSalary()<wThreshold){\n e.setSalary(e.getSalary()+wIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n p=p.getNext();\n }\n }", "public double getTotalHoursWorkedOnTimesheet() {\n\t\tdouble overallTotal = 0;\n\t\tfor (TimesheetRow ts : timesheetRowList) {\n\t\t\toverallTotal += ts.getTotalHours();\n\t\t}\n\t\treturn overallTotal;\n\t}", "public void calculatePayment() {\n\t\tdouble pay = this.annualSalary / NUM_PAY_PERIODS;\n\t\tsuper.setPayment(pay);\n\t}", "public void pay(Company company) {\n\n if (!checkBudgetAvailability(company, 0)) {\n throw new IllegalArgumentException(INSUFFICIENT_BUDGET_MESSAGE);\n }\n\n for (Employee employee : company.getEmployees()) {\n\n double salary = employee.getSalary();\n company.setBudget(company.getBudget() - salary);\n employee.setBankAccount(employee.getBankAccount() + salary);\n }\n }", "public int calculatingDailyWage() {\n\t\tsalary = workingHrs * wagePerHr;\n\t\treturn salary;\n\t}", "public static double calculateGross(double hours, double rate)\t// static \"double\"(return type) ~\n\t{\n\t\tdouble gross;\n\t\tgross = hours * rate;\n\t\tSystem.out.println(hours + \" hours at $\" + rate + \" per hour is $\" + gross);\n\t\treturn gross;\t// The value that is returned.\n\t}", "public static double calculateEmployeeBonus(int employeeSalaryForBenefits, int numberOfYearsWithCompany, String employeePerformance) {\n double total = 0;\n\n try {\n Scanner stdin = new Scanner(System.in);\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n numberOfYearsWithCompany = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if (Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0])) {\n numberOfYearsWithCompany--;\n }\n\n System.out.println(\"Please enter this year's performance, as indicated by HR: \");\n employeePerformance = stdin.nextLine();\n stdin.close();\n\n if (numberOfYearsWithCompany >= 1) {\n if (employeePerformance.equals(\"Excellent\")) {\n total = (employeeSalaryForBenefits * 0.15);\n } else if (employeePerformance.equals(\"Good\")) {\n total = (employeeSalaryForBenefits * 0.10);\n } else if (employeePerformance.equals(\"Average\")) {\n total = (employeeSalaryForBenefits * 0.05);\n } else if (employeePerformance.equals(\"Bad\")) {\n total = 0;\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(\"This will be the yearly bonus for this Employee's performance: \" + total);\n return total;\n }", "public PayrollRecord(String employee, double pay) {\n employeeName = employee;\n currentPay = pay;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(Payroll.OVERTIME_RATE);\n\t\tSystem.out.println(Payroll.REGULAR_WEEK);\n\t\tSystem.out.println(Payroll.LEVEL_ONE_PAY);\n\t\tSystem.out.println(Payroll.LEVEL_TWO_PAY);\n\t\tSystem.out.println(Payroll.LEVEL_THREE_PAY);\n\t\tSystem.out.println(Payroll.PayLevel.ONE);\n\t\tSystem.out.println(Payroll.PayLevel.TWO);\n\t\tSystem.out.println(Payroll.PayLevel.THREE);\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(Payroll.calculatePay(1, Payroll.PayLevel.ONE));\n\t\tSystem.out.println(Payroll.calculatePay(10, Payroll.PayLevel.TWO));\n\t\tSystem.out.println(Payroll.calculatePay(20, Payroll.PayLevel.THREE));\n\t\tSystem.out.println(Payroll.calculatePay(70, Payroll.PayLevel.TWO));\n\t\t\n\t\ttry {\n\t\t\t System.out.println(Payroll.calculatePay(100, Payroll.PayLevel.TWO));\n\t\t\t} catch (IllegalArgumentException ex) {\n\t\t\t System.out.println(\"failure\");\n\t\t\t}\n\t\t\n\t\tPayroll.REGULAR_WEEK = 20;\n\t\tSystem.out.println(Payroll.calculatePay(25, Payroll.PayLevel.TWO));\n\t\t\n\t\tPayroll.OVERTIME_RATE = 2;\n\t\tPayroll.REGULAR_WEEK = 40;\n\t\tSystem.out.println(Payroll.calculatePay(35, Payroll.PayLevel.TWO));\n\t\t\n\t\tPayroll.OVERTIME_RATE = 1.75;\n\t\tPayroll.REGULAR_WEEK = 40;\n\t\tPayroll.LEVEL_ONE_PAY = 12;\n\t\tSystem.out.println(Payroll.calculatePay(35, Payroll.PayLevel.ONE));\n\t\t\n\t\tPayroll.OVERTIME_RATE = 1.75;\n\t\tPayroll.REGULAR_WEEK = 25;\n\t\tPayroll.LEVEL_TWO_PAY = 30;\n\t\tSystem.out.println(Payroll.calculatePay(35, Payroll.PayLevel.TWO));\n\t\t\n\t\tPayroll.OVERTIME_RATE = 1.75;\n\t\tPayroll.REGULAR_WEEK = 40;\n\t\tPayroll.LEVEL_THREE_PAY = 50;\n\t\tSystem.out.println(Payroll.calculatePay(10, Payroll.PayLevel.THREE));\n\t}", "public double tuitionFee(){\n return this.creditHours*this.feePerCreditHour;\n }", "public double getCurrentPay() {\n return currentPay;\n }", "public WorkHours() {\n //default if not yet initialised\n this._startingHour=0.00;\n this._endingHour=0.00;\n }", "protected double getEmpPrimaryJobRate(WBData wbData) throws Exception {\n\n \tList jobList = wbData.getEmployeeJobList();\n \tEmployeeJobData jobData = null;\n \tEmployeeJobData primaryJobData = null;\n \tIterator i = null;\n \tdouble primaryJobRate = 0;\n\n \t// Find the primary job.\n \tif (jobList != null) {\n \t\ti = jobList.iterator();\n \t\twhile (i.hasNext()) {\n \t\t\tjobData = (EmployeeJobData) i.next();\n \t\t\tif (jobData.getEmpjobRank() == 1){\n\n \t\t\t\t// If a primary job was already found, then throw an exeception.\n \t\t\t\tif (primaryJobData != null) {\n \t\t\t\t\tthrow new NestedRuntimeException(\"Multiple Primary Job Rates exist.\");\n \t\t\t\t} else {\n \t\t\t\t\tprimaryJobData = jobData;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n\n \t// Find the job rate for the primary job.\n \tif (primaryJobData != null) {\n \t\tprimaryJobRate = wbData.getJobRate(primaryJobData.getJobId(), primaryJobData.getEmpjobRateIndex(), wbData.getWrksWorkDate());\n \t}\n\n \treturn primaryJobRate;\n }", "public double payRollAbcBusiness(EMP_T employee) {\n\t\tstrategy.setPayStrategy(business);\n\t\treturn strategy.payRoll(employee);\n\t}", "public double getHourlyRate()\n\t{\n\t\treturn hourlyRate;\n\t}", "public double payRollAbcProduction(EMP_T employee) {\n\t\tstrategy.setPayStrategy(production);\n\t\treturn strategy.payRoll(employee);\n\t}", "public PTEmployee(String n, String ssnum, String d, double rate, int hours) {\n\t\tsuper(n, ssnum, d);\n\t\tthis.hourlyRate = rate;\n\t\tthis.hoursWrkd = hours;\n\t}", "@Override\n public double computeProfitUsingRisk() {\n return (getVehiclePerformance() / getVehiclePrice()) * evaluateRisk();\n }", "public double getHourlyRate () {\n\t\treturn this.hourlyRate;\n\t}", "public void compute(){\r\n\r\n\t\ttotalCost=(capAmount*CAPCOST)+(hoodyAmount*HOODYCOST)+(shirtAmount*SHIRTCOST);\r\n\t}", "public int giveRaise() throws EmployeeSalaryException {\n try {\n if (this.yearsWorked % 3 == 0) {\n this.salary = (this.salary + 3000);\n this.yearsWorked++;\n if (this.salary > maxEmployeeSalary) {\n this.salary = maxEmployeeSalary;\n throw new EmployeeSalaryException();\n }\n } else {\n this.yearsWorked++;\n }\n } catch (EmployeeSalaryException ex) {\n ex.printStackTrace();\n System.out.println(\"Sorry maximum salary can only be: \" + maxEmployeeSalary);\n }\n return this.salary;\n }", "public double getHourlyRate() {\r\n return hourlyRate;\r\n }", "public double getHourlyRate() {\r\n return hourlyRate;\r\n }", "@Override\n public int computeProfit() {\n return getVehiclePerformance() / getVehiclePrice();\n }", "public void setHourlyRate(double hr)\n\t{\n\t\thourlyRate = hr;\n\t}", "public void setHoursWorked(double hoursWorked){\r\n\t\t// populate the owned hoursWorked from the given \r\n\t\t// function parameter\r\n\t\t\r\n\t\tthis.hoursWorked = hoursWorked;\r\n\t}", "public double getHourlyRate() {\n return hourlyRate;\n }", "private void processSalaryForEmployee(Epf epf, Esi esi, List<PayOut> payOuts,\r\n\t\t\tReportPayOut reportPayOut, PayrollControl payrollControl, List<LoanIssue> loanIssues, List<OneTimeDeduction> oneTimeDeductionList ) {\r\n\t\t\r\n\t\tPayRollProcessUtil util = new PayRollProcessUtil();\r\n\t\tBigDecimal netSalary = new BigDecimal(0);\r\n\t\tPayRollProcessHDDTO payRollProcessHDDTO = new PayRollProcessHDDTO();\r\n\t\t\r\n\t\tpayRollProcessHDDTO.setPayMonth(payrollControl.getProcessMonth());\r\n\t\tpayRollProcessHDDTO.setEpf(epf);\r\n\t\tpayRollProcessHDDTO.setEsi(esi);\t\r\n\t\tpayRollProcessHDDTO.setReportPayOut(reportPayOut);\r\n\t\tsetProfessionalTax(reportPayOut, payRollProcessHDDTO);\r\n\t\tList<PayRollProcessDTO> earningPayStructures = new ArrayList<PayRollProcessDTO>();\r\n\t\t\r\n\t\tDateUtils dateUtils = new DateUtils();\r\n\t\tDate currentDate = dateUtils.getCurrentDate();\r\n\t\t\r\n\t\t/*List<PayStructure> payStructures = attendanceRepository\r\n\t\t\t\t.fetchPayStructureByEmployee( reportPayOut.getId().getEmployeeId(), currentDate );*/\r\n\t\t\r\n\t\tlogger.info( \" reportPayOut.getId().getEmployeeId() \"+ reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tPayStructureHd payStructureHd = payStructureService.findPayStructure( reportPayOut.getId().getEmployeeId() );\r\n\t\t\r\n\t\tfor ( PayStructure payStructure : payStructureHd.getPayStructures() ) {\r\n\t\t\tif ( payStructure.getPayHead().getEarningDeduction() == null ) {\r\n\t\t\t\tPayHead payHead = payHeadService.findPayHeadById( payStructure.getPayHead().getPayHeadId() );\r\n\t\t\t\tpayStructure.setPayHead(payHead); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t processEarning( payOuts, reportPayOut, util, payRollProcessHDDTO, earningPayStructures, payStructureHd.getPayStructures() , payrollControl );\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t if (earningPayStructures != null && earningPayStructures.size() > 0) {\r\n\t\t\tpayRollProcessHDDTO.setTotalGrossSalary( reportPayOut.getGrossSalary() );\r\n\t\t\tpayOuts.addAll(calcualteDeduction( payRollProcessHDDTO, reportPayOut, payrollControl, payStructureHd ,loanIssues, oneTimeDeductionList ));\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t\t \r\n\t\t if ( reportPayOut.getGrossSalary() != null ) {\r\n\t\t\t netSalary = reportPayOut.getTotalEarning().subtract( reportPayOut.getTotalDeduction() );\r\n\t\t }\r\n\t\t\r\n\t\t reportPayOut.setNetPayableAmount( netSalary );\r\n\t}", "public void calculatePaintAndLabor(){\n this.numGallons = squareFeet/115;\n System.out.println(\"Number of Gallons: \" + numGallons);\n this.laborHours = numGallons * 8;\n System.out.println(\"Number of Hours: \" + laborHours);\n this.paintCost = numGallons * pricePerGallon;\n System.out.println(\"Price of Paint: $\" + paintCost);\n this.laborCost = laborHours * 20.00;\n System.out.println(\"Price of Labor: $\" + laborCost);\n this.totalCost = paintCost + laborCost;\n System.out.println(\"Total Cost: $\" + totalCost);\n\n }", "@Override\r\n public final double getTotalParkingFee(double hours) throws IllegalHoursException {\r\n \r\n int iHours = (int) hours;\r\n \r\n if (hours < 0){\r\n throw new IllegalHoursException();\r\n }\r\n if ( iHours <= getMinHours()){\r\n totalParkingFee = getMinCharge();\r\n } else {\r\n totalParkingFee = getMinCharge() + ((iHours - getMinHours()) * getPerHour());\r\n }\r\n return totalParkingFee;\r\n }", "@Override\n public Double computeCost(double time) {\n // get the time period and policy type\n int timePeriod = Integer.parseInt(period.substring(1, period.length()-1));\n char periodPolicy = period.charAt(period.length()-1);\n\n double finalPrice = 0.0;\n\n // compute the final price\n switch (periodPolicy) {\n case 'D':\n final int secondsPerDay = 86400;\n finalPrice = (time / (secondsPerDay * timePeriod)) * periodCost;\n break;\n case 'W':\n final int secondsPerWeek = 604800;\n finalPrice = (time / (secondsPerWeek * timePeriod)) * periodCost;\n break;\n case 'M':\n final int secondsPerMonth = secondsInMonth(2015, 10); // TODO do this based on real date\n finalPrice = (time / (secondsPerMonth * timePeriod)) * periodCost;\n break;\n case 'Y':\n final int secondsPerYear = 31536000;\n finalPrice = (time / (secondsPerYear * timePeriod)) * periodCost;\n break;\n }\n\n return finalPrice;\n }", "public double getTotalRequiredHours(CapTypeModel capType) throws RemoteException, AAException;", "public double runPrice(int age) {\n\t\t// PriceCRUD for calculating price later\n\t\tPriceCRUD<CinemaClassPrice> cinemaClassCRUD = new PriceCRUD<>(CinemaClassPrice.class);\n\t\tPriceCRUD<MovieTypePrice> movieTypeCRUD = new PriceCRUD<>(MovieTypePrice.class);\n\t\tPriceCRUD<DayPrice> dayCRUD = new PriceCRUD<>(DayPrice.class);\n\t\tPriceCRUD<AgePrice> ageCRUD = new PriceCRUD<>(AgePrice.class);\n\t\t\n\t\t// Get cinema class price\n\t\tCinemaCRUD<Cinema> cinemaCRUD = new CinemaCRUD<Cinema>(Cinema.class, Showtimes.getCineplexId());\n\t\tCinemaClass cinemaClass = cinemaCRUD.getCinemaType(this.showtimes.getCinemaId());\n\t\tCinemaClassPrice cinemaClassPrice = cinemaClassCRUD.getElementPrice(cinemaClass);\n\t\t\n\t\t// Get movie type price\n\t\tMovieCRUD<Movie> movieCRUD = new MovieCRUD<>(Movie.class);\n\t\tMovieType movieType = movieCRUD.getMovieById(this.showtimes.getMovieId()).getType();\n\t\tMovieTypePrice movieTypePrice = movieTypeCRUD.getElementPrice(movieType);\n\t\t\n\t\t// Get Day type price\n\t\tDayType dayType = DateTimeHelper.getDayType(this.showtimes.getDate());\n\t\tDayPrice dayTypePrice = dayCRUD.getElementPrice(dayType);\n\t\t\n\t\t// Get Age Range Price\n\t\tAgePrice agePrice = ageCRUD.getElementPrice(age);\n\t\t\n\t\t// Print receipt for 1 ticket\n\t\tSystem.out.println(cinemaClassPrice.toString());\n\t\tSystem.out.println(movieTypePrice.toString());\n\t\tSystem.out.println(dayTypePrice.toString());\n\t\tSystem.out.println(agePrice.toString());\n\t\tdouble ticketPrice = cinemaClassPrice.getPrice()+movieTypePrice.getPrice()+dayTypePrice.getPrice()+agePrice.getPrice();\n\t\tSystem.out.println(\"Ticket price: \"+ticketPrice);\n\t\t\n\t\treturn ticketPrice;\n\t}" ]
[ "0.76855046", "0.7054092", "0.704585", "0.6961781", "0.6880926", "0.6858682", "0.67437994", "0.6701204", "0.66481614", "0.6619194", "0.6605118", "0.65683496", "0.65626925", "0.6431937", "0.64268196", "0.6387923", "0.63751364", "0.6353249", "0.63143456", "0.6240648", "0.61869085", "0.61836797", "0.6161924", "0.6130908", "0.6119691", "0.60456884", "0.60437477", "0.60403365", "0.6038502", "0.6002607", "0.6000481", "0.5980379", "0.59770083", "0.5949243", "0.5929258", "0.5910944", "0.58987916", "0.5887715", "0.58630186", "0.5748552", "0.5748056", "0.5737262", "0.5726425", "0.57216245", "0.5716078", "0.5716065", "0.5683093", "0.5674844", "0.5652557", "0.5614941", "0.5610888", "0.56088126", "0.560175", "0.5573561", "0.5559091", "0.5539808", "0.5538017", "0.552439", "0.5509908", "0.5501321", "0.54985017", "0.54848164", "0.5468446", "0.5455788", "0.5448299", "0.54289365", "0.5417159", "0.54119754", "0.5400867", "0.53909236", "0.53815526", "0.5378866", "0.5367074", "0.53598803", "0.53452927", "0.53347385", "0.53283036", "0.53113365", "0.5307329", "0.5295468", "0.5285213", "0.527914", "0.5273324", "0.5269317", "0.52692026", "0.5267737", "0.5257239", "0.5251962", "0.52490497", "0.52490497", "0.52461565", "0.5228887", "0.5221664", "0.52117336", "0.5209094", "0.5208102", "0.52062", "0.5196481", "0.5195664", "0.51896214" ]
0.6883961
4
Returns information about this hourly employee as a string (including the number of hours worked).
public String toString() { return super.toString() + "\n" + "Hours Worked" + hoursWorked; //IMPLEMENT THIS }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getHours() {\n StringBuilder hoursSB = new StringBuilder();\n\n if (hours > 0) {\n hoursSB.append(hours);\n } else {\n hoursSB.append(\"0\");\n }\n\n return hoursSB.toString();\n }", "public String displayHours() {\n String hrs=day+\" Hours: \" +getStartHours()+ \" to \"+get_endingHour();\n return hrs;\n }", "public String toString() {\n\t\treturn \"Employee [firstname=\" + firstname + \", hours=\" + hours\n\t\t\t\t+ \", lastname=\" + lastname + \", payrate=\" + payrate\n\t\t\t\t+ \", totalpay=\" + totalpay + \"]\";\n\t}", "@Override\r\n public String toString () {\r\n return \"HourlyWorker: \" + hours + \", \" + hourlyRate + \", \" + salary + \", \" + super.toString();\r\n }", "public HourlyEmployee getEmployee() {\n\t\treturn employee;\n\t}", "@Override\n public String toString(){\n return String.format(\"Hourly Employee : %s\\n%s : %,.2f\", \n super.toString(), \"Hourly Wage\", getWage());\n }", "public String getHours();", "public String toString(){\n return \"Employee First Name: \" + firstName \t\n + \", Surname: \" + secondName\n + \", Hourly Rate \" + hourlyRate;\n }", "public String getWorkinghours() {\n int seconds = workinghours % 60;\n int minutes = (workinghours / 60) % 60;\n int hours = (workinghours / 60) / 60;\n String secs;\n String mins;\n String hourse;\n\n if (seconds < 10) {\n secs = \":0\" + seconds;\n } else {\n secs = \":\" + seconds;\n }\n if (minutes < 10) {\n mins = \":0\" + minutes;\n } else {\n mins = \":\" + minutes;\n }\n if (hours < 10) {\n hourse = \"0\" + hours;\n } else {\n hourse = \"\" + hours;\n }\n return hourse + mins + secs;\n }", "public String getWorkHours() {\r\n\t\treturn workHours;\r\n\t}", "public String getOperatingHours() {\n return mOperatingHours;\n }", "public String calculateHour() {\n\t\tString hora;\n\t\tString min;\n\t\tString seg;\n\t\tString message;\n\t\tCalendar calendario = new GregorianCalendar();\n\t\tDate horaActual = new Date();\n\t\tcalendario.setTime(horaActual);\n\n\t\thora = calendario.get(Calendar.HOUR_OF_DAY) > 9 ? \"\" + calendario.get(Calendar.HOUR_OF_DAY)\n\t\t\t\t: \"0\" + calendario.get(Calendar.HOUR_OF_DAY);\n\t\tmin = calendario.get(Calendar.MINUTE) > 9 ? \"\" + calendario.get(Calendar.MINUTE)\n\t\t\t\t: \"0\" + calendario.get(Calendar.MINUTE);\n\t\tseg = calendario.get(Calendar.SECOND) > 9 ? \"\" + calendario.get(Calendar.SECOND)\n\t\t\t\t: \"0\" + calendario.get(Calendar.SECOND);\n\n\t\tmessage = hora + \":\" + min + \":\" + seg;\n\t\treturn message;\n\n\t}", "public String toString() {\n \tString ret;\n \tint sumWait = 0;\n \tfor(Teller t : employees)\n \t{\n \t\tsumWait += t.getSumWaitTime();\n \t}\n \t\n \tret = \"Total elapsed time: \" + clock;\n \tret = ret + \"\\nTotal customers helped: \"+ numCust;\n \tret = ret + \"\\nAvg. wait time: \"+String.format(\"%.3f\",(float)sumWait/numCust);\n \tfor(Teller t : employees)\n \t{\n \t\tret = ret + \"\\nTeller \"+t.getID()+\": % time idle: \"+String.format(\"%.3f\",(float)(100*t.getIdleTime())/clock)+\" Number of customers helped: \"+t.getNumHelped();\n \t}\n \treturn ret;\n }", "public String getCurrentHours() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public String EmployeeSummary(){\r\n\t\treturn String.format(\"%d\\t%d\\t\\tJunior\\t\\t$%,.2f\\t\\t$%,.2f\\r\\n\", getID(), getYearHired(), getBaseSalary(), CalculateTotalCompensation());\r\n\t}", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "public int getHours() {\n return this.hours;\n }", "public String getTotalLearnlabHours() {\n return this.totalLearnlabHours;\n }", "java.lang.String getBusinesshours();", "public double getHours() {\r\n return hours;\r\n }", "public double getHours() {\r\n return hours;\r\n }", "public int getHour()\n {\n return hour;\n }", "private int getHours() {\n //-----------------------------------------------------------\n //Preconditions: none.\n //Postconditions: returns the value for the data field hours.\n //-----------------------------------------------------------\n\n return this.hours;\n\n }", "public int getHour() {\n return hour; // returns the appointment's hour in military time\n }", "@Override\n public String getSavingsHours() {\n\n final String savingsHrs = getElement(getDriver(), By.className(SAVINGS_HOURS), TINY_TIMEOUT)\n .getText();\n setLogString(\"Savings Hours:\" + savingsHrs, true, CustomLogLevel.HIGH);\n return savingsHrs.substring(savingsHrs.indexOf(\"(\") + 1, savingsHrs.indexOf(\"h\"));\n }", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"\\nEmployees: \" + getEmployees();\n\t}", "public String toString()\n\t//return employee values\n\t{\n\t\treturn \"Id \" + id + \" Start date \" + start + \" Salary \" + salary + super.toString() + \" Job Title \" + jobTitle;\n\t}", "@Override\n\tpublic String toString() {\n\t\tStringBuffer s1 = new StringBuffer();\n\t\ts1.append(\"Employee name : \");\n\t\ts1.append(this.name);\n\t\ts1.append(\" Id is: \");\n\t\ts1.append(Integer.toString(this.id));\n\t\ts1.append(\" salary is \");\n\t\ts1.append(Integer.toString(this.salary));\n\t\treturn s1.toString();\n\n\t}", "public int getHour() {\n\t\treturn this.hour;\n\t}", "public String toString() {\r\n\t\treturn String.format(\"This is a junior employee. ID is %d, hired since %d, and commission is $%,.2f.\\r\\n\", \r\n\t\t\tgetID(), getYearHired(), getCommission());\r\n\t}", "public String getDateHourRepresentation()\n\t{\n\t\tchar[] charArr = new char[13];\n\t\tcharArr[2] = charArr[5] = charArr[10] = '/';\n\t\tint day = m_day;\n\t\tint month = m_month;\n\t\tint year = m_year;\n\t\tint hour = m_hour;\n\t\tfor(int i = 0; i < 2; i++)\n\t\t{\n\t\t\tcharArr[1 - i] = Character.forDigit(day % 10, 10);\n\t\t\tcharArr[4 - i] = Character.forDigit(month % 10, 10);\n\t\t\tcharArr[12 - i] = Character.forDigit(hour % 10, 10);\n\t\t\tday /= 10;\n\t\t\tmonth /= 10;\n\t\t\thour /=10;\n \t\t}\n\t\tfor(int i = 0; i < 4; i++)\n\t\t{\n\t\t\tcharArr[9 - i] = Character.forDigit(year % 10, 10);\n\t\t\tyear /= 10;\n\t\t}\n\t\treturn new String(charArr);\n\t}", "public String toString() {\n\t\treturn hours + \"h\" + minutes + \"m\";\n\t}", "public String toString() {\n return \"Employee Id:\" + id + \" Employee Name: \" + name+ \"Employee Address:\" + address + \"Employee Salary:\" + salary;\n }", "public int getHour() {\n\t\treturn hour;\n\t}", "public int getHour() {\n\t\treturn hour;\n\t}", "public String getEmployeeNum() {\n return employeeNum;\n }", "public double getHour() {\n\t\treturn this.hour;\n\t}", "public String toString() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"M/d/yyyy\");\n\t\treturn employeeName + \" \" + EID + \" \" + address + \" \" + phoneNumber + \" \" + sdf.format(DOB) + \" \" + securityClearance;\n\t}", "public int getHour() { return this.hour; }", "public String getEmployeeInfo() throws SQLException {\n String SQL = String.format(\"SELECT * FROM %s\", DbSchema.table_employees.name);\n Statement statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n ResultSet results = statement.executeQuery(SQL);\n\n //Prepare format stuff\n String tableHeader = String.format(\"%s %s %s %s %s\\n\", table_employees.cols.id, table_employees.cols.first_name, table_employees.cols.last_name, table_employees.cols.age, table_employees.cols.salary);\n StringBuilder output = new StringBuilder(tableHeader);\n DecimalFormat format = new DecimalFormat(\"#,###.00\");\n\n while (results.next()) {\n //Iterate through each row (employee) and add each bit of info to table\n String row = String.format(\"%s %s %s %s %s\\n\",\n results.getInt(table_employees.cols.id),\n results.getString(table_employees.cols.first_name),\n results.getString(table_employees.cols.last_name),\n results.getInt(table_employees.cols.age),\n format.format(results.getDouble(table_employees.cols.salary)));\n output.append(row);\n }\n return output.toString();\n }", "public Integer getHour() {\n\t\treturn hour;\n\t}", "public String getRestaurantHours() {\n return mRestaurantHours;\n }", "public int getOccupiedHours(){\n \t\treturn getOccupiedMinutes()/60;\n \t}", "public long getElapsedTimeHour() {\n return running ? ((((System.currentTimeMillis() - startTime) / 1000) / 60 ) / 60) : 0;\n }", "public double getHoursWorked()\r\n\t{\r\n\treturn hoursWorked;\r\n\t}", "public int getHours() {\r\n return FormatUtils.uint8ToInt(mHours);\r\n }", "public Integer getHour() {\n return hour;\n }", "public String getRecord() {\n return \"Employee name: \\t\" + employeeName + \"\\n\" +\n \"Employee pay:\\t$\" + String.format(\"%.2f\",currentPay);\n }", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRDateUtils.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n\n }", "public String getHora() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n return sdf.format(calendario.getTime());\n }", "public String toString(){\r\n return String.format(\"%-15s%-15s%-30s%,8.2f\", this.employeeFirstName, \r\n this.employeeLastName, this.employeeEmail, getBiweeklySalary());\r\n }", "public int getHour() {\n return dateTime.getHour();\n }", "public String getEmployeeNumber() {\n return (String)getAttributeInternal(EMPLOYEENUMBER);\n }", "public int getHour(){\n return hour;\n }", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRUtility.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n }", "@Override\r\n public String toString() {\r\n return \"Employee{\" + super.toString() + \", \" + \"employeeNumber=\" + employeeNumber + \", salary=\" + salary + '}';\r\n }", "public int getHour() \n { \n return hour; \n }", "@Override\n public String toString(){\n String empDetails = super.toString() + \"::FULL TIME::Annual Salary \"\n \t\t+ doubleToDollar(this.annualSalary);\n return empDetails;\n }", "public void displayOfficeHours(){\n\t\tSystem.out.println(\"office hours \" + this.officeHourDay + \" from \" + (this.officeHourTime) + \" to \" + (this.officeHourTime + 2));\n\t}", "public java.lang.Object getEstimatedHours() {\n return estimatedHours;\n }", "public String toString() {\n\t\tdouble hour = getHour();\n\t\tString h = (hour < 10 ? \" \" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + hour;\n\n\t\treturn \"(YYYY/MM/DD) \" + getYear() + \"/\" + (getMonth() < 10 ? \"0\" : \"\") + getMonth() + \"/\"\n\t\t\t\t+ (getDay() < 10 ? \"0\" : \"\") + getDay() + \", \" + h + \"h \" + (getCalendarType() ? \"(greg)\" : \"(jul)\")\n\t\t\t\t+ \"\\n\" + \"Jul. Day: \" + getJulDay() + \"; \" + \"DeltaT: \" + getDeltaT();\n\t}", "public String getEmployeeDetails(int employeeId) {\n\treturn employeeService.getEmployeeDetails(employeeId).toString(); \n }", "String getHighScoreTime() {\n return getStringStat(highScoreTime);\n }", "public String getFullHour()\n {\n\n String str = \"\";\n\n if (hour < 10)\n {\n str += \"0\";\n }\n str += hour + \":\";\n\n if (minute < 10)\n {\n str += \"0\";\n }\n str += minute;\n\n return str;\n }", "public String getAttractionHours() {\n return mAttractionHours;\n }", "public int getHour() {\n\t\tthis.hour = this.total % 12;\n\t\treturn this.hour;\n\t}", "public String toString(){\r\n return getNumber() + \":\" + getLastName() + \",\" + getFirstName() + \",\" + \"Sales Employee\";\r\n }", "public double getHours(){\n return hours;\n }", "public int[] getHours() {\n int[] hoursArray = {this.hours, this.overtimeHours};\n return hoursArray;\n }", "public final String getNum_emp() {\n return getString(getNum_empAttribute(getMtDatabase()));\n }", "public String toString(){\n String s = \"\";\n s+=\"Employee: \"+name+\"\\n\";\n s+=\"Employee ID: \" + idnum +\"\\n\";\n s+=\"Current Position: \"+position+\"\\n\";\n s+=\"Current Salary: $\" +salary+\"\\n\";\n s+=\"Vacation Balance: \" + vacationBal+ \" days\\n\";\n s+=\"Bonus: $\" +annualBonus+\"\\n\";\n return s;\n }", "@Override \n public String toString() \n { \n return String.format(\"salaried employee: %s%n%s: $%,.2f\",\n super.toString(), \"weekly salary\", getWeeklySalary());\n }", "java.lang.String getEmployeeName();", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"----\" + \"Employee [salary=\" + salary + \", profession=\" + profession + \"]\";\n\t}", "public HourlyDetail() {\n\t\tthis.numberOfShiftBeginning = 0;\n\t\tthis.numberOfShiftEnding = 0;\n\t\tthis.costPerHour = 0;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Employee [id=\" + id + \", name=\" + name + \", salary=\" + salary + \", designation=\" + designation\r\n\t\t\t\t+ \", department=\" + department + \", address=\" + address + \"]\";\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Name is \" + empName + \"\\nEmp ID is \" + empID + \"\\nIncome=\" + annualIncome + \"\\nIncome Tax=\" + incomeTax\r\n\t\t\t\t+ \"\";\r\n\t}", "public String getHoursOfOperationId() {\n return this.hoursOfOperationId;\n }", "@Override\n public String toString() {\n return \"Credit hours: \" + this.creditHours + \"\\nFee per credit hour: $\" + this.feePerCreditHour + \"\\nScholarship amount: $\" + this.scholarshipAmount + \"\\nHealth insurance amount per annum: $\" + this.healthInsurancePerAnnum ;\n }", "public String getEventInfo()\n {\n return \"Event ID: \" + this.hashCode() + \" | Recorded User\\n\" + String.format(\"\\tName %s \\n\\tDate of Birth %s \\n\\tEmail %s \\n\\tContact Number %s \\n\\tAge %d \\nDate %s \\nTime %s \\nParty Size %d \\nEstablishment \\n\\tName: %s \\n\\tAddress: %s\",\n user.getName(), user.getDateOfBirthAsString(), user.getEmail(), user.getPhoneNumber(), \n user.getAge(), getEventDateAsString(), getEventTimeAsString(), partyNumber, establishment.getName(), establishment.getAddress());\n }", "public String getTime() {\n return String.format(\"%02d\", hours) + \":\" + String.format(\"%02d\", minutes);\n }", "public int getHoursWorked() {\n\t\treturn this.hoursWrkd;\n\t}", "public String getEmployees() {\n\t\tString s = \"\";\n\t\tfor (Employee e : employees) {\n\t\t\ts = s + e.getName() + \", \";\n\t\t}\n\t\ts = s.substring(0, s.length() - 2);\n\t\treturn s;\n\t}", "public Employee getHRhead();", "public String getEmployeeName() {\n return employeeName;\n }", "@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < employees.length; i++) {\n result.append(employees[i] + \"\\n\");\n }\n return result.toString();\n }", "public String toString()\n {\n String output = new String();\n output = \"The time is \" + hour + \":\" + min + \":\" + sec + \"\\n\";\n return output;\n }", "@Override\n public String toString ()\n {\n String format = \"Employee %s: %s , %s\\n Commission Rate: $%.1f\\n Sales: $%.2f\\n\";\n\n return String.format(format, this.getId(), this.getLastName(), this.getFirstName(), this.getRate(), this.getSales());\n }", "public String getDateOfHire() {\n return formatter.format(this.dateOfHire);\n }", "public static void EmployeeHoursWorked() {\r\n\t\t\r\n\t\tJLabel e5 = new JLabel(\"Employee's Hours Worked:\");\r\n\t\te5.setFont(f);\r\n\t\tGUI1Panel.add(e5);\r\n\t\tGUI1Panel.add(employeeHoursWorked);\r\n\t\te5.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"ID:\" + this.empid + \",NAME:\" + this.name;\r\n\t}", "public int[] getHours() {\n return hours;\n }", "Integer getHour();", "public int getEndHour() {\n\treturn end.getHour();// s\n }", "java.lang.String getEmploymentDurationText();", "public List<TimeInformation> getAllEmployeesTimeInformation() {\r\n\t\tList<TimeInformation> employeeTimeInformation = repository.findAll();\r\n\t\tif(employeeTimeInformation.size() > 0) {\r\n\t\t\treturn employeeTimeInformation;\r\n\t\t} else {\r\n\t\t\treturn new ArrayList<TimeInformation>();\r\n\t\t}\r\n\t}", "public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}", "private static void hourlyEmployeeEarningReport(final HourlyEmployee hourlyEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName = new StringBuilder();\r\n\t\temployeeName.append(hourlyEmployee.getFirstName()).append(\" \").append(hourlyEmployee.getLastName());\r\n\r\n\t\tdouble weeklyPayAmount = 40 * hourlyEmployee.getHourlyRate();\r\n\r\n\t\t// Rate will be doubled if it’s beyond 40 hours/week.\r\n\t\tif (hourlyEmployee.getWeeklyWorkedHours() > 40) {\r\n\t\t\tdouble overtime = hourlyEmployee.getWeeklyWorkedHours() - 40;\r\n\t\t\tdouble overtimePay = overtime * (hourlyEmployee.getHourlyRate() * 2);\r\n\t\t\tweeklyPayAmount += overtimePay;\r\n\t\t}\r\n\r\n\t\tfinal NumberFormat formatter = NumberFormat.getCurrencyInstance();\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\", employeeName.toString(), formatter.format(weeklyPayAmount));\r\n\t}", "@Override\n\tString toString(Employee obj) {\n\t\treturn null;\n\t}", "public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}" ]
[ "0.73467636", "0.7304038", "0.72540414", "0.7074111", "0.70675004", "0.69778603", "0.6957973", "0.6905539", "0.6900282", "0.6843987", "0.6827234", "0.6786362", "0.6740845", "0.67285156", "0.65938294", "0.65569407", "0.64945203", "0.6378785", "0.6355958", "0.6341042", "0.6341042", "0.63286495", "0.63115376", "0.6293025", "0.6291985", "0.6260084", "0.625647", "0.6241817", "0.62236696", "0.6219172", "0.62109244", "0.6205191", "0.62021405", "0.6191994", "0.6191994", "0.6190875", "0.6164547", "0.61515737", "0.61460745", "0.6137634", "0.61262876", "0.6125912", "0.6119252", "0.61095923", "0.6108974", "0.61073166", "0.60978526", "0.6079838", "0.6078522", "0.6059649", "0.60533863", "0.60495937", "0.6040042", "0.60213697", "0.602047", "0.60200006", "0.60154706", "0.6012414", "0.6008586", "0.6001639", "0.5996311", "0.5993611", "0.598914", "0.5987383", "0.59871835", "0.59725165", "0.5970831", "0.5970236", "0.5963488", "0.59584165", "0.5958347", "0.5954485", "0.5952406", "0.5940401", "0.5933006", "0.59241456", "0.5914539", "0.5908049", "0.59008855", "0.5892629", "0.5888399", "0.58876425", "0.588658", "0.5848759", "0.5824051", "0.5823077", "0.58230066", "0.5812487", "0.58052236", "0.5776999", "0.5766563", "0.5765698", "0.5764697", "0.5763069", "0.5762001", "0.5756578", "0.5748606", "0.5748536", "0.57438886", "0.5741061" ]
0.6370898
18
TODO: Make toast to display tide height in cm
@Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { Toast.makeText(this, "Tide Height: " + tideItems.get(i).getPredInCm() + " cm", Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getheight();", "public int Height(){\r\n return height;\r\n }", "public int sHeight(){\n\t\t\n\t\tint Measuredheight = 0; \n\t\tPoint size = new Point();\n\t\tWindowManager w = activity.getWindowManager();\n\n\t\tif(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n\t\t w.getDefaultDisplay().getSize(size);\n\t\t Measuredheight = size.y; \n\t\t}else{\n\t\t Display d = w.getDefaultDisplay(); \n\t\t Measuredheight = d.getHeight(); \n\t\t}\n\t\t\n\t\treturn Measuredheight;\n\t}", "@Override\n public int height()\n {\n return textCent.height();\n }", "public abstract int getDisplayHeight();", "public int getH() { return height; }", "int getHeight() {return height;}", "Integer getCurrentHeight();", "public int getCurrentHeight();", "private int getQustionHeight(int width, int height){\n\t\tView view = (View) questionText.getClientProperty(javax.swing.plaf.basic.BasicHTML.propertyKey);\n \tview.setSize(width, height);\n \tfloat h = view.getPreferredSpan(View.Y_AXIS);\n \treturn (int)Math.ceil(h);\n\t}", "public int getHeight() {return height;}", "public int getHeight(){\n return height;\n }", "public String getheight()\n\t{\n\t\treturn height.getText();\n\t}", "public int getHeight() { return height; }", "String getHeight();", "String getHeight();", "public abstract int getStatusBarHeight(int position);", "public String getHeight() {\n return height;\n }", "public String getHeight() {\n return height;\n }", "public int getHeight(){\n return height;\n }", "public int getHeight()\n {return height;}", "public int height();", "public int height();", "public int height();", "public int height();", "public int getHeightScreen(){\n return heightScreen ;\n }", "int height();", "public int height() {\n return height;\n }", "public int getHeight(){\n \treturn height;\n }", "@Override\n public int getHeight() {\n return height;\n }", "@Override\n public int getHeight() {\n return height;\n }", "public static int m143417a(Context context) {\n WindowManager windowManager = (WindowManager) context.getSystemService(\"window\");\n DisplayMetrics displayMetrics = new DisplayMetrics();\n windowManager.getDefaultDisplay().getMetrics(displayMetrics);\n return displayMetrics.heightPixels;\n }", "public int height() {\r\n return height;\r\n }", "public int height()\n {\n return height;\n }", "int getHeight()\n {\n return height;\n }", "public static String m579g(Context context) {\r\n try {\r\n return context.getResources().getDisplayMetrics().heightPixels;\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }", "@Override\n public int heightHint() {\n return isMultiline() ? 45 : 15;\n }", "public int height() {\n return height;\n }", "public int height() {\n return height;\n }", "public int height() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight()\n {\n return height;\n }", "public double height() { return _height; }", "public int grHeight() { return height; }", "public int height()\r\n {\r\n return height;\r\n }", "public int getDisplayHeight()\n {\n if ( amiga.isPAL() ) {\n return isInterlaced() ? 512 : 256;\n }\n return isInterlaced() ? 400 : 200;\n }", "public java.lang.String getUnitClearanceHeight() {\n\t\treturn _tempNoTiceShipMessage.getUnitClearanceHeight();\n\t}", "public int getHeight()\n {\n return altezza;\n }", "public int getHeight()\n {\n return height;\n }", "@Test\n public void testGetHumanReadableHeight() {\n System.out.println(\"getHumanReadableHeight\");\n AbstractBarcodeBean instance = new AbstractBarcodeBeanImpl();\n double expResult = 0.0;\n instance.setMsgPosition(HumanReadablePlacement.HRP_NONE);\n double result = instance.getHumanReadableHeight();\n assertEquals(expResult, result, 0.0);\n instance.setMsgPosition(HumanReadablePlacement.HRP_BOTTOM);\n result = instance.getHumanReadableHeight();\n assertEquals(3.67, result, 0.01);\n }", "@Override\n\tpublic int getH() {\n\t\treturn 100;\n\t}", "double getNewHeight();", "@Override\n\tpublic float getHeight() {\n\t\treturn 26;\n\t}", "private double getHeight() {\n\t\treturn height;\n\t}", "public float getHourHeight() {\n return config.hourHeight;\n }", "public int getHeight()\n {\n \treturn height;\n }", "public double getHeightInInches()\n {\n return height;\n }", "public double getBaseHeight();", "public int getHeight() {\n\treturn height;\n}", "public int getHauteur() {\n return getHeight();\n }", "public int getHeight(){\n return this.height;\n }", "public int getScreenHeight();", "public int getScreenHeight();", "public final String getHeight() {\n return this.height;\n }", "public short getFontHeightInPoints()\n {\n return ( short ) (font.getFontHeight() / 20);\n }", "public int height()\n\t{\n\t\treturn height;\n\t}", "private int getStatusBarHeight() {\n int result = 0;\n int resourceId = context.getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resourceId > 0) {\n result = context.getResources().getDimensionPixelSize(resourceId);\n }\n return result;\n }", "@Override\n public int getHeight() {\n return 320;\n }", "public int getHeight() {\n return height;\n }", "@Override\n protected void setHeight(Context context, Integer heightInDp) {\n }", "public static String m575e(Context context) {\r\n try {\r\n DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();\r\n return Integer.toString(displayMetrics.widthPixels) + \"*\" + Integer.toString(displayMetrics.heightPixels);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }", "public double getClearanceHeight() {\n\t\treturn _tempNoTiceShipMessage.getClearanceHeight();\n\t}", "public int getHeight() {\r\n if ( fontMetrics != null ) {\r\n return fontMetrics.getHeight() + 6;\r\n } else {\r\n return 6;\r\n }\r\n }", "private static int getStatusBarHeight(Context context) {\n int result = 0;\n int resId = context.getResources().getIdentifier(\"status_bar_height\", \"dimen\", \"android\");\n if (resId > 0) {\n result = context.getResources().getDimensionPixelOffset(resId);\n }\n return result;\n }", "public static int getDisplayHeightPixel(Context context) {\n Display display = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();\n DisplayMetrics metrics = new DisplayMetrics();\n display.getMetrics(metrics);\n\n return metrics.heightPixels;\n }", "public int height() {\n\t\treturn 0;\n\t}", "public final int getHeight(){\n return height_;\n }", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\n return bala.getHeight();\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "long getHeight();", "public static float alturaDaCena() {\n\t\treturn tamanho().height;\n\t}", "@Override\n\tpublic void height() {\n\t\t\n\t}", "double getOldHeight();", "public final int mo39473l() {\n return getMeasuredHeight();\n }", "short getFitHeight();", "Integer getDefaultHeight();", "public void computeHeight() {\n\t\tif (getContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n\t\t\tint screenHeight = ScreenUtils.getScreenHeight(getContext());\n\t\t\tif (DisplayHelper.isTabModel(getContext())) {\n\t\t\t\tsetHeight(screenHeight * 3 / 4);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetHeight(screenHeight * 4 / 5);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tint screenHeight = ScreenUtils.getScreenHeight(getContext());\n\t\t\tif (DisplayHelper.isTabModel(getContext())) {\n\t\t\t\tsetHeight(screenHeight * 2 / 3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetHeight(screenHeight - 80);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6429783", "0.64294106", "0.63928026", "0.6367552", "0.63578683", "0.63004714", "0.6289548", "0.62562805", "0.62356144", "0.61958367", "0.61951774", "0.61634165", "0.6162333", "0.61510193", "0.6144101", "0.6144101", "0.6136195", "0.6131941", "0.6131941", "0.612314", "0.61095923", "0.6086963", "0.6086963", "0.6086963", "0.6086963", "0.6082048", "0.60616136", "0.605521", "0.6052277", "0.60226524", "0.60226524", "0.6015388", "0.6005384", "0.59877485", "0.5985312", "0.5964676", "0.5946947", "0.59416234", "0.59416234", "0.59416234", "0.59274524", "0.59274524", "0.59274524", "0.59117717", "0.59072804", "0.59049433", "0.58841705", "0.5883086", "0.58732915", "0.586214", "0.5860816", "0.5854525", "0.58505666", "0.5849014", "0.5842571", "0.5840105", "0.58306235", "0.58149564", "0.5806266", "0.5806182", "0.5806105", "0.5802972", "0.5798831", "0.5791637", "0.5791637", "0.5786955", "0.57857835", "0.5784926", "0.57783186", "0.5777171", "0.5765512", "0.57628644", "0.5761073", "0.575973", "0.57594", "0.57588565", "0.5754514", "0.5753406", "0.57519644", "0.57434916", "0.57362384", "0.5730515", "0.5730515", "0.5730515", "0.5730515", "0.5730515", "0.5730515", "0.5730515", "0.5730515", "0.5730515", "0.5730515", "0.5730515", "0.5728073", "0.572387", "0.5722943", "0.57139397", "0.5710218", "0.5703471", "0.5701323", "0.56933373" ]
0.6302929
5
Konstruktori asettaa puun juureksi nullarvon.
public AVL() { this.root = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setNull() {\n\n }", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "public void setPlayerPkmnNull()\r\n {\r\n playerPokemon = null;\r\n }", "@Override\n\tpublic String display() {\n\t\treturn \"null\";\n\t}", "void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }", "@Override\n\tpublic Value apprise() {\n\t\treturn null;\n\t}", "public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "void setNilValue();", "public void testObtenerPalabrasClave() {\n \tString prueba = null; \n \t\tassertNull(prueba);\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "private void setNulls() {\n mEnum = null;\n mString = null;\n mCharSequence = null;\n //mBoolean = true;\n mBoolByte = BooleanDataType.NULL;\n mChar = CharDataType.NULL;\n mDateTime = DateTimeDataType.NULL;\n mTimeOfDay = TimeOfDayDataType.NULL;\n\n mByte = IntegerDataType.INT8_NULL;\n mShort = IntegerDataType.INT16_NULL;\n mInt = IntegerDataType.INT32_NULL;\n mInt48 = IntegerDataType.INT48_NULL;\n mLong = IntegerDataType.INT64_NULL;\n mFloat = FloatDataType.IEEE32_NULL;\n mDouble = FloatDataType.IEEE64_NULL;\n //mDouble2 = FloatDataType.IEEE64_NULL;\n mPUINT30 = IntegerDataType.PUINT30_NULL;\n mPUINT61 = IntegerDataType.PUINT61_NULL;\n mPIneterval = IntegerDataType.PINTERVAL_NULL;\n mSCALE_AUTO = FloatDataType.DECIMAL_NULL;\n mSCALE4 = FloatDataType.DECIMAL_NULL;\n }", "void writeNullObject() throws SAXException {\n workAttrs.clear();\n addIdAttribute(workAttrs, \"0\");\n XmlElementName elemName = uimaTypeName2XmiElementName(\"uima.cas.NULL\");\n startElement(elemName, workAttrs, 0);\n endElement(elemName);\n }", "private void setNull() {\n\n this.txtExamDate.setDate(null);\n this.txtCourseName.setText(null);\n this.txtCourseName.requestFocus();\n }", "public void visitACONST_NULL(ACONST_NULL o){\n\t\t// Nothing needs to be done here.\n\t}", "public void Nodo(){\r\n this.valor = \"\";\r\n this.siguiente = null;\r\n }", "public None()\n {\n \n }", "public void nullValues() {\r\n\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\"Null values ​​are not allowed or incorrect values\");\r\n\t}", "String getDefaultNull();", "@Test\r\n public void testSetPracownik() {\r\n System.out.println(\"setPracownik\");\r\n Pracownik pracownik = null;\r\n Faktura instance = new Faktura();\r\n instance.setPracownik(pracownik);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "private void nullstillFordeling(){\n int i = indeks;\n politi = -1;\n mafiaer = -1;\n venner = -1;\n mafia.nullstillSpesialister();\n spillere.tømTommeRoller();\n for (indeks = 0; roller[indeks] == null; indeks++) ;\n fordeling = null;\n }", "@Override\r\n\tpublic String swim() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic String monHoc() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void setEnemyPkmnNull()\r\n {\r\n enemyPokemon = null;\r\n }", "public String NullSave()\n {\n return \"null\";\n }", "public ArvoreRB(Node nil){\r\n\tthis.raiz = nil;\r\n\tthis.pr = nil;\r\n\tthis.aux = nil;\r\n\tthis.tamanho = 0;\r\n\tthis.print = \" \";\r\n this.nil=nil;\r\n}", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "public void nastav() {\n\t\ttabulkaZiak.setMaxWidth(velkostPolickaX * 3 + 2);\n\t\ttabulkaZiak.setPlaceholder(new Label(\"Žiadne známky.\"));\n\n\t}", "public boolean isNull(){\n return false;\n }", "private final void m29255a(zzazo zzazo) {\n if (zzazo != null) {\n this.zzdps = zzazo;\n return;\n }\n throw new NullPointerException();\n }", "private void defaultPerAllegatoAtto() {\n\t\tif(allegatoAtto.getFlagRitenute() == null) {\n\t\t\tallegatoAtto.setFlagRitenute(Boolean.FALSE);\n\t\t}\n\t\t//SIAC-6426\n\t\tif(allegatoAtto.getVersioneInvioFirma() == null){\n\t\t\tallegatoAtto.setVersioneInvioFirma(0);\n\t\t}\n\t}", "private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }", "public void asetaTeksti(){\n }", "public void unsetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(NULLFLAVOR$28);\n }\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "protected void setToDefault(){\n\n\t}", "public String mo9242az() {\n return null;\n }", "void setNilObjectives();", "public void setValueNull()\n\t{\n\t\tallValues.clear();\n\t}", "public M csmiOnCertifyImageNull(){if(this.get(\"csmiOnCertifyImageNot\")==null)this.put(\"csmiOnCertifyImageNot\", \"\");this.put(\"csmiOnCertifyImage\", null);return this;}", "@Override\n\tpublic void setEmpty() {\n\t\t\n\t}", "public Tura() {\n\t\tLicznikTur = 0;\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void limpiar()\n {\n nombre = null;\n descripcion = null;\n estado = null;\n primerNivel = true;\n }", "protected Asignatura()\r\n\t{}", "public M csmiDriverImageNull(){if(this.get(\"csmiDriverImageNot\")==null)this.put(\"csmiDriverImageNot\", \"\");this.put(\"csmiDriverImage\", null);return this;}", "public Pila () {\n raiz=null; //Instanciar un objeto tipo nodo;\n }", "@Test\n public void sucheKategorienNull() throws Exception {\n System.out.println(\"suche Kategorien Null\");\n SaalKey saal = null;\n List<Kategorie> expResult = null;\n List<Kategorie> result = SaalHelper.sucheKategorien(saal);\n assertEquals(expResult, result);\n \n }", "public void setNullFlavor(String nullFlavor) {\n\t\tthis.nullFlavor = nullFlavor;\n\t}", "public void resetRutaTesauro()\r\n {\r\n this.rutaTesauro = null;\r\n }", "private void empty_field() {\n tf_id_kategori.setText(null);\n tf_nama_kategori.setText(null);\n tf_keterangan.setText(null);\n pencarian.setText(null);\n }", "@Override\r\n\tpublic void noControl() {\r\n q.put(null);\r\n v.put(null);\r\n }", "@Override\n\tpublic void naoAtirou() {\n\t\tatirou=false;\n\n\t}", "@Override\n\tpublic void visit(NullValue arg0) {\n\n\t}", "public boolean canProcessNull() {\n return false;\n }", "public void setToDefault();", "@Override\n\tpublic boolean getIncludesNull() {\n\t\treturn false;\n\t}", "public void setNilZyhtVO()\n {\n synchronized (monitor())\n {\n check_orphaned();\n nc.vo.crd.bd.interf.zyhtvo.ZyhtVO target = null;\n target = (nc.vo.crd.bd.interf.zyhtvo.ZyhtVO)get_store().find_element_user(ZYHTVO$0, 0);\n if (target == null)\n {\n target = (nc.vo.crd.bd.interf.zyhtvo.ZyhtVO)get_store().add_element_user(ZYHTVO$0);\n }\n target.setNil();\n }\n }", "public void setGenerateNull(boolean generateNull){\n mGenerateNull = generateNull;\n }", "private Retorno( )\r\n {\r\n val = null;\r\n izq = null;\r\n der = null;\r\n\r\n }", "public void testSetPowertype_NullClassifier() {\n instance.setPowertype(null);\n assertNull(\"null expected.\", instance.getPowertype());\n }", "public static String formatNull() {\n\t\treturn \"null\";\n\t}", "@Override\n\tprotected String wavRegleJeu() {\n\t\treturn null;\n\t}", "public Prestamo() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public M csmiSexNull(){if(this.get(\"csmiSexNot\")==null)this.put(\"csmiSexNot\", \"\");this.put(\"csmiSex\", null);return this;}", "public String getNullAttribute();", "public void setNullFlavor(java.lang.String nullFlavor)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NULLFLAVOR$28);\n }\n target.setStringValue(nullFlavor);\n }\n }", "public IzvajalecZdravstvenihStoritev() {\n\t}", "public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}", "public void nullstill();", "public void mo4356a() {\n mo4357a((View) null);\n }", "public void vaciar()\n {\n this.raiz = null;\n }", "public FnNull(){\n\t}", "void setNilIsManaged();", "public AutomatZustand()\r\n\t{\r\n\t\tthis.ew_lokal = Automat.eingabewort;\r\n\t}", "private void blank() {\n tgl_pengobatanField.setText(null);\n waktu_pengobatanField.setText(null);\n keluhan_pasienField.setText(null);\n hasil_diagnosaField.setText(null);\n biayaField.setText(null);\n }", "@Override\n\tpublic void visit(NullValue arg0) {\n\t\t\n\t}", "public void setIdPermisosNull(boolean idPermisosNull)\r\n\t{\r\n\t\tthis.idPermisosNull = idPermisosNull;\r\n\t}", "static public void assertNull(Object object) {\n assertNull(null, object);\n }", "@Override\r\n\tpublic TVA mettreAjourTVA(TVA t) {\n\t\treturn null;\r\n\t}", "public M csmiCheckPhotoNull(){if(this.get(\"csmiCheckPhotoNot\")==null)this.put(\"csmiCheckPhotoNot\", \"\");this.put(\"csmiCheckPhoto\", null);return this;}", "public PregledPoruka() {\n preuzmiMape();\n preuzmiPoruke();\n }", "public ConversorVelocidad() {\n //setTemperaturaConvertida(0);\n }", "public static void setNull_fields_allowed(boolean allowed) {\n GUI.null_fields_allowed = allowed;\n }", "public M csmiPersonNull(){if(this.get(\"csmiPersonNot\")==null)this.put(\"csmiPersonNot\", \"\");this.put(\"csmiPerson\", null);return this;}", "public NullUnit() {\n super(1, 0, new InvalidLocation(), 0);\n }", "@Override\n\tpublic String toXMLString(Object arg0) {\n\t\treturn null;\n\t}", "public void limpiar(){\n vistaCarrera.txtId.setText(null);\n vistaCarrera.txtNombre.setText(null);\n vistaCarrera.txtFacultad.setText(null);\n vistaCarrera.labelMsg.setText(null);\n }", "public M csmiCertifyTypeNull(){if(this.get(\"csmiCertifyTypeNot\")==null)this.put(\"csmiCertifyTypeNot\", \"\");this.put(\"csmiCertifyType\", null);return this;}", "public SlanjePoruke() {\n }", "@Override\n\tpublic void visit(Null n) {\n\t\t\n\t}", "public void limpacampos() {\n textFieldMarca.setText(null);\n textFieldModelo.setText(null);\n jtcor.setText(null);\n jfano.setText(null);\n comboBoxCombustivel.setSelectedIndex(-1);\n textFormattedValor.setText(null);\n comboBoxPortas.setSelectedIndex(-1);\n textFieldChassi.setText(null);\n jfplaca.setText(null);\n textFormattedPlaca.setText(null);\n textFieldTipo.setSelectedIndex(-1);\n textFieldStatus.setText(\"Disponível\");\n }", "public Cesta() {\n\t\tthis.cima = null;\n\t}", "boolean isNullOmittable();", "public AntrianPasien() {\r\n\r\n }", "public void resetMostrarVuelta()\r\n {\r\n this.mostrarVuelta = null;\r\n }", "public void Ordenamiento() {\n\n\t}", "public void xsetNullFlavor(com.walgreens.rxit.ch.cda.NullFlavor nullFlavor)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.NullFlavor target = null;\n target = (com.walgreens.rxit.ch.cda.NullFlavor)get_store().find_attribute_user(NULLFLAVOR$28);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.NullFlavor)get_store().add_attribute_user(NULLFLAVOR$28);\n }\n target.set(nullFlavor);\n }\n }", "@Override\r\n\tpublic void setDefault(String oletus) {\r\n\t\ttextVastaus.setText(oletus);\r\n\t}", "public DummyHandLayout() {\r\n//\t\tparent = null;\r\n\t}" ]
[ "0.7075911", "0.6564679", "0.61831087", "0.61411625", "0.6123004", "0.6087239", "0.6044949", "0.5974513", "0.59607774", "0.5935964", "0.59298956", "0.59246933", "0.5915946", "0.59133834", "0.59096444", "0.5903203", "0.5872201", "0.58133805", "0.57730144", "0.5771911", "0.5769227", "0.5763832", "0.5743859", "0.573515", "0.5733611", "0.57290184", "0.57276493", "0.57226187", "0.56993926", "0.5697887", "0.5697438", "0.56759363", "0.56752", "0.56672853", "0.56564826", "0.5651403", "0.56277156", "0.56231743", "0.5623142", "0.5619303", "0.5612686", "0.5611302", "0.5606521", "0.5592929", "0.5570414", "0.5570004", "0.5559848", "0.5549226", "0.5546809", "0.5544326", "0.5538701", "0.5532741", "0.5530392", "0.5529046", "0.5525869", "0.55224335", "0.55207616", "0.55182713", "0.55170554", "0.55160016", "0.5499897", "0.54981935", "0.5496494", "0.5490609", "0.548563", "0.54827094", "0.5481417", "0.54782116", "0.5477504", "0.5476095", "0.54758316", "0.5475259", "0.5475142", "0.54742295", "0.5460424", "0.5454724", "0.5454085", "0.544981", "0.54497004", "0.54494596", "0.5447326", "0.5446226", "0.54335463", "0.5430566", "0.54304236", "0.5420581", "0.54197896", "0.5419261", "0.54154825", "0.54154587", "0.54099226", "0.5408712", "0.5403716", "0.540358", "0.539737", "0.5393044", "0.5389618", "0.53857875", "0.53855354", "0.5383975", "0.53792995" ]
0.0
-1
deleten apumetodi, joka poistaa lapsettoman solmun.
private Node caseNoChildren(Node deleteThis) { Node parent = deleteThis.getParent(); if (parent == null) { this.root = null; // Kyseessä on juuri return deleteThis; } if (deleteThis == parent.getLeft()) { parent.setLeft(null); } else { parent.setRight(null); } return deleteThis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void desligar() {\n\r\n\t}", "@Override\n\tpublic void desligar() {\n\t\t\n\t}", "@Override\n\tvoid desligar() {\n\t\tsuper.desligar();\n\t\tSystem.out.println(\"Automovel desligando\");\n\t}", "public void dessiner() {\n\t\tafficherMatriceLignes(m.getCopiePartielle(progresAffichage), gc);\r\n\t}", "public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}", "@Override\n\tpublic void detalhar() {\n\t\t\n\t}", "public void limpiarPuntos() {\n \tpuntos.clear();\n }", "private void hienThiMaKHSuDungDV(){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layMaKHSuDungDVLoaiBoTrungLap();\n \n cbbThanhToanMaKH.removeAllItems();\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaKH.addItem(suDungModel.getMaKH());\n }\n }", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "public void descolaPosicao();", "void rezervasyonYap(String name, String surname, String islem);", "public void HandelKlas() {\n\t\tSystem.out.println(\"HandelKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Handel(Plansza.getRzemieslnikNaPlanszy());\n\t\tPlansza.getNiewolnikNaPLanszy().Handel(Plansza.getArystokrataNaPlanszy());\n\t\t\n\t\tPlansza.getRzemieslnikNaPlanszy().Handel(Plansza.getNiewolnikNaPLanszy());\n\t\tPlansza.getRzemieslnikNaPlanszy().Handel(Plansza.getArystokrataNaPlanszy());\n\t\t\n\t\tPlansza.getArystokrataNaPlanszy().Handel(Plansza.getNiewolnikNaPLanszy());\n\t\tPlansza.getArystokrataNaPlanszy().Handel(Plansza.getRzemieslnikNaPlanszy());\n\t}", "public void disconnetti() {\n\t\tconnesso = false;\n\t}", "public void decida(){\n int vecinasVivas=vecinos();\n if(vecinasVivas==3 && estadoActual=='m'){\n estadoSiguiente='v';\n }else if((estadoActual=='v' && vecinasVivas==2) || (estadoActual=='v' && vecinasVivas==3)){\n estadoSiguiente='v';\n }else if(vecinasVivas<2 || vecinasVivas>3){\n estadoSiguiente='m';\n }\n }", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public void despegar(){\n if(this.posicion == 1){\n this.setPosicion(2);\n this.indicarEstado(\"Volando\");\n } else{\n System.out.println(\"No estoy preparado para el despegue\");\n }\n }", "public void deplacements () {\n\t\t//Efface de la fenetre le mineur\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getLabyrinthe()[this.laby.getMineur().getY()][this.laby.getMineur().getX()].imageCase(themeJeu));\n\t\t//Deplace et affiche le mineur suivant la touche pressee\n\t\tpartie.laby.deplacerMineur(Partie.touche);\n\t\tPartie.touche = ' ';\n\n\t\t//Operations effectuees si la case ou se trouve le mineur est une sortie\n\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Sortie) {\n\t\t\t//On verifie en premier lieu que tous les filons ont ete extraits\n\t\t\tboolean tousExtraits = true;\t\t\t\t\t\t\t\n\t\t\tfor (int i = 0 ; i < partie.laby.getHauteur() && tousExtraits == true ; i++) {\n\t\t\t\tfor (int j = 0 ; j < partie.laby.getLargeur() && tousExtraits == true ; j++) {\n\t\t\t\t\tif (partie.laby.getLabyrinthe()[i][j] instanceof Filon) {\n\t\t\t\t\t\ttousExtraits = ((Filon)partie.laby.getLabyrinthe()[i][j]).getExtrait();\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Si c'est le cas alors la partie est terminee et le joueur peut recommencer ou quitter, sinon le joueur est averti qu'il n'a pas recupere tous les filons\n\t\t\tif (tousExtraits == true) {\n\t\t\t\tpartie.affichageLabyrinthe ();\n\t\t\t\tSystem.out.println(\"\\nFelicitations, vous avez trouvé la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire à present : [r]ecommencer ou [q]uitter ?\");\n\t\t\t\tString[] choixPossiblesFin = {\"Quitter\", \"Recommencer\"};\n\t\t\t\tint choixFin = JOptionPane.showOptionDialog(null, \"Felicitations, vous avez trouve la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire a present :\", \"Fin de la partie\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, choixPossiblesFin, choixPossiblesFin[0]);\n\t\t\t\tif ( choixFin == 1) {\n\t\t\t\t\tPartie.touche = 'r';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tPartie.touche = 'q';\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpartie.enTete.setText(\"Tous les filons n'ont pas ete extraits !\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Si la case ou se trouve le mineur est un filon qui n'est pas extrait, alors ce dernier est extrait.\n\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Filon && ((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getExtrait() == false) {\n\t\t\t\t((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setExtrait();\n\t\t\t\tSystem.out.println(\"\\nFilon extrait !\");\n\t\t\t}\n\t\t\t//Sinon si la case ou se trouve le mineur est une clef, alors on indique que la clef est ramassee, puis on cherche la porte et on l'efface de la fenetre, avant de rendre la case quelle occupe vide\n\t\t\telse {\n\t\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Clef && ((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getRamassee() == false) {\n\t\t\t\t\t((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setRamassee();\n\t\t\t\t\tint[] coordsPorte = {-1,-1};\n\t\t\t\t\tfor (int i = 0 ; i < this.laby.getHauteur() && coordsPorte[1] == -1 ; i++) {\n\t\t\t\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() && coordsPorte[1] == -1 ; j++) {\n\t\t\t\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Porte) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcoordsPorte[0] = j;\n\t\t\t\t\t\t\t\tcoordsPorte[1] = i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpartie.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].setEtat(true);\n\t\t\t\t\t((JLabel)grille.getComponents()[coordsPorte[1]*this.laby.getLargeur()+coordsPorte[0]]).setIcon(this.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].imageCase(themeJeu));\n\t\t\t\t\tSystem.out.println(\"\\nClef ramassee !\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void renovarBolsa() {\n\t\tSystem.out.println(\"Bolsa renovada com suceso!\");\n\t}", "public void limpiarPaneles(){\n vistaInicial.jpCentralGeneral.removeAll();\n vistaInicial.jpDerecha.removeAll();\n vistaInicial.jpCentral.removeAll();\n }", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "public void fjernAlle() {\n listehode.neste = null;\n antall = 0;\n }", "public void descontarUnidad() {\r\n\t\tcantidad--;\r\n\t}", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "public static void dodavanjePutnickogVozila() {\n\t\tString vrstaVozila = \"Putnicko Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 10000;\n\t\tdouble cenaServisa = 8000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedist = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tPutnickoVozilo vozilo = new PutnickoVozilo(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno,\n\t\t\t\tpreServisa, cenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "private static void Rezerve(ArrayList<Oda> odalar, Kullanici kullanici)\n {\n Oda oda=odaSec(odalar);\n if(oda.getMisafir().equals(\"0\"))\n {\n System.out.print(\"Ad soyad giriniz: \");\n Scanner scn = new Scanner(System.in);\n String ad=scn.next();\n oda.setMisafir(ad);\n dosyaYazici(kullanici.getAd()+\", \"+oda.getMisafir()+\" adina \"+oda.getOdaNo()+\" numarali odayi rezerve etti.\");\n }\n else System.out.print(\"Sectiginiz oda rezerve icin musait degil.\");\n }", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "public void asetaTeksti(){\n }", "public void decida(){\r\n int f=this.getFila();\r\n int c=this.getColumna();\r\n int cont=alRededor(f,c);\r\n if(this.isVivo()){\r\n if(cont==2 || cont==3){\r\n estadoSiguiente=VIVA;\r\n }else/* if(cont==1 || cont>3)*/{\r\n estadoSiguiente=MUERTA;\r\n }\r\n }else{\r\n if(cont==3){\r\n estadoSiguiente=VIVA;\r\n }else if(cont==1 || cont>3){\r\n estadoSiguiente=MUERTA;\r\n }\r\n }\r\n }", "public void destruirArbol(){\n\t\thDer=null;\n\t\thIzq=null;\n\t\tesVacio=true;\n\t}", "private void hienThiCBBmaDV(){\n DichVuService dichVuService = new DichVuService();\n dichVuModels = dichVuService.layToanBoDichVu();\n \n cbbMaDV.removeAllItems();\n if (dichVuModels != null){\n for (DichVuModel dichVuModel : dichVuModels) {\n cbbMaDV.addItem(dichVuModel.getMaDV());\n }\n }else{\n return;\n }\n }", "void berechneFlaeche() {\n\t}", "public void devolver() {\r\n \t\r\n \tif (raiz == null)\r\n \t\tSystem.out.println(\"No hay datos en la pila\");\r\n else\r\n \t System.out.println(\"Devolvemos el dato de la cima: \"+raiz.dato);\r\n }", "public void tyhjenna() {\n this.kulmat.clear();\n }", "private void limpiarDatos() {\n\t\t\n\t}", "void unsetNcbieaa();", "private static void resetDescontoMensal(){\n for(Apps a : apps){\n if(a.isDescontoMensal()){\n a.setDescontoMensal(false);\n }\n }\n }", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "private void cargarFichaLepra_discapacidades() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void resetKassa() {\n aantalklanten = 0;\n aantalartikelen = 0;\n geld = 0;\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void asignarVida();", "public void aplicarDescuento();", "public void pierdeUnaVida() {\n numeroDeVidas--;\n }", "@GetMapping(\n\t\t\tvalue=\"/bioskopi/ukloni/{id}\",\n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<BioskopDTO> ukloni(@PathVariable(name=\"id\") Long id){/*patvariable dovablja id od bioskopa (this.id iz jsa)*/\n\t\tBioskop b=this.bioskopService.findOne(id);\n\t\tif(b==null) {\n\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t\tBioskopDTO bioskop=new BioskopDTO(b.getId(), b.getNaziv(), b.getAdresa(), b.getBrojCentrale(), b.getEMail());\n\t\t/*prolazi kroz projekcije sale i sve brise i na kraju obrise tu salu*/\n\t\tSet<Sala> sale=b.getSale();\n\t\tfor (Sala sala : sale) {\n\t\t\tList<Terminski_raspored> projekcije=sala.getProjekcije();\n\t\t\tfor (Terminski_raspored t : projekcije) {\n\t\t\t\tSet<Gledalac> gledaoci=t.getGledaoci_koji_su_rezervisali_film();\n\t\t\t\tfor (Gledalac g : gledaoci) {\n\t\t\t\t\tif(g.getRezervisani_filmovi().contains(t)) {\n\t\t\t\t\t\tg.getRezervisani_filmovi().remove(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSet<Raspored_filmova> rasporedi=t.getRasporedi();\n\t\t\t\tfor(Raspored_filmova r:rasporedi) {\n\t\t\t\t\tthis.raspored_filmovaService.delete(t.getId());\n\t\t\t\t}\n\t\t\t\t//this.terminski_rasporedService.delete(t.getId());\n\t\t\t}\n\t\t\tthis.salaservice.deleteById(sala.getId());\n\t\t}\n\t\tthis.bioskopService.delete(id); \n\t\t\n\t\t\n\t\treturn new ResponseEntity<>(bioskop,HttpStatus.OK);\n\t}", "private void disparaUfo()\n {\n // Solo dispara si no hay disparo activo\n if (!disparoUfo.getVisible()) {\n // Generamos un número aleatorio para obtener el Ufo que va a disparar\n Random aleatorio = new Random();\n int ufoAleatorio;\n ufoAleatorio = aleatorio.nextInt(NUMEROUFOS);\n\n // Si el Ufo aleatorio NO está muerto dispara\n if (ufos.get(ufoAleatorio).getVisible()) {\n disparoUfo.setPosicion(ufos.get(ufoAleatorio).getPosicionX() + ((ufos.get(ufoAleatorio).getAncho() - disparoUfo.getAncho()) / 2), ufos.get(ufoAleatorio).getPosicionY() + ufos.get(ufoAleatorio).getAlto());\n disparoUfo.setVisible(true);\n }\n }\n }", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "public void disparar(){}", "public void botoiaDesaktibatu() {\r\n\t\tordaindu_Botoia.setEnabled(false);\r\n\t}", "private void remplirUtiliseData() {\n\t}", "@Override\n\tpublic void devolucao(Livros livro) {\n\t\t\n\t}", "void salirDelMazo() {\n mazo.inhabilitarCartaEspecial(this);\n }", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "private static void cajas() {\n\t\t\n\t}", "public void limpacampos() {\n textFieldMarca.setText(null);\n textFieldModelo.setText(null);\n jtcor.setText(null);\n jfano.setText(null);\n comboBoxCombustivel.setSelectedIndex(-1);\n textFormattedValor.setText(null);\n comboBoxPortas.setSelectedIndex(-1);\n textFieldChassi.setText(null);\n jfplaca.setText(null);\n textFormattedPlaca.setText(null);\n textFieldTipo.setSelectedIndex(-1);\n textFieldStatus.setText(\"Disponível\");\n }", "public final void nonRedefinissableParEnfant(){\n\n }", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void sendeSpielfeld();", "public void vaciar()\n {\n this.raiz = null;\n }", "void unsetSchufaResponseData();", "public void PedirSintomas() {\n\t\t\r\n\t\tSystem.out.println(\"pedir sintomas del paciente para relizar el diagnosticoa\");\r\n\t}", "public void Ordenamiento() {\n\n\t}", "@Override\n\tpublic void eliminar() {\n\n\t}", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "public void verarbeite() {\n\t\t\r\n\t}", "public void borrarPiezasAmenazadoras(){\n this.piezasAmenazadoras.clear();\n }", "public void UnDia()\n {\n int i = 0;\n for (i = 0; i < 6; i++) {\n for (int j = animales.get(i).size() - 1; j >= 0; j--) {\n\n if (!procesoComer(i, j)) {\n animales.get(i).get(j).destruir();\n animales.get(i).remove(j);\n } else {\n if (animales.get(i).size() > 0 && j < animales.get(i).size()) {\n\n if (animales.get(i).get(j).reproducirse()) {\n ProcesoReproducirse(i, j);\n }\n if (j < animales.get(i).size()) {\n if (animales.get(i).get(j).morir()) {\n animales.get(i).get(j).destruir();\n animales.get(i).remove(j);\n }\n }\n }\n }\n\n }\n }\n if (krill == 0) {\n Utilidades.MostrarExtincion(0, dia);\n }\n modificarKrill();\n modificarTemperatura();\n ejecutarDesastres();\n for (i = 1; i < animales.size(); i++) {\n if (animales.get(i).size() == 0 && !extintos.get(i)) {\n extintos.set(i, true);\n Utilidades.MostrarExtincion(i, dia);\n }\n }\n dia++;\n System.out.println(dia + \":\" + krill + \",\" + animales.get(1).size() + \",\" + animales.get(2).size() + \",\" + animales.get(3).size() + \",\" + animales.get(4).size() + \",\" + animales.get(5).size());\n }", "public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }", "public void pop() {\n if (cabeza!= null) {\n //SI CABEZA.SIGUENTE ES DISTINTO A NULO\n if (cabeza.siguiente==null) {\n //CABEZA SERA NULO\n cabeza=null; \n //SE IRAN RESTANDO LOS NODOS\n longitud--;\n } else {\n //DE LO CONTRARIO EL PUNTERO SERA IGUAL A CABEZA\n Nodo puntero=cabeza;\n //MIENTRTAS EL PUNTERO SEA DISITINTO A NULO \n while (puntero.siguiente.siguiente!=null) { \n //PUNTYERO SERA IGUAL A LA DIRECCION DEL SIGUIENTE NODO\n puntero=puntero.siguiente;\n }\n puntero.siguiente=null;\n longitud--;\n }\n }\n }", "public void dessiner() {\n\t\tthis.panel.dessinerJeu();\t\n\t}", "public int hapus() {\r\n return elemen[--ukuran];\r\n }", "private native void destruirAplicacionNativa();", "public static void darMasaje() {\n\n\t}", "private void viderZonesSaisies() {\n // libellé\n EditText libelleSport = findViewById(R.id.saisieSport);\n libelleSport.setText(\"\");\n // checkbox durée\n CheckBox dureeSport = findViewById(R.id.chkDureeSport);\n dureeSport.setChecked(false);\n // checkbox distance\n CheckBox distanceSport = findViewById(R.id.chkDistanceSport);\n distanceSport.setChecked(false);\n }", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "@Override\n public void popuniPodatke() {\n }", "public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}", "private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}", "public void rodar(){\n\t\tmeuConjuntoDePneus.rodar();\r\n\t}", "void Vorrücken()\n {\n }", "public static void traduitSiteAnglais() {\n\t\t\n\t}", "public static void deletarProdutos(){\n if(ListaDProduto.isEmpty()){\n SaidaDados(\"Nenhum produto cadastrado\");\n return;\n } \n ListaDProduto.clear();\n SaidaDados(\"Todos produto deletado com sucesso\");\n \n \n }", "public void eliminarCompraComic();", "private void devolverSolicitud(HttpPresentationComms comms, int numeroSolicitud, String justificacion) throws HttpPresentationException, KeywordValueException {\n/* 127 */ VSolicitudesDAO rsVSol = new VSolicitudesDAO();\n/* 128 */ VSolicitudesDTO regSol = rsVSol.getSolicitud(numeroSolicitud);\n/* 129 */ rsVSol.close();\n/* */ \n/* 131 */ String sPagina = \"CambiarEstadoSolicitud.po?solicitud=\" + numeroSolicitud + \"&observacion=\" + justificacion + \"&nuevoestado=\" + regSol.getEstadoAnterior() + \"&devuelta=1\";\n/* */ \n/* */ \n/* */ \n/* 135 */ throw new ClientPageRedirectException(comms.request.getAppFileURIPath(sPagina));\n/* */ }", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "public void desplegarInformacion() { //\n\n System.out.println(nombre);\n System.out.println(apellido);\n\n }", "private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private DittaAutonoleggio(){\n \n }", "public void videListeClient(){\n couleurs.clear();\n }", "public void ustalDroge(ArrayList<Sciezka> nowaDroga)\n\t{\n\t\tdroga = nowaDroga;\n\t}", "private void nullstillFordeling(){\n int i = indeks;\n politi = -1;\n mafiaer = -1;\n venner = -1;\n mafia.nullstillSpesialister();\n spillere.tømTommeRoller();\n for (indeks = 0; roller[indeks] == null; indeks++) ;\n fordeling = null;\n }", "public void demarrerPartie(long idPartie) {\n Partie p = daocrud.findOne(idPartie);\r\n\r\n // Erreur si pas au moins 2 joueurs dans la partie\r\n if (jService.recupererNbJoueursParPartieId(idPartie) < 2) {\r\n throw new RuntimeException(\"Erreur : nb joueurs moins 2\");\r\n }\r\n\r\n // passe le joueur d'ordre 1 à etat a la main\r\n jService.passeJoueurOrdre1EtatALaMain(idPartie);\r\n\r\n // distribue 7 cartes d'ingrédients au hasard à chaque joueur de la partie\r\n for (Joueur j : p.getJoueurs()) {\r\n\r\n cService.distribue7CartesParJoueurIdEtPartieId(j.getId(), idPartie);\r\n }\r\n\r\n }", "private void almacenarFallos() {\n BaseDatos bd = new BaseDatos(this);\n// Log.i(\"FALLOS\",\"Nmero de fallos final: \"+fallos);\n bd.updatePalabra(palabraActual.getId(),fallos);\n\n bd.close();\n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "@Override\r\n\tpublic void trunOff() {\n\t\tSystem.out.println(\"켜다\");\r\n\t}", "public void desvincular() {\n\t\tList<Motorista> motoristas = new ArrayList<>();\n\t\tList<Veiculo> veiculos = new ArrayList<>();\n\t\ttry {\n\t\t\tveiculos = Deserializador.deserializar(\"conteudo/veiculos\", Veiculo.class);\n\t\t\tmotoristas = Deserializador.deserializar(\"conteudo/motoristas\", Motorista.class);\n\n\t\t\tScanner entrada = new Scanner(System.in);\n\t\t\tMotorista motorista = null;\n\t\t\tVeiculo veiculo = null;\n\t\t\tSystem.out.println(\"Digite o numero da CNH do motorista que deseja desvincular.\");\n\t\t\tint cnh = entrada.nextInt();\n\t\t\tif (motoristas != null) {\n\t\t\t\tif (veiculos != null) {\n\t\t\t\t\tfor (Motorista motor : motoristas) {\n\t\t\t\t\t\tif (cnh == motor.getNumero_Carteira()) {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista encontrado: \" + motor.getNome());\n\t\t\t\t\t\t\tmotorista = motor;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (motorista == null) {\n\t\t\t\t\t\tSystem.out.println(\"Motorista nao encontrado!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (Veiculo veic : veiculos) {\n\t\t\t\t\t\t\tif (veic.getPlaca().equals(motorista.getVeiculo().getPlaca())) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veiculo encontrado.\");\n\t\t\t\t\t\t\t\tveiculo = veic;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (motorista.getVeiculo() != null) {\n\t\t\t\t\t\t\tveiculo.setMotorista(null);\n\t\t\t\t\t\t\tmotorista.setVeiculo(null);\n\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista desvinculado com sucesso.\");\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista nao esta vinculado a nenhum veiculo.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"A lista de veiculos esta vazia.\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"A lista de motoristas esta vazia.\");\n\t\t\t}\n\n\t\t\tSerializador s = new Serializador();\n\t\t\ts.serializar(\"conteudo/motoristas\", motoristas);\n\t\t\ts.serializar(\"conteudo/veiculos\", veiculos);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.err.println(\"Falha ao serializar ou deserializar! - \" + ex.toString());\n\t\t}\n\t}", "private void reset(){\n //stop les threads\n if(jeuPousse != null) {jeuPousse = null;}\n if(jeuDeBalle != null) {jeuDeBalle.setFinPartie(true); jeuDeBalle = null;}\n if(jeuEquipe != null) {jeuEquipe.setFinPartie(true); jeuEquipe = null;}\n\n simpleLogo.getFeuille().getListeTortues().clear();\n effacer();\n courante = null;\n }" ]
[ "0.693666", "0.6788985", "0.6490072", "0.63839257", "0.6309747", "0.63083684", "0.6293662", "0.62913454", "0.6241429", "0.6235482", "0.6218911", "0.6184294", "0.6172438", "0.6168638", "0.6166759", "0.6154202", "0.6153612", "0.614378", "0.6136961", "0.6126193", "0.6119133", "0.6106474", "0.61063033", "0.61043257", "0.60973567", "0.60971737", "0.6077114", "0.60660285", "0.6059151", "0.605804", "0.60539764", "0.60371387", "0.60286206", "0.602843", "0.6020158", "0.60058916", "0.5996789", "0.5986251", "0.59686744", "0.5960849", "0.59534377", "0.594932", "0.5940162", "0.59340733", "0.592206", "0.59037536", "0.58926386", "0.58880556", "0.5885896", "0.58852184", "0.5883441", "0.5876022", "0.5874365", "0.58731884", "0.58722955", "0.586987", "0.5864996", "0.5863589", "0.58617514", "0.58520895", "0.58519095", "0.58474135", "0.5846986", "0.5846024", "0.5842624", "0.5842539", "0.58367974", "0.5834774", "0.58338594", "0.58311296", "0.5810433", "0.5808425", "0.57985616", "0.5797326", "0.57921624", "0.578649", "0.5785996", "0.57855356", "0.5771875", "0.57679224", "0.57592845", "0.5747679", "0.574026", "0.5739914", "0.5737686", "0.57346463", "0.57343996", "0.5727191", "0.57261735", "0.572551", "0.572551", "0.57245517", "0.57233053", "0.57178456", "0.57165176", "0.571563", "0.57153887", "0.57139033", "0.5710911", "0.57104844", "0.57007295" ]
0.0
-1
deleten apumetodi, joka poistaa yksilapsisen solmun.
private Node caseOneChild(Node deleteThis) { Node child, parent; if (deleteThis.getLeft() != null) { child = deleteThis.getLeft(); } else { child = deleteThis.getRight(); } parent = deleteThis.getParent(); child.setParent(parent); if (parent == null) { this.root = child; // Poistettava on juuri return deleteThis; } if (deleteThis == parent.getLeft()) { parent.setLeft(child); } else { parent.setRight(child); } return deleteThis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void desligar() {\n\r\n\t}", "@Override\n\tpublic void desligar() {\n\t\t\n\t}", "private void hienThiMaKHSuDungDV(){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layMaKHSuDungDVLoaiBoTrungLap();\n \n cbbThanhToanMaKH.removeAllItems();\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaKH.addItem(suDungModel.getMaKH());\n }\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "public void dessiner() {\n\t\tafficherMatriceLignes(m.getCopiePartielle(progresAffichage), gc);\r\n\t}", "@Override\n\tvoid desligar() {\n\t\tsuper.desligar();\n\t\tSystem.out.println(\"Automovel desligando\");\n\t}", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "public static void dodavanjePutnickogVozila() {\n\t\tString vrstaVozila = \"Putnicko Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 10000;\n\t\tdouble cenaServisa = 8000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedist = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tPutnickoVozilo vozilo = new PutnickoVozilo(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno,\n\t\t\t\tpreServisa, cenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "private void hienThiCBBmaDV(){\n DichVuService dichVuService = new DichVuService();\n dichVuModels = dichVuService.layToanBoDichVu();\n \n cbbMaDV.removeAllItems();\n if (dichVuModels != null){\n for (DichVuModel dichVuModel : dichVuModels) {\n cbbMaDV.addItem(dichVuModel.getMaDV());\n }\n }else{\n return;\n }\n }", "public void asetaTeksti(){\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void decida(){\n int vecinasVivas=vecinos();\n if(vecinasVivas==3 && estadoActual=='m'){\n estadoSiguiente='v';\n }else if((estadoActual=='v' && vecinasVivas==2) || (estadoActual=='v' && vecinasVivas==3)){\n estadoSiguiente='v';\n }else if(vecinasVivas<2 || vecinasVivas>3){\n estadoSiguiente='m';\n }\n }", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "public void descontarUnidad() {\r\n\t\tcantidad--;\r\n\t}", "private static void Rezerve(ArrayList<Oda> odalar, Kullanici kullanici)\n {\n Oda oda=odaSec(odalar);\n if(oda.getMisafir().equals(\"0\"))\n {\n System.out.print(\"Ad soyad giriniz: \");\n Scanner scn = new Scanner(System.in);\n String ad=scn.next();\n oda.setMisafir(ad);\n dosyaYazici(kullanici.getAd()+\", \"+oda.getMisafir()+\" adina \"+oda.getOdaNo()+\" numarali odayi rezerve etti.\");\n }\n else System.out.print(\"Sectiginiz oda rezerve icin musait degil.\");\n }", "public void HandelKlas() {\n\t\tSystem.out.println(\"HandelKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Handel(Plansza.getRzemieslnikNaPlanszy());\n\t\tPlansza.getNiewolnikNaPLanszy().Handel(Plansza.getArystokrataNaPlanszy());\n\t\t\n\t\tPlansza.getRzemieslnikNaPlanszy().Handel(Plansza.getNiewolnikNaPLanszy());\n\t\tPlansza.getRzemieslnikNaPlanszy().Handel(Plansza.getArystokrataNaPlanszy());\n\t\t\n\t\tPlansza.getArystokrataNaPlanszy().Handel(Plansza.getNiewolnikNaPLanszy());\n\t\tPlansza.getArystokrataNaPlanszy().Handel(Plansza.getRzemieslnikNaPlanszy());\n\t}", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "void berechneUmfang() {\r\n\t\tfor (int i = 1; i < m_ANZAHL_POINTS; i++) {\r\n\t\t\tm_umfang += m_pointArray[i].distance(m_pointArray[i-1]);\t\t\r\n\t\t}\r\n\t}", "public void aplicarDescuento();", "public void renovarBolsa() {\n\t\tSystem.out.println(\"Bolsa renovada com suceso!\");\n\t}", "public void decida(){\r\n int f=this.getFila();\r\n int c=this.getColumna();\r\n int cont=alRededor(f,c);\r\n if(this.isVivo()){\r\n if(cont==2 || cont==3){\r\n estadoSiguiente=VIVA;\r\n }else/* if(cont==1 || cont>3)*/{\r\n estadoSiguiente=MUERTA;\r\n }\r\n }else{\r\n if(cont==3){\r\n estadoSiguiente=VIVA;\r\n }else if(cont==1 || cont>3){\r\n estadoSiguiente=MUERTA;\r\n }\r\n }\r\n }", "public void descolaPosicao();", "void rezervasyonYap(String name, String surname, String islem);", "public void devolver() {\r\n \t\r\n \tif (raiz == null)\r\n \t\tSystem.out.println(\"No hay datos en la pila\");\r\n else\r\n \t System.out.println(\"Devolvemos el dato de la cima: \"+raiz.dato);\r\n }", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "@Override\n\tpublic void detalhar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "@GetMapping(\n\t\t\tvalue=\"/bioskopi/ukloni/{id}\",\n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<BioskopDTO> ukloni(@PathVariable(name=\"id\") Long id){/*patvariable dovablja id od bioskopa (this.id iz jsa)*/\n\t\tBioskop b=this.bioskopService.findOne(id);\n\t\tif(b==null) {\n\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t\tBioskopDTO bioskop=new BioskopDTO(b.getId(), b.getNaziv(), b.getAdresa(), b.getBrojCentrale(), b.getEMail());\n\t\t/*prolazi kroz projekcije sale i sve brise i na kraju obrise tu salu*/\n\t\tSet<Sala> sale=b.getSale();\n\t\tfor (Sala sala : sale) {\n\t\t\tList<Terminski_raspored> projekcije=sala.getProjekcije();\n\t\t\tfor (Terminski_raspored t : projekcije) {\n\t\t\t\tSet<Gledalac> gledaoci=t.getGledaoci_koji_su_rezervisali_film();\n\t\t\t\tfor (Gledalac g : gledaoci) {\n\t\t\t\t\tif(g.getRezervisani_filmovi().contains(t)) {\n\t\t\t\t\t\tg.getRezervisani_filmovi().remove(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSet<Raspored_filmova> rasporedi=t.getRasporedi();\n\t\t\t\tfor(Raspored_filmova r:rasporedi) {\n\t\t\t\t\tthis.raspored_filmovaService.delete(t.getId());\n\t\t\t\t}\n\t\t\t\t//this.terminski_rasporedService.delete(t.getId());\n\t\t\t}\n\t\t\tthis.salaservice.deleteById(sala.getId());\n\t\t}\n\t\tthis.bioskopService.delete(id); \n\t\t\n\t\t\n\t\treturn new ResponseEntity<>(bioskop,HttpStatus.OK);\n\t}", "public void deplacements () {\n\t\t//Efface de la fenetre le mineur\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getLabyrinthe()[this.laby.getMineur().getY()][this.laby.getMineur().getX()].imageCase(themeJeu));\n\t\t//Deplace et affiche le mineur suivant la touche pressee\n\t\tpartie.laby.deplacerMineur(Partie.touche);\n\t\tPartie.touche = ' ';\n\n\t\t//Operations effectuees si la case ou se trouve le mineur est une sortie\n\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Sortie) {\n\t\t\t//On verifie en premier lieu que tous les filons ont ete extraits\n\t\t\tboolean tousExtraits = true;\t\t\t\t\t\t\t\n\t\t\tfor (int i = 0 ; i < partie.laby.getHauteur() && tousExtraits == true ; i++) {\n\t\t\t\tfor (int j = 0 ; j < partie.laby.getLargeur() && tousExtraits == true ; j++) {\n\t\t\t\t\tif (partie.laby.getLabyrinthe()[i][j] instanceof Filon) {\n\t\t\t\t\t\ttousExtraits = ((Filon)partie.laby.getLabyrinthe()[i][j]).getExtrait();\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Si c'est le cas alors la partie est terminee et le joueur peut recommencer ou quitter, sinon le joueur est averti qu'il n'a pas recupere tous les filons\n\t\t\tif (tousExtraits == true) {\n\t\t\t\tpartie.affichageLabyrinthe ();\n\t\t\t\tSystem.out.println(\"\\nFelicitations, vous avez trouvé la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire à present : [r]ecommencer ou [q]uitter ?\");\n\t\t\t\tString[] choixPossiblesFin = {\"Quitter\", \"Recommencer\"};\n\t\t\t\tint choixFin = JOptionPane.showOptionDialog(null, \"Felicitations, vous avez trouve la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire a present :\", \"Fin de la partie\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, choixPossiblesFin, choixPossiblesFin[0]);\n\t\t\t\tif ( choixFin == 1) {\n\t\t\t\t\tPartie.touche = 'r';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tPartie.touche = 'q';\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpartie.enTete.setText(\"Tous les filons n'ont pas ete extraits !\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Si la case ou se trouve le mineur est un filon qui n'est pas extrait, alors ce dernier est extrait.\n\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Filon && ((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getExtrait() == false) {\n\t\t\t\t((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setExtrait();\n\t\t\t\tSystem.out.println(\"\\nFilon extrait !\");\n\t\t\t}\n\t\t\t//Sinon si la case ou se trouve le mineur est une clef, alors on indique que la clef est ramassee, puis on cherche la porte et on l'efface de la fenetre, avant de rendre la case quelle occupe vide\n\t\t\telse {\n\t\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Clef && ((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getRamassee() == false) {\n\t\t\t\t\t((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setRamassee();\n\t\t\t\t\tint[] coordsPorte = {-1,-1};\n\t\t\t\t\tfor (int i = 0 ; i < this.laby.getHauteur() && coordsPorte[1] == -1 ; i++) {\n\t\t\t\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() && coordsPorte[1] == -1 ; j++) {\n\t\t\t\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Porte) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcoordsPorte[0] = j;\n\t\t\t\t\t\t\t\tcoordsPorte[1] = i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpartie.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].setEtat(true);\n\t\t\t\t\t((JLabel)grille.getComponents()[coordsPorte[1]*this.laby.getLargeur()+coordsPorte[0]]).setIcon(this.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].imageCase(themeJeu));\n\t\t\t\t\tSystem.out.println(\"\\nClef ramassee !\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String [] agrs){\n\r\n\r\n Kaczka gumowa = new GumowaKaczka();\r\n gumowa.ustawKwakanieInterfejs(2);\r\n gumowa.ustawLatanieInterfejs(new SzybkieLatanie());\r\n gumowa.wyswietl();\r\n System.out.println(gumowa.kwacz());\r\n System.out.println(gumowa.lec());\r\n Kaczka dzika = new DzikaKaczka();\r\n // dzika.ustawLatanieInterfejs(1);\r\n dzika.wyswietl();\r\n System.out.println(dzika.lec());\r\n System.out.println(dzika.kwacz());\r\n\r\n\r\n// Polecenie[] polecenieWlacz;\r\n// Polecenie[] polecanieWylacz;\r\n// Polecenie polecenieWycofaj;\r\n//\r\n// polecanieWylacz = new Polecenie[7];\r\n// polecenieWlacz = new Polecenie[7];\r\n//\r\n// Swiatlo swiatlo = new Swiatlo();\r\n// polecanieWylacz[0] = new PolecenieWylaczSwiatlo(swiatlo);\r\n// polecenieWlacz[0] = new PolecenieWlaczSwiatlo(swiatlo);\r\n//\r\n//\r\n//\r\n//\r\n// polecenieWlacz[0].wykonaj();\r\n// polecanieWylacz[0].wykonaj();\r\n// polecenieWlacz[0].wykonaj();\r\n// polecenieWycofaj = polecanieWylacz[0];\r\n//// polecenieWycofaj = polecenieWlacz[0];\r\n// polecenieWycofaj.wykonaj();\r\n// polecenieWycofaj.wykonaj();\r\n//// polecenieWycofaj.wycofaj();\r\n//\r\n// WiezaStereo wiezaStereo = new WiezaStereo();\r\n//\r\n// polecenieWlacz[1] = new PolecenieWiezaStereoWlaczCD(wiezaStereo);\r\n//\r\n// polecenieWlacz[1].wykonaj();\r\n\r\n\r\n\r\n }", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public void asignarVida();", "public void sendeSpielfeld();", "public void vaaraSyote() {\n System.out.println(\"En ymmärtänyt\");\n kierros();\n }", "void berechneFlaeche() {\n\t}", "public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "public void Ordenamiento() {\n\n\t}", "public void DaneStartowe() {\n\t\tSystem.out.println(\"DaneStartowe\");\n\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getArystokrataNaPlanszy().setZloto((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t\tPlansza.getArystokrataNaPlanszy().setTowary((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t}", "private DittaAutonoleggio(){\n \n }", "public int hapus() {\r\n return elemen[--ukuran];\r\n }", "public static void dodavanjeBicikl() {\n\t\tString vrstaVozila = \"Bicikl\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = Main.nista;\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = 0;\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 700;\n\t\tdouble cenaServisa = 5000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tint brSedist = 1;\n\t\tint brVrata = 0;\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tBicikl vozilo = new Bicikl(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}", "public void pierdeUnaVida() {\n numeroDeVidas--;\n }", "private void viderZonesSaisies() {\n // libellé\n EditText libelleSport = findViewById(R.id.saisieSport);\n libelleSport.setText(\"\");\n // checkbox durée\n CheckBox dureeSport = findViewById(R.id.chkDureeSport);\n dureeSport.setChecked(false);\n // checkbox distance\n CheckBox distanceSport = findViewById(R.id.chkDistanceSport);\n distanceSport.setChecked(false);\n }", "public void deskripsi() {\r\n System.out.println(this.nama + \" bekerja di Perusahaan \" + Employee.perusahaan + \" dengan usia \" + this.usia + \" tahun\");\r\n }", "public void disconnetti() {\n\t\tconnesso = false;\n\t}", "private static void resetDescontoMensal(){\n for(Apps a : apps){\n if(a.isDescontoMensal()){\n a.setDescontoMensal(false);\n }\n }\n }", "public void niveauSuivant() {\n niveau = niveau.suivant();\n }", "public static void traduitSiteAnglais() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void resetKassa() {\n aantalklanten = 0;\n aantalartikelen = 0;\n geld = 0;\n }", "public void despegar(){\n if(this.posicion == 1){\n this.setPosicion(2);\n this.indicarEstado(\"Volando\");\n } else{\n System.out.println(\"No estoy preparado para el despegue\");\n }\n }", "public void dessiner() {\n\t\tthis.panel.dessinerJeu();\t\n\t}", "public void duerme() {\n System.out.println(\"Duerme profundamentZzZzZz...\");\n }", "public static void zatvoriAplikaciju() {\r\n\t\tint zatvori = JOptionPane.showConfirmDialog(teretanaGui.getContentPane(),\r\n\t\t\t\t\"Da li ste sigurni da zelite da izadjete iz programa?\", \"Izlazak iz programa\",\r\n\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\t\tif (zatvori == JOptionPane.YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "private void cargarFichaLepra_discapacidades() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "public void UnDia()\n {\n int i = 0;\n for (i = 0; i < 6; i++) {\n for (int j = animales.get(i).size() - 1; j >= 0; j--) {\n\n if (!procesoComer(i, j)) {\n animales.get(i).get(j).destruir();\n animales.get(i).remove(j);\n } else {\n if (animales.get(i).size() > 0 && j < animales.get(i).size()) {\n\n if (animales.get(i).get(j).reproducirse()) {\n ProcesoReproducirse(i, j);\n }\n if (j < animales.get(i).size()) {\n if (animales.get(i).get(j).morir()) {\n animales.get(i).get(j).destruir();\n animales.get(i).remove(j);\n }\n }\n }\n }\n\n }\n }\n if (krill == 0) {\n Utilidades.MostrarExtincion(0, dia);\n }\n modificarKrill();\n modificarTemperatura();\n ejecutarDesastres();\n for (i = 1; i < animales.size(); i++) {\n if (animales.get(i).size() == 0 && !extintos.get(i)) {\n extintos.set(i, true);\n Utilidades.MostrarExtincion(i, dia);\n }\n }\n dia++;\n System.out.println(dia + \":\" + krill + \",\" + animales.get(1).size() + \",\" + animales.get(2).size() + \",\" + animales.get(3).size() + \",\" + animales.get(4).size() + \",\" + animales.get(5).size());\n }", "public void actualizarPodio() {\r\n\t\tordenarXPuntaje();\r\n\t\tint tam = datos.size();\r\n\t\traizPodio = datos.get(tam-1);\r\n\t\traizPodio.setIzq(datos.get(tam-2));\r\n\t\traizPodio.setDer(datos.get(tam-3));\r\n\t}", "public AutomatZustand()\r\n\t{\r\n\t\tthis.ew_lokal = Automat.eingabewort;\r\n\t}", "public final void nonRedefinissableParEnfant(){\n\n }", "public void PedirSintomas() {\n\t\t\r\n\t\tSystem.out.println(\"pedir sintomas del paciente para relizar el diagnosticoa\");\r\n\t}", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "public void botoiaDesaktibatu() {\r\n\t\tordaindu_Botoia.setEnabled(false);\r\n\t}", "public void ustalDroge(ArrayList<Sciezka> nowaDroga)\n\t{\n\t\tdroga = nowaDroga;\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void trenneVerbindung();", "void unsetNcbieaa();", "private native void destruirAplicacionNativa();", "public void AwansSpoleczny() {\n\t\tSystem.out.println(\"AwansSpoleczny\");\n\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getNiewolnikNaPLanszy() instanceof Niewolnicy) {\n\t\t\tPlansza.setNiewolnikNaPlanszy(new Mieszczanie(Plansza.getNiewolnikNaPLanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getRzemieslnikNaPlanszy() instanceof Rzemieslnicy) {\n\t\t\tPlansza.setRzemieslnikNaPlanszy(new Handlarze(Plansza.getRzemieslnikNaPlanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getArystokrataNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getArystokrataNaPlanszy() instanceof Arystokracja) {\n\t\t\tPlansza.setArystokrataNaPlanszy(new Szlachta(Plansza.getArystokrataNaPlanszy()));\n\t\t}\n\t}", "public void limpiarPaneles(){\n vistaInicial.jpCentralGeneral.removeAll();\n vistaInicial.jpDerecha.removeAll();\n vistaInicial.jpCentral.removeAll();\n }", "void Vorrücken()\n {\n }", "public void fjernAlle() {\n listehode.neste = null;\n antall = 0;\n }", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "public void leerPlanesDietas();", "private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}", "public Drakkar(){\r\n\t\tanguilas=m;\r\n\t}", "void salirDelMazo() {\n mazo.inhabilitarCartaEspecial(this);\n }", "public void distribuirAportes2(){\n\n if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){\n comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));\n }\n }", "private void disparaUfo()\n {\n // Solo dispara si no hay disparo activo\n if (!disparoUfo.getVisible()) {\n // Generamos un número aleatorio para obtener el Ufo que va a disparar\n Random aleatorio = new Random();\n int ufoAleatorio;\n ufoAleatorio = aleatorio.nextInt(NUMEROUFOS);\n\n // Si el Ufo aleatorio NO está muerto dispara\n if (ufos.get(ufoAleatorio).getVisible()) {\n disparoUfo.setPosicion(ufos.get(ufoAleatorio).getPosicionX() + ((ufos.get(ufoAleatorio).getAncho() - disparoUfo.getAncho()) / 2), ufos.get(ufoAleatorio).getPosicionY() + ufos.get(ufoAleatorio).getAlto());\n disparoUfo.setVisible(true);\n }\n }\n }", "public Vector<MakhlukHidup> get_daftar();", "public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void distribuirAportes1(){\n\n if(null == comprobanteSeleccionado.getAporteuniversidad()){\n System.out.println(\"comprobanteSeleccionado.getAporteuniversidad() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getAporteorganismo()){\n System.out.println(\"comprobanteSeleccionado.getAporteorganismo() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getMontoaprobado()){\n System.out.println(\"comprobanteSeleccionado.getMontoaprobado() >> NULO\");\n }\n\n try{\n if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){\n comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));\n comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);\n }\n } catch(NullPointerException npe){\n System.out.println(\"Error de NullPointerException\");\n npe.printStackTrace();\n }\n\n }", "public void affiche() {\n System.out.println(\"le tapis porte \"+this.tapis.size()+\" caisse(s)\");\n for (Iterator it = this.tapis.iterator(); it.hasNext(); ) {\n System.out.println(it.next().toString());\n } \n }", "public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}", "public void realizacjap34() {\n System.out.println(\"REALIZACJA PUNKTU 3\\n\");\n\n System.out.println(\"\\nWyszukiwanie osob po imieniu (Piotr) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoImieniu(Listy.osoby, \"Piotr\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po nazwisku (Oleszczuk) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzOsobyPoNazwisku(Listy.osoby, \"Oleszczuk\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy mniejszym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyMniejszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy większym niz 10============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyWiekszymNiz(Listy.osoby, 10).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stazu pracy równym 5============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStazuPracyRownym(Listy.osoby, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin mniejszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachMniejszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin wiekszej niz 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachWiekszychNiz(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po liczbie nadgodzin równej 6 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoNadgodzinachRownych(Listy.osoby, 6).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji wiekszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiWiekszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji mniejszej niz 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiMniejszejNiz(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po pensji rownej 15000 ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoPensjiRownej(Listy.osoby, 15000).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie osob po stanowisku (Adiunkt) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzPracownikowPoStanowisku(Listy.osoby, \"Adiunkt\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studenta po numerze indeksu (123456) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzStudentaPoIndeksie(Listy.osoby, \"123456\"));\n\n System.out.println(\"\\nWyszukiwanie studentów po roku studiów (1) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoRokuStudiow(Listy.osoby, 1).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie studentów po kierunku (Informatyka Stosowana) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzStudentowPoKierunku(Listy.osoby, \"Informatyka Stosowana\").forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursu po nazwie (Analiza Matematyczna 1) ============================================================================\\n\");\n System.out.println(NarzedziaWyszukiwania.znajdzKursPoNazwie(Listy.kursy, \"Analiza Matematyczna 1\"));\n\n System.out.println(\"\\nWyszukiwanie kursów po liczbie ects (5) ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoECTS(Listy.kursy, 5).forEach(System.out::println);\n\n System.out.println(\"\\nWyszukiwanie kursów po prowadzacym+\"+Listy.osoby.get(0).getImie()+\" \"+Listy.osoby.get(0).getNazwisko()+\" ============================================================================\\n\");\n NarzedziaWyszukiwania.znajdzKursyPoProwadzacym(Listy.kursy, Listy.osoby.get(0)).forEach(System.out::println);\n\n\n //REALIZACJA PUNKTU 4\n System.out.println(\"=====================================================================================================================\");\n System.out.println(\"REALIZACJA PUNKTU 4\");\n System.out.println(\"=====================================================================================================================\\n\");\n System.out.println(\"Kursy:\\n\");\n for (Kurs kurs : Listy.kursy) {\n System.out.println(kurs.toString());\n }\n\n System.out.println(\"\\nOsoby:\\n\");\n for (Osoba osoba : Listy.osoby) {\n System.out.println(\"OSOBA====================================================================================================\");\n System.out.println(osoba.toString());\n System.out.println();\n }\n }", "public void destruirArbol(){\n\t\thDer=null;\n\t\thIzq=null;\n\t\tesVacio=true;\n\t}", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "private void remplirUtiliseData() {\n\t}", "public void verarbeite() {\n\t\t\r\n\t}", "public void testAuta()\n\t{\n\t\tNakladak nakl = new Nakladak(Simulator.getCas());\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\t//cesta po prekladistich\n\t\tfor(int i=4001;i<4009;i++)\n\t\t{\n\t\t\tnakl.cesta.add(i);\n\t\t}\n\t\tnakl.kDispozici = false;\n\t\tnakl.jede = true;\n\t\tsim.addObserver(nakl);\n\t\t\n\t\tthis.vozy.add(nakl);\n\t\t\n\t}", "public void limpiarPuntos() {\n \tpuntos.clear();\n }", "@Override\n\tpublic void verkaufen() {\n\t}" ]
[ "0.65595645", "0.64309853", "0.6310721", "0.6291233", "0.62153643", "0.6213087", "0.6209026", "0.6182081", "0.6144151", "0.6137768", "0.6120994", "0.61033356", "0.6095781", "0.60437655", "0.6041703", "0.60335344", "0.60284144", "0.6007461", "0.59819645", "0.59626615", "0.59552056", "0.59488267", "0.59377015", "0.5934834", "0.593357", "0.59311736", "0.59283555", "0.59256893", "0.5919496", "0.59104824", "0.5906581", "0.58956385", "0.58916456", "0.5885748", "0.58770627", "0.5875316", "0.58547556", "0.58523417", "0.5851736", "0.5848821", "0.5844896", "0.58448064", "0.58435816", "0.5840942", "0.58312434", "0.5806358", "0.58011585", "0.57951754", "0.57901746", "0.5787831", "0.5786058", "0.57770246", "0.57745975", "0.5771061", "0.5763903", "0.57590055", "0.5757353", "0.57560766", "0.5752667", "0.5751242", "0.57488203", "0.57475567", "0.5739382", "0.57345355", "0.57280064", "0.57205725", "0.5714624", "0.5714218", "0.571225", "0.5708386", "0.57056683", "0.57056683", "0.57036525", "0.5703331", "0.5701625", "0.5700579", "0.5692963", "0.569218", "0.56919044", "0.56908035", "0.5689539", "0.5689199", "0.5685099", "0.56780696", "0.56683916", "0.5663704", "0.56609815", "0.5659833", "0.56512594", "0.56507456", "0.56506765", "0.56500566", "0.5645707", "0.56424814", "0.56386197", "0.56350654", "0.5633384", "0.5629842", "0.5626617", "0.56240636", "0.5615945" ]
0.0
-1
deleten apumetodi, joka poistaa kaksilapsisen solmun.
private Node caseTwoChildren(Node deleteThis) { Node next = getMin(deleteThis.getRight()), child, parent; deleteThis.setKey(next.getKey()); child = next.getRight(); parent = next.getParent(); if (parent.getLeft() == next) { parent.setLeft(child); } else { parent.setRight(child); } if (child != null) { child.setParent(parent); } return next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void desligar() {\n\r\n\t}", "@Override\n\tpublic void desligar() {\n\t\t\n\t}", "private native void destruirAplicacionNativa();", "@Override\n\tvoid desligar() {\n\t\tsuper.desligar();\n\t\tSystem.out.println(\"Automovel desligando\");\n\t}", "@Override\n\tpublic void detalhar() {\n\t\t\n\t}", "private void hienThiMaKHSuDungDV(){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layMaKHSuDungDVLoaiBoTrungLap();\n \n cbbThanhToanMaKH.removeAllItems();\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaKH.addItem(suDungModel.getMaKH());\n }\n }", "@GetMapping(\n\t\t\tvalue=\"/bioskopi/ukloni/{id}\",\n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<BioskopDTO> ukloni(@PathVariable(name=\"id\") Long id){/*patvariable dovablja id od bioskopa (this.id iz jsa)*/\n\t\tBioskop b=this.bioskopService.findOne(id);\n\t\tif(b==null) {\n\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t\tBioskopDTO bioskop=new BioskopDTO(b.getId(), b.getNaziv(), b.getAdresa(), b.getBrojCentrale(), b.getEMail());\n\t\t/*prolazi kroz projekcije sale i sve brise i na kraju obrise tu salu*/\n\t\tSet<Sala> sale=b.getSale();\n\t\tfor (Sala sala : sale) {\n\t\t\tList<Terminski_raspored> projekcije=sala.getProjekcije();\n\t\t\tfor (Terminski_raspored t : projekcije) {\n\t\t\t\tSet<Gledalac> gledaoci=t.getGledaoci_koji_su_rezervisali_film();\n\t\t\t\tfor (Gledalac g : gledaoci) {\n\t\t\t\t\tif(g.getRezervisani_filmovi().contains(t)) {\n\t\t\t\t\t\tg.getRezervisani_filmovi().remove(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSet<Raspored_filmova> rasporedi=t.getRasporedi();\n\t\t\t\tfor(Raspored_filmova r:rasporedi) {\n\t\t\t\t\tthis.raspored_filmovaService.delete(t.getId());\n\t\t\t\t}\n\t\t\t\t//this.terminski_rasporedService.delete(t.getId());\n\t\t\t}\n\t\t\tthis.salaservice.deleteById(sala.getId());\n\t\t}\n\t\tthis.bioskopService.delete(id); \n\t\t\n\t\t\n\t\treturn new ResponseEntity<>(bioskop,HttpStatus.OK);\n\t}", "void unsetSchufaResponseData();", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "public void botoiaDesaktibatu() {\r\n\t\tordaindu_Botoia.setEnabled(false);\r\n\t}", "public void aplicarDescuento();", "private void hienThiCBBmaDV(){\n DichVuService dichVuService = new DichVuService();\n dichVuModels = dichVuService.layToanBoDichVu();\n \n cbbMaDV.removeAllItems();\n if (dichVuModels != null){\n for (DichVuModel dichVuModel : dichVuModels) {\n cbbMaDV.addItem(dichVuModel.getMaDV());\n }\n }else{\n return;\n }\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "void unsetNcbieaa();", "public void asetaTeksti(){\n }", "public WebService_Detalle_alquiler_factura() {\n }", "private DittaAutonoleggio(){\n \n }", "void rezervasyonYap(String name, String surname, String islem);", "private static void resetDescontoMensal(){\n for(Apps a : apps){\n if(a.isDescontoMensal()){\n a.setDescontoMensal(false);\n }\n }\n }", "public void descontarUnidad() {\r\n\t\tcantidad--;\r\n\t}", "public void descolaPosicao();", "public static void dodavanjePutnickogVozila() {\n\t\tString vrstaVozila = \"Putnicko Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 10000;\n\t\tdouble cenaServisa = 8000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedist = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tPutnickoVozilo vozilo = new PutnickoVozilo(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno,\n\t\t\t\tpreServisa, cenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "private static void Rezerve(ArrayList<Oda> odalar, Kullanici kullanici)\n {\n Oda oda=odaSec(odalar);\n if(oda.getMisafir().equals(\"0\"))\n {\n System.out.print(\"Ad soyad giriniz: \");\n Scanner scn = new Scanner(System.in);\n String ad=scn.next();\n oda.setMisafir(ad);\n dosyaYazici(kullanici.getAd()+\", \"+oda.getMisafir()+\" adina \"+oda.getOdaNo()+\" numarali odayi rezerve etti.\");\n }\n else System.out.print(\"Sectiginiz oda rezerve icin musait degil.\");\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "private void remplirUtiliseData() {\n\t}", "public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private void cargarFichaLepra_discapacidades() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "private void limpiarDatos() {\n\t\t\n\t}", "public void dessiner() {\n\t\tafficherMatriceLignes(m.getCopiePartielle(progresAffichage), gc);\r\n\t}", "public void asignarVida();", "@Override\n public void popuniPodatke() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void decida(){\n int vecinasVivas=vecinos();\n if(vecinasVivas==3 && estadoActual=='m'){\n estadoSiguiente='v';\n }else if((estadoActual=='v' && vecinasVivas==2) || (estadoActual=='v' && vecinasVivas==3)){\n estadoSiguiente='v';\n }else if(vecinasVivas<2 || vecinasVivas>3){\n estadoSiguiente='m';\n }\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void sendeSpielfeld();", "void berechneFlaeche() {\n\t}", "public void resetKassa() {\n aantalklanten = 0;\n aantalartikelen = 0;\n geld = 0;\n }", "public final void nonRedefinissableParEnfant(){\n\n }", "public static void traduitSiteAnglais() {\n\t\t\n\t}", "void unsetDesc();", "public void disconnetti() {\n\t\tconnesso = false;\n\t}", "public void ugasiKorisnika() {\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n if (outputStream != null) {\n outputStream.close();\n }\n if (socket != null) {\n socket.close();\n }\n } catch (IOException ex) {\n Logger.getLogger(KorisnikApstraktni.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void Ordenamiento() {\n\n\t}", "public void decida(){\r\n int f=this.getFila();\r\n int c=this.getColumna();\r\n int cont=alRededor(f,c);\r\n if(this.isVivo()){\r\n if(cont==2 || cont==3){\r\n estadoSiguiente=VIVA;\r\n }else/* if(cont==1 || cont>3)*/{\r\n estadoSiguiente=MUERTA;\r\n }\r\n }else{\r\n if(cont==3){\r\n estadoSiguiente=VIVA;\r\n }else if(cont==1 || cont>3){\r\n estadoSiguiente=MUERTA;\r\n }\r\n }\r\n }", "public void destruirArbol(){\n\t\thDer=null;\n\t\thIzq=null;\n\t\tesVacio=true;\n\t}", "public void HandelKlas() {\n\t\tSystem.out.println(\"HandelKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Handel(Plansza.getRzemieslnikNaPlanszy());\n\t\tPlansza.getNiewolnikNaPLanszy().Handel(Plansza.getArystokrataNaPlanszy());\n\t\t\n\t\tPlansza.getRzemieslnikNaPlanszy().Handel(Plansza.getNiewolnikNaPLanszy());\n\t\tPlansza.getRzemieslnikNaPlanszy().Handel(Plansza.getArystokrataNaPlanszy());\n\t\t\n\t\tPlansza.getArystokrataNaPlanszy().Handel(Plansza.getNiewolnikNaPLanszy());\n\t\tPlansza.getArystokrataNaPlanszy().Handel(Plansza.getRzemieslnikNaPlanszy());\n\t}", "public void devolver() {\r\n \t\r\n \tif (raiz == null)\r\n \t\tSystem.out.println(\"No hay datos en la pila\");\r\n else\r\n \t System.out.println(\"Devolvemos el dato de la cima: \"+raiz.dato);\r\n }", "public void despegar(){\n if(this.posicion == 1){\n this.setPosicion(2);\n this.indicarEstado(\"Volando\");\n } else{\n System.out.println(\"No estoy preparado para el despegue\");\n }\n }", "public void deskripsi() {\r\n System.out.println(this.nama + \" bekerja di Perusahaan \" + Employee.perusahaan + \" dengan usia \" + this.usia + \" tahun\");\r\n }", "@Override\n\t\t\t\tpublic void downget(String arg0) {\n\t\t\t\t}", "public int hapus() {\r\n return elemen[--ukuran];\r\n }", "public static void zatvoriAplikaciju() {\r\n\t\tint zatvori = JOptionPane.showConfirmDialog(teretanaGui.getContentPane(),\r\n\t\t\t\t\"Da li ste sigurni da zelite da izadjete iz programa?\", \"Izlazak iz programa\",\r\n\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\t\tif (zatvori == JOptionPane.YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public void unget() {}", "public void renovarBolsa() {\n\t\tSystem.out.println(\"Bolsa renovada com suceso!\");\n\t}", "public void tyhjenna() {\n this.kulmat.clear();\n }", "public void limpiarPaneles(){\n vistaInicial.jpCentralGeneral.removeAll();\n vistaInicial.jpDerecha.removeAll();\n vistaInicial.jpCentral.removeAll();\n }", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "private void disparaUfo()\n {\n // Solo dispara si no hay disparo activo\n if (!disparoUfo.getVisible()) {\n // Generamos un número aleatorio para obtener el Ufo que va a disparar\n Random aleatorio = new Random();\n int ufoAleatorio;\n ufoAleatorio = aleatorio.nextInt(NUMEROUFOS);\n\n // Si el Ufo aleatorio NO está muerto dispara\n if (ufos.get(ufoAleatorio).getVisible()) {\n disparoUfo.setPosicion(ufos.get(ufoAleatorio).getPosicionX() + ((ufos.get(ufoAleatorio).getAncho() - disparoUfo.getAncho()) / 2), ufos.get(ufoAleatorio).getPosicionY() + ufos.get(ufoAleatorio).getAlto());\n disparoUfo.setVisible(true);\n }\n }\n }", "@Override\n\tpublic void devolucao(Livros livro) {\n\t\t\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "public void pierdeUnaVida() {\n numeroDeVidas--;\n }", "static public void zapisz(String host){\n\n String daneWysyłane=\"oddaj=\";\n Wyp[] wyporzyczeniaDoZmiany=new Wyp[wyporzyczenia.size()];\n for(int i=0;i<wyporzyczenia.size();i++){\n Wyp el=wyporzyczenia.elements().nextElement();\n if(el.zmieniony){\n wyporzyczeniaDoZmiany[i]=el;\n daneWysyłane+=el.id+\"/\"+el.czasKoniec+\";\";\n\n }\n }\n daneWysyłane+=\"&dodaj=\";\n Wyp[] wyporzyczeniaDoDodania=new Wyp[wyporzyczenia.size()];\n for(int i=0;i<wyporzyczenia.size();i++){\n Wyp el=wyporzyczenia.elements().nextElement();\n if(el.dodany){\n wyporzyczeniaDoDodania[i]=el;\n daneWysyłane+=el.laptop.id+\"/\"+el.kto.id+\"/\"+el.czasStart()+\"/\"+el.czasKoniec()+\";\";\n\n }\n }\n URL u = null;\n try {\n u = new URL(\"http://\"+host+\"/zapisz.php\");\n HttpURLConnection con = (HttpURLConnection) u.openConnection();\n\n //add reuqest header\n con.setRequestMethod(\"POST\");\n con.setRequestProperty(\"User-Agent\", \"Android\");\n con.setRequestProperty(\"Accept-Language\", \"en-US,en;q=0.5\");\n\n\n // Send post request\n con.setDoOutput(true);\n DataOutputStream wr = new DataOutputStream(con.getOutputStream());\n wr.writeBytes(daneWysyłane);\n wr.flush();\n wr.close();\n\n int responseCode = con.getResponseCode();\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "private void viderZonesSaisies() {\n // libellé\n EditText libelleSport = findViewById(R.id.saisieSport);\n libelleSport.setText(\"\");\n // checkbox durée\n CheckBox dureeSport = findViewById(R.id.chkDureeSport);\n dureeSport.setChecked(false);\n // checkbox distance\n CheckBox distanceSport = findViewById(R.id.chkDistanceSport);\n distanceSport.setChecked(false);\n }", "public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}", "public void limpiarPuntos() {\n \tpuntos.clear();\n }", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "private void unDeleteValoresPago() {\n CQChangeStateVP( MVALORPAGO.ANULADO,MVALORPAGO.EMITIDO);\n }", "public void trenneVerbindung();", "public void disparar(){}", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "public Destruir() {\r\n }", "public void verarbeite() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public static void dodavanjeBicikl() {\n\t\tString vrstaVozila = \"Bicikl\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = Main.nista;\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = 0;\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 700;\n\t\tdouble cenaServisa = 5000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tint brSedist = 1;\n\t\tint brVrata = 0;\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tBicikl vozilo = new Bicikl(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public void deleteAnio()\r\n {\r\n this._has_anio= false;\r\n }", "@Override\n\tpublic void eliminar() {\n\n\t}", "public void borrarPiezasAmenazadoras(){\n this.piezasAmenazadoras.clear();\n }", "void uncap();", "public void desplegarInformacion() { //\n\n System.out.println(nombre);\n System.out.println(apellido);\n\n }", "public void desvincular() {\n\t\tList<Motorista> motoristas = new ArrayList<>();\n\t\tList<Veiculo> veiculos = new ArrayList<>();\n\t\ttry {\n\t\t\tveiculos = Deserializador.deserializar(\"conteudo/veiculos\", Veiculo.class);\n\t\t\tmotoristas = Deserializador.deserializar(\"conteudo/motoristas\", Motorista.class);\n\n\t\t\tScanner entrada = new Scanner(System.in);\n\t\t\tMotorista motorista = null;\n\t\t\tVeiculo veiculo = null;\n\t\t\tSystem.out.println(\"Digite o numero da CNH do motorista que deseja desvincular.\");\n\t\t\tint cnh = entrada.nextInt();\n\t\t\tif (motoristas != null) {\n\t\t\t\tif (veiculos != null) {\n\t\t\t\t\tfor (Motorista motor : motoristas) {\n\t\t\t\t\t\tif (cnh == motor.getNumero_Carteira()) {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista encontrado: \" + motor.getNome());\n\t\t\t\t\t\t\tmotorista = motor;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (motorista == null) {\n\t\t\t\t\t\tSystem.out.println(\"Motorista nao encontrado!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (Veiculo veic : veiculos) {\n\t\t\t\t\t\t\tif (veic.getPlaca().equals(motorista.getVeiculo().getPlaca())) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veiculo encontrado.\");\n\t\t\t\t\t\t\t\tveiculo = veic;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (motorista.getVeiculo() != null) {\n\t\t\t\t\t\t\tveiculo.setMotorista(null);\n\t\t\t\t\t\t\tmotorista.setVeiculo(null);\n\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista desvinculado com sucesso.\");\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista nao esta vinculado a nenhum veiculo.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"A lista de veiculos esta vazia.\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"A lista de motoristas esta vazia.\");\n\t\t\t}\n\n\t\t\tSerializador s = new Serializador();\n\t\t\ts.serializar(\"conteudo/motoristas\", motoristas);\n\t\t\ts.serializar(\"conteudo/veiculos\", veiculos);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.err.println(\"Falha ao serializar ou deserializar! - \" + ex.toString());\n\t\t}\n\t}", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "void Vorrücken()\n {\n }", "@Override\n\tpublic void naoAtirou() {\n\t\tatirou=false;\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void exit () {\r\n System.out.println(\"Desligando aplicação...\");\r\n this.stub.killStub();\r\n }", "@Override\r\n\tpublic void emettreOffre() {\n\t\t\r\n\t}", "public void videListeClient(){\n couleurs.clear();\n }", "void salirDelMazo() {\n mazo.inhabilitarCartaEspecial(this);\n }", "public void supprimerInaccessibles(){\n grammaireCleaner.nettoyNonAccGramm();\n setChanged();\n notifyObservers(\"3\");\n }", "public synchronized void zeraArtigo() throws HelpDeskException {\n\t\tArtigoDAO.getInstance().removeAll();\n\t}", "public static void deletarProdutos(){\n if(ListaDProduto.isEmpty()){\n SaidaDados(\"Nenhum produto cadastrado\");\n return;\n } \n ListaDProduto.clear();\n SaidaDados(\"Todos produto deletado com sucesso\");\n \n \n }", "public List<Mobibus> darMobibus();" ]
[ "0.6598745", "0.6505438", "0.6216745", "0.6182959", "0.61075413", "0.6076109", "0.60734594", "0.604431", "0.598459", "0.5941349", "0.5939326", "0.5912806", "0.5897896", "0.5868503", "0.5856053", "0.5853362", "0.5837891", "0.58201927", "0.58152485", "0.5807587", "0.58028185", "0.57660127", "0.5754404", "0.57227224", "0.5715877", "0.57097226", "0.57071865", "0.5705618", "0.5686808", "0.5686808", "0.5680632", "0.56663525", "0.56656486", "0.56637836", "0.5661201", "0.5658154", "0.56241155", "0.56239927", "0.56108546", "0.5606237", "0.5590309", "0.55729634", "0.556986", "0.55585104", "0.55582076", "0.554946", "0.55482006", "0.5539734", "0.5531561", "0.5530802", "0.55303836", "0.5512184", "0.55053246", "0.5503593", "0.54998237", "0.54967153", "0.54920506", "0.5491499", "0.5483413", "0.54734844", "0.5459177", "0.5449614", "0.5444963", "0.543396", "0.54331", "0.54235846", "0.5421384", "0.542055", "0.54193634", "0.5414319", "0.5407702", "0.5405826", "0.5404404", "0.5402989", "0.5399124", "0.53986126", "0.53973776", "0.5395346", "0.53945744", "0.5394237", "0.53876644", "0.53822273", "0.537061", "0.53705585", "0.5367108", "0.5365134", "0.5360897", "0.53396183", "0.53393507", "0.5335267", "0.5331154", "0.5329727", "0.5328162", "0.5327702", "0.532711", "0.53207785", "0.5319465", "0.5316653", "0.5305638", "0.53025067", "0.530147" ]
0.0
-1
Etsii puusta suurimman avaimen getMaxmetodin avulla.
public int getMaxKey() { return getMax(this.root).getKey(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMaximun(){\n int highGrade = grades[0]; //assumi que grades[0] é a maior nota\n //faz o loop pelo array de notas\n for(int grade: grades){\n //se a nota for maior que highGrade. atribui essa nota a highGrade\n if(grade > highGrade){\n highGrade = grade; //nota mais alta\n }\n }\n \n return highGrade;\n }", "private static void afisareSubsecventaMaxima() {\n afisareSir(citireSir().SecvMax());\n }", "String getMax_res();", "protected final int getMax() {\n\treturn(this.max);\n }", "int getMax();", "double getMax();", "double getMax();", "public int getMax(){\n return tab[rangMax()];\n }", "protected int getMaxAantalPerTrein() {\r\n return maxaantalpassagiersintrein;\r\n }", "private int max(int profondeur)\n\t{\n\t\tif(profondeur == 0 || grille.fin())\n\t\t{\n\t\t\treturn eval();\n\t\t}\n\t\tint max_val = -1000;\n\t\tfor(int y = 0; y < grille.getTaille(); y++)\n\t\t{\n\t\t\tfor(int x = 0; x < grille.getTaille(); x++)\n\t\t\t{\n\t\t\t\tCoordonnee test = new Coordonnee(x, y);\n\t\t\t\tif(grille.getCase(test).getContenu() == grille.getCaseVide())\n\t\t\t\t{\n\t\t\t\t\tgrille.jouer(test, getPion());\n\t\t\t\t\tint val = min(profondeur-1);\n\t\t\t\t\t//System.out.println(x + \" \" + y + \" : \" + val);\n\t\t\t\t\t//grille.afficher();\n\t\t\t\t\tif(val > max_val)\n\t\t\t\t\t{\n\t\t\t\t\t\tmax_val = val;\n\t\t\t\t\t}\n\t\t\t\t\tannuler(test);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max_val;\n\t}", "public int getPuntajeMaximo() {\n\t\ttry {\r\n\t\t\treturn juego.getPuntajeMaximo();\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public int getMax()\n {\n return 0;\n }", "public Contenedor getContenedorMaximo()\n {\n Contenedor maxCont = null;\n int maxPeso ;\n\n maxPeso = 0;\n\n for (Contenedor c : this.losContenedores){\n if (c.peso > maxPeso)\n {\n maxPeso = c.peso;\n maxCont = c;\n }\n }\n\n return maxCont;\n }", "int getMaximum();", "public double max() {\n double resultat = 0;\n double tmp = 0;\n System.out.println(\"type:\" + type);\n for (int i = 0; i < tab.size(); i++) {\n tmp = CalculatorArray.max(tab.get(i));\n if (tmp > resultat) {\n resultat = tmp;\n }\n }\n System.out.println(\"Max colonne:\" + resultat);\n return resultat;\n }", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMaxValue(){\n\t\treturn maxValue;\n\t}", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "public int getSumaMax() {\r\n\t\treturn sumaMax;\r\n\t}", "public int GetMaxVal();", "public int getMaxValue() {\n return maxValue;\n }", "public abstract int getMaximumValue();", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMaximum() {\r\n return max;\r\n }", "public double calcularAlvoMaximo() {\r\n\t\treturn calcularFrequenciaMaxima()*0.85;\r\n\t}", "E maxVal();", "Expression getMax();", "public String getMaxValue () {\n return maxValue;\n }", "public static int retourneMaxNumber() {\n int tmp = 0;\n try {\n String requete = \"SELECT Max(eleve.id_el) AS Maxeleve FROM eleve\";\n ResultSet rs = Connector1.statement.executeQuery(requete);\n while (rs.next()) {\n tmp = rs.getInt(1);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n }\n return tmp;\n }", "private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }", "public int getMaxMtu() {\n return mMaxMtu;\n }", "public float getMax()\n {\n parse_text();\n return max;\n }", "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}", "public Point getMax () {\r\n\r\n\treturn getB();\r\n }", "@In Integer max();", "@In Integer max();", "public Long getMaxValue() {\n return maxValue;\n }", "public long getMax() {\n return m_Max;\n }", "private double getMax() {\n return Collections.max(values.values());\n }", "@Override\n public Long findMAX() {\n\n StringBuffer sql = new StringBuffer(\"select max(magoithau) from goithau\");\n Query query = entityManager.createNativeQuery(sql.toString());\n return Long.parseLong(query.getSingleResult().toString()) ;\n }", "public String getMax() {\n return max;\n }", "public Integer getMax() {\n\t\t\tif (hotMinMax) {\n\t\t\t\tConfigValue rawMinMax = new ConfigValue();\n\t\t\t\ttry {\n\t\t\t\t\trawSrv.getCfgMinMax(name, rawMinMax);\n\t\t\t\t\t// TODO: FIX HERE\n\t\t\t\t\treturn 100;\n\t\t\t\t} catch (TVMException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn new Integer(max);\n\t\t\t}\n\t\t\t// ....\n\t\t\treturn 100;\n\t\t}", "public float getMaxAlturaCM();", "public int findMax(){\n return nilaiMaks(this.root);\n }", "int getMax( int max );", "public int getMaxIntValue();", "int maxNoteValue();", "public String getMax() { \n\t\treturn getMaxElement().getValue();\n\t}", "public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}", "public int getMax() {\n\t\treturn mMax;\n\t}", "protected String getMaximum()\n {\n return maximum;\n }", "public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}", "public Factura getMaxNumeroFactura();", "public java.lang.Integer getMaxResultados()\n {\n return this.maxResultados;\n }", "int max();", "public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }", "double getMaxAmountl() {\n\t\treturn MAX_AMOUNT;\n\t}", "int getMaxInt();", "public String max()\r\n\t {\r\n\t\t if(this.max != null)\r\n\t\t {\r\n\t\t\t return this.max.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }", "int getMaxStamina();", "public int getMaxAmount() {\n return _max;\n }", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "@JsonIgnore\r\n public String getMax() {\r\n return OptionalNullable.getFrom(max);\r\n }", "public Quantity<Q> getMax() {\n return max;\n }", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "@Override\n\tpublic long getMaxnum() {\n\t\treturn _esfTournament.getMaxnum();\n\t}", "public double getMaximumValue() { return this.maximumValue; }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int input =0;\n int[] nilai = new int[5];\n System.out.println(\"Masukkan 5 nilai : \");\n for(int i=0;i<5;i++){\n input = in.nextInt();\n nilai[i] = input;\n }\n System.out.println(\"Nilai Maksimum = \" +cariMax(nilai));\n }", "protected final Comparable getMax()\r\n {\r\n return myMax;\r\n }", "protected IExpressionValue max()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MAX FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2>ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,true);\r\n\t\t\r\n\t}", "public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}", "public void setMaxAlturaCM(float max);", "public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}", "Double getMaximumValue();", "public double getMaximum() {\n return (max);\n }", "public int getMaxDias() {\n\t\treturn maxDias;\n\t}", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "public static void setMaxAu(int max) {\n\t\tmaxAu = max;\n\t}", "public int ObtenerMaximaIdDetalle() {// METODO OBTENER MAXIMA ID\n\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturadetalle\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n idFacturaDetalle = 0;\n\n while (rs.next()) {\n idFacturaDetalle = rs.getInt(\"idFacturaDetalle\");\n }\n\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return idFacturaDetalle;\n }", "public int getMaxAthletes()\n {\n\treturn maxAthletes;\n }", "int max(){\r\n int auxMax = array[0];\r\n for (int i=1;i<array.length;i++){\r\n if(array[i] > auxMax){\r\n auxMax = array[i];\r\n }\r\n }\r\n return auxMax;\r\n }", "public Long consultarTiempoMaximo() {\n return timeFi;\n }", "public int max() {\n\t\treturn 0;\n\t}", "public int getMax()\n {\n int max = data.get(0).getX();\n\n for(int i = 0; i < data.size(); i++)\n {\n if (data.get(i).getX() > max)\n {\n max = data.get(i).getX();\n }\n }\n\n\n return max;\n }", "public int getVitesseMax()\t{\r\n \treturn this.vitesseMax;\r\n }", "public int getMaximum() {\n return this.iMaximum;\n }", "public double getMaxVal() {\n return maxVal;\n }", "public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}", "private float getMaxHeight(TECarpentersBlock TE)\n \t{\n \t\tfloat maxHeight = 1.0F / 16.0F;\n \t\t\n \t\tfor (int quadrant = 0; quadrant < 4; ++quadrant) {\n \t\t\tfloat quadHeight = Collapsible.getQuadHeight(TE, quadrant) / 16.0F;\n \t\t\tif (quadHeight > maxHeight)\n \t\t\t\tmaxHeight = quadHeight;\n \t\t}\t\t\n \n \t\treturn maxHeight;\n \t}", "public int getMaxValue() throws Exception {\n\t\treturn RemoteServer.instance().executeAndGetId(\"getmaxvalue\",\n\t\t\t\tgetRefId());\n\t}" ]
[ "0.7560499", "0.7534673", "0.73059696", "0.72906053", "0.7273432", "0.7261439", "0.7261439", "0.71755826", "0.7150421", "0.7139299", "0.7114689", "0.7034015", "0.7001677", "0.69662076", "0.687462", "0.68690765", "0.68677664", "0.68677664", "0.68677664", "0.68518764", "0.6829171", "0.6828289", "0.68279284", "0.6815493", "0.68012434", "0.6778419", "0.6778419", "0.67621285", "0.67498666", "0.67491686", "0.67453724", "0.67435366", "0.67348284", "0.67179006", "0.67171675", "0.6713823", "0.6706212", "0.67056245", "0.669621", "0.669621", "0.6676094", "0.6671564", "0.66713256", "0.66662574", "0.666501", "0.6664227", "0.6657106", "0.6644361", "0.663514", "0.66320324", "0.66278976", "0.6622951", "0.661816", "0.6609809", "0.6583568", "0.6578376", "0.65751094", "0.6562405", "0.6549373", "0.6546545", "0.654257", "0.6541158", "0.65300024", "0.65218323", "0.65197504", "0.65152633", "0.6513592", "0.6512036", "0.6499272", "0.6486431", "0.6470434", "0.64683086", "0.6452525", "0.6447828", "0.64461976", "0.6440785", "0.64309114", "0.6429312", "0.64231634", "0.64187026", "0.6399455", "0.6395998", "0.63840044", "0.63840044", "0.63840044", "0.63840044", "0.63840044", "0.63840044", "0.6382649", "0.63783437", "0.63742083", "0.63640356", "0.6359189", "0.6356813", "0.63527054", "0.6332146", "0.6325189", "0.6318136", "0.6315671", "0.6302008", "0.6292696" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel15 = new javax.swing.JLabel(); patientNameBox = new javax.swing.JTextField(); patientAgeBox = new javax.swing.JTextField(); patientDiseaseBox = new javax.swing.JTextField(); patientIDBox = new javax.swing.JTextField(); patientSetBtn = new javax.swing.JButton(); patientIDSearchBtn = new javax.swing.JTextField(); searchPatientBtn = new javax.swing.JButton(); patientNameFoundBox = new javax.swing.JTextField(); patientAgeFoundBox = new javax.swing.JTextField(); patientDiseaseFoundBox = new javax.swing.JTextField(); docNameBox = new javax.swing.JTextField(); docSkillBox = new javax.swing.JTextField(); docSet = new javax.swing.JButton(); billPatientIDBox = new javax.swing.JTextField(); billPatient = new javax.swing.JButton(); checkInventoryBtn = new javax.swing.JButton(); sellMedsBtn = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jButton7 = new javax.swing.JButton(); cashShowBtn = new javax.swing.JButton(); jButton9 = new javax.swing.JButton(); jButton10 = new javax.swing.JButton(); exitBtn = new javax.swing.JButton(); clrAllTxt = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); sellMedsBox = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); sellAmount = new javax.swing.JTextField(); medsBuyBox = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); buyMedsAmount = new javax.swing.JTextField(); buyMedsBtn = new javax.swing.JButton(); buyPriceBox = new javax.swing.JTextField(); asdfas = new javax.swing.JLabel(); showAmountBox = new javax.swing.JLabel(); numberOfPatient = new javax.swing.JLabel(); diseaseByTypeLbl = new javax.swing.JLabel(); medsCountLbl = new javax.swing.JLabel(); cashShowLbl = new javax.swing.JLabel(); diseaseSearchBox = new javax.swing.JTextField(); ShowAllMeds = new javax.swing.JButton(); EditProfit = new javax.swing.JButton(); ShowDoctorInfo = new javax.swing.JButton(); ShowPatients = new javax.swing.JButton(); docShowWallet = new javax.swing.JButton(); jLabel15.setText("jLabel15"); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(51, 204, 255)); patientNameBox.setText("patient name"); patientNameBox.setToolTipText("set patient name"); patientNameBox.setName("patientName"); // NOI18N patientAgeBox.setText("age"); patientAgeBox.setToolTipText("age"); patientDiseaseBox.setText("disease"); patientDiseaseBox.setToolTipText("disease"); patientIDBox.setText("patientID"); patientIDBox.setToolTipText("patientID"); patientIDBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { patientIDBoxActionPerformed(evt); } }); patientSetBtn.setText("Submit"); patientSetBtn.setToolTipText("Set Method"); patientSetBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { patientSetBtnActionPerformed(evt); } }); patientIDSearchBtn.setText("patient id"); patientIDSearchBtn.setToolTipText("patietn id for search"); patientIDSearchBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { patientIDSearchBtnActionPerformed(evt); } }); searchPatientBtn.setText("Search"); searchPatientBtn.setToolTipText("Find your Patient"); searchPatientBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchPatientBtnActionPerformed(evt); } }); patientNameFoundBox.setText("search result"); patientNameFoundBox.setToolTipText(""); patientNameFoundBox.setName("patientName"); // NOI18N patientAgeFoundBox.setText("search result"); patientAgeFoundBox.setToolTipText(""); patientAgeFoundBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { patientAgeFoundBoxActionPerformed(evt); } }); patientDiseaseFoundBox.setText("search result"); patientDiseaseFoundBox.setToolTipText(""); patientDiseaseFoundBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { patientDiseaseFoundBoxActionPerformed(evt); } }); docNameBox.setToolTipText("doc name"); docNameBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { docNameBoxActionPerformed(evt); } }); docSkillBox.setToolTipText("expertise"); docSet.setText("doc set"); docSet.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { docSetActionPerformed(evt); } }); billPatientIDBox.setToolTipText("patient id"); billPatient.setText("bill patient"); billPatient.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { billPatientActionPerformed(evt); } }); checkInventoryBtn.setText("check inventory"); checkInventoryBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { checkInventoryBtnActionPerformed(evt); } }); sellMedsBtn.setText("sell medicine"); sellMedsBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sellMedsBtnActionPerformed(evt); } }); jLabel1.setBackground(new java.awt.Color(255, 153, 51)); jLabel1.setForeground(new java.awt.Color(255, 0, 0)); jLabel1.setText("patient admission"); jLabel2.setBackground(new java.awt.Color(255, 153, 51)); jLabel2.setForeground(new java.awt.Color(255, 0, 0)); jLabel2.setText("Doctors"); jLabel3.setBackground(new java.awt.Color(255, 153, 51)); jLabel3.setForeground(new java.awt.Color(255, 0, 0)); jLabel3.setText("pharmacy"); jLabel4.setBackground(new java.awt.Color(255, 153, 51)); jLabel4.setForeground(new java.awt.Color(255, 0, 0)); jLabel4.setText("Manager"); jButton7.setText("number of patient"); jButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton7ActionPerformed(evt); } }); cashShowBtn.setText("total cash"); cashShowBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cashShowBtnActionPerformed(evt); } }); jButton9.setText("disease by type"); jButton9.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton9ActionPerformed(evt); } }); jButton10.setText("medicine at stock"); jButton10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton10ActionPerformed(evt); } }); exitBtn.setText("Exit"); exitBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitBtnActionPerformed(evt); } }); clrAllTxt.setText("Clear All Text"); clrAllTxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clrAllTxtActionPerformed(evt); } }); jLabel5.setText("Name"); jLabel5.setToolTipText("Name"); jLabel6.setText("Age"); jLabel7.setText("Disease"); jLabel8.setText("ID"); jLabel9.setText("Name"); jLabel10.setText("Expertise"); jLabel11.setText("Name"); jLabel12.setText("Quantity"); sellAmount.setToolTipText("Meds Quantity"); sellAmount.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sellAmountActionPerformed(evt); } }); medsBuyBox.setToolTipText("Medicine name"); jLabel13.setText("Name"); jLabel14.setText("Quantity"); buyMedsBtn.setText("buy medicine"); buyMedsBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buyMedsBtnActionPerformed(evt); } }); buyPriceBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buyPriceBoxActionPerformed(evt); } }); asdfas.setText("buy price"); showAmountBox.setText("Shows stock info"); numberOfPatient.setText("N/A"); diseaseByTypeLbl.setText("N/A"); diseaseByTypeLbl.setToolTipText(""); medsCountLbl.setText("N/A"); cashShowLbl.setText("N/A"); diseaseSearchBox.setToolTipText("type in disease name to search"); ShowAllMeds.setText("Show All Meds"); ShowAllMeds.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ShowAllMedsActionPerformed(evt); } }); EditProfit.setText("Edit Profit"); EditProfit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EditProfitActionPerformed(evt); } }); ShowDoctorInfo.setText("Show Doctor Information"); ShowDoctorInfo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ShowDoctorInfoActionPerformed(evt); } }); ShowPatients.setText("Show Patients"); ShowPatients.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ShowPatientsActionPerformed(evt); } }); docShowWallet.setText("show wallet"); docShowWallet.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { docShowWalletActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(clrAllTxt) .addGap(18, 18, 18) .addComponent(exitBtn) .addGap(25, 25, 25)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jLabel6) .addComponent(jLabel7) .addComponent(jLabel8))) .addComponent(jLabel9) .addGroup(layout.createSequentialGroup() .addGap(2, 2, 2) .addComponent(jLabel10))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(docShowWallet) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(diseaseSearchBox, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(EditProfit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ShowAllMeds) .addComponent(checkInventoryBtn))))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(jLabel11) .addGap(18, 18, 18) .addComponent(sellMedsBox, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel12) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(sellAmount)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(sellMedsBtn) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(numberOfPatient, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(showAmountBox) .addComponent(cashShowLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(diseaseByTypeLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(medsCountLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(13, 13, 13)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(patientNameBox) .addComponent(patientAgeBox) .addComponent(patientDiseaseBox) .addComponent(patientIDBox, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel1) .addGroup(layout.createSequentialGroup() .addComponent(patientSetBtn) .addGap(38, 38, 38) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(patientIDSearchBtn) .addComponent(searchPatientBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(patientNameFoundBox) .addComponent(patientAgeFoundBox) .addComponent(patientDiseaseFoundBox, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(docSkillBox, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(docSet, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(docNameBox, javax.swing.GroupLayout.Alignment.LEADING)) .addGap(1, 1, 1) .addComponent(ShowPatients) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(billPatient, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(billPatientIDBox))) .addGroup(layout.createSequentialGroup() .addComponent(jLabel2) .addGap(34, 34, 34) .addComponent(ShowDoctorInfo))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 55, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(cashShowBtn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton7, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(buyMedsBtn) .addGroup(layout.createSequentialGroup() .addComponent(asdfas) .addGap(22, 22, 22) .addComponent(buyPriceBox, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(2, 2, 2) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(jLabel14) .addGap(22, 22, 22) .addComponent(buyMedsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel13) .addGap(36, 36, 36) .addComponent(medsBuyBox)))))))) .addGap(137, 137, 137)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(43, 43, 43) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(patientNameBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5))) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(jLabel1)) .addGap(7, 7, 7) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(medsBuyBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13) .addComponent(jLabel11)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel14) .addComponent(buyMedsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(patientAgeBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(buyPriceBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(asdfas)))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(patientNameFoundBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(patientAgeFoundBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(patientDiseaseBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7) .addComponent(sellMedsBtn) .addComponent(buyMedsBtn) .addComponent(patientDiseaseFoundBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addGap(21, 21, 21) .addComponent(sellMedsBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel12) .addComponent(sellAmount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(patientIDBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(patientIDSearchBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel8) .addComponent(ShowAllMeds)) .addGap(7, 7, 7) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(checkInventoryBtn) .addComponent(showAmountBox)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(patientSetBtn) .addComponent(searchPatientBtn)) .addGap(47, 47, 47) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ShowDoctorInfo) .addComponent(jLabel2) .addComponent(jLabel4)))) .addGap(32, 32, 32) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(docNameBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(billPatientIDBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9) .addComponent(ShowPatients)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton7) .addComponent(numberOfPatient) .addComponent(docSkillBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10) .addComponent(billPatient)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cashShowBtn) .addComponent(cashShowLbl) .addComponent(docSet)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton9) .addComponent(diseaseByTypeLbl) .addComponent(diseaseSearchBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(docShowWallet)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton10) .addComponent(medsCountLbl)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(EditProfit) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(exitBtn) .addComponent(clrAllTxt)) .addContainerGap()) ); patientDiseaseBox.getAccessibleContext().setAccessibleName(""); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public Soru1() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public PatientUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public kunde() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MusteriEkle() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "public sinavlar2() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public P0405() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73195183", "0.7290407", "0.7290407", "0.7290407", "0.72855854", "0.7248445", "0.7213232", "0.72084314", "0.7195551", "0.71902007", "0.71835697", "0.7158979", "0.71473545", "0.70928645", "0.70807934", "0.70575565", "0.6987147", "0.6976941", "0.69544566", "0.69541115", "0.6943778", "0.6942792", "0.6935224", "0.6931817", "0.6928287", "0.69246083", "0.6924253", "0.69117594", "0.6910518", "0.68936557", "0.68927425", "0.6891522", "0.68911785", "0.6889459", "0.68826854", "0.68823767", "0.6880858", "0.6878632", "0.68753785", "0.68741786", "0.68710285", "0.68593234", "0.6856001", "0.6855885", "0.685485", "0.68537056", "0.68532616", "0.68519884", "0.68519884", "0.6843908", "0.6836617", "0.68361354", "0.68289286", "0.68281245", "0.6826939", "0.682426", "0.68220174", "0.68170464", "0.6816829", "0.68109316", "0.6808785", "0.6808737", "0.6808307", "0.6807784", "0.6801649", "0.67936075", "0.67933095", "0.67924714", "0.67911524", "0.67894745", "0.67889065", "0.6787865", "0.6781763", "0.6766413", "0.67660075", "0.6765137", "0.6756547", "0.6756297", "0.67528564", "0.6752207", "0.67416096", "0.67398196", "0.6737052", "0.6736384", "0.6734045", "0.67276424", "0.6726131", "0.6721189", "0.6715488", "0.671506", "0.67148006", "0.6708023", "0.67061347", "0.67027885", "0.6701509", "0.670121", "0.6699335", "0.66989076", "0.6694664", "0.6690946", "0.6688705" ]
0.0
-1
GENFIRST:event_patientSetBtnActionPerformed TODO add your handling code here:
private void patientSetBtnActionPerformed(java.awt.event.ActionEvent evt) { patientArr[patientI] = new patient(patientNameBox.getText(), Integer.parseInt(patientAgeBox.getText()), patientDiseaseBox.getText(), Integer.parseInt(patientIDBox.getText())); try { for (int i = 0; i < doc.length; i++) { if (patientDiseaseBox.getText().equalsIgnoreCase(doc[i].expertise)) { doc[i].newPatient(patientArr[patientI]); patientArr[patientI].docIndex = i; break; } } } catch (NullPointerException e) { for (int i = 0; i < doc.length; i++) { if (doc[i].expertise.equalsIgnoreCase("medicine")) { doc[i].newPatient(patientArr[patientI]); } } } patientArr[patientI].due += 1000; patientI++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n mngPatientBtn = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n mngPatientBtn.setBackground(new java.awt.Color(0, 153, 0));\n mngPatientBtn.setFont(new java.awt.Font(\"Verdana\", 3, 12)); // NOI18N\n mngPatientBtn.setForeground(new java.awt.Color(255, 255, 255));\n mngPatientBtn.setText(\"MANAGE PATIENTS RECORDS\");\n mngPatientBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mngPatientBtnActionPerformed(evt);\n }\n });\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/userInterface/HospitalAdminRole/hospital_icon.jpg\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(105, 105, 105)\n .addComponent(mngPatientBtn))\n .addGroup(layout.createSequentialGroup()\n .addGap(157, 157, 157)\n .addComponent(jLabel1)))\n .addGap(130, 130, 130))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(mngPatientBtn)\n .addGap(117, 117, 117))\n );\n }", "private void onAddPatient() {\n\t\tGuiManager.openFrame(GuiManager.FRAME_ADD_PATIENT);\n\t}", "private void fullNameRegisterActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtidDemActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void Button_RecipricalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_RecipricalActionPerformed\n // TODO add your handling code here:\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n label4 = new java.awt.Label();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n label3 = new java.awt.Label();\n PatientID = new javax.swing.JLabel();\n Pid = new javax.swing.JTextField();\n FullName = new javax.swing.JLabel();\n fullname = new javax.swing.JTextField();\n Gender = new javax.swing.JLabel();\n male = new javax.swing.JRadioButton();\n female = new javax.swing.JRadioButton();\n TreatmentType = new javax.swing.JLabel();\n search = new javax.swing.JButton();\n treatmentType = new javax.swing.JComboBox();\n Progression = new javax.swing.JLabel();\n progression = new javax.swing.JTextField();\n LastDateVisited = new javax.swing.JLabel();\n ADD = new javax.swing.JButton();\n DELETE = new javax.swing.JButton();\n UPDATE = new javax.swing.JButton();\n RESET1 = new javax.swing.JButton();\n RESET = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n issue = new javax.swing.JTextField();\n bloodGroup = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n report = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel6 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n lastDate = new com.toedter.calendar.JDateChooser();\n jScrollPane2 = new javax.swing.JScrollPane();\n Viewfield = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n\n label4.setAlignment(java.awt.Label.CENTER);\n label4.setBackground(new java.awt.Color(0, 102, 0));\n label4.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n label4.setFont(new java.awt.Font(\"Baskerville Old Face\", 1, 36)); // NOI18N\n label4.setForeground(new java.awt.Color(255, 255, 255));\n label4.setText(\"HAPPY SMILE DENTAL CLINIC\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setLayout(null);\n\n jPanel2.setBackground(new java.awt.Color(0, 102, 0));\n\n label3.setAlignment(java.awt.Label.CENTER);\n label3.setBackground(new java.awt.Color(0, 102, 0));\n label3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n label3.setFont(new java.awt.Font(\"Baskerville Old Face\", 1, 36)); // NOI18N\n label3.setForeground(new java.awt.Color(255, 255, 255));\n label3.setText(\"HAPPY SMILE DENTAL CLINIC\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(335, 335, 335)\n .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, 603, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(982, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(19, 19, 19))\n );\n\n jPanel1.add(jPanel2);\n jPanel2.setBounds(0, 0, 1920, 70);\n\n PatientID.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n PatientID.setText(\"Patient Id\");\n jPanel1.add(PatientID);\n PatientID.setBounds(30, 400, 73, 23);\n jPanel1.add(Pid);\n Pid.setBounds(180, 400, 180, 30);\n\n FullName.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n FullName.setText(\"Full Name\");\n jPanel1.add(FullName);\n FullName.setBounds(390, 400, 75, 23);\n\n fullname.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n fullnameActionPerformed(evt);\n }\n });\n jPanel1.add(fullname);\n fullname.setBounds(510, 400, 230, 30);\n\n Gender.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n Gender.setText(\"Gender\");\n jPanel1.add(Gender);\n Gender.setBounds(30, 460, 55, 23);\n\n buttonGroup1.add(male);\n male.setFont(new java.awt.Font(\"Calibri\", 1, 13)); // NOI18N\n male.setText(\"Male\");\n male.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n maleMouseClicked(evt);\n }\n });\n jPanel1.add(male);\n male.setBounds(180, 460, 70, 25);\n\n buttonGroup1.add(female);\n female.setFont(new java.awt.Font(\"Calibri\", 1, 13)); // NOI18N\n female.setText(\"Female\");\n female.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n femaleMouseClicked(evt);\n }\n });\n jPanel1.add(female);\n female.setBounds(270, 460, 90, 25);\n\n TreatmentType.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n TreatmentType.setText(\"Treatment Type\");\n jPanel1.add(TreatmentType);\n TreatmentType.setBounds(30, 540, 120, 23);\n\n search.setBackground(new java.awt.Color(0, 102, 51));\n search.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n search.setForeground(new java.awt.Color(0, 102, 51));\n search.setText(\"SEARCH\");\n search.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n search.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchActionPerformed(evt);\n }\n });\n jPanel1.add(search);\n search.setBounds(470, 90, 70, 30);\n\n treatmentType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Root filling\", \"Surgical removal\", \"Crown\", \"Bridge\" }));\n treatmentType.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n treatmentTypeActionPerformed(evt);\n }\n });\n jPanel1.add(treatmentType);\n treatmentType.setBounds(180, 530, 180, 30);\n\n Progression.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n Progression.setText(\"Progression\");\n jPanel1.add(Progression);\n Progression.setBounds(390, 620, 110, 30);\n jPanel1.add(progression);\n progression.setBounds(510, 610, 240, 110);\n\n LastDateVisited.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n LastDateVisited.setText(\"Last edit visited\");\n jPanel1.add(LastDateVisited);\n LastDateVisited.setBounds(30, 620, 120, 30);\n\n ADD.setBackground(new java.awt.Color(0, 102, 51));\n ADD.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n ADD.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/butttonAdd.png\"))); // NOI18N\n ADD.setText(\"ADD\");\n ADD.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n ADD.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n ADD.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ADDActionPerformed(evt);\n }\n });\n jPanel1.add(ADD);\n ADD.setBounds(40, 980, 130, 40);\n\n DELETE.setBackground(new java.awt.Color(0, 102, 51));\n DELETE.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n DELETE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/delete.png\"))); // NOI18N\n DELETE.setText(\"DELETE\");\n DELETE.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n DELETE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n DELETEActionPerformed(evt);\n }\n });\n jPanel1.add(DELETE);\n DELETE.setBounds(220, 980, 140, 40);\n\n UPDATE.setBackground(new java.awt.Color(0, 102, 51));\n UPDATE.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n UPDATE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/update.png\"))); // NOI18N\n UPDATE.setText(\"UPDATE\");\n UPDATE.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n UPDATE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n UPDATEActionPerformed(evt);\n }\n });\n jPanel1.add(UPDATE);\n UPDATE.setBounds(410, 980, 130, 40);\n\n RESET1.setBackground(new java.awt.Color(0, 102, 51));\n RESET1.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n RESET1.setText(\"DEMO\");\n RESET1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n RESET1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RESET1ActionPerformed(evt);\n }\n });\n jPanel1.add(RESET1);\n RESET1.setBounds(820, 980, 130, 40);\n\n RESET.setBackground(new java.awt.Color(0, 102, 51));\n RESET.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n RESET.setText(\"RESET\");\n RESET.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n RESET.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RESETActionPerformed(evt);\n }\n });\n jPanel1.add(RESET);\n RESET.setBounds(590, 980, 130, 40);\n\n jLabel7.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n jLabel7.setText(\"Blood Group\");\n jPanel1.add(jLabel7);\n jLabel7.setBounds(390, 540, 120, 20);\n\n jTable1.setBackground(new java.awt.Color(204, 255, 153));\n jTable1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jTable1.setGridColor(new java.awt.Color(0, 0, 0));\n jTable1.setSelectionBackground(new java.awt.Color(204, 255, 204));\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n jPanel1.add(jScrollPane1);\n jScrollPane1.setBounds(20, 140, 710, 170);\n\n jLabel1.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n jLabel1.setText(\"Issue\");\n jPanel1.add(jLabel1);\n jLabel1.setBounds(390, 460, 38, 23);\n jPanel1.add(issue);\n issue.setBounds(510, 460, 230, 50);\n\n bloodGroup.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"O+\", \"O-\", \"A+\", \"A-\", \"B+\", \"B-\", \"AB+\", \"AB-\" }));\n jPanel1.add(bloodGroup);\n bloodGroup.setBounds(510, 540, 230, 30);\n\n jLabel3.setBackground(new java.awt.Color(0, 102, 0));\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 1, 36)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(51, 102, 0));\n jLabel3.setText(\"PATIENT HISTORY\");\n jPanel1.add(jLabel3);\n jLabel3.setBounds(1190, 110, 380, 80);\n\n report.setBackground(new java.awt.Color(0, 102, 51));\n report.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n report.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/report.png\"))); // NOI18N\n report.setText(\"REPORT\");\n report.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n report.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n reportActionPerformed(evt);\n }\n });\n jPanel1.add(report);\n report.setBounds(1720, 680, 130, 40);\n\n jButton2.setBackground(new java.awt.Color(0, 102, 51));\n jButton2.setFont(new java.awt.Font(\"Calibri\", 1, 13)); // NOI18N\n jButton2.setText(\"VIEW\");\n jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, null, java.awt.Color.green, null, null));\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton2);\n jButton2.setBounds(810, 680, 100, 40);\n\n jComboBox1.setFont(new java.awt.Font(\"Calibri\", 1, 13)); // NOI18N\n jComboBox1.setForeground(new java.awt.Color(0, 102, 51));\n jComboBox1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jPanel1.add(jComboBox1);\n jComboBox1.setBounds(180, 90, 260, 30);\n\n jLabel6.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n jLabel6.setText(\"SEARCH BY NAME\");\n jPanel1.add(jLabel6);\n jLabel6.setBounds(50, 90, 120, 30);\n\n jButton3.setBackground(new java.awt.Color(0, 102, 51));\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/logout.png\"))); // NOI18N\n jButton3.setText(\"LOG OUT\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton3);\n jButton3.setBounds(1770, 70, 150, 40);\n jPanel1.add(lastDate);\n lastDate.setBounds(180, 620, 180, 40);\n\n Viewfield.setColumns(20);\n Viewfield.setFont(new java.awt.Font(\"Monospaced\", 0, 18)); // NOI18N\n Viewfield.setRows(5);\n jScrollPane2.setViewportView(Viewfield);\n\n jPanel1.add(jScrollPane2);\n jScrollPane2.setBounds(810, 200, 1040, 470);\n\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/bg3.jpg\"))); // NOI18N\n jLabel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(51, 153, 0), new java.awt.Color(51, 102, 0), new java.awt.Color(0, 102, 51), new java.awt.Color(0, 153, 51)));\n jPanel1.add(jLabel2);\n jLabel2.setBounds(0, 330, 770, 750);\n\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/bg3.jpg\"))); // NOI18N\n jLabel4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(0, 153, 0), new java.awt.Color(51, 153, 0), new java.awt.Color(0, 204, 51), new java.awt.Color(0, 102, 51)));\n jPanel1.add(jLabel4);\n jLabel4.setBounds(0, 70, 770, 260);\n\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/bg3.jpg\"))); // NOI18N\n jLabel5.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(0, 153, 0), new java.awt.Color(51, 102, 0), new java.awt.Color(0, 204, 0), new java.awt.Color(0, 153, 51)));\n jPanel1.add(jLabel5);\n jLabel5.setBounds(770, 50, 1150, 1030);\n\n jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/bg3.jpg\"))); // NOI18N\n jLabel8.setText(\"jLabel8\");\n jPanel1.add(jLabel8);\n jLabel8.setBounds(630, 40, 640, 1030);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1920, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1080, Short.MAX_VALUE)\n );\n\n setSize(new java.awt.Dimension(1938, 1127));\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jtfpatientid = new javax.swing.JTextField();\n btnsave = new javax.swing.JButton();\n jcbdiseaseid = new javax.swing.JComboBox();\n jtfhistory = new javax.swing.JTextField();\n\n setClosable(true);\n setIconifiable(true);\n setTitle(\"Edit Patient Disease Details\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel3.setText(\"Choose Disease Id\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel4.setText(\"Enter Patient Id\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel2.setText(\"Enter Patient History\");\n\n jtfpatientid.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jtfpatientid.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n\n btnsave.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n btnsave.setText(\"UPDATE PATIENT DISEASE\");\n btnsave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnsaveActionPerformed(evt);\n }\n });\n\n jcbdiseaseid.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jcbdiseaseid.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jtfhistory.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jtfhistory.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(226, Short.MAX_VALUE)\n .addComponent(btnsave, javax.swing.GroupLayout.PREFERRED_SIZE, 402, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(240, 240, 240))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(74, 74, 74)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jtfpatientid)\n .addComponent(jcbdiseaseid, 0, 387, Short.MAX_VALUE)\n .addComponent(jtfhistory))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jcbdiseaseid, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jtfpatientid, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jtfhistory, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 50, Short.MAX_VALUE)\n .addComponent(btnsave, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(50, 50, 50))\n );\n\n pack();\n }", "private void btnRegresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void splPerActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void settingBtnClick() {\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Set Patient Permission\");\n setMaximumSize(new java.awt.Dimension(450, 300));\n setResizable(false);\n\n jPanel1.setMaximumSize(new java.awt.Dimension(450, 300));\n jPanel1.setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jLabel1.setText(\"Patient:\");\n jPanel1.add(jLabel1);\n jLabel1.setBounds(70, 40, 50, 18);\n\n jLabel2.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jLabel2.setText(\"PatientName\");\n jPanel1.add(jLabel2);\n jLabel2.setBounds(130, 40, 80, 18);\n\n jLabel3.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jLabel3.setText(\"Doctor:\");\n jPanel1.add(jLabel3);\n jLabel3.setBounds(250, 40, 50, 18);\n\n jLabel4.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jLabel4.setText(\"DoctorName\");\n jPanel1.add(jLabel4);\n jLabel4.setBounds(300, 40, 70, 18);\n\n jCheckBox1.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jCheckBox1.setText(\"Temperature\");\n jPanel1.add(jCheckBox1);\n jCheckBox1.setBounds(70, 100, 110, 27);\n\n jCheckBox2.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jCheckBox2.setText(\"Blood Pressure\");\n jPanel1.add(jCheckBox2);\n jCheckBox2.setBounds(250, 100, 120, 27);\n\n jCheckBox3.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jCheckBox3.setText(\"Sugar Level\");\n jPanel1.add(jCheckBox3);\n jCheckBox3.setBounds(70, 160, 110, 27);\n\n jCheckBox4.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jCheckBox4.setText(\"Weight\");\n jPanel1.add(jCheckBox4);\n jCheckBox4.setBounds(250, 160, 70, 27);\n\n jButton1.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jButton1.setText(\"Grant Permission\");\n jPanel1.add(jButton1);\n jButton1.setBounds(70, 230, 130, 30);\n\n jButton2.setFont(new java.awt.Font(\"Comic Sans MS\", 0, 12)); // NOI18N\n jButton2.setText(\"Cancel\");\n jPanel1.add(jButton2);\n jButton2.setBounds(250, 230, 130, 30);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void devBtnActionPerformed(ActionEvent evt) {\n }", "private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void phantichActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tArrayList<String> constructorInput = null;\n\t\t\t\tconstructorInput = NewPatientWindow.showInputdialog(true);\n\t\t\t\t\n\t\t\t\t// if cancel or close chosen on new patient window:\n\t\t\t\tif (constructorInput == null)\n\t\t\t\t\treturn; \n\t\t\t\t\n\t\t\t\t//else:\n\t\t\t\tBrainFreezeMain.patients.add(new Patient(\n\t\t\t\t\t\t(constructorInput.toArray( new String[constructorInput.size()]))));\n\t\t\t\tBrainFreezeMain.currentPatientIndex = BrainFreezeMain.patients.size()-1;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLeftPanel.refreshPatientLabel(); // change to patient list, update label\n\t\t\t\tLeftPanel.refreshPatientData(); // change to patient, update data\n\t\t\t\t\t\n\t\t\t\t}", "public Patient_Update() {\n initComponents();\n ButtonGroup bg = new ButtonGroup();\n bg.add(p_male);\n bg.add(p_female);\n showDate();\n showTime();\n }", "private void jbtn_addActionPerformed(ActionEvent evt) {\n\t\ttry {\n\t\t\tconn cc=new conn();\n \t\t//String query1=\"SELECT * FROM doctor\";\n \t\t//ResultSet rs=cc.st.executeQuery(query1);\n \t\tpst=cc.c.prepareStatement(\"insert into medicine(medicine_name,brand,mfd_date,expiry_date,price)value(?,?,?,?,?)\");\n \t\t\n \t\tpst.setString(1,jtxt_medname.getText());\n \t\tpst.setString(2,jtxt_brand.getText());\n \t\tpst.setString(3,jtxt_mfd.getText());\n \t\tpst.setString(4,jtxt_exp.getText());\n \t\tpst.setString(5,jtxt_price.getText());\n \t\t\n \t\tpst.executeUpdate();\n \t\tJOptionPane.showMessageDialog(this,\"Record Added\");\n \t\tupDateDB();\n \t\ttxtblank();\n \t\t\n\t\t}\n\t\t \n\t\t\n\t\tcatch (SQLException ex)\n\t\t{\n\t\t\tjava.util.logging.Logger.getLogger(show_doc.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n\t\t}\n\t\t\n\t}", "private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void machnameActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtPatientName = new javax.swing.JTextField();\n lblMaritalStatus = new javax.swing.JLabel();\n txtAge = new javax.swing.JTextField();\n lblPatientName = new javax.swing.JLabel();\n btnRegisterPatient = new javax.swing.JButton();\n lblAge = new javax.swing.JLabel();\n lblUserName = new javax.swing.JLabel();\n txtUserName = new javax.swing.JTextField();\n lblPassword = new javax.swing.JLabel();\n ddlGender = new javax.swing.JComboBox();\n txtContactNumber = new javax.swing.JTextField();\n lblTitle = new javax.swing.JLabel();\n ddlMaritalStatus = new javax.swing.JComboBox();\n lblGender = new javax.swing.JLabel();\n lblContactNumber = new javax.swing.JLabel();\n btnBack = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n txtEmail = new javax.swing.JTextField();\n txtPassword = new javax.swing.JPasswordField();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n lblMaritalStatus.setText(\"Marital Status:\");\n\n lblPatientName.setText(\"Patient name:\");\n\n btnRegisterPatient.setText(\"Register Patient\");\n btnRegisterPatient.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRegisterPatientActionPerformed(evt);\n }\n });\n\n lblAge.setText(\"Age:\");\n\n lblUserName.setText(\"Username:\");\n\n lblPassword.setText(\"Password:\");\n\n lblTitle.setFont(new java.awt.Font(\"Lucida Grande\", 1, 14)); // NOI18N\n lblTitle.setForeground(new java.awt.Color(102, 102, 102));\n lblTitle.setText(\"Register Patient Panel\");\n\n lblGender.setText(\"Gender:\");\n\n lblContactNumber.setText(\"Contact Number:\");\n\n btnBack.setText(\"<<Back\");\n btnBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBackActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Email:\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(394, 394, 394)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(lblTitle)\n .addGap(353, 353, 353))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(lblGender, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblAge, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblPatientName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 82, Short.MAX_VALUE))\n .addGap(135, 135, 135))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(lblUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE)\n .addComponent(lblPassword, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(122, 122, 122)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtPatientName, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtAge, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtUserName, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(ddlGender, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtPassword)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(btnBack, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(160, 160, 160)\n .addComponent(btnRegisterPatient))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblContactNumber, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblMaritalStatus, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(122, 122, 122)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(ddlMaritalStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtContactNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(222, 222, 222))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(63, 63, 63)\n .addComponent(lblTitle)\n .addGap(40, 40, 40)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtPatientName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(lblPatientName, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(9, 9, 9)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtAge, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblAge, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblGender)\n .addComponent(ddlGender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblUserName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblPassword)\n .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(17, 17, 17)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtContactNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblContactNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ddlMaritalStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblMaritalStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnRegisterPatient)\n .addComponent(btnBack))\n .addGap(120, 120, 120))\n );\n }", "private void BanalisisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void designBtnActionPerformed(ActionEvent evt) {\n }", "private void passwordRegisterActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jtxtIDActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "private void pidTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n admitBtn = new javax.swing.JButton();\n searchBtn = new javax.swing.JButton();\n resetBtn = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n wardnoText = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n IDTExt = new javax.swing.JTextField();\n nameTExt = new javax.swing.JTextField();\n attendNoText = new javax.swing.JTextField();\n dateText = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n consText = new javax.swing.JTextField();\n disText = new javax.swing.JTextField();\n roomnoText = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Patient Attendance\");\n\n admitBtn.setText(\"Admit\");\n admitBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n admitBtnActionPerformed(evt);\n }\n });\n\n searchBtn.setText(\"Search\");\n searchBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchBtnActionPerformed(evt);\n }\n });\n\n resetBtn.setText(\"Reset\");\n resetBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n resetBtnActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"back\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Patient Attendance\"));\n\n jLabel6.setText(\"consultant no\");\n\n jLabel2.setText(\"Admit date\");\n\n wardnoText.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n wardnoTextFocusLost(evt);\n }\n });\n wardnoText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n wardnoTextKeyTyped(evt);\n }\n });\n\n jLabel10.setText(\"Room No\");\n\n IDTExt.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n IDTExtFocusLost(evt);\n }\n });\n IDTExt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n IDTExtActionPerformed(evt);\n }\n });\n IDTExt.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n IDTExtKeyTyped(evt);\n }\n });\n\n attendNoText.setEditable(false);\n attendNoText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n attendNoTextKeyTyped(evt);\n }\n });\n\n dateText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n dateTextActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Docname\");\n\n jLabel7.setText(\"Ward No\");\n\n jLabel1.setText(\"patient attendance no\");\n\n jLabel8.setText(\"v\");\n\n jLabel5.setText(\"patient_NIC\");\n\n jLabel4.setText(\"Disease\");\n\n consText.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n consTextFocusLost(evt);\n }\n });\n consText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n consTextKeyTyped(evt);\n }\n });\n\n roomnoText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n roomnoTextKeyTyped(evt);\n }\n });\n\n jLabel3.setText(\"yyyy-mm-dd\");\n\n jButton2.setText(\"Add extern Physician details\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel9)\n .addComponent(jLabel7)\n .addComponent(jLabel4)\n .addComponent(jLabel10))\n .addGap(65, 65, 65)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dateText, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(attendNoText, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(IDTExt, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(2, 2, 2)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(consText, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nameTExt, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(disText, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(wardnoText, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(roomnoText, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jButton2)\n .addGap(55, 55, 55))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(attendNoText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(dateText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(IDTExt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(consText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(nameTExt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(disText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(wardnoText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(roomnoText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(32, 32, 32)\n .addComponent(resetBtn)\n .addGap(39, 39, 39)\n .addComponent(searchBtn)\n .addGap(38, 38, 38)\n .addComponent(admitBtn)))\n .addContainerGap(76, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(resetBtn)\n .addComponent(searchBtn)\n .addComponent(admitBtn)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n pack();\n }", "private void btnInventarioActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void cnpjFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtCIdActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void ControlsActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnAceptarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void monthFieldDfActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "@SuppressWarnings(\"unchecked\")\n private void initComponents() {//GEN-BEGIN:initComponents\n\n nameL = new javax.swing.JLabel();\n removeB = new javax.swing.JButton();\n diagnosisL = new javax.swing.JLabel();\n bedL = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setLayout(new java.awt.GridLayout(3, 2, 5, 5));\n\n nameL.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n nameL.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n nameL.setText(patient.toString());\n add(nameL);\n\n removeB.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n removeB.setText(\"Remove Patient\");\n removeB.setToolTipText(\"Removes this patient from the clinic\");\n removeB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n removeBActionPerformed(evt);\n }\n });\n add(removeB);\n\n diagnosisL.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n diagnosisL.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n diagnosisL.setText(patient.getDiagnosis());\n add(diagnosisL);\n\n bedL.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n bedL.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n bedL.setText(patient.getBed().toString());\n add(bedL);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel1.setText(\"Assigned Doctor :\");\n add(jLabel1);\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(patient.getAssignedDoc().toString());\n add(jLabel2);\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n txt_id = new javax.swing.JTextField();\n txt_name = new javax.swing.JTextField();\n txt_age = new javax.swing.JTextField();\n txt_contact = new javax.swing.JTextField();\n txt_address = new javax.swing.JTextField();\n txt_doctor = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n bl_image = new javax.swing.JLabel();\n btn_image = new javax.swing.JButton();\n txt_sex = new javax.swing.JComboBox<>();\n txt_patientType = new javax.swing.JComboBox<>();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTablePatient = new javax.swing.JTable();\n btn_insert = new javax.swing.JButton();\n btn_update = new javax.swing.JButton();\n btn_delete = new javax.swing.JButton();\n btn_First = new javax.swing.JButton();\n btn_last = new javax.swing.JButton();\n btn_next = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n txt_modifiedDate = new javax.swing.JTextField();\n txt_modifiedTime = new javax.swing.JTextField();\n btn_previous = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n txt_user = new javax.swing.JLabel();\n txt_user1 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n btn_search = new javax.swing.JButton();\n jLabel12 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(1380, 800));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel1.setText(\"Patient Id :\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 160, 70, 30));\n\n jLabel2.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel2.setText(\"Name :\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 210, 60, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel3.setText(\"Sex :\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 260, -1, -1));\n\n jLabel4.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel4.setText(\"Age :\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 310, -1, -1));\n\n jLabel5.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel5.setText(\"Contact No :\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 360, 80, -1));\n\n jLabel6.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel6.setText(\"Address :\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 420, 70, -1));\n\n jLabel7.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n jLabel7.setText(\"Patient Type :\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 530, 100, -1));\n\n jLabel8.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel8.setText(\"Doctor :\");\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 590, 60, -1));\n\n txt_id.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n txt_id.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_idActionPerformed(evt);\n }\n });\n getContentPane().add(txt_id, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 160, 210, 30));\n\n txt_name.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_nameActionPerformed(evt);\n }\n });\n getContentPane().add(txt_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 210, 210, 30));\n\n txt_age.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_ageActionPerformed(evt);\n }\n });\n getContentPane().add(txt_age, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 310, 210, 30));\n\n txt_contact.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_contactActionPerformed(evt);\n }\n });\n getContentPane().add(txt_contact, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 360, 210, 30));\n\n txt_address.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_addressActionPerformed(evt);\n }\n });\n getContentPane().add(txt_address, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 420, 210, 80));\n getContentPane().add(txt_doctor, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 590, 210, 30));\n\n jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 160, 10, 460));\n\n jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 160, 10, 460));\n\n bl_image.setBackground(new java.awt.Color(204, 204, 255));\n bl_image.setOpaque(true);\n getContentPane().add(bl_image, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 170, 320, 240));\n\n btn_image.setFont(new java.awt.Font(\"Dialog\", 0, 18)); // NOI18N\n btn_image.setText(\"Choose Image\");\n btn_image.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_imageActionPerformed(evt);\n }\n });\n getContentPane().add(btn_image, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 430, 320, 40));\n\n txt_sex.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n txt_sex.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Select\", \"Male\", \"Female\" }));\n txt_sex.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_sexActionPerformed(evt);\n }\n });\n getContentPane().add(txt_sex, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 260, 210, 30));\n\n txt_patientType.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n txt_patientType.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Select type\", \"Surgery\", \"Regular\", \"New Patient\" }));\n getContentPane().add(txt_patientType, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 530, 210, 30));\n\n jTablePatient.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Patient ID\", \"Name\", \"Age\", \"Contact No.\", \"Doctor\"\n }\n ));\n jTablePatient.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTablePatientMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTablePatient);\n\n getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(870, 170, -1, 440));\n\n btn_insert.setText(\"Insert\");\n btn_insert.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_insertActionPerformed(evt);\n }\n });\n getContentPane().add(btn_insert, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 650, -1, -1));\n\n btn_update.setText(\"Update\");\n btn_update.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_updateActionPerformed(evt);\n }\n });\n getContentPane().add(btn_update, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 650, -1, -1));\n\n btn_delete.setText(\"Delete\");\n btn_delete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_deleteActionPerformed(evt);\n }\n });\n getContentPane().add(btn_delete, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 650, -1, -1));\n\n btn_First.setText(\"First\");\n btn_First.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_FirstActionPerformed(evt);\n }\n });\n getContentPane().add(btn_First, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 650, -1, -1));\n\n btn_last.setText(\"Last\");\n btn_last.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_lastActionPerformed(evt);\n }\n });\n getContentPane().add(btn_last, new org.netbeans.lib.awtextra.AbsoluteConstraints(930, 650, -1, -1));\n\n btn_next.setText(\"Next\");\n btn_next.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_nextActionPerformed(evt);\n }\n });\n getContentPane().add(btn_next, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 650, -1, -1));\n\n jLabel9.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel9.setText(\"Modified Date :\");\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 520, 100, -1));\n\n jLabel10.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel10.setText(\"Modified Time :\");\n getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 570, -1, -1));\n\n txt_modifiedDate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_modifiedDateActionPerformed(evt);\n }\n });\n getContentPane().add(txt_modifiedDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 520, 150, 30));\n\n txt_modifiedTime.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_modifiedTimeActionPerformed(evt);\n }\n });\n getContentPane().add(txt_modifiedTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 570, 150, 30));\n\n btn_previous.setText(\"Previous\");\n btn_previous.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_previousActionPerformed(evt);\n }\n });\n getContentPane().add(btn_previous, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 650, -1, -1));\n\n jLabel11.setText(\"Last loged in by ---\");\n getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));\n\n jButton1.setText(\"Load\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 90, -1, -1));\n\n txt_user.setBackground(new java.awt.Color(204, 204, 255));\n txt_user.setOpaque(true);\n getContentPane().add(txt_user, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 210, 20));\n\n txt_user1.setBackground(new java.awt.Color(204, 204, 255));\n txt_user1.setOpaque(true);\n getContentPane().add(txt_user1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 60, 210, 20));\n\n jButton2.setText(\"Click here to get details of patients Treatment History\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1030, 650, -1, -1));\n\n btn_search.setText(\"Search By Id\");\n btn_search.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_searchActionPerformed(evt);\n }\n });\n getContentPane().add(btn_search, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 650, -1, -1));\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 1, 30)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(0, 153, 153));\n jLabel12.setText(\" Patient BIO and History\");\n getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 70, 470, 50));\n\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jButton3.setText(\"Logout\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(1220, 40, 100, 30));\n\n pack();\n setLocationRelativeTo(null);\n }", "private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n titleLbl = new javax.swing.JLabel();\n nameLbl = new javax.swing.JLabel();\n nameTF = new javax.swing.JTextField();\n ageLbl = new javax.swing.JLabel();\n ageTF = new javax.swing.JTextField();\n conditionLbl = new javax.swing.JLabel();\n conditionTF = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n guiTA = new javax.swing.JTextArea();\n addBTN = new javax.swing.JButton();\n registeredBTN = new javax.swing.JButton();\n nextBTN = new javax.swing.JButton();\n exitBTN = new javax.swing.JButton();\n allocateBtn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n titleLbl.setForeground(new java.awt.Color(0, 71, 214));\n titleLbl.setText(\"National Covid‐19 Vaccination Programme\");\n\n nameLbl.setText(\"Please enter your name:\");\n\n ageLbl.setText(\"Please enter your age:\");\n\n conditionLbl.setText(\"Do you have a pre-existing medical condition? (enter Y/N):\");\n\n guiTA.setColumns(20);\n guiTA.setRows(5);\n jScrollPane1.setViewportView(guiTA);\n\n addBTN.setText(\"Add Patient\");\n addBTN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addBTNActionPerformed(evt);\n }\n });\n\n registeredBTN.setText(\"Display Registered Vaccine Candidates\");\n registeredBTN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registeredBTNActionPerformed(evt);\n }\n });\n\n nextBTN.setText(\"Next Candidate\");\n nextBTN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nextBTNActionPerformed(evt);\n }\n });\n\n exitBTN.setText(\"Close Application\");\n exitBTN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exitBTNActionPerformed(evt);\n }\n });\n\n allocateBtn.setText(\"Assign Priorities\");\n allocateBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n allocateBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(ageLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(ageTF))\n .addGroup(layout.createSequentialGroup()\n .addComponent(nameLbl)\n .addGap(18, 18, 18)\n .addComponent(nameTF))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(titleLbl)))\n .addGap(114, 114, 114))\n .addGroup(layout.createSequentialGroup()\n .addComponent(conditionLbl)\n .addGap(18, 18, 18)\n .addComponent(conditionTF)\n .addGap(56, 56, 56))\n .addGroup(layout.createSequentialGroup()\n .addComponent(addBTN)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(registeredBTN)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(allocateBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nextBTN)\n .addGap(18, 18, 18)\n .addComponent(exitBTN)))\n .addContainerGap())))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titleLbl)\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nameLbl)\n .addComponent(nameTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(ageLbl)\n .addComponent(ageTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(conditionLbl)\n .addComponent(conditionTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addBTN)\n .addComponent(nextBTN)\n .addComponent(exitBTN)\n .addComponent(allocateBtn))\n .addGap(18, 18, 18)\n .addComponent(registeredBTN)\n .addContainerGap(39, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void custIDTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n chatTxt = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n patientNameTxt = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n chatTextArea = new javax.swing.JTextArea();\n sendBtn = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n selectMedicationBtn = new javax.swing.JButton();\n\n chatTxt.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n jLabel2.setText(\"Patient Name:\");\n\n patientNameTxt.setEditable(false);\n patientNameTxt.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel1.setText(\"To chat with your patient\");\n\n chatTextArea.setColumns(20);\n chatTextArea.setFont(new java.awt.Font(\"Monospaced\", 0, 15)); // NOI18N\n chatTextArea.setRows(5);\n jScrollPane1.setViewportView(chatTextArea);\n\n sendBtn.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n sendBtn.setText(\"Send Message\");\n sendBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sendBtnActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Back\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n selectMedicationBtn.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n selectMedicationBtn.setText(\"Select Medication\");\n selectMedicationBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectMedicationBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(174, 174, 174)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGap(91, 91, 91)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(38, 38, 38)\n .addComponent(patientNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(chatTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(sendBtn)\n .addComponent(selectMedicationBtn)))\n .addComponent(jScrollPane1))))\n .addContainerGap(561, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addComponent(jLabel1)\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(patientNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(chatTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sendBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(selectMedicationBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(294, Short.MAX_VALUE))\n );\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n Members members = Members.getInstance();\n if (members.getPatients().doesMemberExist(name.getText().toUpperCase())==true){\n //launch patient GUI\n MainJFrame.changeState(ViewState.PATIENT);\n \n //find person\n Person p = members.getPatients().findMemberByName(name.getText());\n \n //make person a patient to access patient methods\n Patient patient = (Patient)p;\n \n //Get instance of patient panel\n PatientPanel patientPanel = PatientPanel.getInstance();\n \n //update fields with patient information\n patientPanel.setNameField(patient.getName());\n patientPanel.setAppointmentList(patient.getFormattedAppointments());\n patientPanel.setDobField(patient.getFormattedDate());\n patientPanel.setDoctorField(patient.getDoctor().getName());\n patientPanel.setGenderField(patient.getGenderAsString());\n patientPanel.setHouseField(patient.getContact().getHouse());\n patientPanel.setPhoneField(patient.getContact().getPhoneNum());\n patientPanel.setPostcodeField(patient.getContact().getPostcode());\n patientPanel.setRoadField(patient.getContact().getRoad());\n patientPanel.setTownField(patient.getContact().getTown());\n }\n else if (members.getDoctors().doesMemberExist(name.getText().toUpperCase())==true){\n //launch doctor GUI\n MainJFrame.changeState(ViewState.DOCTOR);\n \n //find person\n Person d = members.getDoctors().findMemberByName(name.getText());\n \n //make person a patient to access patient methods\n Doctor doctor = (Doctor)d;\n \n //Get instance of Doctors panel\n DoctorPanel doctorPanel = DoctorPanel.getInstance();\n \n //populate doctors schedule on log in\n doctorPanel.setSchedule(doctor.getFormattedSchedule());\n \n //set the doctors name to a string, used to maintain which doctor is logged in\n DoctorPanel.doctorsName = name.getText();\n\n }\n else if (members.getSecretaries().doesMemberExist(name.getText().toUpperCase())==true){\n //Launch Secretary GUI\n MainJFrame.changeState(ViewState.SECRETARY);\n }\n else if (members.getPharmacists().doesMemberExist(name.getText().toUpperCase())==true){\n //Launch Pharmacist GUI\n MainJFrame.changeState(ViewState.PHARMACIST);\n } \n else{\n //if no patient matches, return error dialog box.\n JOptionPane.showMessageDialog (null, \"Incorrect username entered\", \"Program Error\", JOptionPane.ERROR_MESSAGE);\n }\n \n //Get instance of login panel\n LoginPanel loginPanel = LoginPanel.getInstance();\n //Clear the text box\n loginPanel.clearLoginButton();\n }", "private void rangoFecha1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextFieldIDActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel15 = new javax.swing.JLabel();\n patientNameBox = new javax.swing.JTextField();\n patientAgeBox = new javax.swing.JTextField();\n patientDiseaseBox = new javax.swing.JTextField();\n patientIDBox = new javax.swing.JTextField();\n patientSetBtn = new javax.swing.JButton();\n patientIDSearchBtn = new javax.swing.JTextField();\n searchPatientBtn = new javax.swing.JButton();\n patientNameFoundBox = new javax.swing.JTextField();\n patientAgeFoundBox = new javax.swing.JTextField();\n patientDiseaseFoundBox = new javax.swing.JTextField();\n docNameBox = new javax.swing.JTextField();\n docSkillBox = new javax.swing.JTextField();\n docSet = new javax.swing.JButton();\n billPatientIDBox = new javax.swing.JTextField();\n billPatient = new javax.swing.JButton();\n checkInventoryBtn = new javax.swing.JButton();\n sellMedsBtn = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jButton7 = new javax.swing.JButton();\n cashShowBtn = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n exitBtn = new javax.swing.JButton();\n clrAllTxt = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n sellMedsBox = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n sellAmount = new javax.swing.JTextField();\n medsBuyBox = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n buyMedsAmount = new javax.swing.JTextField();\n buyMedsBtn = new javax.swing.JButton();\n buyPriceBox = new javax.swing.JTextField();\n asdfas = new javax.swing.JLabel();\n showAmountBox = new javax.swing.JLabel();\n numberOfPatient = new javax.swing.JLabel();\n diseaseByTypeLbl = new javax.swing.JLabel();\n medsCountLbl = new javax.swing.JLabel();\n cashShowLbl = new javax.swing.JLabel();\n diseaseSearchBox = new javax.swing.JTextField();\n ShowAllMeds = new javax.swing.JButton();\n EditProfit = new javax.swing.JButton();\n ShowDoctorInfo = new javax.swing.JButton();\n ShowPatients = new javax.swing.JButton();\n docShowWallet = new javax.swing.JButton();\n\n jLabel15.setText(\"jLabel15\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(51, 204, 255));\n\n patientNameBox.setText(\"patient name\");\n patientNameBox.setToolTipText(\"set patient name\");\n patientNameBox.setName(\"patientName\"); // NOI18N\n\n patientAgeBox.setText(\"age\");\n patientAgeBox.setToolTipText(\"age\");\n\n patientDiseaseBox.setText(\"disease\");\n patientDiseaseBox.setToolTipText(\"disease\");\n\n patientIDBox.setText(\"patientID\");\n patientIDBox.setToolTipText(\"patientID\");\n patientIDBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n patientIDBoxActionPerformed(evt);\n }\n });\n\n patientSetBtn.setText(\"Submit\");\n patientSetBtn.setToolTipText(\"Set Method\");\n patientSetBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n patientSetBtnActionPerformed(evt);\n }\n });\n\n patientIDSearchBtn.setText(\"patient id\");\n patientIDSearchBtn.setToolTipText(\"patietn id for search\");\n patientIDSearchBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n patientIDSearchBtnActionPerformed(evt);\n }\n });\n\n searchPatientBtn.setText(\"Search\");\n searchPatientBtn.setToolTipText(\"Find your Patient\");\n searchPatientBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchPatientBtnActionPerformed(evt);\n }\n });\n\n patientNameFoundBox.setText(\"search result\");\n patientNameFoundBox.setToolTipText(\"\");\n patientNameFoundBox.setName(\"patientName\"); // NOI18N\n\n patientAgeFoundBox.setText(\"search result\");\n patientAgeFoundBox.setToolTipText(\"\");\n patientAgeFoundBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n patientAgeFoundBoxActionPerformed(evt);\n }\n });\n\n patientDiseaseFoundBox.setText(\"search result\");\n patientDiseaseFoundBox.setToolTipText(\"\");\n patientDiseaseFoundBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n patientDiseaseFoundBoxActionPerformed(evt);\n }\n });\n\n docNameBox.setToolTipText(\"doc name\");\n docNameBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n docNameBoxActionPerformed(evt);\n }\n });\n\n docSkillBox.setToolTipText(\"expertise\");\n\n docSet.setText(\"doc set\");\n docSet.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n docSetActionPerformed(evt);\n }\n });\n\n billPatientIDBox.setToolTipText(\"patient id\");\n\n billPatient.setText(\"bill patient\");\n billPatient.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n billPatientActionPerformed(evt);\n }\n });\n\n checkInventoryBtn.setText(\"check inventory\");\n checkInventoryBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n checkInventoryBtnActionPerformed(evt);\n }\n });\n\n sellMedsBtn.setText(\"sell medicine\");\n sellMedsBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sellMedsBtnActionPerformed(evt);\n }\n });\n\n jLabel1.setBackground(new java.awt.Color(255, 153, 51));\n jLabel1.setForeground(new java.awt.Color(255, 0, 0));\n jLabel1.setText(\"patient admission\");\n\n jLabel2.setBackground(new java.awt.Color(255, 153, 51));\n jLabel2.setForeground(new java.awt.Color(255, 0, 0));\n jLabel2.setText(\"Doctors\");\n\n jLabel3.setBackground(new java.awt.Color(255, 153, 51));\n jLabel3.setForeground(new java.awt.Color(255, 0, 0));\n jLabel3.setText(\"pharmacy\");\n\n jLabel4.setBackground(new java.awt.Color(255, 153, 51));\n jLabel4.setForeground(new java.awt.Color(255, 0, 0));\n jLabel4.setText(\"Manager\");\n\n jButton7.setText(\"number of patient\");\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n\n cashShowBtn.setText(\"total cash\");\n cashShowBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cashShowBtnActionPerformed(evt);\n }\n });\n\n jButton9.setText(\"disease by type\");\n jButton9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton9ActionPerformed(evt);\n }\n });\n\n jButton10.setText(\"medicine at stock\");\n jButton10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton10ActionPerformed(evt);\n }\n });\n\n exitBtn.setText(\"Exit\");\n exitBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exitBtnActionPerformed(evt);\n }\n });\n\n clrAllTxt.setText(\"Clear All Text\");\n clrAllTxt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n clrAllTxtActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Name\");\n jLabel5.setToolTipText(\"Name\");\n\n jLabel6.setText(\"Age\");\n\n jLabel7.setText(\"Disease\");\n\n jLabel8.setText(\"ID\");\n\n jLabel9.setText(\"Name\");\n\n jLabel10.setText(\"Expertise\");\n\n jLabel11.setText(\"Name\");\n\n jLabel12.setText(\"Quantity\");\n\n sellAmount.setToolTipText(\"Meds Quantity\");\n sellAmount.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sellAmountActionPerformed(evt);\n }\n });\n\n medsBuyBox.setToolTipText(\"Medicine name\");\n\n jLabel13.setText(\"Name\");\n\n jLabel14.setText(\"Quantity\");\n\n buyMedsBtn.setText(\"buy medicine\");\n buyMedsBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buyMedsBtnActionPerformed(evt);\n }\n });\n\n buyPriceBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buyPriceBoxActionPerformed(evt);\n }\n });\n\n asdfas.setText(\"buy price\");\n\n showAmountBox.setText(\"Shows stock info\");\n\n numberOfPatient.setText(\"N/A\");\n\n diseaseByTypeLbl.setText(\"N/A\");\n diseaseByTypeLbl.setToolTipText(\"\");\n\n medsCountLbl.setText(\"N/A\");\n\n cashShowLbl.setText(\"N/A\");\n\n diseaseSearchBox.setToolTipText(\"type in disease name to search\");\n\n ShowAllMeds.setText(\"Show All Meds\");\n ShowAllMeds.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ShowAllMedsActionPerformed(evt);\n }\n });\n\n EditProfit.setText(\"Edit Profit\");\n EditProfit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n EditProfitActionPerformed(evt);\n }\n });\n\n ShowDoctorInfo.setText(\"Show Doctor Information\");\n ShowDoctorInfo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ShowDoctorInfoActionPerformed(evt);\n }\n });\n\n ShowPatients.setText(\"Show Patients\");\n ShowPatients.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ShowPatientsActionPerformed(evt);\n }\n });\n\n docShowWallet.setText(\"show wallet\");\n docShowWallet.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n docShowWalletActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(clrAllTxt)\n .addGap(18, 18, 18)\n .addComponent(exitBtn)\n .addGap(25, 25, 25))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel8)))\n .addComponent(jLabel9)\n .addGroup(layout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addComponent(jLabel10)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(docShowWallet)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(diseaseSearchBox, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(EditProfit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(ShowAllMeds)\n .addComponent(checkInventoryBtn)))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel11)\n .addGap(18, 18, 18)\n .addComponent(sellMedsBox, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sellAmount))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(sellMedsBtn)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(numberOfPatient, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(showAmountBox)\n .addComponent(cashShowLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(diseaseByTypeLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(medsCountLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(13, 13, 13))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(patientNameBox)\n .addComponent(patientAgeBox)\n .addComponent(patientDiseaseBox)\n .addComponent(patientIDBox, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel1)\n .addGroup(layout.createSequentialGroup()\n .addComponent(patientSetBtn)\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(patientIDSearchBtn)\n .addComponent(searchPatientBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(patientNameFoundBox)\n .addComponent(patientAgeFoundBox)\n .addComponent(patientDiseaseFoundBox, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(docSkillBox, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(docSet, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(docNameBox, javax.swing.GroupLayout.Alignment.LEADING))\n .addGap(1, 1, 1)\n .addComponent(ShowPatients)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(billPatient, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(billPatientIDBox)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(34, 34, 34)\n .addComponent(ShowDoctorInfo)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 55, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cashShowBtn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton7, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(buyMedsBtn)\n .addGroup(layout.createSequentialGroup()\n .addComponent(asdfas)\n .addGap(22, 22, 22)\n .addComponent(buyPriceBox, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel14)\n .addGap(22, 22, 22)\n .addComponent(buyMedsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel13)\n .addGap(36, 36, 36)\n .addComponent(medsBuyBox))))))))\n .addGap(137, 137, 137))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(patientNameBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jLabel1))\n .addGap(7, 7, 7)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(medsBuyBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13)\n .addComponent(jLabel11))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel14)\n .addComponent(buyMedsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(patientAgeBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(buyPriceBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(asdfas))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(patientNameFoundBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(patientAgeFoundBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(patientDiseaseBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7)\n .addComponent(sellMedsBtn)\n .addComponent(buyMedsBtn)\n .addComponent(patientDiseaseFoundBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(sellMedsBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(sellAmount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(patientIDBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(patientIDSearchBtn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8)\n .addComponent(ShowAllMeds))\n .addGap(7, 7, 7)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(checkInventoryBtn)\n .addComponent(showAmountBox))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(patientSetBtn)\n .addComponent(searchPatientBtn))\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(ShowDoctorInfo)\n .addComponent(jLabel2)\n .addComponent(jLabel4))))\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(docNameBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(billPatientIDBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9)\n .addComponent(ShowPatients))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton7)\n .addComponent(numberOfPatient)\n .addComponent(docSkillBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10)\n .addComponent(billPatient))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(cashShowBtn)\n .addComponent(cashShowLbl)\n .addComponent(docSet))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton9)\n .addComponent(diseaseByTypeLbl)\n .addComponent(diseaseSearchBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(docShowWallet))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton10)\n .addComponent(medsCountLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(EditProfit)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(exitBtn)\n .addComponent(clrAllTxt))\n .addContainerGap())\n );\n\n patientDiseaseBox.getAccessibleContext().setAccessibleName(\"\");\n\n pack();\n }", "private void numeroDaFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void ValorActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n backBtn = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n operatePatientBtn = new javax.swing.JButton();\n patientNameTxtField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n releasePatientBtn = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n feedBackTextArea = new javax.swing.JTextArea();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n backBtn.setText(\"Back\");\n backBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backBtnActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"ER Specialist Operation \");\n\n operatePatientBtn.setText(\"Operate Patient\");\n operatePatientBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n operatePatientBtnActionPerformed(evt);\n }\n });\n\n patientNameTxtField.setEditable(false);\n\n jLabel2.setText(\"Patient\");\n\n releasePatientBtn.setText(\"Release Patient\");\n releasePatientBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n releasePatientBtnActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Feedback\");\n\n feedBackTextArea.setColumns(20);\n feedBackTextArea.setRows(5);\n jScrollPane1.setViewportView(feedBackTextArea);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(107, 107, 107)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(operatePatientBtn)\n .addGroup(layout.createSequentialGroup()\n .addGap(173, 173, 173)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(55, 55, 55)\n .addComponent(patientNameTxtField, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addComponent(backBtn)\n .addGap(67, 67, 67)\n .addComponent(releasePatientBtn)))\n .addGap(297, 297, 297))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(patientNameTxtField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(58, 58, 58)\n .addComponent(operatePatientBtn)\n .addGap(46, 46, 46)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(releasePatientBtn)\n .addComponent(backBtn))\n .addGap(242, 242, 242))\n );\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==b0){\r\n\t\t\tif(!tf1.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的病历号(数字)进行查找\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"正确\");\r\n\t\t\t\tPatient patient = Db.serch(tf1.getText());\r\n\t\t\t\tif(patient == null){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"没有该病历号的记录,请重新输入病历号搜索\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttf2.setText(patient.getName());\r\n\t\t\t\t\ttf3.setText(patient.getSex());\r\n\t\t\t\t\ttf4.setText(patient.getAge());\r\n\t\t\t\t\ttf5.setText(patient.getCareer());\r\n\t\t\t\t\ttf6.setText(patient.getPhone());\r\n\t\t\t\t\ttf7.setText(patient.getRecipe());\r\n\t\t\t\t\tta.setText(patient.getDescribe());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(e.getSource()==b1){\r\n\t\t\tif(!tf1.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的病历号(数字)\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(!tf4.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的年龄(数字)\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(!tf6.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的电话(数字)\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(!tf7.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的处方(数字)\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tPatient patient = new Patient();\r\n\t\t\tpatient.setId(tf1.getText());\r\n\t\t\tpatient.setName(tf2.getText());\r\n\t\t\tpatient.setSex(tf3.getText());\r\n\t\t\tpatient.setAge(tf4.getText());\r\n\t\t\tpatient.setCareer(tf5.getText());\r\n\t\t\tpatient.setPhone(tf6.getText());\r\n\t\t\tpatient.setRecipe(tf7.getText());\r\n\t\t\tpatient.setDescribe(ta.getText());\r\n\t\t\tDb.update(patient);\r\n\t\t}else if(e.getSource()==b2){\r\n\t\t\tSystem.out.println(\"开始打印\");\r\n\t\t\tPatient pa = new Patient();\r\n\t\t\tpa.setId(tf1.getText());\r\n\t\t\tpa.setName(tf2.getText());\r\n\t\t\tpa.setSex(tf3.getText());\r\n\t\t\tpa.setAge(tf4.getText());\r\n\t\t\tpa.setCareer(tf5.getText());\r\n\t\t\tpa.setPhone(tf6.getText());\r\n\t\t\tpa.setRecipe(tf7.getText());\r\n\t\t\tpa.setDescribe(ta.getText());\r\n\t\t\tnew PrintPanel(pa);\r\n\t\t}else if(e.getSource()==b3){\r\n\t\t\tSystem.out.println(\"开始治疗\");\r\n\t\t\t\r\n\t\t\tif(owner!=null){\r\n\t\t\t\towner.setVisible(true);\r\n\t\t\t\towner.editorMain.setVisible(false);\r\n\t\t\t}\r\n\t\t\tsetVisible(false);\r\n\t\t}else if(e.getSource()==b4){\r\n\t\t\tthis.setVisible(false);\t\t\t\r\n\t\t\towner.setVisible(false);\r\n\t\t\tthis.owner.editorMain.setVisible(true);\r\n\t\t\t\r\n\t\t}\r\n\t}", "void btnGenReport_actionPerformed(ActionEvent e) {\n JButtonQueryButtonAction(e);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jRadioButtonMenuItem1 = new javax.swing.JRadioButtonMenuItem();\n jRadioButtonMenuItem2 = new javax.swing.JRadioButtonMenuItem();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n teaInfoAddButton = new javax.swing.JButton();\n teaInfoResetButton = new javax.swing.JButton();\n teaManRadioButton = new javax.swing.JRadioButton();\n teaWomanRadioButton = new javax.swing.JRadioButton();\n teaRadioButton1 = new javax.swing.JRadioButton();\n teaRadioButton2 = new javax.swing.JRadioButton();\n teaRadioButton3 = new javax.swing.JRadioButton();\n teaIDText = new javax.swing.JTextField();\n teaNameText = new javax.swing.JTextField();\n teaDepartmentText = new javax.swing.JTextField();\n teaCollegeText = new javax.swing.JTextField();\n teaInterestText = new javax.swing.JTextField();\n teaPhoneText = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n teaRadioButton4 = new javax.swing.JRadioButton();\n jLabel10 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n\n jRadioButtonMenuItem1.setSelected(true);\n jRadioButtonMenuItem1.setText(\"jRadioButtonMenuItem1\");\n\n jRadioButtonMenuItem2.setSelected(true);\n jRadioButtonMenuItem2.setText(\"jRadioButtonMenuItem2\");\n\n setClosable(true);\n setTitle(\"老师信息添加\");\n\n jLabel1.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel1.setText(\"教工号*\");\n\n jLabel2.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel2.setText(\"姓名*\");\n\n jLabel3.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel3.setText(\"性别*\");\n\n jLabel4.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel4.setText(\"学院*\");\n\n jLabel5.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel5.setText(\"系*\");\n\n jLabel6.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel6.setText(\"类别*\");\n\n jLabel7.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel7.setText(\"手机*\");\n\n jLabel8.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel8.setText(\"兴趣\");\n\n jLabel9.setBackground(new java.awt.Color(255, 0, 0));\n jLabel9.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 0, 0));\n jLabel9.setText(\"填写要求:1、除兴趣一栏可选外其余均为必填!\");\n\n teaInfoAddButton.setFont(new java.awt.Font(\"华文行楷\", 0, 18)); // NOI18N\n teaInfoAddButton.setText(\"添加\");\n teaInfoAddButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaInfoAddButtonActionPerformed(evt);\n }\n });\n\n teaInfoResetButton.setFont(new java.awt.Font(\"华文行楷\", 0, 18)); // NOI18N\n teaInfoResetButton.setText(\"重置\");\n teaInfoResetButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaInfoResetButtonActionPerformed(evt);\n }\n });\n\n teaManRadioButton.setSelected(true);\n teaManRadioButton.setText(\"男\");\n teaManRadioButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaManRadioButtonActionPerformed(evt);\n }\n });\n\n teaWomanRadioButton.setText(\"女\");\n teaWomanRadioButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaWomanRadioButtonActionPerformed(evt);\n }\n });\n\n teaRadioButton1.setSelected(true);\n teaRadioButton1.setText(\"助理教授\");\n teaRadioButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaRadioButton1ActionPerformed(evt);\n }\n });\n\n teaRadioButton2.setText(\"副教授\");\n teaRadioButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaRadioButton2ActionPerformed(evt);\n }\n });\n\n teaRadioButton3.setText(\"教授\");\n teaRadioButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaRadioButton3ActionPerformed(evt);\n }\n });\n\n teaIDText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaIDTextActionPerformed(evt);\n }\n });\n\n teaNameText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaNameTextActionPerformed(evt);\n }\n });\n\n teaDepartmentText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaDepartmentTextActionPerformed(evt);\n }\n });\n\n teaCollegeText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaCollegeTextActionPerformed(evt);\n }\n });\n\n teaInterestText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaInterestTextActionPerformed(evt);\n }\n });\n\n teaPhoneText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaPhoneTextActionPerformed(evt);\n }\n });\n\n jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/view/icons/teacher.png\"))); // NOI18N\n\n teaRadioButton4.setText(\"其他\");\n teaRadioButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n teaRadioButton4ActionPerformed(evt);\n }\n });\n\n jLabel10.setBackground(new java.awt.Color(255, 0, 0));\n jLabel10.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(255, 0, 0));\n jLabel10.setText(\"2、教工号为11位纯数字,如52282168868\");\n\n jLabel12.setBackground(new java.awt.Color(255, 0, 0));\n jLabel12.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(255, 0, 0));\n jLabel12.setText(\"3、手机号为11位纯数字,如13358878188\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)))\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel8))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(teaIDText, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(teaNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(teaCollegeText, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(teaDepartmentText, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(teaPhoneText, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(teaManRadioButton)\n .addGap(18, 18, 18)\n .addComponent(teaWomanRadioButton))\n .addGroup(layout.createSequentialGroup()\n .addComponent(teaRadioButton1)\n .addGap(18, 18, 18)\n .addComponent(teaRadioButton2)\n .addGap(18, 18, 18)\n .addComponent(teaRadioButton3)\n .addGap(18, 18, 18)\n .addComponent(teaRadioButton4))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(teaInfoAddButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(teaInfoResetButton))\n .addComponent(teaInterestText, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel12)\n .addComponent(jLabel9))\n .addGroup(layout.createSequentialGroup()\n .addGap(108, 108, 108)\n .addComponent(jLabel10)))))\n .addGap(60, 60, 60))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel9)\n .addGap(18, 18, 18)\n .addComponent(jLabel10)\n .addGap(18, 18, 18)\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(teaIDText, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(teaNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(teaManRadioButton)\n .addComponent(teaWomanRadioButton))\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(teaCollegeText, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(teaDepartmentText, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(teaRadioButton1)\n .addComponent(teaRadioButton2)\n .addComponent(teaRadioButton3)\n .addComponent(teaRadioButton4)))\n .addComponent(jLabel11))\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(teaPhoneText, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(teaInterestText, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(teaInfoAddButton)\n .addComponent(teaInfoResetButton))\n .addContainerGap())\n );\n\n pack();\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void clickButton()\n {\n fieldChangeNotify( 0 );\n }", "private void flightIDTextActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n doctorScheduleJTable = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n backJButton1 = new javax.swing.JButton();\n btnDiagnose = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n doctorScheduleJTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Status\", \"Patient ID\", \"Patient Name\", \"Scheduled Time\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(doctorScheduleJTable);\n if (doctorScheduleJTable.getColumnModel().getColumnCount() > 0) {\n doctorScheduleJTable.getColumnModel().getColumn(0).setResizable(false);\n doctorScheduleJTable.getColumnModel().getColumn(1).setResizable(false);\n doctorScheduleJTable.getColumnModel().getColumn(2).setResizable(false);\n doctorScheduleJTable.getColumnModel().getColumn(3).setResizable(false);\n }\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Manage Doctor Schedule\");\n\n backJButton1.setText(\"<< Back\");\n backJButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButton1ActionPerformed(evt);\n }\n });\n\n btnDiagnose.setText(\"Diagnose Patient\");\n btnDiagnose.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDiagnoseActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(100, 100, 100)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(backJButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnDiagnose))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 800, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(102, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(jLabel1)\n .addGap(36, 36, 36)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(118, 118, 118)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(backJButton1)\n .addComponent(btnDiagnose))\n .addContainerGap(195, Short.MAX_VALUE))\n );\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n pNamLbl = new javax.swing.JLabel();\n pNamTf = new javax.swing.JTextField();\n pAgeLbl = new javax.swing.JLabel();\n pAgeTf = new javax.swing.JTextField();\n mConLbl = new javax.swing.JLabel();\n mConTf = new javax.swing.JTextField();\n addBtn = new javax.swing.JButton();\n schedBtn = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n extBtn = new javax.swing.JButton();\n pListBtn = new javax.swing.JButton();\n prioLbl = new javax.swing.JLabel();\n prioTf = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(204, 0, 0));\n jLabel1.setText(\"Welcome to the Vaccine App\");\n\n pNamLbl.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n pNamLbl.setText(\"Patients Name:\");\n\n pAgeLbl.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n pAgeLbl.setText(\"Patients Age:\");\n\n mConLbl.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n mConLbl.setText(\"Medical Condition (Y/N):\");\n\n addBtn.setText(\"Add Patient\");\n addBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addBtnActionPerformed(evt);\n }\n });\n\n schedBtn.setText(\"Next Group\");\n schedBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n schedBtnActionPerformed(evt);\n }\n });\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n extBtn.setText(\"Exit\");\n extBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n extBtnActionPerformed(evt);\n }\n });\n\n pListBtn.setText(\"List\");\n pListBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pListBtnActionPerformed(evt);\n }\n });\n\n prioLbl.setText(\"Priority:\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(104, 104, 104)\n .addComponent(jLabel1)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pNamLbl)\n .addComponent(pAgeLbl))\n .addGap(66, 66, 66)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(pAgeTf, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pNamTf, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(mConLbl)\n .addComponent(prioLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(mConTf)\n .addComponent(prioTf))))\n .addGroup(layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(addBtn)\n .addGap(18, 18, 18)\n .addComponent(schedBtn)\n .addGap(18, 18, 18)\n .addComponent(pListBtn)\n .addGap(18, 18, 18)\n .addComponent(extBtn)))))\n .addContainerGap(150, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pNamLbl)\n .addComponent(pNamTf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pAgeLbl)\n .addComponent(pAgeTf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(mConLbl)\n .addComponent(mConTf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prioLbl)\n .addComponent(prioTf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addBtn)\n .addComponent(schedBtn)\n .addComponent(extBtn)\n .addComponent(pListBtn))\n .addContainerGap(308, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void jTextField4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n buttonGroup2 = new javax.swing.ButtonGroup();\n buttonGroup3 = new javax.swing.ButtonGroup();\n buttonGroup4 = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n pid = new javax.swing.JTextField();\n dname = new javax.swing.JComboBox<>();\n jLabel4 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n v1 = new javax.swing.JRadioButton();\n jLabel13 = new javax.swing.JLabel();\n v2 = new javax.swing.JRadioButton();\n j1 = new javax.swing.JRadioButton();\n h1 = new javax.swing.JRadioButton();\n b1 = new javax.swing.JRadioButton();\n h2 = new javax.swing.JRadioButton();\n j2 = new javax.swing.JRadioButton();\n b2 = new javax.swing.JRadioButton();\n temp = new javax.swing.JTextField();\n slp = new javax.swing.JTextField();\n sub = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"ONLINE CONSULTATION\");\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel2.setText(\"Enter Patient ID\");\n\n jLabel3.setText(\"Select a Genral Physician\");\n\n pid.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pidActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(pid)\n .addComponent(dname, 0, 79, Short.MAX_VALUE))\n .addGap(32, 32, 32))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(pid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(dname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23))\n );\n\n jLabel4.setText(\"Temperature : \");\n\n jLabel6.setText(\"Number of hours of sleep:\");\n\n jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel7.setText(\"Vomit :\");\n\n jLabel8.setText(\"Headache :\");\n\n jLabel9.setText(\"Joint Pain:\");\n\n jLabel10.setText(\"Blocked Nose:\");\n\n jLabel12.setText(\"Yes\");\n\n buttonGroup1.add(v1);\n v1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n v1ActionPerformed(evt);\n }\n });\n\n jLabel13.setText(\"No\");\n\n buttonGroup1.add(v2);\n v2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n v2ActionPerformed(evt);\n }\n });\n\n buttonGroup3.add(j1);\n j1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n j1ActionPerformed(evt);\n }\n });\n\n buttonGroup2.add(h1);\n h1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n h1ActionPerformed(evt);\n }\n });\n\n buttonGroup4.add(b1);\n b1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n b1ActionPerformed(evt);\n }\n });\n\n buttonGroup2.add(h2);\n h2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n h2ActionPerformed(evt);\n }\n });\n\n buttonGroup3.add(j2);\n j2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n j2ActionPerformed(evt);\n }\n });\n\n buttonGroup4.add(b2);\n b2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n b2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addComponent(jLabel10)\n .addComponent(jLabel7))\n .addGap(126, 126, 126)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel12)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(v1)\n .addComponent(b1)\n .addComponent(h1)\n .addComponent(j1)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(h2)\n .addComponent(v2)\n .addComponent(j2)\n .addComponent(b2))\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap(23, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addGap(9, 9, 9))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(jLabel13))\n .addGap(18, 18, 18)\n .addComponent(v1))\n .addComponent(v2, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(h2)\n .addComponent(h1)\n .addComponent(jLabel8))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(j2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(b2))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addGap(18, 18, 18)\n .addComponent(jLabel10))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(j1)\n .addGap(9, 9, 9)\n .addComponent(b1))))\n .addGap(12, 12, 12))\n );\n\n sub.setText(\"SUBMIT\");\n sub.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n subActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(242, 242, 242)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGap(102, 102, 102)\n .addComponent(jLabel5)))\n .addGap(87, 87, 87))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel6))\n .addGap(53, 53, 53)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(slp)\n .addComponent(temp)))\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(118, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(sub)\n .addGap(235, 235, 235))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel1)\n .addGap(49, 49, 49)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(temp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(slp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38)\n .addComponent(sub)\n .addGap(40, 40, 40))\n );\n\n pack();\n }", "private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblTitle = new javax.swing.JLabel();\n lblRecordNum = new javax.swing.JLabel();\n txtRecordNum = new javax.swing.JTextField();\n txtAlergy1 = new javax.swing.JTextField();\n lblAlergy1 = new javax.swing.JLabel();\n txtAlergy2 = new javax.swing.JTextField();\n lblAlergy2 = new javax.swing.JLabel();\n txtAlergy3 = new javax.swing.JTextField();\n lblAlergy3 = new javax.swing.JLabel();\n btnMedicalSave = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n lblTitle.setBackground(new java.awt.Color(0, 153, 153));\n lblTitle.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n lblTitle.setForeground(new java.awt.Color(0, 153, 153));\n lblTitle.setText(\"Create Medical Information\");\n\n lblRecordNum.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n lblRecordNum.setText(\"Medical Record Number:\");\n\n lblAlergy1.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n lblAlergy1.setText(\"Alergy 1:\");\n\n lblAlergy2.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n lblAlergy2.setText(\"Alergy 2:\");\n\n lblAlergy3.setFont(new java.awt.Font(\"Tahoma\", 0, 12)); // NOI18N\n lblAlergy3.setText(\"Alergy 3:\");\n\n btnMedicalSave.setText(\"Save\");\n btnMedicalSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnMedicalSaveActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(lblTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblRecordNum)\n .addGap(18, 18, 18)\n .addComponent(txtRecordNum, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblAlergy2)\n .addGap(18, 18, 18)\n .addComponent(txtAlergy2, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblAlergy1)\n .addGap(18, 18, 18)\n .addComponent(txtAlergy1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblAlergy3)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnMedicalSave, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtAlergy3, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addContainerGap(102, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(57, 57, 57)\n .addComponent(lblTitle)\n .addGap(46, 46, 46)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtRecordNum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblRecordNum))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAlergy1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblAlergy1))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAlergy2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblAlergy2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAlergy3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblAlergy3))\n .addGap(30, 30, 30)\n .addComponent(btnMedicalSave)\n .addContainerGap(92, Short.MAX_VALUE))\n );\n }", "private void jTextField19ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void onSelectPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0) {\n\t\t\t// No row has been selected\n\t\t\tbuttonRemovePatient.setEnabled(false);\n\t\t\tbuttonViewPatient.setEnabled(false);\n\t\t} else {\n\t\t\t// A row has been selected\n\t\t\tbuttonRemovePatient.setEnabled(true);\n\t\t\tbuttonViewPatient.setEnabled(true);\n\t\t}\n\t}", "public void patientsCredentials() {\n\t\tutil.ClickElement(prop.getValue(\"locators.register.click\"));\n\t\tlogreport.info(\"Patient registration is clicked\");\n\t}", "private void add_grant_perches_textActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void setPatient(org.hl7.fhir.ResourceReference patient)\n {\n generatedSetterHelperImpl(patient, PATIENT$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Petitioner_ID = new javax.swing.JLabel();\n Petitioner_Name = new javax.swing.JLabel();\n Petitioner_CNIC = new javax.swing.JLabel();\n Petitioner_City = new javax.swing.JLabel();\n Petitioner_State = new javax.swing.JLabel();\n Petitioner_ID_Field = new javax.swing.JTextField();\n Petitioner_Name_Field = new javax.swing.JTextField();\n Petitioner_CNIC_Field = new javax.swing.JTextField();\n Petitioner_City_Field = new javax.swing.JTextField();\n Petitioner_State_Field = new javax.swing.JTextField();\n Accused_Insert_Button = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n Petitioner_Contact_no = new javax.swing.JLabel();\n Petitioner_Contact_No_Field = new javax.swing.JTextField();\n Petitioner_FIR_ID = new javax.swing.JLabel();\n Petitioner_FIR_ID_Field = new javax.swing.JTextField();\n Petitioner_Gender = new javax.swing.JLabel();\n Petitioner_Gender_Field = new javax.swing.JTextField();\n Petitioner_Gender_ComboBox = new javax.swing.JComboBox<>();\n Petitioner_House_No = new javax.swing.JLabel();\n Petitioner_House_No_Field = new javax.swing.JTextField();\n Petitioner_Return_Button = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Petitioner_ID.setText(\"Petitioner_ID\");\n\n Petitioner_Name.setText(\"Name\");\n\n Petitioner_CNIC.setText(\"CNIC\");\n\n Petitioner_City.setText(\"City\");\n\n Petitioner_State.setText(\"State\");\n\n Petitioner_ID_Field.setToolTipText(\"yyyy-mm-dd\");\n Petitioner_ID_Field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_ID_FieldActionPerformed(evt);\n }\n });\n\n Petitioner_CNIC_Field.setToolTipText(\"int\");\n Petitioner_CNIC_Field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_CNIC_FieldActionPerformed(evt);\n }\n });\n\n Petitioner_State_Field.setToolTipText(\"yyyy-mm-dd\");\n Petitioner_State_Field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_State_FieldActionPerformed(evt);\n }\n });\n\n Accused_Insert_Button.setText(\"Insert\");\n Accused_Insert_Button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Accused_Insert_ButtonActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Georgia\", 0, 14)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"PETITIONER FORM\");\n\n Petitioner_Contact_no.setText(\"Contact_No\");\n\n Petitioner_Contact_No_Field.setToolTipText(\"yyyy-mm-dd\");\n Petitioner_Contact_No_Field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_Contact_No_FieldActionPerformed(evt);\n }\n });\n\n Petitioner_FIR_ID.setText(\"FIR_ID\");\n\n Petitioner_FIR_ID_Field.setToolTipText(\"yyyy-mm-dd\");\n Petitioner_FIR_ID_Field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_FIR_ID_FieldActionPerformed(evt);\n }\n });\n\n Petitioner_Gender.setText(\"Gender\");\n\n Petitioner_Gender_Field.setEditable(false);\n Petitioner_Gender_Field.setText(\"Male\");\n Petitioner_Gender_Field.setToolTipText(\"\");\n Petitioner_Gender_Field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_Gender_FieldActionPerformed(evt);\n }\n });\n\n Petitioner_Gender_ComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Male\", \"Female\" }));\n Petitioner_Gender_ComboBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_Gender_ComboBoxActionPerformed(evt);\n }\n });\n\n Petitioner_House_No.setText(\"House_No\");\n\n Petitioner_House_No_Field.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_House_No_FieldActionPerformed(evt);\n }\n });\n\n Petitioner_Return_Button.setText(\"Return\");\n Petitioner_Return_Button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Petitioner_Return_ButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(Petitioner_House_No, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Petitioner_State, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Petitioner_FIR_ID)\n .addComponent(Petitioner_Gender, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Petitioner_ID, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Petitioner_Name, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)\n .addComponent(Petitioner_CNIC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Petitioner_City, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Petitioner_Contact_no, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Accused_Insert_Button, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(Petitioner_Return_Button, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(Petitioner_City_Field)\n .addComponent(Petitioner_Contact_No_Field)\n .addComponent(Petitioner_Gender_Field, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)\n .addComponent(Petitioner_Name_Field)\n .addComponent(Petitioner_CNIC_Field)\n .addComponent(Petitioner_State_Field)\n .addComponent(Petitioner_FIR_ID_Field)\n .addComponent(Petitioner_ID_Field, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(Petitioner_House_No_Field))\n .addGap(18, 18, 18)\n .addComponent(Petitioner_Gender_ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(Petitioner_ID)\n .addComponent(Petitioner_ID_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Petitioner_Name_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Petitioner_Name, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Petitioner_Gender_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Petitioner_Gender, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Petitioner_Gender_ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Petitioner_Contact_No_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Petitioner_Contact_no, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Petitioner_CNIC)\n .addComponent(Petitioner_CNIC_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Petitioner_City)\n .addComponent(Petitioner_City_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Petitioner_State, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Petitioner_State_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Petitioner_House_No)\n .addComponent(Petitioner_House_No_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Petitioner_FIR_ID_Field, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Petitioner_FIR_ID, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Accused_Insert_Button)\n .addComponent(Petitioner_Return_Button))\n .addContainerGap(49, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n table_appointment = new javax.swing.JTable();\n date_appointment = new javax.swing.JTextField();\n status_appointment = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n patient_id_appointment = new javax.swing.JLabel();\n patient_name_appointment = new javax.swing.JLabel();\n doctor_appointment = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n id_appointment = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n table_appointment.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n table_appointment.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n table_appointmentMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(table_appointment);\n\n jLabel1.setText(\"Date\");\n\n jLabel2.setText(\"Status\");\n\n jLabel3.setText(\"Patient ID\");\n\n jLabel4.setText(\"Patient name\");\n\n doctor_appointment.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n doctor_appointmentKeyReleased(evt);\n }\n });\n\n jLabel7.setText(\"Doctor ID\");\n\n jButton1.setText(\"Save\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Cancel\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Appointment ID\");\n\n jButton3.setText(\"Add\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jMenu1.setText(\"File\");\n\n jMenuItem1.setText(\"Main menu\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(doctor_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(jLabel7))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(date_appointment)\n .addComponent(status_appointment)\n .addComponent(patient_name_appointment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(patient_id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(id_appointment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(88, 88, 88)))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 574, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(doctor_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addGap(35, 35, 35)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(27, 27, 27))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(patient_id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(12, 12, 12))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(patient_name_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(date_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(status_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(44, Short.MAX_VALUE))\n );\n\n pack();\n }", "private static void changePatient(){\r\n // opretter ny instans af tempPatinet som overskriver den gamle\r\n Patient p = new Patient(); // det her kan udskiftes med en nulstil funktion for at forsikre at der altid kun er en patient.\r\n Patient.setCprNumber((Long) null);\r\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public SinglePatientPN() {\n initComponents();\n }", "public AssignPatient() {\n initComponents();\n this.getContentPane().setBackground(Color.WHITE);\n connex=connect.accessdb();\n }", "private void txtRucActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void dateFieldDtActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void monthFieldDtActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "private void btnAdministrarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void RadioButtonAgregarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnThongtinActionPerformed(java.awt.event.ActionEvent evt) {\n\n fillThongtin();\n }", "private void yearFieldDfActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "private void setDateButtonActionPerformed(java.awt.event.ActionEvent evt) {\n Date newDate = calendario.getDate();\n if(newDate != null) {\n java.sql.Date date = new java.sql.Date(newDate.getTime());\n control.setDate(date);\n control.crearAlerta(\"Informacion\", \"La fecha \" + date + \" ha sido agregada\" , this);\n } else {\n control.crearAlerta(\"Advertencia\", \"Debe escoger una fecha\", this);\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblPatients = new javax.swing.JTable();\n btnSelect = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n btnEdit = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Lista de pacientes\");\n\n tblPatients.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Habitación\", \"Nombres\", \"Apellidos\", \"Fecha de nacimiento\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tblPatients.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblPatientsMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tblPatients);\n\n btnSelect.setText(\"Seleccionar\");\n btnSelect.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnSelectMouseClicked(evt);\n }\n });\n\n btnCancel.setText(\"Volver\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n btnEdit.setText(\"Editar\");\n btnEdit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnEditMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCancel)\n .addGap(18, 18, 18)\n .addComponent(btnEdit)\n .addGap(18, 18, 18)\n .addComponent(btnSelect)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSelect)\n .addComponent(btnCancel)\n .addComponent(btnEdit))\n .addGap(36, 36, 36))\n );\n\n pack();\n }", "public void setPatientId(int patientId) {\n\t\t\t\n\t\tthis.patientId=patientId;\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnAccountTerminate = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n txtPatientID = new javax.swing.JTextPane();\n lbPatientID = new javax.swing.JLabel();\n boxAppointment = new javax.swing.JComboBox<>();\n jScrollPane1 = new javax.swing.JScrollPane();\n txtInfo = new javax.swing.JTextArea();\n boxPrescription = new javax.swing.JComboBox<>();\n boxHistory = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n btnSubmitDate = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n btnSubmitFeedback = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n boxDoctors = new javax.swing.JComboBox<>();\n jLabel10 = new javax.swing.JLabel();\n jScrollPane3 = new javax.swing.JScrollPane();\n txtFeedback = new javax.swing.JTextArea();\n btnAppointment = new javax.swing.JButton();\n btnHistory = new javax.swing.JButton();\n btnPrescription = new javax.swing.JButton();\n boxViewDoctors = new javax.swing.JComboBox<>();\n btnDoctorView = new javax.swing.JButton();\n boxRating = new javax.swing.JComboBox<>();\n jLabel11 = new javax.swing.JLabel();\n boxDoctorsAppointment = new javax.swing.JComboBox<>();\n dateEnd = new org.jdesktop.swingx.JXDatePicker();\n dateStart = new org.jdesktop.swingx.JXDatePicker();\n boxStartHour = new javax.swing.JComboBox<>();\n boxEndHour = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n txtMinStart = new javax.swing.JTextField();\n txtMinEnd = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n txtAppResponse = new javax.swing.JTextField();\n jLabel38 = new javax.swing.JLabel();\n txtFeedbackResponse = new javax.swing.JTextField();\n jLabel39 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n btnAccountTerminate.setText(\"Terminate Account\");\n btnAccountTerminate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAccountTerminateActionPerformed(evt);\n }\n });\n\n txtPatientID.setEditable(false);\n jScrollPane2.setViewportView(txtPatientID);\n\n lbPatientID.setText(\"Patient ID\");\n\n txtInfo.setColumns(20);\n txtInfo.setRows(5);\n jScrollPane1.setViewportView(txtInfo);\n\n jLabel2.setText(\"start date\");\n\n jLabel3.setText(\"end date\");\n\n btnSubmitDate.setText(\"sumbit\");\n\n jLabel4.setText(\"Request an appointment\");\n\n jLabel5.setText(\"Enter the range of dates\");\n\n btnSubmitFeedback.setText(\"submit\");\n\n jLabel8.setText(\"Doctor feedback\");\n\n jLabel9.setText(\"Select doctor and write feedback\");\n\n jLabel10.setText(\"Select doctor\");\n\n txtFeedback.setColumns(20);\n txtFeedback.setRows(5);\n jScrollPane3.setViewportView(txtFeedback);\n\n btnAppointment.setText(\"view Appointment\");\n\n btnHistory.setText(\"View History\");\n\n btnPrescription.setText(\"view Prescription\");\n\n btnDoctorView.setText(\"View Doctors Ratings\");\n\n boxRating.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\" }));\n\n jLabel11.setText(\"select rating\");\n\n boxStartHour.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"07\", \"08\", \"09\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\" }));\n boxStartHour.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n boxStartHourActionPerformed(evt);\n }\n });\n\n boxEndHour.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"07\", \"08\", \"09\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\" }));\n\n jLabel1.setText(\"Hour\");\n\n jLabel6.setText(\"Hour\");\n\n txtMinStart.setText(\"00\");\n\n txtMinEnd.setText(\"00\");\n txtMinEnd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtMinEndActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Minutes\");\n\n jLabel12.setText(\"Minutes\");\n\n txtAppResponse.setForeground(new java.awt.Color(255, 0, 0));\n txtAppResponse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtAppResponseActionPerformed(evt);\n }\n });\n\n jLabel38.setText(\"Appointment Response\");\n\n txtFeedbackResponse.setForeground(new java.awt.Color(255, 0, 0));\n txtFeedbackResponse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtFeedbackResponseActionPerformed(evt);\n }\n });\n\n jLabel39.setText(\"Feedback Response\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(lbPatientID)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnAccountTerminate)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addGap(35, 35, 35)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(dateStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(dateEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(btnSubmitDate))\n .addComponent(jLabel4)\n .addComponent(boxDoctorsAppointment, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addComponent(btnSubmitFeedback))\n .addComponent(jLabel9)\n .addComponent(jLabel8)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel10)\n .addComponent(jLabel11))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(boxDoctors, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(boxRating, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(layout.createSequentialGroup()\n .addGap(97, 97, 97)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(boxStartHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(boxEndHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtMinStart, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtMinEnd)))\n .addGap(43, 43, 43)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(26, 26, 26))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(boxAppointment, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(boxPrescription, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(jLabel38)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtAppResponse, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(25, 25, 25))\n .addComponent(boxViewDoctors, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(boxHistory, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(12, 12, 12)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnDoctorView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnHistory, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnPrescription, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnAppointment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(4, 4, 4)\n .addComponent(jLabel39)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtFeedbackResponse, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(10, 10, 10))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lbPatientID))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtFeedbackResponse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel39))\n .addGap(2, 2, 2)\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxDoctors, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel9))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(boxDoctorsAppointment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxRating, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel11)\n .addComponent(jLabel5))\n .addGap(3, 3, 3))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxAppointment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnAppointment))\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxPrescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPrescription))\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxHistory, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnHistory))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxViewDoctors, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnDoctorView))\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAppResponse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel38))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dateStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(dateEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnSubmitDate)\n .addGap(79, 79, 79)\n .addComponent(btnAccountTerminate))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxStartHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addComponent(txtMinStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxEndHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)\n .addComponent(txtMinEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12))))\n .addGap(18, 18, 18)\n .addComponent(btnSubmitFeedback)))\n .addGap(34, 34, 34))\n );\n\n pack();\n }", "private void u_interestActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void txtbuscarHCActionPerformed(java.awt.event.ActionEvent evt) {\n }" ]
[ "0.6778549", "0.6697091", "0.66750425", "0.66576743", "0.6653715", "0.6564413", "0.65135956", "0.6476453", "0.6473489", "0.642535", "0.6422784", "0.63897336", "0.63796526", "0.63796526", "0.63789123", "0.6347591", "0.63391346", "0.63252795", "0.6317801", "0.62958544", "0.62923735", "0.62520856", "0.6245241", "0.6243284", "0.6231862", "0.6222769", "0.62219465", "0.6211465", "0.62114054", "0.6209987", "0.6206739", "0.6203012", "0.61994916", "0.6198013", "0.61966234", "0.6191865", "0.6181245", "0.61705637", "0.6170475", "0.61668617", "0.61668617", "0.6161209", "0.61508375", "0.6141696", "0.61340225", "0.6132163", "0.6129382", "0.61206293", "0.61148053", "0.6114676", "0.608706", "0.608706", "0.60827833", "0.60724837", "0.60546833", "0.605173", "0.6046096", "0.60438377", "0.6040938", "0.6024189", "0.60119575", "0.60119575", "0.60119575", "0.6008886", "0.6004965", "0.60046524", "0.6004629", "0.60038584", "0.60024095", "0.599724", "0.5990285", "0.59793836", "0.59759325", "0.59751904", "0.5974408", "0.5972502", "0.59712857", "0.59654045", "0.596338", "0.595966", "0.595966", "0.595966", "0.5956429", "0.5952473", "0.5948865", "0.59451544", "0.59428215", "0.59428215", "0.59428215", "0.5939884", "0.5937562", "0.59374017", "0.59323764", "0.5932075", "0.5929934", "0.5927353", "0.591857", "0.59151024", "0.591215", "0.5906326" ]
0.74589306
0
GENFIRST:event_ShowPatientsActionPerformed TODO add your handling code here:
private void ShowPatientsActionPerformed(java.awt.event.ActionEvent evt) { String s = ""; int c = 0; try { while (c < doc.length) { if (docNameBox.getText().equalsIgnoreCase(doc[c].name)) { s = doc[c].name + " has these patients under him/her: \n" + doc[c].printPatientName(frame); break; } else { c++; } } } catch (NullPointerException e) { s = "Doctor name not found, please add name"; } JOptionPane.showMessageDialog(null, s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showPatients() {\n\t\t\t\n\t}", "private void onAddPatient() {\n\t\tGuiManager.openFrame(GuiManager.FRAME_ADD_PATIENT);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tArrayList<String> constructorInput = null;\n\t\t\t\tconstructorInput = NewPatientWindow.showInputdialog(true);\n\t\t\t\t\n\t\t\t\t// if cancel or close chosen on new patient window:\n\t\t\t\tif (constructorInput == null)\n\t\t\t\t\treturn; \n\t\t\t\t\n\t\t\t\t//else:\n\t\t\t\tBrainFreezeMain.patients.add(new Patient(\n\t\t\t\t\t\t(constructorInput.toArray( new String[constructorInput.size()]))));\n\t\t\t\tBrainFreezeMain.currentPatientIndex = BrainFreezeMain.patients.size()-1;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLeftPanel.refreshPatientLabel(); // change to patient list, update label\n\t\t\t\tLeftPanel.refreshPatientData(); // change to patient, update data\n\t\t\t\t\t\n\t\t\t\t}", "@UiHandler(\"people\")\n\tvoid patientsClicked(ClickEvent event) {\n\t\tplaceController.goTo(new StandardizedPatientPlace(\"PatientPlace\"));\n\t}", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "private void onViewPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0)\n\t\t\t// No row has been selected\n\t\t\treturn;\n\n\t\t// Gets the patient ID\n\t\tbyte[] patientId = (byte[]) tablePatients.getValueAt(selectedRowIndex, PatientTable.ID);\n\n\t\t// Sets the patient ID as the current one\n\t\tPatientManager.setCurrentPatientId(patientId);\n\n\t\t// Opens the patient frame\n\t\tGuiManager.openFrame(GuiManager.FRAME_PATIENT);\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n Members members = Members.getInstance();\n if (members.getPatients().doesMemberExist(name.getText().toUpperCase())==true){\n //launch patient GUI\n MainJFrame.changeState(ViewState.PATIENT);\n \n //find person\n Person p = members.getPatients().findMemberByName(name.getText());\n \n //make person a patient to access patient methods\n Patient patient = (Patient)p;\n \n //Get instance of patient panel\n PatientPanel patientPanel = PatientPanel.getInstance();\n \n //update fields with patient information\n patientPanel.setNameField(patient.getName());\n patientPanel.setAppointmentList(patient.getFormattedAppointments());\n patientPanel.setDobField(patient.getFormattedDate());\n patientPanel.setDoctorField(patient.getDoctor().getName());\n patientPanel.setGenderField(patient.getGenderAsString());\n patientPanel.setHouseField(patient.getContact().getHouse());\n patientPanel.setPhoneField(patient.getContact().getPhoneNum());\n patientPanel.setPostcodeField(patient.getContact().getPostcode());\n patientPanel.setRoadField(patient.getContact().getRoad());\n patientPanel.setTownField(patient.getContact().getTown());\n }\n else if (members.getDoctors().doesMemberExist(name.getText().toUpperCase())==true){\n //launch doctor GUI\n MainJFrame.changeState(ViewState.DOCTOR);\n \n //find person\n Person d = members.getDoctors().findMemberByName(name.getText());\n \n //make person a patient to access patient methods\n Doctor doctor = (Doctor)d;\n \n //Get instance of Doctors panel\n DoctorPanel doctorPanel = DoctorPanel.getInstance();\n \n //populate doctors schedule on log in\n doctorPanel.setSchedule(doctor.getFormattedSchedule());\n \n //set the doctors name to a string, used to maintain which doctor is logged in\n DoctorPanel.doctorsName = name.getText();\n\n }\n else if (members.getSecretaries().doesMemberExist(name.getText().toUpperCase())==true){\n //Launch Secretary GUI\n MainJFrame.changeState(ViewState.SECRETARY);\n }\n else if (members.getPharmacists().doesMemberExist(name.getText().toUpperCase())==true){\n //Launch Pharmacist GUI\n MainJFrame.changeState(ViewState.PHARMACIST);\n } \n else{\n //if no patient matches, return error dialog box.\n JOptionPane.showMessageDialog (null, \"Incorrect username entered\", \"Program Error\", JOptionPane.ERROR_MESSAGE);\n }\n \n //Get instance of login panel\n LoginPanel loginPanel = LoginPanel.getInstance();\n //Clear the text box\n loginPanel.clearLoginButton();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jTextFieldFname = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jTextFieldLname = new javax.swing.JTextField();\n jTextFieldAddress = new javax.swing.JTextField();\n jTextFieldPhoneNum = new javax.swing.JTextField();\n jTextFieldStatus = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jTextFieldID = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(0, 153, 153));\n jLabel1.setText(\"Search By Name\");\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 3, 14)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(102, 102, 0));\n jLabel2.setText(\"First Name Of Patient \");\n\n jButton1.setFont(new java.awt.Font(\"Times New Roman\", 3, 14)); // NOI18N\n jButton1.setForeground(new java.awt.Color(0, 102, 51));\n jButton1.setText(\"Search\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 3, 14)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(102, 102, 0));\n jLabel3.setText(\"Last Name Of Patient\");\n\n jTextFieldAddress.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextFieldAddressActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 14)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(102, 102, 0));\n jLabel4.setText(\"Address\");\n\n jLabel5.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 14)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(102, 102, 0));\n jLabel5.setText(\"Phone Number\");\n\n jLabel7.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 14)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(102, 102, 0));\n jLabel7.setText(\"ID\");\n\n jLabel8.setFont(new java.awt.Font(\"Trebuchet MS\", 3, 14)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(102, 102, 0));\n jLabel8.setText(\"Status\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(130, 130, 130)\n .addComponent(jButton1))\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 69, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldStatus, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextFieldID, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addComponent(jTextFieldFname, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextFieldPhoneNum, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)\n .addComponent(jTextFieldAddress)))))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTextFieldLname, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(87, 87, 87)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(49, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jLabel1)\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextFieldFname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextFieldLname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(38, 38, 38)\n .addComponent(jButton1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(63, 63, 63)\n .addComponent(jLabel4))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextFieldAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextFieldPhoneNum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextFieldStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jTextFieldID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(89, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void searchPatient() {\r\n String lName, fName;\r\n lName = search_lNameField.getText();\r\n fName = search_fNameField.getText();\r\n // find patients with the Last & First Name entered\r\n patientsFound = MainGUI.pimsSystem.search_patient(lName, fName);\r\n\r\n // more than one patient found\r\n if (patientsFound.size() > 1) {\r\n\r\n // create String ArrayList of patients: Last, First (DOB)\r\n ArrayList<String> foundList = new ArrayList<String>();\r\n String toAdd = \"\";\r\n // use patient data to make patient options to display\r\n for (patient p : patientsFound) {\r\n toAdd = p.getL_name() + \", \" + p.getF_name() + \" (\" + p.getDob() + \")\";\r\n foundList.add(toAdd);\r\n }\r\n int length;\r\n // clear combo box (in case this is a second search)\r\n while ((length = selectPatient_choosePatientCB.getItemCount()) > 0) {\r\n selectPatient_choosePatientCB.removeItemAt(length - 1);\r\n }\r\n // add Patient Options to combo box\r\n for (int i = 0; i < foundList.size(); i++) {\r\n selectPatient_choosePatientCB.addItem(foundList.get(i));\r\n }\r\n\r\n // display whether patients found or not\r\n JOptionPane.showMessageDialog(this, \"Found More than 1 Result for Last Name, First Name: \" + lName + \", \" + fName\r\n + \".\\nPress \\\"Ok\\\" to select a patient.\",\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n\r\n selectPatientDialog.setVisible(true);\r\n }\r\n\r\n // one patient found\r\n else if (patientsFound.size() == 1) {\r\n\r\n JOptionPane.showMessageDialog(this, \"Found one match for Last Name, First Name: \" + lName + \", \" + fName,\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n // display patient data\r\n currentPatient = patientsFound.get(0);\r\n search_fillPatientFoundData(currentPatient);\r\n }\r\n // no patient found\r\n else {\r\n\r\n JOptionPane.showMessageDialog(this, \"No Results found for Last Name, First Name:\" + lName + \", \" + fName,\r\n \"Search Failed\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "private void fullNameRegisterActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void search_fillPatientFoundData(patient toDisplay) {\r\n if (toDisplay != null) {\r\n JOptionPane.showMessageDialog(this, \"Filling in Information for Patient Found\",\r\n \"Filling in Info\", JOptionPane.DEFAULT_OPTION);\r\n\r\n // true = yes, false = no policy\r\n String policy;\r\n if (toDisplay.isPolicy())\r\n policy = \"Yes\";\r\n else\r\n policy = \"No\";\r\n\r\n // Appointment Tab\r\n app_lookUpAppointmentTextField.setText(MainGUI.pimsSystem.lookUpAppointmentDate(toDisplay));\r\n app_patientNameTextField.setText(toDisplay.getL_name() + \", \" + toDisplay.getF_name());\r\n\r\n // Patient Info Tab\r\n pInfo_lastNameTextField.setText(toDisplay.getL_name());\r\n pInfo_firstNameTextField.setText(toDisplay.getF_name());\r\n pInfo_middleNameTextField.setText(toDisplay.getM_name());\r\n pInfo_ssnTextField.setText(Integer.toString(toDisplay.getSSN()));\r\n pInfo_dobTextField.setText(toDisplay.getDob());\r\n pInfo_phoneNumberTextField.setText(toDisplay.getP_number());\r\n pInfo_addressTextField.setText(toDisplay.getAddress());\r\n pInfo_cityTextField.setText(toDisplay.getCity());\r\n pInfo_zipCodeTextField.setText(Integer.toString(toDisplay.getZip()));\r\n pInfo_stateComboBox.setSelectedItem(toDisplay.getState());\r\n pInfo_userField.setText(toDisplay.getUser_name());\r\n pInfo_pwField.setText(toDisplay.getPassword());\r\n pInfo_policyComboBox.setSelectedItem(policy);\r\n\r\n // Billing Tab\r\n billing_fullNameField.setText(toDisplay.getL_name() + \", \" + toDisplay.getF_name());\r\n billing_ssnField.setText(Integer.toString(toDisplay.getSSN()));\r\n billing_policyField.setText(policy);\r\n billing_policyField.setEditable(false);\r\n printHistory(toDisplay);\r\n\r\n selectPatientDialog.setVisible(false);\r\n\r\n repaint();\r\n revalidate();\r\n\r\n } else\r\n JOptionPane.showMessageDialog(this, \"No Patient to Select. Make a search first\",\r\n \"Filling in Info\", JOptionPane.DEFAULT_OPTION);\r\n\r\n }", "private void studyMoreActionPerformed(ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n txt_id = new javax.swing.JTextField();\n txt_name = new javax.swing.JTextField();\n txt_age = new javax.swing.JTextField();\n txt_contact = new javax.swing.JTextField();\n txt_address = new javax.swing.JTextField();\n txt_doctor = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n bl_image = new javax.swing.JLabel();\n btn_image = new javax.swing.JButton();\n txt_sex = new javax.swing.JComboBox<>();\n txt_patientType = new javax.swing.JComboBox<>();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTablePatient = new javax.swing.JTable();\n btn_insert = new javax.swing.JButton();\n btn_update = new javax.swing.JButton();\n btn_delete = new javax.swing.JButton();\n btn_First = new javax.swing.JButton();\n btn_last = new javax.swing.JButton();\n btn_next = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n txt_modifiedDate = new javax.swing.JTextField();\n txt_modifiedTime = new javax.swing.JTextField();\n btn_previous = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n txt_user = new javax.swing.JLabel();\n txt_user1 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n btn_search = new javax.swing.JButton();\n jLabel12 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(1380, 800));\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel1.setText(\"Patient Id :\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 160, 70, 30));\n\n jLabel2.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel2.setText(\"Name :\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 210, 60, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel3.setText(\"Sex :\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 260, -1, -1));\n\n jLabel4.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel4.setText(\"Age :\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 310, -1, -1));\n\n jLabel5.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel5.setText(\"Contact No :\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 360, 80, -1));\n\n jLabel6.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel6.setText(\"Address :\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 420, 70, -1));\n\n jLabel7.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n jLabel7.setText(\"Patient Type :\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 530, 100, -1));\n\n jLabel8.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel8.setText(\"Doctor :\");\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 590, 60, -1));\n\n txt_id.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n txt_id.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_idActionPerformed(evt);\n }\n });\n getContentPane().add(txt_id, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 160, 210, 30));\n\n txt_name.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_nameActionPerformed(evt);\n }\n });\n getContentPane().add(txt_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 210, 210, 30));\n\n txt_age.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_ageActionPerformed(evt);\n }\n });\n getContentPane().add(txt_age, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 310, 210, 30));\n\n txt_contact.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_contactActionPerformed(evt);\n }\n });\n getContentPane().add(txt_contact, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 360, 210, 30));\n\n txt_address.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_addressActionPerformed(evt);\n }\n });\n getContentPane().add(txt_address, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 420, 210, 80));\n getContentPane().add(txt_doctor, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 590, 210, 30));\n\n jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 160, 10, 460));\n\n jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 160, 10, 460));\n\n bl_image.setBackground(new java.awt.Color(204, 204, 255));\n bl_image.setOpaque(true);\n getContentPane().add(bl_image, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 170, 320, 240));\n\n btn_image.setFont(new java.awt.Font(\"Dialog\", 0, 18)); // NOI18N\n btn_image.setText(\"Choose Image\");\n btn_image.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_imageActionPerformed(evt);\n }\n });\n getContentPane().add(btn_image, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 430, 320, 40));\n\n txt_sex.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n txt_sex.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Select\", \"Male\", \"Female\" }));\n txt_sex.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_sexActionPerformed(evt);\n }\n });\n getContentPane().add(txt_sex, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 260, 210, 30));\n\n txt_patientType.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n txt_patientType.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Select type\", \"Surgery\", \"Regular\", \"New Patient\" }));\n getContentPane().add(txt_patientType, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 530, 210, 30));\n\n jTablePatient.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Patient ID\", \"Name\", \"Age\", \"Contact No.\", \"Doctor\"\n }\n ));\n jTablePatient.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTablePatientMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTablePatient);\n\n getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(870, 170, -1, 440));\n\n btn_insert.setText(\"Insert\");\n btn_insert.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_insertActionPerformed(evt);\n }\n });\n getContentPane().add(btn_insert, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 650, -1, -1));\n\n btn_update.setText(\"Update\");\n btn_update.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_updateActionPerformed(evt);\n }\n });\n getContentPane().add(btn_update, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 650, -1, -1));\n\n btn_delete.setText(\"Delete\");\n btn_delete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_deleteActionPerformed(evt);\n }\n });\n getContentPane().add(btn_delete, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 650, -1, -1));\n\n btn_First.setText(\"First\");\n btn_First.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_FirstActionPerformed(evt);\n }\n });\n getContentPane().add(btn_First, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 650, -1, -1));\n\n btn_last.setText(\"Last\");\n btn_last.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_lastActionPerformed(evt);\n }\n });\n getContentPane().add(btn_last, new org.netbeans.lib.awtextra.AbsoluteConstraints(930, 650, -1, -1));\n\n btn_next.setText(\"Next\");\n btn_next.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_nextActionPerformed(evt);\n }\n });\n getContentPane().add(btn_next, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 650, -1, -1));\n\n jLabel9.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel9.setText(\"Modified Date :\");\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 520, 100, -1));\n\n jLabel10.setFont(new java.awt.Font(\"Ebrima\", 0, 14)); // NOI18N\n jLabel10.setText(\"Modified Time :\");\n getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 570, -1, -1));\n\n txt_modifiedDate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_modifiedDateActionPerformed(evt);\n }\n });\n getContentPane().add(txt_modifiedDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 520, 150, 30));\n\n txt_modifiedTime.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_modifiedTimeActionPerformed(evt);\n }\n });\n getContentPane().add(txt_modifiedTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 570, 150, 30));\n\n btn_previous.setText(\"Previous\");\n btn_previous.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_previousActionPerformed(evt);\n }\n });\n getContentPane().add(btn_previous, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 650, -1, -1));\n\n jLabel11.setText(\"Last loged in by ---\");\n getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));\n\n jButton1.setText(\"Load\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 90, -1, -1));\n\n txt_user.setBackground(new java.awt.Color(204, 204, 255));\n txt_user.setOpaque(true);\n getContentPane().add(txt_user, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 210, 20));\n\n txt_user1.setBackground(new java.awt.Color(204, 204, 255));\n txt_user1.setOpaque(true);\n getContentPane().add(txt_user1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 60, 210, 20));\n\n jButton2.setText(\"Click here to get details of patients Treatment History\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1030, 650, -1, -1));\n\n btn_search.setText(\"Search By Id\");\n btn_search.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_searchActionPerformed(evt);\n }\n });\n getContentPane().add(btn_search, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 650, -1, -1));\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 1, 30)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(0, 153, 153));\n jLabel12.setText(\" Patient BIO and History\");\n getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 70, 470, 50));\n\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jButton3.setText(\"Logout\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(1220, 40, 100, 30));\n\n pack();\n setLocationRelativeTo(null);\n }", "public void displayPatients() {\n DefaultTableModel dm = new DefaultTableModel(0, 0);\n String header[] = new String[]{\"\", \"Nom:\", \"Prénom:\", \"Dg:\", \"Séance:\", \"Date visit\"};\n dm.setColumnIdentifiers(header);\n jTable1.setModel(dm);\n\n \n \n //set the data in the table =>rows\n\n for (int i = 0; i < patients.size(); i++) {\n Patient patient = patients.get(i);\n\n Vector<Object> data = new Vector<Object>();\n data.add(patient.getId());\n data.add(patient.getNom());\n data.add(patient.getPrenom());\n data.add(patient.getDg());\n data.add(patient.getNombre_seance());\n data.add(patient.getDate_visit());\n dm.addRow(data);\n \n }\n }", "public void mmAddFriendSearchClick(ActionEvent event) throws Exception{\r\n displayAddFriendSearch();\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblPatients = new javax.swing.JTable();\n btnSelect = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n btnEdit = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Lista de pacientes\");\n\n tblPatients.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Habitación\", \"Nombres\", \"Apellidos\", \"Fecha de nacimiento\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tblPatients.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblPatientsMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tblPatients);\n\n btnSelect.setText(\"Seleccionar\");\n btnSelect.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnSelectMouseClicked(evt);\n }\n });\n\n btnCancel.setText(\"Volver\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n btnEdit.setText(\"Editar\");\n btnEdit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnEditMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 546, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCancel)\n .addGap(18, 18, 18)\n .addComponent(btnEdit)\n .addGap(18, 18, 18)\n .addComponent(btnSelect)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSelect)\n .addComponent(btnCancel)\n .addComponent(btnEdit))\n .addGap(36, 36, 36))\n );\n\n pack();\n }", "public void friendSearchClick(ActionEvent event) throws Exception{\r\n displayAddFriendresults();\r\n }", "@SuppressWarnings(\"resource\")\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tObject a = e.getSource();\n\t\t\tif (a==UserManual){\n\t\t\t\t//Opens up user manual as a PDF file\n\t\t\t\tFile file = new File(\"Schools\\\\UserManual.pdf\");\n\t\t\t if (file.toString().endsWith(\".pdf\"))\n\t\t\t\t\ttry {\n\t\t\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \" + file);\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t Desktop desktop = Desktop.getDesktop();\n\t\t\t try {\n\t\t\t\t\t\tdesktop.open(file);\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tif(a==back51){\n\t\t\t\ttranscript.setVisible(false);\n\t\t\t\tstudentinfo.setVisible(true);\n\t\t\t}\n\t\t\tif (a == transcriptupdate) {\n\t\t\t\tTranscriptedit();\n\t\t\t}\n\t\t\tif (a == StudentButton) {\n\t\t\t\tAttendancer = false;\n\t\t\t\tcall.StudentStuff();\n\t\t\t}\n\t\t\tif (a == TeacherButton) {\n\t\t\t\tAttendancer = true;\n\t\t\t\tcall.TeacherStuff();\n\t\t\t}\n\t\t\tif (a == AdminButton) {\n\t\t\t\tcall.AdminStuff();\n\t\t\t}\n\t\t\tif (a == SearchBar) {\n\t\t\t}\n\t\t\tif (a == search2) {\n\t\t\t\tFile directory = new File(\"Schools\\\\\" + SearchBar2.getText()\n\t\t\t\t\t\t+ \".hi\");\n\t\t\t\tif (!directory.exists()) {\n\t\t\t\t\tSearchBar2.setText(\"Student does not exist.\");\n\t\t\t\t} else if (SearchBar2.getText().equals(\"\")) {\n\t\t\t\t\tSearchBar2.setText(\"Student does not exist.\");\n\t\t\t\t} else {\n\t\t\t\t\tcall.StudentStuff2();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a == search) {\n\t\t\t\tcall.Studentinfo();\n\t\t\t}\n\t\t\tif (a == NewStudent) {\n\t\t\t\tcall.AddStudent();\n\t\t\t}\n\t\t\tif (a == Add) {\n\t\t\t\tcall.Add();\n\t\t\t\tStudentNum.setText(\"Student Number\");\n\t\t\t\tStudentname.setText(\"Student Name\");\n\t\t\t}\n\t\t\tif (a == back) {\n\t\t\t\tMainFrame1.setVisible(true);\n\t\t\t\tAdminFrame1.setVisible(false);\n\t\t\t\tStudentframe.setVisible(false);\n\t\t\t\tteacherFrame.setVisible(false);\n\t\t\t}\n\t\t\tif (a == back2) {\n\t\t\t\tAdminFrame1.setVisible(true);\n\t\t\t\tnames.clear();\n\t\t\t\tcall.chooseFile();\n\t\t\t\tStudentname.setText(\"Student Name\");\n\t\t\t\tStudentNum.setText(\"Student Number\");\n\t\t\t\tAddStudent1.setVisible(false);\n\t\t\t}\n\t\t\tif (a == update) {\n\t\t\t\tString updater = text.getText();\n\t\t\t\tString names2 = SearchBar.getText();\n\t\t\t\ttry {\n\t\t\t\t\tPrintWriter out;\n\t\t\t\t\tout = new PrintWriter(new FileWriter(\"Schools\\\\\" + names2\n\t\t\t\t\t\t\t+ \".hi\" + \"\\\\\" + \"Student Information.txt\", false));\n\t\t\t\t\tout.print(updater);\n\t\t\t\t\tout.close();\n\t\t\t\t} catch (Exception e1) {\n\t\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a == back3) {\n\t\t\t\tstudentinfo.setVisible(false);\n\t\t\t\tSearchBar.setText(\"Search...\");\n\t\t\t\ttext.setText(\"\");\n\t\t\t\tcall.AdminStuff();\n\t\t\t}\n\t\t\tif (a == back4) {\n\t\t\t\tStudentframe2.setVisible(false);\n\t\t\t\tAttendanceFrame.setVisible(false);\n\t\t\t\tSearchBar2.setText(\"Enter Student Number\");\n\t\t\t\tcall.StudentStuff();\n\t\t\t}\n\t\t\tif (a == back6) {\n\t\t\t\tCoursesFrame.setVisible(false);\n\t\t\t\tStudentStuff2();\n\t\t\t}\n\t\t\tif (a == CourseSelect) {\n\t\t\t\tif (checker == 0) {\n\t\t\t\t\tCourses();\n\t\t\t\t} else {\n\t\t\t\t\tCoursesFrame.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a == Save) {\n\t\t\t\tcall.Confirm();\n\t\t\t}\n\t\t\tif (a == Yes) {\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"Schools\\\\\" + SearchBar2.getText() + \".hi\"\n\t\t\t\t\t\t\t+ \"\\\\Current Classes\");\n\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\tif (file.mkdir()) {\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tint x = 0;\n\t\t\t\t\twhile (StudentCourseList[x] != null) {\n\t\t\t\t\t\tPrintWriter out = new PrintWriter(new FileWriter(file\n\t\t\t\t\t\t\t\t+ \"\\\\\" + StudentCourseList[x] + \".txt\", true));\n\t\t\t\t\t\tout = new PrintWriter(new FileWriter(file + \"\\\\\"\n\t\t\t\t\t\t\t\t+ StudentCourseList[x] + \"_Attendance.txt\", true));\n\t\t\t\t\t\tout.close();\n\t\t\t\t\t\tx++;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e2) {\n\t\t\t\t}\n\t\t\t\tConfirmation.setVisible(false);\n\t\t\t\tCoursesFrame.setVisible(false);\n\t\t\t\tStudentframe2.setVisible(false);\n\t\t\t\tStudentStuff();\n\t\t\t}\n\t\t\tif (a == No) {\n\t\t\t\tConfirmation.setVisible(false);\n\t\t\t}\n\t\t\tif (a == Marks) {\n\t\t\t\tCurrentMarks();\n\t\t\t}\n\t\t\tif (a == TeacherButton) {\n\t\t\t\tTeacherStuff();\n\t\t\t}\n\t\t\tif (a == search3) {\n\t\t\t\tif (checker2 == 0) {\n\t\t\t\t\tFile directory = new File(\"Schools\\\\Available Classes\\\\\"\n\t\t\t\t\t\t\t+ SearchBar3.getText() + \".txt\");\n\t\t\t\t\tif (!directory.exists()) {\n\t\t\t\t\t\tSearchBar3.setText(\"Course does not exist.\");\n\t\t\t\t\t} else if (directory.exists()) {\n\t\t\t\t\t\tTeacherStuff2();\n\t\t\t\t\t}\n\t\t\t\t\tchecker2 = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a == back7) {\n\t\t\t\tSearchBar3.setText(\"Enter Course Code\");\n\t\t\t\tteacherFrame2.setVisible(false);\n\t\t\t\tTeacherStuff();\n\t\t\t\tchecker3 = 1;\n\t\t\t\tchecker2 = 0;\n\t\t\t}\n\t\t\tif (a == ClassList) {\n\t\n\t\t\t\tbackaroo = false;\n\t\t\t\tteacherFrame2.setVisible(false);\n\t\t\t\tselectedStudent = ClassList.getSelectedItem().toString();\n\t\t\t\tTeacherStuff3();\n\t\t\t\tTeacherStuff4();\n\t\t\t\tAddingMarks();\n\t\t\t}\n\t\t\tif (a == CourseList) {\n\t\t\t\tback10.addActionListener(this);\n\t\t\t\tbackaroo = true;\n\t\t\t\tStudentMarksFrame1.setVisible(false);\n\t\t\t\tselectedClass = CourseList.getSelectedItem().toString();\n\t\t\t\tSearchBar3.setText(selectedClass);\n\t\t\t\tselectedStudent = SearchBar2.getText();\n\t\t\t\tTeacherStuff3();\n\t\t\t\tTeacherStuff4();\n\t\t\t\tAttendance();\n\t\t\t}\n\t\t\tif (a == back8) {\n\t\t\t\tTeacherFrame3.setVisible(false);\n\t\t\t\tMarkFrame.setVisible(false);\n\t\t\t\tAttendanceFrame.setVisible(false);\n\t\t\t\tAddFrame.setVisible(false);\n\t\t\t\tteacherFrame2.setVisible(true);\n\t\t\t}\n\t\t\tif (a == AddMark) {\n\t\t\t\tAttendanceFrame.setVisible(false);\n\t\t\t\tAddingMarks2();\n\t\t\t}\n\t\t\tif (a == Enter) {\n\t\t\t\tString input = new String();\n\t\t\t\ttry {\n\t\t\t\t\tdouble percent = Double.parseDouble(Percentage.getText());\n\t\t\t\t\tint worth = Integer.parseInt(MarkWeighting.getText());\n\t\t\t\t\tif (Categories.getText().contains(\"K\")\n\t\t\t\t\t\t\t&& AssignName.getText() != null && percent >= 0\n\t\t\t\t\t\t\t&& worth != 0) {\n\t\t\t\t\t\tinput = \"K/U,\" + AssignName.getText() + \",\" + percent + \",\"\n\t\t\t\t\t\t\t\t+ worth;\n\t\t\t\t\t} else if (Categories.getText().contains(\"T\")\n\t\t\t\t\t\t\t&& AssignName.getText() != null && percent >= 0\n\t\t\t\t\t\t\t&& worth != 0) {\n\t\t\t\t\t\tinput = \"T/I,\" + AssignName.getText() + \",\" + percent + \",\"\n\t\t\t\t\t\t\t\t+ worth;\n\t\t\t\t\t} else if (Categories.getText().contains(\"A\")\n\t\t\t\t\t\t\t&& AssignName.getText() != null && percent >= 0\n\t\t\t\t\t\t\t&& worth != 0) {\n\t\t\t\t\t\tinput = \"App,\" + AssignName.getText() + \",\" + percent + \",\"\n\t\t\t\t\t\t\t\t+ worth;\n\t\t\t\t\t} else if (Categories.getText().contains(\"C\")\n\t\t\t\t\t\t\t&& AssignName.getText() != null && percent >= 0\n\t\t\t\t\t\t\t&& worth != 0) {\n\t\t\t\t\t\tinput = \"Comm,\" + AssignName.getText() + \",\" + percent\n\t\t\t\t\t\t\t\t+ \",\" + worth;\n\t\t\t\t\t} else if (Categories.getText().contains(\"E\")\n\t\t\t\t\t\t\t&& AssignName.getText() != null && percent >= 0\n\t\t\t\t\t\t\t&& worth != 0) {\n\t\t\t\t\t\tinput = \"Exam,\" + AssignName.getText() + \",\" + percent\n\t\t\t\t\t\t\t\t+ \",\" + worth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJFrame Invalid = new JFrame();\n\t\t\t\t\t\tJLabel l1 = new JLabel(\"INVALID\");\n\t\t\t\t\t\tInvalid.add(l1);\n\t\t\t\t\t\tInvalid.setSize(100, 100);\n\t\t\t\t\t\tInvalid.setLocationRelativeTo(null);\n\t\t\t\t\t\tInvalid.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception Arg7) {\n\t\t\t\t}\n\t\t\t\tPrintWriter out;\n\t\t\t\tif (checker4 == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout = new PrintWriter(new FileWriter((\"Schools\\\\\"\n\t\t\t\t\t\t\t\t+ selectedStudent + \".hi\\\\Current Classes\\\\\"\n\t\t\t\t\t\t\t\t+ SearchBar3.getText() + \".txt\"), true));\n\t\t\t\t\t\tout.append(System.getProperty(\"line.separator\"));\n\t\t\t\t\t\tout.append(input);\n\t\t\t\t\t\tout.close();\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t}\n\t\t\t\t\tchecker4 = 1;\n\t\t\t\t}\n\t\t\t\tAddFrame.setVisible(false);\n\t\t\t}\n\t\t\tif (a == back9) {\n\t\t\t\tStudentframe2.setVisible(true);\n\t\t\t\tStudentMarksFrame1.setVisible(false);\n\t\t\t}\n\t\t\tif (a == back10) {\n\t\t\t\tStudentframe2.setVisible(true);\n\t\t\t\tTeacherFrame3.setVisible(false);\n\t\t\t\tAttendanceFrame.setVisible(false);\n\t\t\t\tCourseList.removeAll();\n\t\t\t}\n\t\t\tif (a == AttendanceB) {\n\t\t\t\tAddFrame.setVisible(false);\n\t\t\t\tAttendance();\n\t\t\t}\n\t\t\tif (a == transcriptb) {\n\t\t\t\tTranscript();\n\t\t\t}\n\t\t\tif (a == AttendanceEnter) {\n\t\t\t\tAttendanceFrame.setVisible(false);\n\t\t\t\ttry {\n\t\t\t\t\tif (checker6 == true) {\n\t\t\t\t\t\tBufferedWriter pw = new BufferedWriter(\n\t\t\t\t\t\t\t\tnew FileWriter(\n\t\t\t\t\t\t\t\t\t\t(\"Schools\\\\\" + selectedStudent\n\t\t\t\t\t\t\t\t\t\t\t\t+ \".hi\\\\Current Classes\\\\\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ SearchBar3.getText() + \"_Attendance.txt\"),\n\t\t\t\t\t\t\t\t\t\ttrue));\n\t\t\t\t\t\tpw.append((AttendanceT.getText() + \",\"));\n\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\tchecker6 = false;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception Arg8) {\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n table_appointment = new javax.swing.JTable();\n date_appointment = new javax.swing.JTextField();\n status_appointment = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n patient_id_appointment = new javax.swing.JLabel();\n patient_name_appointment = new javax.swing.JLabel();\n doctor_appointment = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n id_appointment = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n table_appointment.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n table_appointment.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n table_appointmentMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(table_appointment);\n\n jLabel1.setText(\"Date\");\n\n jLabel2.setText(\"Status\");\n\n jLabel3.setText(\"Patient ID\");\n\n jLabel4.setText(\"Patient name\");\n\n doctor_appointment.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n doctor_appointmentKeyReleased(evt);\n }\n });\n\n jLabel7.setText(\"Doctor ID\");\n\n jButton1.setText(\"Save\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Cancel\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Appointment ID\");\n\n jButton3.setText(\"Add\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jMenu1.setText(\"File\");\n\n jMenuItem1.setText(\"Main menu\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(doctor_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(jLabel7))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel4)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(date_appointment)\n .addComponent(status_appointment)\n .addComponent(patient_name_appointment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(patient_id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(id_appointment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(88, 88, 88)))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 574, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(doctor_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addGap(35, 35, 35)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(27, 27, 27))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(patient_id_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(12, 12, 12))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(patient_name_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(date_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(status_appointment, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(44, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void onSelectPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0) {\n\t\t\t// No row has been selected\n\t\t\tbuttonRemovePatient.setEnabled(false);\n\t\t\tbuttonViewPatient.setEnabled(false);\n\t\t} else {\n\t\t\t// A row has been selected\n\t\t\tbuttonRemovePatient.setEnabled(true);\n\t\t\tbuttonViewPatient.setEnabled(true);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n label4 = new java.awt.Label();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n label3 = new java.awt.Label();\n PatientID = new javax.swing.JLabel();\n Pid = new javax.swing.JTextField();\n FullName = new javax.swing.JLabel();\n fullname = new javax.swing.JTextField();\n Gender = new javax.swing.JLabel();\n male = new javax.swing.JRadioButton();\n female = new javax.swing.JRadioButton();\n TreatmentType = new javax.swing.JLabel();\n search = new javax.swing.JButton();\n treatmentType = new javax.swing.JComboBox();\n Progression = new javax.swing.JLabel();\n progression = new javax.swing.JTextField();\n LastDateVisited = new javax.swing.JLabel();\n ADD = new javax.swing.JButton();\n DELETE = new javax.swing.JButton();\n UPDATE = new javax.swing.JButton();\n RESET1 = new javax.swing.JButton();\n RESET = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n issue = new javax.swing.JTextField();\n bloodGroup = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n report = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel6 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n lastDate = new com.toedter.calendar.JDateChooser();\n jScrollPane2 = new javax.swing.JScrollPane();\n Viewfield = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n\n label4.setAlignment(java.awt.Label.CENTER);\n label4.setBackground(new java.awt.Color(0, 102, 0));\n label4.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n label4.setFont(new java.awt.Font(\"Baskerville Old Face\", 1, 36)); // NOI18N\n label4.setForeground(new java.awt.Color(255, 255, 255));\n label4.setText(\"HAPPY SMILE DENTAL CLINIC\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setLayout(null);\n\n jPanel2.setBackground(new java.awt.Color(0, 102, 0));\n\n label3.setAlignment(java.awt.Label.CENTER);\n label3.setBackground(new java.awt.Color(0, 102, 0));\n label3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n label3.setFont(new java.awt.Font(\"Baskerville Old Face\", 1, 36)); // NOI18N\n label3.setForeground(new java.awt.Color(255, 255, 255));\n label3.setText(\"HAPPY SMILE DENTAL CLINIC\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(335, 335, 335)\n .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, 603, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(982, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(19, 19, 19))\n );\n\n jPanel1.add(jPanel2);\n jPanel2.setBounds(0, 0, 1920, 70);\n\n PatientID.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n PatientID.setText(\"Patient Id\");\n jPanel1.add(PatientID);\n PatientID.setBounds(30, 400, 73, 23);\n jPanel1.add(Pid);\n Pid.setBounds(180, 400, 180, 30);\n\n FullName.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n FullName.setText(\"Full Name\");\n jPanel1.add(FullName);\n FullName.setBounds(390, 400, 75, 23);\n\n fullname.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n fullnameActionPerformed(evt);\n }\n });\n jPanel1.add(fullname);\n fullname.setBounds(510, 400, 230, 30);\n\n Gender.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n Gender.setText(\"Gender\");\n jPanel1.add(Gender);\n Gender.setBounds(30, 460, 55, 23);\n\n buttonGroup1.add(male);\n male.setFont(new java.awt.Font(\"Calibri\", 1, 13)); // NOI18N\n male.setText(\"Male\");\n male.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n maleMouseClicked(evt);\n }\n });\n jPanel1.add(male);\n male.setBounds(180, 460, 70, 25);\n\n buttonGroup1.add(female);\n female.setFont(new java.awt.Font(\"Calibri\", 1, 13)); // NOI18N\n female.setText(\"Female\");\n female.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n femaleMouseClicked(evt);\n }\n });\n jPanel1.add(female);\n female.setBounds(270, 460, 90, 25);\n\n TreatmentType.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n TreatmentType.setText(\"Treatment Type\");\n jPanel1.add(TreatmentType);\n TreatmentType.setBounds(30, 540, 120, 23);\n\n search.setBackground(new java.awt.Color(0, 102, 51));\n search.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n search.setForeground(new java.awt.Color(0, 102, 51));\n search.setText(\"SEARCH\");\n search.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n search.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchActionPerformed(evt);\n }\n });\n jPanel1.add(search);\n search.setBounds(470, 90, 70, 30);\n\n treatmentType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Root filling\", \"Surgical removal\", \"Crown\", \"Bridge\" }));\n treatmentType.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n treatmentTypeActionPerformed(evt);\n }\n });\n jPanel1.add(treatmentType);\n treatmentType.setBounds(180, 530, 180, 30);\n\n Progression.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n Progression.setText(\"Progression\");\n jPanel1.add(Progression);\n Progression.setBounds(390, 620, 110, 30);\n jPanel1.add(progression);\n progression.setBounds(510, 610, 240, 110);\n\n LastDateVisited.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n LastDateVisited.setText(\"Last edit visited\");\n jPanel1.add(LastDateVisited);\n LastDateVisited.setBounds(30, 620, 120, 30);\n\n ADD.setBackground(new java.awt.Color(0, 102, 51));\n ADD.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n ADD.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/butttonAdd.png\"))); // NOI18N\n ADD.setText(\"ADD\");\n ADD.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n ADD.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n ADD.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ADDActionPerformed(evt);\n }\n });\n jPanel1.add(ADD);\n ADD.setBounds(40, 980, 130, 40);\n\n DELETE.setBackground(new java.awt.Color(0, 102, 51));\n DELETE.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n DELETE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/delete.png\"))); // NOI18N\n DELETE.setText(\"DELETE\");\n DELETE.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n DELETE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n DELETEActionPerformed(evt);\n }\n });\n jPanel1.add(DELETE);\n DELETE.setBounds(220, 980, 140, 40);\n\n UPDATE.setBackground(new java.awt.Color(0, 102, 51));\n UPDATE.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n UPDATE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/update.png\"))); // NOI18N\n UPDATE.setText(\"UPDATE\");\n UPDATE.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n UPDATE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n UPDATEActionPerformed(evt);\n }\n });\n jPanel1.add(UPDATE);\n UPDATE.setBounds(410, 980, 130, 40);\n\n RESET1.setBackground(new java.awt.Color(0, 102, 51));\n RESET1.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n RESET1.setText(\"DEMO\");\n RESET1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n RESET1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RESET1ActionPerformed(evt);\n }\n });\n jPanel1.add(RESET1);\n RESET1.setBounds(820, 980, 130, 40);\n\n RESET.setBackground(new java.awt.Color(0, 102, 51));\n RESET.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n RESET.setText(\"RESET\");\n RESET.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n RESET.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n RESETActionPerformed(evt);\n }\n });\n jPanel1.add(RESET);\n RESET.setBounds(590, 980, 130, 40);\n\n jLabel7.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n jLabel7.setText(\"Blood Group\");\n jPanel1.add(jLabel7);\n jLabel7.setBounds(390, 540, 120, 20);\n\n jTable1.setBackground(new java.awt.Color(204, 255, 153));\n jTable1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jTable1.setGridColor(new java.awt.Color(0, 0, 0));\n jTable1.setSelectionBackground(new java.awt.Color(204, 255, 204));\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n jPanel1.add(jScrollPane1);\n jScrollPane1.setBounds(20, 140, 710, 170);\n\n jLabel1.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n jLabel1.setText(\"Issue\");\n jPanel1.add(jLabel1);\n jLabel1.setBounds(390, 460, 38, 23);\n jPanel1.add(issue);\n issue.setBounds(510, 460, 230, 50);\n\n bloodGroup.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"O+\", \"O-\", \"A+\", \"A-\", \"B+\", \"B-\", \"AB+\", \"AB-\" }));\n jPanel1.add(bloodGroup);\n bloodGroup.setBounds(510, 540, 230, 30);\n\n jLabel3.setBackground(new java.awt.Color(0, 102, 0));\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 1, 36)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(51, 102, 0));\n jLabel3.setText(\"PATIENT HISTORY\");\n jPanel1.add(jLabel3);\n jLabel3.setBounds(1190, 110, 380, 80);\n\n report.setBackground(new java.awt.Color(0, 102, 51));\n report.setFont(new java.awt.Font(\"Times New Roman\", 1, 13)); // NOI18N\n report.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/report.png\"))); // NOI18N\n report.setText(\"REPORT\");\n report.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n report.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n reportActionPerformed(evt);\n }\n });\n jPanel1.add(report);\n report.setBounds(1720, 680, 130, 40);\n\n jButton2.setBackground(new java.awt.Color(0, 102, 51));\n jButton2.setFont(new java.awt.Font(\"Calibri\", 1, 13)); // NOI18N\n jButton2.setText(\"VIEW\");\n jButton2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, null, java.awt.Color.green, null, null));\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton2);\n jButton2.setBounds(810, 680, 100, 40);\n\n jComboBox1.setFont(new java.awt.Font(\"Calibri\", 1, 13)); // NOI18N\n jComboBox1.setForeground(new java.awt.Color(0, 102, 51));\n jComboBox1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jPanel1.add(jComboBox1);\n jComboBox1.setBounds(180, 90, 260, 30);\n\n jLabel6.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n jLabel6.setText(\"SEARCH BY NAME\");\n jPanel1.add(jLabel6);\n jLabel6.setBounds(50, 90, 120, 30);\n\n jButton3.setBackground(new java.awt.Color(0, 102, 51));\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/logout.png\"))); // NOI18N\n jButton3.setText(\"LOG OUT\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton3);\n jButton3.setBounds(1770, 70, 150, 40);\n jPanel1.add(lastDate);\n lastDate.setBounds(180, 620, 180, 40);\n\n Viewfield.setColumns(20);\n Viewfield.setFont(new java.awt.Font(\"Monospaced\", 0, 18)); // NOI18N\n Viewfield.setRows(5);\n jScrollPane2.setViewportView(Viewfield);\n\n jPanel1.add(jScrollPane2);\n jScrollPane2.setBounds(810, 200, 1040, 470);\n\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/bg3.jpg\"))); // NOI18N\n jLabel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(51, 153, 0), new java.awt.Color(51, 102, 0), new java.awt.Color(0, 102, 51), new java.awt.Color(0, 153, 51)));\n jPanel1.add(jLabel2);\n jLabel2.setBounds(0, 330, 770, 750);\n\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/bg3.jpg\"))); // NOI18N\n jLabel4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(0, 153, 0), new java.awt.Color(51, 153, 0), new java.awt.Color(0, 204, 51), new java.awt.Color(0, 102, 51)));\n jPanel1.add(jLabel4);\n jLabel4.setBounds(0, 70, 770, 260);\n\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/bg3.jpg\"))); // NOI18N\n jLabel5.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(0, 153, 0), new java.awt.Color(51, 102, 0), new java.awt.Color(0, 204, 0), new java.awt.Color(0, 153, 51)));\n jPanel1.add(jLabel5);\n jLabel5.setBounds(770, 50, 1150, 1030);\n\n jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/bg3.jpg\"))); // NOI18N\n jLabel8.setText(\"jLabel8\");\n jPanel1.add(jLabel8);\n jLabel8.setBounds(630, 40, 640, 1030);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1920, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1080, Short.MAX_VALUE)\n );\n\n setSize(new java.awt.Dimension(1938, 1127));\n setLocationRelativeTo(null);\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==b0){\r\n\t\t\tif(!tf1.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的病历号(数字)进行查找\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"正确\");\r\n\t\t\t\tPatient patient = Db.serch(tf1.getText());\r\n\t\t\t\tif(patient == null){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"没有该病历号的记录,请重新输入病历号搜索\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttf2.setText(patient.getName());\r\n\t\t\t\t\ttf3.setText(patient.getSex());\r\n\t\t\t\t\ttf4.setText(patient.getAge());\r\n\t\t\t\t\ttf5.setText(patient.getCareer());\r\n\t\t\t\t\ttf6.setText(patient.getPhone());\r\n\t\t\t\t\ttf7.setText(patient.getRecipe());\r\n\t\t\t\t\tta.setText(patient.getDescribe());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(e.getSource()==b1){\r\n\t\t\tif(!tf1.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的病历号(数字)\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(!tf4.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的年龄(数字)\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(!tf6.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的电话(数字)\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(!tf7.getText().matches(\"^([1-9][0-9]*)$\")){\r\n\t\t\t\tSystem.out.println(\"错误\");\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入正确的处方(数字)\", \"警告\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tPatient patient = new Patient();\r\n\t\t\tpatient.setId(tf1.getText());\r\n\t\t\tpatient.setName(tf2.getText());\r\n\t\t\tpatient.setSex(tf3.getText());\r\n\t\t\tpatient.setAge(tf4.getText());\r\n\t\t\tpatient.setCareer(tf5.getText());\r\n\t\t\tpatient.setPhone(tf6.getText());\r\n\t\t\tpatient.setRecipe(tf7.getText());\r\n\t\t\tpatient.setDescribe(ta.getText());\r\n\t\t\tDb.update(patient);\r\n\t\t}else if(e.getSource()==b2){\r\n\t\t\tSystem.out.println(\"开始打印\");\r\n\t\t\tPatient pa = new Patient();\r\n\t\t\tpa.setId(tf1.getText());\r\n\t\t\tpa.setName(tf2.getText());\r\n\t\t\tpa.setSex(tf3.getText());\r\n\t\t\tpa.setAge(tf4.getText());\r\n\t\t\tpa.setCareer(tf5.getText());\r\n\t\t\tpa.setPhone(tf6.getText());\r\n\t\t\tpa.setRecipe(tf7.getText());\r\n\t\t\tpa.setDescribe(ta.getText());\r\n\t\t\tnew PrintPanel(pa);\r\n\t\t}else if(e.getSource()==b3){\r\n\t\t\tSystem.out.println(\"开始治疗\");\r\n\t\t\t\r\n\t\t\tif(owner!=null){\r\n\t\t\t\towner.setVisible(true);\r\n\t\t\t\towner.editorMain.setVisible(false);\r\n\t\t\t}\r\n\t\t\tsetVisible(false);\r\n\t\t}else if(e.getSource()==b4){\r\n\t\t\tthis.setVisible(false);\t\t\t\r\n\t\t\towner.setVisible(false);\r\n\t\t\tthis.owner.editorMain.setVisible(true);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tstr1 = name.getText().trim();\n\t\t\t\tif(str1.length()==0)\n\t\t\t\t\tsqlStr1 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr1 = \" and name like '%\"+str1+\"%'\";\n\t\t\t\tstr2 = (String)gender.getSelectedItem();\n\t\t\t\tif(str2.equals(\"不限\"))\n\t\t\t\t\tsqlStr2 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr2 = \" and gender = '\"+str2+\"'\";\n\t\t\t\tstr3 = address.getText();\n\t\t\t\tif(str3.length()==0)\n\t\t\t\t\tsqlStr3 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr3 = \" and address = '%\"+str3+\"%'\";\n\t\t\t\tstr4 = (String)study.getSelectedItem();\n\t\t\t\tif(str4.equals(\"不限\"))\n\t\t\t\t\tsqlStr4 = \"\";\n\t\t\t\telse\n\t\t\t\t\tsqlStr4 = \" and study = '\"+str4+\"'\";\n\t\t\t\tselect = \"select number,name,gender,age,study,mobilephone,joindate,address from employee where description like '%' \"+sqlStr1+sqlStr2+sqlStr3+sqlStr4;\n\t\t\t\ttable = new EmployeeTable(select).getTable();\n\t\t\t\troot.removeAll();\n\t\t\t\troot.add(new JScrollPane(table));\n\t\t\t\troot.revalidate();\n//\t\t\t\tfor(;root.getParent()!=null;root = root.getParent());\n//\t\t\t\troot.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}", "@Override\n\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\tint id = Integer.parseInt((String) pidDropDown.getSelectedItem());\n\t\t\t\t\t\n\t\t\t\t\tfor (Patient p : plist) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (id == p.id) {\n\n\t\t\t\t\t\t\tpNametxt.setText(p.name);\n\t\t\t\t\t\t\tpAgetxt.setText(Integer.toString(p.age));\n\t\t\t\t\t\t\tpWeighttxt.setText(Integer.toString(p.weight));\n\t\t\t\t\t\t\tpDoctortxt.setText(p.doctor);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// and populate the GUI with proper details\n\n\t\t\t\t}", "private void machnameActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n titleLbl = new javax.swing.JLabel();\n nameLbl = new javax.swing.JLabel();\n nameTF = new javax.swing.JTextField();\n ageLbl = new javax.swing.JLabel();\n ageTF = new javax.swing.JTextField();\n conditionLbl = new javax.swing.JLabel();\n conditionTF = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n guiTA = new javax.swing.JTextArea();\n addBTN = new javax.swing.JButton();\n registeredBTN = new javax.swing.JButton();\n nextBTN = new javax.swing.JButton();\n exitBTN = new javax.swing.JButton();\n allocateBtn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n titleLbl.setForeground(new java.awt.Color(0, 71, 214));\n titleLbl.setText(\"National Covid‐19 Vaccination Programme\");\n\n nameLbl.setText(\"Please enter your name:\");\n\n ageLbl.setText(\"Please enter your age:\");\n\n conditionLbl.setText(\"Do you have a pre-existing medical condition? (enter Y/N):\");\n\n guiTA.setColumns(20);\n guiTA.setRows(5);\n jScrollPane1.setViewportView(guiTA);\n\n addBTN.setText(\"Add Patient\");\n addBTN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addBTNActionPerformed(evt);\n }\n });\n\n registeredBTN.setText(\"Display Registered Vaccine Candidates\");\n registeredBTN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n registeredBTNActionPerformed(evt);\n }\n });\n\n nextBTN.setText(\"Next Candidate\");\n nextBTN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nextBTNActionPerformed(evt);\n }\n });\n\n exitBTN.setText(\"Close Application\");\n exitBTN.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exitBTNActionPerformed(evt);\n }\n });\n\n allocateBtn.setText(\"Assign Priorities\");\n allocateBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n allocateBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(ageLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(ageTF))\n .addGroup(layout.createSequentialGroup()\n .addComponent(nameLbl)\n .addGap(18, 18, 18)\n .addComponent(nameTF))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(titleLbl)))\n .addGap(114, 114, 114))\n .addGroup(layout.createSequentialGroup()\n .addComponent(conditionLbl)\n .addGap(18, 18, 18)\n .addComponent(conditionTF)\n .addGap(56, 56, 56))\n .addGroup(layout.createSequentialGroup()\n .addComponent(addBTN)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(registeredBTN)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(allocateBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nextBTN)\n .addGap(18, 18, 18)\n .addComponent(exitBTN)))\n .addContainerGap())))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titleLbl)\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nameLbl)\n .addComponent(nameTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(ageLbl)\n .addComponent(ageTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(conditionLbl)\n .addComponent(conditionTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addBTN)\n .addComponent(nextBTN)\n .addComponent(exitBTN)\n .addComponent(allocateBtn))\n .addGap(18, 18, 18)\n .addComponent(registeredBTN)\n .addContainerGap(39, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getActionCommand().equals(\"查询\")) {\n\t\t\tint vipid = 0;\n\t\t\tString vipname = \"\";\n\t\t\ttry {\n\t\t\t\tif (!this.jTextField.getText().equals(\"\")) {\n\t\t\t\t\tvipid = Integer.parseInt(this.jTextField.getText().trim());\n\t\t\t\t}\n\t\t\t\tif (!this.jTextField2.getText().equals(\"\")) {\n\t\t\t\t\tvipname = this.jTextField2.getText().trim();\n\t\t\t\t}\n\t\t\t\tVipinfo vipinfo = new Vipinfo();\n\t\t\t\tvipinfo.setVipid(vipid);\n\t\t\t\tvipinfo.setVipname(vipname);\n\t\t\t\tArrayList<Vipinfo> vipinfoList = vipinfoServer\n\t\t\t\t\t\t.getVipinfo(vipinfo);\n\t\t\t\tint count = this.dtm.getRowCount();\n\t\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\t\tthis.dtm.removeRow(0);\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < vipinfoList.size(); i++) {\n\t\t\t\t\tthis.dtm.addRow(new Object[] {\n\t\t\t\t\t\t\tvipinfoList.get(i).getVipid(),\n\t\t\t\t\t\t\tvipinfoList.get(i).getVipname(),\n\t\t\t\t\t\t\tvipinfoList.get(i).getVipsex(),\n\t\t\t\t\t\t\tvipinfoList.get(i).getVipcut(), });\n\t\t\t\t}\n\t\t\t} catch (Exception e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif (e.getActionCommand().equals(\"返回\")) {\n\t\t\tFirstFrame firstFrame = new FirstFrame();\n\t\t\tthis.dispose();\n\t\t}\n\n\t\tif (e.getActionCommand().equals(\"添加会员信息\")) {\n\t\t\tVIPAdd vipAdd = new VIPAdd();\n\t\t\tthis.dispose();\n\t\t}\n\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n mngPatientBtn = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n mngPatientBtn.setBackground(new java.awt.Color(0, 153, 0));\n mngPatientBtn.setFont(new java.awt.Font(\"Verdana\", 3, 12)); // NOI18N\n mngPatientBtn.setForeground(new java.awt.Color(255, 255, 255));\n mngPatientBtn.setText(\"MANAGE PATIENTS RECORDS\");\n mngPatientBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mngPatientBtnActionPerformed(evt);\n }\n });\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/userInterface/HospitalAdminRole/hospital_icon.jpg\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(105, 105, 105)\n .addComponent(mngPatientBtn))\n .addGroup(layout.createSequentialGroup()\n .addGap(157, 157, 157)\n .addComponent(jLabel1)))\n .addGap(130, 130, 130))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(mngPatientBtn)\n .addGap(117, 117, 117))\n );\n }", "public Patient_Update() {\n initComponents();\n ButtonGroup bg = new ButtonGroup();\n bg.add(p_male);\n bg.add(p_female);\n showDate();\n showTime();\n }", "private void btndanhsachbandocActionPerformed(java.awt.event.ActionEvent evt) {\n showDuLieu();\n }", "private void u_interestActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void flightIDTextActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void patientSetBtnActionPerformed(java.awt.event.ActionEvent evt) {\n patientArr[patientI] = new patient(patientNameBox.getText(),\n Integer.parseInt(patientAgeBox.getText()),\n patientDiseaseBox.getText(),\n Integer.parseInt(patientIDBox.getText()));\n try {\n for (int i = 0; i < doc.length; i++) {\n if (patientDiseaseBox.getText().equalsIgnoreCase(doc[i].expertise)) {\n doc[i].newPatient(patientArr[patientI]);\n patientArr[patientI].docIndex = i;\n break;\n }\n }\n } catch (NullPointerException e) {\n for (int i = 0; i < doc.length; i++) {\n if (doc[i].expertise.equalsIgnoreCase(\"medicine\")) {\n doc[i].newPatient(patientArr[patientI]);\n\n }\n }\n }\n\n patientArr[patientI].due += 1000;\n\n patientI++;\n \n }", "private void searchTextFiledActionPerformed(ActionEvent evt) {\n }", "private void splPerActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void app_requestAppointment() {\r\n if (!app_patientNameTextField.getText().equals((\"\"))) {\r\n currentPatient = MainGUI.pimsSystem.patient_details\r\n (pInfo_lastNameTextField.getText(), Integer.parseInt(pInfo_ssnTextField.getText()));\r\n if (currentPatient != null) {\r\n String message = MainGUI.pimsSystem.add_date(datePicker.getText(), timePicker.getText(), currentPatient);\r\n JOptionPane.showMessageDialog(null, message);\r\n }\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"Must Search a Patient First (Search Tab)\");\r\n }\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == btnCancel) {\n new AdminView().setVisible(true);\n this.dispose();\n } else if (e.getSource() == btnSearch) {\n clickSearch();\n } else if (e.getSource() == btnConfirm) {\n if (strMaMT != null && strMaTL != null) {\n clickConfirm();\n if (MuonTraDAO.getNumOfMuonTL(strMaMT) == MuonTraDAO.getNumOfTraTL(strMaMT)) {\n JOptionPane.showMessageDialog(rootPane, \"Đã trả hết mã '\" + strMaMT + \"' !\\nThanh toán tiền cọc!\\nSố tiền cọc là: \" \n + MuonTraDAO.getNumOfMuonTL(strMaMT) * 50000 + \"đ\");\n }\n } else {\n JOptionPane.showMessageDialog(rootPane, \"Chưa chọn Tài Liệu Muốn Trả\", \"ERROR\", JOptionPane.WARNING_MESSAGE);\n }\n } else if (e.getSource() == btnShowAll) {\n clickShowAll();\n } else if (e.getSource() == btnPrint) {\n getReport();\n// printResult();\n// new PrintTraTL().setVisible(true);\n// this.dispose();\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n admitBtn = new javax.swing.JButton();\n searchBtn = new javax.swing.JButton();\n resetBtn = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n wardnoText = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n IDTExt = new javax.swing.JTextField();\n nameTExt = new javax.swing.JTextField();\n attendNoText = new javax.swing.JTextField();\n dateText = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n consText = new javax.swing.JTextField();\n disText = new javax.swing.JTextField();\n roomnoText = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Patient Attendance\");\n\n admitBtn.setText(\"Admit\");\n admitBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n admitBtnActionPerformed(evt);\n }\n });\n\n searchBtn.setText(\"Search\");\n searchBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchBtnActionPerformed(evt);\n }\n });\n\n resetBtn.setText(\"Reset\");\n resetBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n resetBtnActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"back\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Patient Attendance\"));\n\n jLabel6.setText(\"consultant no\");\n\n jLabel2.setText(\"Admit date\");\n\n wardnoText.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n wardnoTextFocusLost(evt);\n }\n });\n wardnoText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n wardnoTextKeyTyped(evt);\n }\n });\n\n jLabel10.setText(\"Room No\");\n\n IDTExt.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n IDTExtFocusLost(evt);\n }\n });\n IDTExt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n IDTExtActionPerformed(evt);\n }\n });\n IDTExt.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n IDTExtKeyTyped(evt);\n }\n });\n\n attendNoText.setEditable(false);\n attendNoText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n attendNoTextKeyTyped(evt);\n }\n });\n\n dateText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n dateTextActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Docname\");\n\n jLabel7.setText(\"Ward No\");\n\n jLabel1.setText(\"patient attendance no\");\n\n jLabel8.setText(\"v\");\n\n jLabel5.setText(\"patient_NIC\");\n\n jLabel4.setText(\"Disease\");\n\n consText.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n consTextFocusLost(evt);\n }\n });\n consText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n consTextKeyTyped(evt);\n }\n });\n\n roomnoText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n roomnoTextKeyTyped(evt);\n }\n });\n\n jLabel3.setText(\"yyyy-mm-dd\");\n\n jButton2.setText(\"Add extern Physician details\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel9)\n .addComponent(jLabel7)\n .addComponent(jLabel4)\n .addComponent(jLabel10))\n .addGap(65, 65, 65)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dateText, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(attendNoText, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(IDTExt, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(2, 2, 2)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(consText, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nameTExt, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(disText, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(wardnoText, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(roomnoText, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jButton2)\n .addGap(55, 55, 55))))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(attendNoText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(dateText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(IDTExt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(consText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(nameTExt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(disText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(wardnoText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(roomnoText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton2)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(32, 32, 32)\n .addComponent(resetBtn)\n .addGap(39, 39, 39)\n .addComponent(searchBtn)\n .addGap(38, 38, 38)\n .addComponent(admitBtn)))\n .addContainerGap(76, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(resetBtn)\n .addComponent(searchBtn)\n .addComponent(admitBtn)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n pack();\n }", "public void actionPerformed(ActionEvent e) {\r\n JTextField ownerTf;\r\n String mes;\r\n\r\n String record[] = getRecordOnPan();\r\n\r\n try {\r\n int match[] = data.find(record);\r\n \r\n if (match.length > 1) {\r\n updateStatus(\"More than one match record.\");\r\n return;\r\n } else if (match.length == 0) {\r\n updateStatus(\"Record not found.\");\r\n return;\r\n }\r\n \r\n ownerTf = new JTextField();\r\n ownerTf.setText(record[5]);\r\n mes = \"Enter customer id\";\r\n \r\n int result = JOptionPane.showOptionDialog(\r\n frame, new Object[] {mes, ownerTf},\r\n \"Booking\", JOptionPane.OK_CANCEL_OPTION,\r\n JOptionPane.PLAIN_MESSAGE,\r\n null, null, null);\r\n\r\n if (result == JOptionPane.OK_OPTION) {\r\n record[5] = ownerTf.getText();\r\n bc.handleUpdateGesture(match[0], record);\r\n updateStatus(\"Subcontractor booked.\");\r\n }\r\n } catch (Exception ex) {\r\n updateStatus(ex.getMessage());\r\n }\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDodajStudentaDialog dodajStudenta = new DodajStudentaDialog();\n\t\tdodajStudenta.setVisible(true);\n\t}", "@Override\n\tpublic void showPatientDetails() {\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"S.No Patient's name ID Mobile Age\");\n\t\tfor (int i = 1; i <= UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i - 1);\n\t\t\tSystem.out.print(\" \" + i + \" \" + jsnobj.get(\"Patient's name\") + \" \" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t+ \" \" + jsnobj.get(\"Mobile\") + \" \" + jsnobj.get(\"Age\") + \"\\n\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString sql = \"SELECT COUNT(*) FROM EDW_LOCATION JOIN EDW_TEMPS ON EDW_LOCATION.IDTEMPS = EDW_TEMPS.IDTEMPS \"\n\t\t\t\t\t\t+ \"JOIN EDW_CLIENT ON EDW_LOCATION.IDCLIENT = EDW_CLIENT.IDCLIENT WHERE 1=1 \";\n\t\t\t\tString valueAgeGroup = ((ComboBoxItem) ageGroupComboBox.getSelectedItem()).value;\n\t\t\t\tString valueProvince = ((ComboBoxItem) provinceComboBox.getSelectedItem()).value;\n\t\t\t\tString valueWeekDay = ((ComboBoxItem) weekDayComboBox.getSelectedItem()).value;\n\t\t\t\tString valueMonth = ((ComboBoxItem) monthComboBox.getSelectedItem()).value;\n\t\t\t\t\n\t\t\t\tif (valueAgeGroup != null) { sql += \"AND EDW_CLIENT.GROUPEAGE LIKE '\" + valueAgeGroup + \"' \"; }\n\t\t\t\tif (valueProvince != null) { sql += \"AND EDW_CLIENT.PROVINCE LIKE '\" + valueProvince + \"' \"; }\n\t\t\t\tif (valueWeekDay != null) { sql += \"AND EDW_TEMPS.JOUR LIKE '\" + valueWeekDay + \"' \"; }\n\t\t\t\tif (valueMonth != null) { sql += \"AND EDW_TEMPS.MOIS LIKE '\" + valueMonth + \"' \"; }\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t \tConnection con = SimpleConnection.GetSimpleDBConnection();\n\t\t\t\t PreparedStatement stmt = null;\n\t\t\t stmt = con.prepareStatement(sql);\n\t\t\t ResultSet rs = stmt.executeQuery();\n\t\t\t if (rs.next()) {\n\t\t\t int nbLocations = rs.getInt(1);\n\t\t\t \n\t\t\t nbLocationsTextField.setText(\"\" + nbLocations);\n\t\t\t }\n\t\t\t stmt.close();\n\t\t\t } catch (SQLException e ) {\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t }\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n chatTxt = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n patientNameTxt = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n chatTextArea = new javax.swing.JTextArea();\n sendBtn = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n selectMedicationBtn = new javax.swing.JButton();\n\n chatTxt.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n jLabel2.setText(\"Patient Name:\");\n\n patientNameTxt.setEditable(false);\n patientNameTxt.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel1.setText(\"To chat with your patient\");\n\n chatTextArea.setColumns(20);\n chatTextArea.setFont(new java.awt.Font(\"Monospaced\", 0, 15)); // NOI18N\n chatTextArea.setRows(5);\n jScrollPane1.setViewportView(chatTextArea);\n\n sendBtn.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n sendBtn.setText(\"Send Message\");\n sendBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sendBtnActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Back\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n selectMedicationBtn.setFont(new java.awt.Font(\"Tahoma\", 0, 15)); // NOI18N\n selectMedicationBtn.setText(\"Select Medication\");\n selectMedicationBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n selectMedicationBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(174, 174, 174)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGap(91, 91, 91)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(38, 38, 38)\n .addComponent(patientNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(chatTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(sendBtn)\n .addComponent(selectMedicationBtn)))\n .addComponent(jScrollPane1))))\n .addContainerGap(561, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addComponent(jLabel1)\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(patientNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(chatTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sendBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(selectMedicationBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(294, Short.MAX_VALUE))\n );\n }", "private void txtDisplayActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n pNamLbl = new javax.swing.JLabel();\n pNamTf = new javax.swing.JTextField();\n pAgeLbl = new javax.swing.JLabel();\n pAgeTf = new javax.swing.JTextField();\n mConLbl = new javax.swing.JLabel();\n mConTf = new javax.swing.JTextField();\n addBtn = new javax.swing.JButton();\n schedBtn = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n extBtn = new javax.swing.JButton();\n pListBtn = new javax.swing.JButton();\n prioLbl = new javax.swing.JLabel();\n prioTf = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(204, 0, 0));\n jLabel1.setText(\"Welcome to the Vaccine App\");\n\n pNamLbl.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n pNamLbl.setText(\"Patients Name:\");\n\n pAgeLbl.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n pAgeLbl.setText(\"Patients Age:\");\n\n mConLbl.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n mConLbl.setText(\"Medical Condition (Y/N):\");\n\n addBtn.setText(\"Add Patient\");\n addBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addBtnActionPerformed(evt);\n }\n });\n\n schedBtn.setText(\"Next Group\");\n schedBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n schedBtnActionPerformed(evt);\n }\n });\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n extBtn.setText(\"Exit\");\n extBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n extBtnActionPerformed(evt);\n }\n });\n\n pListBtn.setText(\"List\");\n pListBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n pListBtnActionPerformed(evt);\n }\n });\n\n prioLbl.setText(\"Priority:\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(104, 104, 104)\n .addComponent(jLabel1)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pNamLbl)\n .addComponent(pAgeLbl))\n .addGap(66, 66, 66)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(pAgeTf, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pNamTf, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(mConLbl)\n .addComponent(prioLbl))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(mConTf)\n .addComponent(prioTf))))\n .addGroup(layout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(addBtn)\n .addGap(18, 18, 18)\n .addComponent(schedBtn)\n .addGap(18, 18, 18)\n .addComponent(pListBtn)\n .addGap(18, 18, 18)\n .addComponent(extBtn)))))\n .addContainerGap(150, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pNamLbl)\n .addComponent(pNamTf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pAgeLbl)\n .addComponent(pAgeTf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(mConLbl)\n .addComponent(mConTf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prioLbl)\n .addComponent(prioTf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addBtn)\n .addComponent(schedBtn)\n .addComponent(extBtn)\n .addComponent(pListBtn))\n .addContainerGap(308, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void initializeSelectPatientDialog(){\r\n\r\n selectPatientDialog = new JDialog();\r\n selectPatientDialog.setTitle(\"Search Results\");\r\n\r\n selectPatientPanel = new JPanel(new GridBagLayout());\r\n selectPatientPanel.setBackground(MainGUI.backgroundColor);\r\n selectPatientPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n\r\n selectPatientPanelConstraints = new GridBagConstraints();\r\n\r\n selectPatient_instructionLabel = new JLabel(\"Choose Patient from Drop down List\");\r\n selectPatient_instructionLabel.setFont(new java.awt.Font(selectPatient_instructionLabel.getFont().getFontName(),\r\n Font.PLAIN, 20));\r\n selectPatient_instructionLabel.setForeground(MainGUI.fontColor);\r\n\r\n selectPatient_choosePatientCB = new JComboBox<String>();\r\n\r\n selectPatient_selectPatientFoundButton = new JButton(\"Select Patient\");\r\n selectPatient_selectPatientFoundButton.setForeground(MainGUI.fontColor);\r\n\r\n // add components to panel\r\n\r\n // add instruction label\r\n selectPatientPanelConstraints.gridx = 10;\r\n selectPatientPanelConstraints.gridy = 10;\r\n selectPatientPanelConstraints.gridwidth = 20;\r\n selectPatientPanelConstraints.weighty = 0.1;\r\n selectPatientPanelConstraints.anchor = GridBagConstraints.NORTH;\r\n selectPatientPanelConstraints.insets = new Insets(20, 0, 0, 0);\r\n selectPatientPanel.add(selectPatient_instructionLabel, selectPatientPanelConstraints);\r\n\r\n // add combo box\r\n selectPatientPanelConstraints.gridy = 20;\r\n selectPatientPanelConstraints.weightx = 0.1;\r\n selectPatientPanelConstraints.anchor = GridBagConstraints.WEST;\r\n selectPatientPanelConstraints.insets = new Insets(0, 80, 0, 0);\r\n selectPatientPanel.add(selectPatient_choosePatientCB, selectPatientPanelConstraints);\r\n\r\n // add select patient button\r\n selectPatientPanelConstraints.gridx = 20;\r\n selectPatientPanelConstraints.ipady = 10;\r\n selectPatientPanelConstraints.anchor = GridBagConstraints.EAST;\r\n selectPatientPanelConstraints.insets = new Insets(0, 0, 0, 80);\r\n selectPatientPanel.add(selectPatient_selectPatientFoundButton, selectPatientPanelConstraints);\r\n\r\n // add panel to dialog\r\n selectPatientDialog.add(selectPatientPanel);\r\n selectPatientDialog.setSize(500, 200);\r\n selectPatientDialog.setLocationRelativeTo(null);\r\n\r\n\r\n }", "public Patients_Data_Frame() {\n initComponents();\n Show_Products_in_jTable();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this,'P'));\r\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n tableTreatment = new javax.swing.JTable();\n jLabel4 = new javax.swing.JLabel();\n frameTreatment = new javax.swing.JInternalFrame();\n labAvailable = new javax.swing.JLabel();\n labUnavailable = new javax.swing.JLabel();\n buttonConfirm = new javax.swing.JButton();\n buttonCancel = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n txtNote = new javax.swing.JTextArea();\n comboType = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n comboScore = new javax.swing.JComboBox<>();\n buttonTreat = new javax.swing.JButton();\n buttonMedical = new javax.swing.JButton();\n buttonHistory = new javax.swing.JButton();\n\n tableTreatment.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Patient\", \"Checkin Time\", \"Message\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, true, true\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(tableTreatment);\n if (tableTreatment.getColumnModel().getColumnCount() > 0) {\n tableTreatment.getColumnModel().getColumn(0).setPreferredWidth(20);\n tableTreatment.getColumnModel().getColumn(1).setPreferredWidth(20);\n }\n\n jLabel4.setFont(new java.awt.Font(\"Lucida Grande\", 0, 24)); // NOI18N\n jLabel4.setText(\"Patients Treatment\");\n\n frameTreatment.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n frameTreatment.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n frameTreatment.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n frameTreatment.setEnabled(false);\n frameTreatment.setVisible(true);\n\n buttonConfirm.setText(\"Confirm\");\n buttonConfirm.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonConfirmActionPerformed(evt);\n }\n });\n\n buttonCancel.setText(\"Cancel\");\n buttonCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonCancelActionPerformed(evt);\n }\n });\n\n txtNote.setColumns(20);\n txtNote.setRows(5);\n jScrollPane2.setViewportView(txtNote);\n\n jLabel1.setText(\"Treatment Type\");\n\n jLabel2.setText(\"Hygiene Score\");\n\n comboScore.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\" }));\n\n javax.swing.GroupLayout frameTreatmentLayout = new javax.swing.GroupLayout(frameTreatment.getContentPane());\n frameTreatment.getContentPane().setLayout(frameTreatmentLayout);\n frameTreatmentLayout.setHorizontalGroup(\n frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(frameTreatmentLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(frameTreatmentLayout.createSequentialGroup()\n .addComponent(buttonConfirm)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buttonCancel))\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 847, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(frameTreatmentLayout.createSequentialGroup()\n .addGroup(frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(comboType, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(comboScore, 0, 200, Short.MAX_VALUE))\n .addGap(590, 590, 590)\n .addComponent(labAvailable, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(labUnavailable, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n frameTreatmentLayout.setVerticalGroup(\n frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(frameTreatmentLayout.createSequentialGroup()\n .addGroup(frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(labAvailable, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labUnavailable, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(frameTreatmentLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboType, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboScore, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(frameTreatmentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(buttonConfirm, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buttonCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n\n buttonTreat.setText(\"Treat The Patient\");\n buttonTreat.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonTreatActionPerformed(evt);\n }\n });\n\n buttonMedical.setText(\"View Patient Medical Info\");\n buttonMedical.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonMedicalActionPerformed(evt);\n }\n });\n\n buttonHistory.setText(\"View Patient Treatment History\");\n buttonHistory.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonHistoryActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(frameTreatment, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(buttonTreat)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buttonMedical)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buttonHistory)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 338, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(buttonTreat, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buttonMedical, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buttonHistory, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(frameTreatment))\n );\n }", "public void actionPerformed (ActionEvent event){\n addTeachersFrame.setVisible(true);\r\n }", "public void buttonShowAll(ActionEvent actionEvent) {\n }", "private void foodRecButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_foodRecButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getFoodRecController();\n }", "public PatientHistoryDialog(PatientDTO patient) {\n setTitle(String.format(\"診療録(%s%s)\", patient.lastName, patient.firstName));\n PatientHistoryRoot root = new PatientHistoryRoot(patient);\n setScene(new Scene(root));\n root.setupOnClose(this);\n root.trigger();\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent a) {\n\t\tif(a.getSource()==jb1){//点击“查询”按钮\r\n\t\t\tSystem.out.println(\"用户希望查询...\");\r\n\t\t\tString name=this.jtf.getText().trim();//获得输入的内容\r\n\t\t\tString sql;\r\n\t\t\tif(name.matches(\"[0-9]+\")){//如果输入的内容是纯数字,则是查询学号,这个[0-9]+是正则表达式,表示纯数字的意思\r\n\t\t\t\tsql=\"SELECT * FROM stuInformation WHERE stuId='\"+name+\"'\";\r\n\t\t\t}else{//如果不是纯数字的话就是输入了名字,执行查询名字的SQL语句\r\n\t\t\t\tsql=\"SELECT * FROM stuInformation WHERE stuName='\"+name+\"'\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(name.equals(\"\")){//如果输入为空,则提示错误。并且刷新一次表格\r\n\t\t\t\tsql=\"select * from stuInformation\";\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"请输入需要查询的名字\");\r\n\t\t\t}\r\n\t\t\tsm=new StuModel(sql);\r\n\t\t\tjt.setModel(sm);\r\n\t\t}\r\n\t\telse if(a.getSource()==jb2){//点击“添加”按钮\r\n\t\t\t//弹出添加界面\r\n\t\t\tSystem.out.println(\"添加...\");\r\n\t\t\tStuAddDiag sa=new StuAddDiag(this,\"添加学生\",true);\r\n\t\t\t//重新获得新的数据模型\r\n\t\t\tsm=new StuModel();\r\n\t\t\tjt.setModel(sm);\r\n\t\t}\r\n\t\telse if(a.getSource()==jb4){//点击“删除”按钮\r\n\t\t\t//删除记录\r\n\t\t\t//获得学生id\r\n\t\t\tint rowNum=this.jt.getSelectedRow();//返回用户点中的行\r\n\t\t\tif(rowNum==-1){//未选中行情况会返回一个-1\r\n\t\t\t\t//提示\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"请选中一行\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t//获得学生的ID\r\n\t\t\tString stuId=(String)sm.getValueAt(rowNum, 0);\r\n\t\t\tSystem.out.println(\"ID:\"+stuId);\r\n\t\t\t//连接数据库,执行删除任务\r\n\t\t\ttry {\r\n\t\t\t\t//加载驱动\r\n\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\t\tSystem.out.println(\"Test3的JDBC驱动加载成功\");\r\n\t\t\t\t//连接MySQL数据库\r\n\t\t\t\t\r\n\t\t\t\tct=DriverManager.getConnection(MySqlAccount.url, MySqlAccount.user, MySqlAccount.passwd);\r\n\t\t\t\tSystem.out.println(\"数据库连接成功\");\r\n\t\t\t\t/*\r\n\t\t\t\t * PreparedStatement 实例包含已编译的 SQL 语句。这就是使语句“准备好”。包含于\r\n\t\t\t\t PreparedStatement 对象中的 SQL 语句可具有一个或多个 IN 参数。\r\n\t\t\t\t IN参数的值在 SQL 语句创建时未被指定。相反的,该语句为每个 IN 参数保留一个问号(“?”)\r\n\t\t\t\t 作为占位符。每个问号的值必须在该语句执行之前,通过适当的setXXX 方法来提供。\r\n\t\t\t\t */\r\n\t\t\t\tps=ct.prepareStatement(\"delete from stuinformation where stuId=?\");\r\n\t\t\t\tps.setString(1, stuId);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally{\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(rs!=null){\r\n\t\t\t\t\t\trs.close();\r\n\t\t\t\t\t\trs=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ps!=null){\r\n\t\t\t\t\t\tps.close();\r\n\t\t\t\t\t\tps=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(ct!=null){\r\n\t\t\t\t\t\tct.close();\r\n\t\t\t\t\t\tct=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsm=new StuModel();\r\n\t\t\t//更新jtable\r\n\t\t\tjt.setModel(sm);\r\n\t\t}\r\n\t\telse if(a.getSource()==jb3){//点击“修改”按钮\r\n\t\t\tSystem.out.println(\"用户希望修改...\");\r\n\t\t\t//用户修改模块\r\n\t\t\tint rowNum=this.jt.getSelectedRow();\r\n\t\t\tif(rowNum==-1){\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"请选择一行\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t//显示对话框\r\n\t\t\tSystem.out.println(\"对话框\");\r\n\t\t\tStuUpDiag su=new StuUpDiag(this,\"修改资料\",true,sm,rowNum);\r\n\t\t\tsm=new StuModel();\r\n\t\t\tjt.setModel(sm);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString date = AppDateField.getText();\n\t\tString Time = AppTimeField.getText();\t\n\t\tString Name = AppPatNameField.getText();\n\t\tString Surname = AppPatSurnameField.getText();\n\t\tint Id = Integer.parseInt(AppPatIdField.getText());\n\t\tString Doctor = AppDocNameField.getText();\n\t\tString Service = (String) SelectTask.getSelectedItem();\n\t\t\n\t\tDBH db = new DBH();\n\t\t\n\t\tString sql = \"INSERT INTO `Narnia_Hospital`.`Appointments` (`Appointment_Date`, `Appointment_Time`, `AppPat_Name`, `AppPat_Surname`, `AppPatId`, `AppDoctor`, `AppService`) VALUES ('\"+date+\"','\"+Time+\"','\"+Name+\"','\"+Surname+\"','\"+Id+\"','\"+Doctor+\"','\"+Service+\"')\"; \n\t\t\n\t\t\n\t\tResultSet rs = null;\n\t\t\n\t\ttry{\n\t\t rs = db.executeCall(sql);\n \t\t\n\t\t while(rs.next()){\n\t\t\t \n\t\t\t Appointment A1 = new Appointment();\n\t\t\t \n\t\t\t A1.setAppDate (date);\n\t\t\t A1.setAppTime(Time);\n\t\t\t A1.setPatientName(Name);\n\t\t\t A1.setPatientSurname(Surname);\n\t\t\t A1.setPatId(Id);\n\t\t\t A1.setDoctorName(Doctor);\n\t\t\t A1.setServiceRequired(Service);\n\t\t\t \n\t\t\t \n\t\t\t \t\n\t\t\t\t }\n\t\t\t \n\t\t \n\t\t \n\t\t \n\t\t}catch (Exception ex){}\n\t\t\n\t\t//Offers the option to create a new one or leave this screen.\n\t\t\n\t\tJOptionPane.showMessageDialog(this, \"Appointment Registered!\");\n\t\t\n\t\t int n = JOptionPane.showConfirmDialog(this,\"Do you want to add another appointment?\", \"Message Selected\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t if (n == 0){ \n\t\t\t this.setVisible(false);\n\t\t\t new NewAppointment();\n\t\t\t\n\t\t} else if (n == 1){\n\t\t\t this.setVisible(false);\n\t\t\t new SecretaryScreen();\n\t\t}\n\t\t\n\t}", "public void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tshowCustomerInvoices();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\t\tString s=\"select *from CustomerData where Customer_Name=?\";\n\t\t\t\t ps=con.prepareStatement(s);\n\t\t\t\t ps.setString(1,txtSearch.getText());\n\t\t\t\t rs=ps.executeQuery();\n\t\t\t\t if(rs.next())\n\t\t\t\t {\n\t\t\t\t \ttblCustomer.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t \tJOptionPane.showMessageDialog(null,\"Sorry! this Cutomer is not exist.\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t} catch (SQLException e3) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te3.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n formMouseClicked(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"San Francisco Display\", 1, 36)); // NOI18N\n jLabel1.setText(\"Visitors:\");\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Name\", \"Visiting Date\", \"Visiting Time\", \"Contact No.\", \"Prisoner ID\", \"Prisoner Name\", \"Prisoner Cell No.\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n jButton1.setText(\"Click Here\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"to insert new visitor.\");\n\n jLabel3.setText(\"ID\");\n\n jLabel4.setText(\"Name\");\n\n jLabel5.setText(\"Visiting Date\");\n\n jLabel6.setText(\"Prisoner ID\");\n\n jLabel7.setText(\"Prisoner Name\");\n\n jLabel8.setText(\"Prisoner Cell\");\n\n jButton2.setText(\"Filter\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setIcon(new javax.swing.ImageIcon(\"/home/al-sany/NetBeansProjects/prisonManagementSystem/icons/back.png\")); // NOI18N\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(86, 86, 86)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1205, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(174, 174, 174)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(133, 133, 133)\n .addComponent(jLabel4)\n .addGap(121, 121, 121)\n .addComponent(jLabel5)\n .addGap(131, 131, 131)\n .addComponent(jLabel6)\n .addGap(139, 139, 139)\n .addComponent(jLabel7)\n .addGap(126, 126, 126)\n .addComponent(jLabel8)))\n .addContainerGap(75, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(1, 1, 1)\n .addComponent(jLabel2)\n .addGap(88, 88, 88))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(88, 88, 88)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(91, 91, 91)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(106, 106, 106)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(104, 104, 104)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(90, 90, 90)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(141, 141, 141))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(587, 587, 587))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(54, 54, 54))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(119, 119, 119)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jLabel2))\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jButton2)\n .addContainerGap(73, Short.MAX_VALUE))\n );\n\n pack();\n }", "public Patient_Info() {\n initComponents();\n }", "private void txtidDemActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void clickOnPatients() {\n\t\twait.waitForStableDom(250);\n\t\tisElementDisplayed(\"link_patients\");\n\t\twait.waitForElementToBeClickable(element(\"link_patients\"));\n\t\twait.waitForStableDom(250);\n\t\texecuteJavascript(\"document.getElementById('doctor-patients').click();\");\n\t\tlogMessage(\"user clicks on Patients\");\n\t}", "public void updateUpdatePatientPanel() {\n\t\tupdateNameTF.setText(getDoctor(tempDoctorId).getPatient(tempPatientId)\n\t\t\t\t.getPName());\n\t\tupdateAddressTA.setText(getDoctor(tempDoctorId).getPatient(\n\t\t\t\ttempPatientId).getPAddress());\n\t\tupdatePhoneNoTA\n\t\t\t\t.setText(\"\"\n\t\t\t\t\t\t+ getDoctor(tempDoctorId).getPatient(tempPatientId)\n\t\t\t\t\t\t\t\t.getPPhone());\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n doctorScheduleJTable = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n backJButton1 = new javax.swing.JButton();\n btnDiagnose = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n doctorScheduleJTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Status\", \"Patient ID\", \"Patient Name\", \"Scheduled Time\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(doctorScheduleJTable);\n if (doctorScheduleJTable.getColumnModel().getColumnCount() > 0) {\n doctorScheduleJTable.getColumnModel().getColumn(0).setResizable(false);\n doctorScheduleJTable.getColumnModel().getColumn(1).setResizable(false);\n doctorScheduleJTable.getColumnModel().getColumn(2).setResizable(false);\n doctorScheduleJTable.getColumnModel().getColumn(3).setResizable(false);\n }\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Manage Doctor Schedule\");\n\n backJButton1.setText(\"<< Back\");\n backJButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButton1ActionPerformed(evt);\n }\n });\n\n btnDiagnose.setText(\"Diagnose Patient\");\n btnDiagnose.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDiagnoseActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(100, 100, 100)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(backJButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnDiagnose))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 800, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(102, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(jLabel1)\n .addGap(36, 36, 36)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(118, 118, 118)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(backJButton1)\n .addComponent(btnDiagnose))\n .addContainerGap(195, Short.MAX_VALUE))\n );\n }", "private void fNameActionPerformed(java.awt.event.ActionEvent evt) {\n\t }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n backBtn = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n operatePatientBtn = new javax.swing.JButton();\n patientNameTxtField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n releasePatientBtn = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n feedBackTextArea = new javax.swing.JTextArea();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n backBtn.setText(\"Back\");\n backBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backBtnActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"ER Specialist Operation \");\n\n operatePatientBtn.setText(\"Operate Patient\");\n operatePatientBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n operatePatientBtnActionPerformed(evt);\n }\n });\n\n patientNameTxtField.setEditable(false);\n\n jLabel2.setText(\"Patient\");\n\n releasePatientBtn.setText(\"Release Patient\");\n releasePatientBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n releasePatientBtnActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Feedback\");\n\n feedBackTextArea.setColumns(20);\n feedBackTextArea.setRows(5);\n jScrollPane1.setViewportView(feedBackTextArea);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(107, 107, 107)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(operatePatientBtn)\n .addGroup(layout.createSequentialGroup()\n .addGap(173, 173, 173)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(55, 55, 55)\n .addComponent(patientNameTxtField, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addComponent(backBtn)\n .addGap(67, 67, 67)\n .addComponent(releasePatientBtn)))\n .addGap(297, 297, 297))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(patientNameTxtField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(58, 58, 58)\n .addComponent(operatePatientBtn)\n .addGap(46, 46, 46)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(releasePatientBtn)\n .addComponent(backBtn))\n .addGap(242, 242, 242))\n );\n }", "private void custIDTextFieldActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void phantichActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btn_ReturnActionPerformed(java.awt.event.ActionEvent evt) {\n \n Filight_Details FD = new Filight_Details();\n FD.setVisible(true);\n this.close();\n \n }", "private void ControlsActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void formMouseClicked(java.awt.event.MouseEvent evt) {\n }", "@SuppressWarnings(\"unchecked\")\n private void initComponents() {//GEN-BEGIN:initComponents\n\n nameL = new javax.swing.JLabel();\n removeB = new javax.swing.JButton();\n diagnosisL = new javax.swing.JLabel();\n bedL = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setLayout(new java.awt.GridLayout(3, 2, 5, 5));\n\n nameL.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n nameL.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n nameL.setText(patient.toString());\n add(nameL);\n\n removeB.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n removeB.setText(\"Remove Patient\");\n removeB.setToolTipText(\"Removes this patient from the clinic\");\n removeB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n removeBActionPerformed(evt);\n }\n });\n add(removeB);\n\n diagnosisL.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n diagnosisL.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n diagnosisL.setText(patient.getDiagnosis());\n add(diagnosisL);\n\n bedL.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n bedL.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n bedL.setText(patient.getBed().toString());\n add(bedL);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n jLabel1.setText(\"Assigned Doctor :\");\n add(jLabel1);\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(patient.getAssignedDoc().toString());\n add(jLabel2);\n }", "private void jIdFilmeActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public SinglePatientPN() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnAccountTerminate = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n txtPatientID = new javax.swing.JTextPane();\n lbPatientID = new javax.swing.JLabel();\n boxAppointment = new javax.swing.JComboBox<>();\n jScrollPane1 = new javax.swing.JScrollPane();\n txtInfo = new javax.swing.JTextArea();\n boxPrescription = new javax.swing.JComboBox<>();\n boxHistory = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n btnSubmitDate = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n btnSubmitFeedback = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n boxDoctors = new javax.swing.JComboBox<>();\n jLabel10 = new javax.swing.JLabel();\n jScrollPane3 = new javax.swing.JScrollPane();\n txtFeedback = new javax.swing.JTextArea();\n btnAppointment = new javax.swing.JButton();\n btnHistory = new javax.swing.JButton();\n btnPrescription = new javax.swing.JButton();\n boxViewDoctors = new javax.swing.JComboBox<>();\n btnDoctorView = new javax.swing.JButton();\n boxRating = new javax.swing.JComboBox<>();\n jLabel11 = new javax.swing.JLabel();\n boxDoctorsAppointment = new javax.swing.JComboBox<>();\n dateEnd = new org.jdesktop.swingx.JXDatePicker();\n dateStart = new org.jdesktop.swingx.JXDatePicker();\n boxStartHour = new javax.swing.JComboBox<>();\n boxEndHour = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n txtMinStart = new javax.swing.JTextField();\n txtMinEnd = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n txtAppResponse = new javax.swing.JTextField();\n jLabel38 = new javax.swing.JLabel();\n txtFeedbackResponse = new javax.swing.JTextField();\n jLabel39 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n btnAccountTerminate.setText(\"Terminate Account\");\n btnAccountTerminate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAccountTerminateActionPerformed(evt);\n }\n });\n\n txtPatientID.setEditable(false);\n jScrollPane2.setViewportView(txtPatientID);\n\n lbPatientID.setText(\"Patient ID\");\n\n txtInfo.setColumns(20);\n txtInfo.setRows(5);\n jScrollPane1.setViewportView(txtInfo);\n\n jLabel2.setText(\"start date\");\n\n jLabel3.setText(\"end date\");\n\n btnSubmitDate.setText(\"sumbit\");\n\n jLabel4.setText(\"Request an appointment\");\n\n jLabel5.setText(\"Enter the range of dates\");\n\n btnSubmitFeedback.setText(\"submit\");\n\n jLabel8.setText(\"Doctor feedback\");\n\n jLabel9.setText(\"Select doctor and write feedback\");\n\n jLabel10.setText(\"Select doctor\");\n\n txtFeedback.setColumns(20);\n txtFeedback.setRows(5);\n jScrollPane3.setViewportView(txtFeedback);\n\n btnAppointment.setText(\"view Appointment\");\n\n btnHistory.setText(\"View History\");\n\n btnPrescription.setText(\"view Prescription\");\n\n btnDoctorView.setText(\"View Doctors Ratings\");\n\n boxRating.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"1\", \"2\", \"3\", \"4\", \"5\" }));\n\n jLabel11.setText(\"select rating\");\n\n boxStartHour.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"07\", \"08\", \"09\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\" }));\n boxStartHour.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n boxStartHourActionPerformed(evt);\n }\n });\n\n boxEndHour.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"07\", \"08\", \"09\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\" }));\n\n jLabel1.setText(\"Hour\");\n\n jLabel6.setText(\"Hour\");\n\n txtMinStart.setText(\"00\");\n\n txtMinEnd.setText(\"00\");\n txtMinEnd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtMinEndActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Minutes\");\n\n jLabel12.setText(\"Minutes\");\n\n txtAppResponse.setForeground(new java.awt.Color(255, 0, 0));\n txtAppResponse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtAppResponseActionPerformed(evt);\n }\n });\n\n jLabel38.setText(\"Appointment Response\");\n\n txtFeedbackResponse.setForeground(new java.awt.Color(255, 0, 0));\n txtFeedbackResponse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtFeedbackResponseActionPerformed(evt);\n }\n });\n\n jLabel39.setText(\"Feedback Response\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(lbPatientID)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnAccountTerminate)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addComponent(jLabel2))\n .addGap(35, 35, 35)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(dateStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(dateEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(btnSubmitDate))\n .addComponent(jLabel4)\n .addComponent(boxDoctorsAppointment, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addComponent(btnSubmitFeedback))\n .addComponent(jLabel9)\n .addComponent(jLabel8)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel10)\n .addComponent(jLabel11))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(boxDoctors, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(boxRating, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(layout.createSequentialGroup()\n .addGap(97, 97, 97)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(boxStartHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(boxEndHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtMinStart, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtMinEnd)))\n .addGap(43, 43, 43)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(26, 26, 26))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(boxAppointment, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(boxPrescription, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addComponent(jLabel38)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtAppResponse, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(25, 25, 25))\n .addComponent(boxViewDoctors, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(boxHistory, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(12, 12, 12)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnDoctorView, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnHistory, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnPrescription, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnAppointment, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(4, 4, 4)\n .addComponent(jLabel39)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtFeedbackResponse, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(10, 10, 10))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lbPatientID))\n .addGap(31, 31, 31)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtFeedbackResponse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel39))\n .addGap(2, 2, 2)\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxDoctors, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel10))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel9))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(boxDoctorsAppointment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxRating, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel11)\n .addComponent(jLabel5))\n .addGap(3, 3, 3))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxAppointment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnAppointment))\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxPrescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPrescription))\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxHistory, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnHistory))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxViewDoctors, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnDoctorView))\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAppResponse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel38))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dateStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(dateEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnSubmitDate)\n .addGap(79, 79, 79)\n .addComponent(btnAccountTerminate))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxStartHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addComponent(txtMinStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(boxEndHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)\n .addComponent(txtMinEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12))))\n .addGap(18, 18, 18)\n .addComponent(btnSubmitFeedback)))\n .addGap(34, 34, 34))\n );\n\n pack();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmAddStudentGroup.dispose();\n\t\t\t\tnew Add_Subjects();\n\t\t\t\t\n\t\t\t}", "private void BanalisisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tTableWindow customersWindow = new TableWindow(dbHandler.getArrayOfCustomers(),Customer.getTitles());\r\n\t\t\t customersWindow.setVisible(true);\r\n\t\t\t}", "private void tfLugarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void actionPerformed(ActionEvent event) {\n editFrame.setVisible(false);\r\n //load period info from file\r\n try {\r\n loadPeriodInfo();\r\n }catch (IOException E) {\r\n System.out.println (\"ERROR READING 'Period List.txt\"); \r\n }\r\n //refresh page\r\n teacherZonePanel.setVisible(false);\r\n teacherZonePanel.setVisible(true);\r\n \r\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void createSearchForPatientPanel() {\n\n\t\tsearchPatientPanel = new JPanel();\n\t\tsearchPatientPanel.setSize(700, 430);\n\t\tsearchPatientPanel.setLocation(0, 70);\n\t\tsearchPatientPanel.setLayout(null);\n\n\t\tJPanel topSearchPanel = new JPanel(new FlowLayout());\n\t\ttopSearchPanel.setSize(500, 30);\n\t\ttopSearchPanel.setLocation(100, 0);\n\t\ttopSearchPanel.add(new JLabel(\"Enter Patiets Name/ID:\"));\n\t\tsearchPatientTF = new JTextField(20);\n\t\ttopSearchPanel.add(searchPatientTF);\n\t\tsearchButton = new JButton(\"Find Patient\");\n\n\t\tsearchButton.addActionListener(this);\n\n\t\ttopSearchPanel.add(searchButton);\n\t\tsearchPatientPanel.add(topSearchPanel);\n\n\t\t// searched patients details labels\n\t\tJPanel searchedPatientDetailsPanel = new JPanel(new GridLayout(4, 2));\n\t\tsearchedPatientDetailsPanel.setLocation(40, 60);\n\t\tsearchedPatientDetailsPanel.setSize(250, 200);\n\t\tsearchedPatientDetailsPanel.setBackground(Color.WHITE);\n\n\t\tl1 = new JLabel(\"Name:\");\n\t\tsearchLabel1 = new JLabel(\"\");\n\t\tl2 = new JLabel(\"Address:\");\n\t\tsearchLabel2 = new JLabel(\"\");\n\t\tl3 = new JLabel(\"Phone Number:\");\n\t\tsearchLabel3 = new JLabel(\"\");\n\t\tl4 = new JLabel(\"DOB:\");\n\t\tsearchLabel4 = new JLabel(\"\");\n\n\t\tsearchedPatientDetailsPanel.add(l1);\n\t\tsearchedPatientDetailsPanel.add(searchLabel1);\n\t\tsearchedPatientDetailsPanel.add(l2);\n\t\tsearchedPatientDetailsPanel.add(searchLabel2);\n\t\tsearchedPatientDetailsPanel.add(l3);\n\t\tsearchedPatientDetailsPanel.add(searchLabel3);\n\t\tsearchedPatientDetailsPanel.add(l4);\n\t\tsearchedPatientDetailsPanel.add(searchLabel4);\n\n\t\tsearchPatientPanel.add(searchedPatientDetailsPanel);\n\n\t\t// update button\n\t\tJPanel updateButtonPanel = new JPanel();\n\t\tupdateButtonPanel.setSize(200, 40);\n\t\tupdateButtonPanel.setLocation(40, 300);\n\n\t\tupdatePatientPanel = new JPanel();\n\t\tupdatePatientButton = new JButton(\"Upadate Current Patient\");\n\t\tupdatePatientButton.setVisible(false);\n\n\t\tupdatePatientButton.addActionListener(this);\n\t\tupdateButtonPanel.add(updatePatientButton);\n\t\tsearchPatientPanel.add(updateButtonPanel);\n\n\t\tJPanel updateAddNewHistoryButtonPanel = new JPanel();\n\t\tupdateAddNewHistoryButtonPanel.setSize(200, 40);\n\t\tupdateAddNewHistoryButtonPanel.setLocation(40, 350);\n\n\t\taddNewHistoryButton = new JButton(\"Add New History\");\n\t\taddNewHistoryButton.addActionListener(this);\n\t\taddNewHistoryButton.setVisible(false);\n\n\t\tupdateAddNewHistoryButtonPanel.add(addNewHistoryButton);\n\t\tsearchPatientPanel.add(updateAddNewHistoryButtonPanel);\n\n\t\t// searched patients history text area\n\t\tJPanel patientsHistoryPanel = new JPanel();\n\t\tpatientsHistoryPanel.setSize(350, 300);\n\t\tpatientsHistoryPanel.setLocation(330, 50);\n\n\t\tpatientsHistoryReport = new JTextArea(17, 30);\n\t\tJScrollPane sp2 = new JScrollPane(patientsHistoryReport);\n\t\tpatientsHistoryPanel.add(sp2);\n\t\tpatientsHistoryReport.setEditable(false);\n\t\tpatientsHistoryReport.setLineWrap(true);\n\t\tpatientsHistoryReport.setWrapStyleWord(true);\n\t\tpatientsHistoryReport.setWrapStyleWord(true);\n\n\t\tsearchPatientPanel.add(patientsHistoryPanel);\n\n\t\ttotalGUIPanel.add(searchPatientPanel);\n\t}", "private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {\n new UserIndividualEfficiency().setVisible(true);\n dispose();\n }", "private void ShowCardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ShowCardActionPerformed\n alert.setText(\"\");\n int selectedRow = Table.getSelectedRow();\n if (selectedRow == -1)\n RowItem.setText(\"Please select an item first\");\n else {\n jTextField1.setText(\"Enter search query\");\n alert.setText(\"\");\n RowItem.setText(\"\");\n displayMgr.CU.cardDetails(id, name, price, discount);\n displayMgr.showCard();\n }\n }", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tif(arg0.getSource().equals(jB[0])) {\r\n\t\t\t\t\t\tString sql=\"\";\r\n\t\t\t\t\t\tif(genre.getSelectedIndex()!=0)\r\n\t\t\t\t\t\t\tsql=\" and genre='\"+genre.getSelectedItem()+\"'\";\r\n\t\t\t\t\t\taddRow(dTM,\"select album, music_no, title, singer, genre, date from music where title like '%\"+text.getText()+\"%'\"+sql);\r\n\t\t\t\t\t\tif(dTM.getRowCount()==0) {\r\n\t\t\t\t\t\t\terr_msg(\"검색된 항목이 없습니다.\");\r\n\t\t\t\t\t\t\taddRow(dTM, \"select album, music_no, title, singer, genre, date from music\");\r\n\t\t\t\t\t\t\tgenre.setSelectedIndex(0);\r\n\t\t\t\t\t\t\ttext.setText(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tupdateTable(dTM, jT);\r\n\t\t\t\t\t\tsetWest();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(arg0.getSource().equals(jB[1])) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t\tint row=jT.getSelectedRow();\r\n\t\t\t\t\t\tnew OneLine(new Object[] {jT.getValueAt(row, 2), jT.getValueAt(row, 3), jT.getValueAt(row, 1)}).addWindowListener(new Before(thisForm));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(arg0.getSource().equals(jB[2])) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tint row=jT.getSelectedRow();\r\n\t\t\t\t\t\t\tResultSet rs=DB.stmt.executeQuery(\"select * from rating where kinds=1 and music_r=\"+jT.getValueAt(row, 1)+\" and member_r='\"+DB.ID+\"'\");\r\n\t\t\t\t\t\t\tif(rs.next())\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(MainFrame.POINT==-1) {\r\n\t\t\t\t\t\t\tif(con_msg(\"구매를 하시려면 로그인을 해주세요.\", \"구매\")) {\r\n\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tint row=jT.getSelectedRow();\r\n\t\t\t\t\t\tif(con_msg(\"제목 : \"+jT.getValueAt(row, 2)+\"를 구매하시겠습니까?\", \"구매 확인\")) {\r\n\t\t\t\t\t\t\tif(MainFrame.POINT==0) {\r\n\t\t\t\t\t\t\t\tif(con_msg(\"포인트가 부족합니다.\\n포인트를 충전하시겠습니까?\", \"포인트 부족\")) {\r\n\t\t\t\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t\t\t\t\tnew Pay().addWindowListener(new Before(thisForm));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tDB.stmt.execute(\"insert into rating values(\"+jT.getValueAt(row, 1)+\", '\"+DB.ID+\"', 1, '')\");\r\n\t\t\t\t\t\t\t\tDB.stmt.execute(\"update music set album=album+1 where music_no=\"+jT.getValueAt(row, 1));\r\n\t\t\t\t\t\t\t\tDB.stmt.execute(\"update member set point=point-100 where id='\"+DB.ID+\"'\");\r\n\t\t\t\t\t\t\t\tMainFrame.POINT-=100;\r\n\t\t\t\t\t\t\t\tMainFrame.PJL.setText(\"잔여포인트 : \"+MainFrame.POINT);\r\n\t\t\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tupdateTable(dTM, jT);\r\n\t\t\t\t\t\tsetWest();\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "void onItemClick(Patient patient);", "public void actionPerformed (ActionEvent event ) \r\n\t{\r\n\r\n\t\t/*if button bSave generates the event */\r\n\t\tif (event.getSource () == bSave) \r\n\t\t{\r\n savePerson();\r\n\r\n // clear fields\r\n clear(); \r\n }\r\n\r\n\t\t/*if button bDelete generates the event */\r\n\t\telse if (event.getSource() == bDelete) \r\n\t\t{\r\n deletePerson();\r\n\r\n // clear fields\r\n clear();\r\n }\r\n\r\n\t\t/*if button bUpdate generates the event */\r\n\t\telse if (event.getSource() == bUpdate) \r\n\t\t{\r\n updatePerson();\r\n\r\n clear(); \r\n }\r\n\r\n\t\t/*if button bSearch generates the event */\r\n\t\telse if (event.getSource() == bSearch) \r\n\t\t{\r\n searchPerson();\r\n } \r\n\r\n\t\t/*if button bForward generates the event */\r\n\t\telse if (event.getSource() == bForward) \r\n\t\t{\r\n displayNextRecord(); \r\n }\r\n\r\n\t\t/*if button bBack generates the event */\r\n\t\telse if (event.getSource() == bBack) \r\n\t\t{\r\n displayPreviousRecord();\r\n }\r\n\r\n\t\t/*if button bClear generates the event */\r\n\t\telse if (event.getSource() == bClear) \r\n\t\t{\r\n clear();\r\n }\r\n\r\n \t\t/*if button bExit generates the event */ \r\n\t\telse if (event.getSource() == bExit) \r\n\t\t{\t\t\t\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n PatientNameLabel = new javax.swing.JLabel();\n dcmPatientNameField = new javax.swing.JTextField();\n doCFindButton1 = new javax.swing.JButton();\n jScrollPane3 = new javax.swing.JScrollPane();\n receivedUIDList = new javax.swing.JList<>();\n SearchPatientReportLabel = new javax.swing.JLabel();\n ReportLabel = new javax.swing.JLabel();\n ReportReadLabel = new javax.swing.JLabel();\n doCGetButton = new javax.swing.JButton();\n SelectDicomFile = new javax.swing.JButton();\n dicomImageLabel = new javax.swing.JLabel();\n ImageLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n PatientNameLabel.setText(\"Patient Name\");\n\n dcmPatientNameField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n dcmPatientNameFieldActionPerformed(evt);\n }\n });\n\n doCFindButton1.setText(\"C-FIND\");\n doCFindButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n doCFindButton1doCFindButtonActionPerformed(evt);\n }\n });\n\n receivedUIDList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n receivedUIDListValueChanged(evt);\n }\n });\n jScrollPane3.setViewportView(receivedUIDList);\n\n SearchPatientReportLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n SearchPatientReportLabel.setText(\"Search for Patient Report\");\n\n ReportLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n ReportLabel.setText(\"Report\");\n\n doCGetButton.setText(\"C-GET\");\n doCGetButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n doCGetButtondoCFindButtonActionPerformed(evt);\n }\n });\n\n SelectDicomFile.setText(\"Select DICOM\");\n SelectDicomFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SelectDicomFileActionPerformed(evt);\n }\n });\n\n ImageLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n ImageLabel.setText(\"Image\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(ReportLabel)\n .addGap(590, 590, 590))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 294, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addComponent(doCGetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(SelectDicomFile)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(dicomImageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 623, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(284, 284, 284))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(SearchPatientReportLabel)\n .addGroup(layout.createSequentialGroup()\n .addComponent(PatientNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(dcmPatientNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33)\n .addComponent(doCFindButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(670, 670, 670)\n .addComponent(ImageLabel))\n .addGroup(layout.createSequentialGroup()\n .addGap(645, 645, 645)\n .addComponent(ReportReadLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 775, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(233, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(ImageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(dicomImageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)\n .addComponent(ReportLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(ReportReadLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 376, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(60, 60, 60))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(SearchPatientReportLabel)\n .addGap(117, 117, 117)\n .addComponent(doCGetButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(SelectDicomFile))\n .addGroup(layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(PatientNameLabel)\n .addComponent(dcmPatientNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(doCFindButton1))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 667, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTablefaculty = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n jTextFieldfid = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jTextFieldfname = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jToggleButtonsave1 = new javax.swing.JToggleButton();\n jToggleButtondelete1 = new javax.swing.JToggleButton();\n jToggleButtonupdate1 = new javax.swing.JToggleButton();\n jLabel9 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jTablefaculty.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Faculty ID\", \"Faculty Name\"\n }\n ));\n jTablefaculty.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTablefacultyMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTablefaculty);\n\n jLabel1.setText(\"Faculty ID\");\n\n jLabel2.setText(\"Faculty Name\");\n\n jLabel3.setFont(new java.awt.Font(\"Tempus Sans ITC\", 0, 36)); // NOI18N\n jLabel3.setText(\"University Management System\");\n\n jToggleButtonsave1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icon/19-32.png\"))); // NOI18N\n jToggleButtonsave1.setText(\"Insert\");\n jToggleButtonsave1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonsave1ActionPerformed(evt);\n }\n });\n\n jToggleButtondelete1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icon/50-32.png\"))); // NOI18N\n jToggleButtondelete1.setText(\"Delete\");\n jToggleButtondelete1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtondelete1ActionPerformed(evt);\n }\n });\n\n jToggleButtonupdate1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icon/43-32.png\"))); // NOI18N\n jToggleButtonupdate1.setText(\"Update\");\n jToggleButtonupdate1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButtonupdate1ActionPerformed(evt);\n }\n });\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel9.setText(\"Faculty Details\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel1))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextFieldfid)\n .addComponent(jTextFieldfname)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(51, 51, 51)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jToggleButtondelete1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButtonsave1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButtonupdate1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(124, 124, 124)\n .addComponent(jLabel9)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 386, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(45, 45, 45))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(145, 145, 145)\n .addComponent(jLabel3)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextFieldfid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextFieldfname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jToggleButtonsave1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButtondelete1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButtonupdate1)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3)\n .addGap(26, 26, 26))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void createListPatientsPanel() {\n\n\t\tlistPatientsPanel = new JPanel();\n\t\tlistPatientsPanel.setSize(700, 430);\n\t\tlistPatientsPanel.setLocation(0, 70);\n\t\tlistPatientsPanel.setLayout(new GridLayout(1, 1));\n\t\t// textArea\n\t\tpatientList = new JList(getDoctor(tempDoctorId).getPList().toArray());\n\t\tpatientList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tpatientList.addMouseListener(new MouseListener() {\n\t\t\t@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t}\n\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif (e.getClickCount() == 2) {\n\t\t\t\t\tPatient p = (Patient) patientList.getSelectedValue();\n\t\t\t\t\ttempPatientId = p.getPId();\n\t\t\t\t\tupdateSearchPatientPanel();\n\t\t\t\t\tsearchPatientPanel.setVisible(true);\n\t\t\t\t\tlistPatientsPanel.setVisible(false);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tJScrollPane sp1 = new JScrollPane(patientList);\n\t\tlistPatientsPanel.add(sp1);\n\t\ttotalGUIPanel.add(listPatientsPanel);\n\t\tlistPatientsPanel.setVisible(false);\n\t}", "public void actionPerformed(ActionEvent evt) {\n ISession activeSession = getApplication().getSessionManager().getActiveSession();\n if (activeSession == null)\n throw new IllegalArgumentException(\"This method should not be called with a null activeSession\");\n\n\n final SessionInfoInternalFrame sif = new SessionInfoInternalFrame(activeSession, _resources);\n getApplication().getMainFrame().addWidget(sif);\n\n // If we don't invokeLater here no Short-Cut-Key is sent\n // to the internal frame\n // seen under java version \"1.4.1_01\" and Linux\n SwingUtilities.invokeLater(new Runnable()\n {\n public void run()\n {\n sif.setVisible(true);\n }\n });\n\t}", "public void toggleAddRecord(ActionEvent e) {\r\n tempcontactfirstname = \"\";\r\n tempcontactlastname = \"\";\r\n addRecord = !addRecord;\r\n }", "private void dateEntryViewActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tStudentManagement studentManagement =new StudentManagement();\n\t\t\t studentManagement.setModal(true);\n\t\t\t studentManagement.setVisible(true);\n\t\t\t}", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public static void show() \r\n\t{\r\n\t\tJPanel panel = Window.getCleanContentPane();\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setBackground(SystemColor.inactiveCaption);\r\n\t\tpanel_1.setBounds(-11, 0, 795, 36);\r\n\t\tpanel.add(panel_1);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Over Surgery System\");\r\n\t\tpanel_1.add(lblNewLabel);\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\t\r\n\t\tJTable table = new JTable();\r\n\t\ttable.setBounds(25, 130, 726, 120);\r\n\t\tpanel.add(table);\r\n\t\t\r\n\t\tJLabel lblNewLabel1 = new JLabel(\"General Practictioner ID:\");\r\n\t\tlblNewLabel1.setBounds(25, 73, 145, 34);\r\n\t\tpanel.add(lblNewLabel1);\r\n\t\t\r\n\t\tJTextField textField = new JTextField();\r\n\t\ttextField.setBounds(218, 77, 172, 27);\r\n\t\tpanel.add(textField);\r\n\t\ttextField.setColumns(10);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"Ok\");\r\n\t\tbtnNewButton.setBounds(440, 79, 57, 23);\r\n\t\tpanel.add(btnNewButton);\r\n\t\t\r\n\t\tJLabel lblNurseAvability = new JLabel(\"Nurse ID:\");\r\n\t\tlblNurseAvability.setBounds(25, 326, 112, 14);\r\n\t\tpanel.add(lblNurseAvability);\r\n\t\t\r\n\t\tJTextField textField_1 = new JTextField();\r\n\t\ttextField_1.setColumns(10);\r\n\t\ttextField_1.setBounds(233, 326, 172, 27);\r\n\t\tpanel.add(textField_1);\r\n\t\t\r\n\t\t\r\n\t\tJButton button = new JButton(\"Ok\");\r\n\t\tbutton.setBounds(440, 328, 57, 23);\r\n\t\tpanel.add(button);\r\n\t\t\r\n\t\tJTable table_1 = new JTable();\r\n\t\ttable_1.setBounds(25, 388, 726, 120);\r\n\t\tpanel.add(table_1);\r\n\t}", "@Override\n\tpublic void actionPerformed(final ActionEvent event) {\n\t\tshowNew();\n\t}" ]
[ "0.79580885", "0.6970812", "0.67903256", "0.67107135", "0.65784764", "0.65743786", "0.653941", "0.65001804", "0.6498519", "0.64919436", "0.64263827", "0.63719416", "0.6362006", "0.6350083", "0.63153744", "0.62800795", "0.6266123", "0.6187655", "0.617572", "0.61569357", "0.61119753", "0.6103176", "0.6098366", "0.6093144", "0.6092138", "0.60795254", "0.6074394", "0.6067163", "0.6066379", "0.6056956", "0.6052915", "0.6047907", "0.6042906", "0.6021574", "0.6021149", "0.6012132", "0.5999154", "0.5980665", "0.5977243", "0.5976361", "0.5964129", "0.59560764", "0.594965", "0.59456044", "0.59430116", "0.5942103", "0.59401286", "0.59340805", "0.593032", "0.5928497", "0.59238446", "0.59188724", "0.59177035", "0.5902699", "0.58819777", "0.58806", "0.5876746", "0.5871253", "0.5870557", "0.5860549", "0.5859541", "0.58581394", "0.58577764", "0.58557194", "0.58522105", "0.58517045", "0.5850234", "0.58478504", "0.58469677", "0.5844107", "0.58383113", "0.5835049", "0.58316165", "0.58302826", "0.58009017", "0.5795402", "0.5794567", "0.5793584", "0.57925135", "0.5786992", "0.57856977", "0.57856977", "0.57839555", "0.57813674", "0.57801855", "0.57790726", "0.5773718", "0.57648355", "0.57615435", "0.5761102", "0.5758976", "0.5756651", "0.57547367", "0.575276", "0.57515067", "0.5747792", "0.5747792", "0.5741916", "0.5737791", "0.57370496" ]
0.7605243
1
get request URL need to hit= protocol+baseurl+path+parameter+value
@Test(enabled=true) public void getRequest() { String url = "https://reqres.in/api/users?page=2"; //create an object of response class //Restassured will send get request to the url and store response in response object Response response = RestAssured.get(url); //We have to put assertion in response code and response data Assert.assertEquals(response.getStatusCode(), 200 , "Response code Mismatch"); int total_pages = response.jsonPath().get("total_pages"); Assert.assertEquals(total_pages, 2 , "Total Pages value Mismatch"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getRequestURL();", "String getRequest(String url);", "String getQueryRequestUrl();", "public StringBuffer getRequestURL() {\n return new StringBuffer(url);\n }", "public static String UrlToHit(){\n\t\treturn BaseURL;\n\t}", "@Override\n public StringBuffer getRequestURL() {\n //StringBuffer requestURL = super.getRequestURL();\n //System.out.println(\"URL: \" + requestURL.toString());\n return this.requestURL;\n }", "String getRequestedUrl();", "public String determineURL(HttpServletRequest request)\n {\n String url = \"http://\"+request.getHeader(\"host\")+request.getContextPath()+\"/omserver\";\n return url;\n }", "public String getRequestUrl(){\n return this.requestUrl;\n }", "public abstract RestURL getURL();", "HttpGet getRequest(HttpServletRequest request, String address) throws IOException;", "private static String getBaseUrl() {\n StringBuilder url = new StringBuilder();\n url.append(getProtocol());\n url.append(getHost());\n url.append(getPort());\n url.append(getVersion());\n url.append(getService());\n Log.d(TAG, \"url_base: \" + url.toString());\n return url.toString();\n }", "String url();", "public URL getUrl() {\n try {\n StringBuilder completeUrlBuilder = new StringBuilder();\n completeUrlBuilder.append(getBaseEndpointPath());\n completeUrlBuilder.append(path);\n if (requestType == HttpRequest.NetworkOperationType.GET && parameters != null) {\n boolean first = true;\n for (String key : parameters.keySet()) {\n if (first) {\n first = false;\n completeUrlBuilder.append(\"?\");\n } else {\n completeUrlBuilder.append(\"&\");\n }\n completeUrlBuilder.append(key).append(\"=\").append(parameters.get(key));\n }\n }\n return new URL(completeUrlBuilder.toString());\n } catch (MalformedURLException exception) {\n LocalizableLog.error(exception);\n return null;\n }\n }", "Uri getUrl();", "@Override\n public String getUrl() {\n StringBuilder sb = new StringBuilder(baseUrl);\n if (mUrlParams.size() > 0) {\n sb.append(\"?\");\n for (String key : mUrlParams.keySet()) {\n sb.append(key);\n sb.append(\"=\");\n sb.append(mUrlParams.get(key));\n sb.append(\"&\");\n }\n }\n String result = sb.substring(0, sb.length() - 1);\n return result;\n }", "URL getUrl();", "protected String getBaseUrl(HttpServletRequest request) {\n\t\tString retVal = \"\";\n\t\tif (request != null && request.getRequestURL() != null) {\n\t\t\tStringBuffer url = request.getRequestURL();\n\t\t\tString uri = request.getRequestURI();\n\t\t\t\n\t\t\tretVal = url.substring(0, url.length() - uri.length());\n\t\t}\n\t\t\n\t\treturn retVal;\n\t}", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "String getServerUrl();", "String getRequestUrl() {\n return requestUrl;\n }", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getServiceUrl();", "private String getHref(HttpServletRequest request)\n {\n String respath = request.getRequestURI();\n if (respath == null)\n \trespath = \"\";\n String codebaseParam = getRequestParam(request, CODEBASE, null);\n int idx = respath.lastIndexOf('/');\n if (codebaseParam != null)\n if (respath.indexOf(codebaseParam) != -1)\n idx = respath.indexOf(codebaseParam) + codebaseParam.length() - 1;\n String href = respath.substring(idx + 1); // Exclude /\n href = href + '?' + request.getQueryString();\n return href;\n }", "@Step(\"<url> sayfasına git\")\n public void geturl(String url) {\n Driver.webDriver.get(url + \"/\");\n }", "public static String requestURL(String url) {\n return \"\";\n }", "public abstract String getBaseURL();", "@Override\n\t\tpublic StringBuffer getRequestURL() {\n\t\t\treturn null;\n\t\t}", "public static String getBaseUrl(HttpServletRequest request) {\n\t\tif ((request.getServerPort() == 80) || (request.getServerPort() == 443))\n\t\t{\n\t\t\treturn request.getScheme() + \"://\" + request.getServerName();\t\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\treturn request.getScheme() + \"://\" + request.getServerName() + \":\" + request.getServerPort();\n\t\t}\n\t}", "public static String getRequestUrlAsHttp(HttpServletRequest argRequest) {\r\n\t\tStringBuffer requestURL = argRequest.getRequestURL();\r\n\t\tString queryString = argRequest.getQueryString();\r\n\t\tif (requestURL != null) {\r\n\t\t\tif (queryString != null && !queryString.isEmpty()) {\r\n\t\t\t\trequestURL.append(HttpConstants.QMARK).append(queryString);\r\n\t\t\t}\r\n\t\t\tString result = requestURL.toString();\r\n\t\t\t// result = result.replace(\"https://\", \"http://\");\r\n\t\t\tresult = StringUtils.replace(result, \"https://\", \"http://\");\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "java.net.URL getUrl();", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "public final static String getFullRequestUrl(final HttpServletRequest req) {\n return req.getRequestURL().toString() + (StringUtils.hasText(req.getQueryString()) ? \"?\"+req.getQueryString() : \"\");\n }", "public String getDownloadRequestUrl()\r\n {\r\n String requestUrl;\r\n if ( downloadURI != null )\r\n {\r\n try\r\n {\r\n // dont use whole uri.. only file and query part..!?\r\n requestUrl = URLUtil.getPathQueryFromUri( downloadURI );\r\n return requestUrl;\r\n }\r\n catch (URIException e)\r\n {// failed to use uri.. try other request urls..\r\n NLogger.warn( NLoggerNames.Download_Candidate, e, e );\r\n }\r\n }\r\n \r\n if ( resourceURN != null )\r\n {\r\n requestUrl = URLUtil.buildName2ResourceURL( resourceURN );\r\n }\r\n else\r\n {\r\n // build standard old style gnutella request.\r\n String fileIndexStr = String.valueOf( fileIndex );\r\n StringBuffer urlBuffer = new StringBuffer( 6 + fileIndexStr.length()\r\n + fileName.length() );\r\n urlBuffer.append( \"/get/\" );\r\n urlBuffer.append( fileIndexStr );\r\n urlBuffer.append( '/' ); \r\n urlBuffer.append( URLCodecUtils.encodeURL( fileName ) );\r\n requestUrl = urlBuffer.toString();\r\n }\r\n return requestUrl;\r\n }", "public URI getRequestURI();", "@Test\n\tpublic void testRequest() throws Exception {\n\t\tURI uri=new URIBuilder().setScheme(\"http\")\n\t\t\t\t.setHost(\"www.google.com\")\n\t\t\t\t//.setPort(8080)\n\t\t\t\t.setPath(\"/search\")\n\t\t\t\t.setParameter(\"q\", \"httpclient\")\n\t\t\t\t.setParameter(\"btnG\", \"Google Search\")\n\t\t\t\t.setParameter(\"aq\", \"f\")\n\t\t\t\t.setParameter(\"oq\", \"\")\n\t\t\t\t.build();\n\t\tHttpGet httpGet = new HttpGet(uri);\n\t\tSystem.out.println(httpGet.getURI());\n\t\t\n\t}", "public String getURL()\n {\n return getURL(\"http\");\n }", "protected abstract String getUrl();", "@Override\npublic void get(String url) {\n\t\n}", "String getQueryResultsUrl();", "protected String getBaseUrl() {\n return requestBaseUrl;\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "java.lang.String getApiUrl();", "public String getReqUrl() {\n return reqUrl;\n }", "public static String getRequestUrl(HttpRequest argHttpRequest) {\r\n\t\tif (argHttpRequest != null) {\r\n\t\t\tString originHostName = getHostName(argHttpRequest);\r\n\t\t\tString originRequestUri = argHttpRequest.getRequestLine().getUri();\r\n\t\t\treturn \"https://\" + originHostName + \"/\" + originRequestUri;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private String fill(String url, String requestPath, String... parameters) {\n String filledUrl = url.replaceFirst(\"\\\\{url\\\\}\", requestPath.substring(1,requestPath.length()));\n for (String parameter : parameters) {\n filledUrl = filledUrl.replaceFirst(\"\\\\{[^}]*\\\\}\", parameter);\n }\n\n return filledUrl;\n }", "String getServerBaseURL();", "String getRequest();", "@Test\n public void doRequestURL() throws IOException, NoSuchAlgorithmException, KeyManagementException {\n doRequest(\"https://login.cloud.huawei.com/oauth2/v2/token\");\n\n\n //doRequestWithOutHttps(\"https://124.74.46.118:7012/business/service\");\n //doRequestWithOutHttpsPool(\"https://124.74.46.118:7012/business/service\");\n }", "public abstract String getUrl();", "private String getRequestUrl(String query) {\n\n StringBuilder builder = new StringBuilder();\n float lat, lng;\n\n // check for location, if not found, check for locally saved location\n if (location != null) {\n lat = location.lat;\n lng = location.lng;\n } else {\n lat = SharedPrefs.get(C.sp_last_lat);\n lng = SharedPrefs.get(C.sp_last_long);\n }\n String locationStr;\n // if even that is not found, search near Bangalore\n if (lat == -1 || lng == -1) {\n locationStr = \"near=Bengaluru\";\n } else {\n locationStr = \"ll=\" + lat + \",\" + lng;\n }\n\n builder.append(C.API_SEARCH)\n .append(\"client_id=\").append(C.FS_CLIENT_ID).append(\"&\")\n .append(\"client_secret=\").append(C.FS_CLIENT_SECRET).append(\"&\")\n .append(\"v=20191231&\")\n .append(\"limit=20&\")\n .append(\"intent=checkin&\")\n .append(locationStr);\n\n if (query != null) {\n builder.append(\"&query=\").append(query);\n }\n\n return builder.toString();\n\n }", "private static String getURL(String url) {\r\n\t\t//fixup the url\r\n\t\tURL address;\r\n\t\ttry {\r\n\t\t\taddress = new URL(url);\r\n\t\t}\r\n\t\tcatch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\t\t\r\n\t\t//make the hookup\r\n\t\tHttpURLConnection con;\r\n\t\ttry {\r\n\t\t\tcon = (HttpURLConnection) address.openConnection();\r\n\t\t}\r\n\t\tcatch(IOException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\r\n\t\t// optional default is GET\r\n\t\ttry {\r\n\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t}\r\n\t\tcatch (ProtocolException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\r\n\t\t//this executes the get? - maybe check with wireshark if ever important\r\n//\t\tint responseCode = 0; \r\n//\t\ttry {\r\n//\t\t\tresponseCode = con.getResponseCode();\r\n//\t\t}\r\n//\t\tcatch(IOException e) {\r\n//\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n//\t\t\treturn new String();\r\n//\t\t}\r\n\t\t\r\n\t\t//TODO handle bad response codes\r\n\r\n\t\t//read the response\r\n\t\tStringBuffer response = new StringBuffer();\r\n\t\ttry {\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\tString inputLine = new String();\r\n\t\r\n\t\t\t//grab each line from the response\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tresponse.append(inputLine);\r\n\t\t\t}\r\n\t\t\t//fix dangling\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tcatch(IOException e) {\r\n\t\t\tSystem.out.println(\"====>\" + e.getMessage());\r\n\t\t\treturn new String();\r\n\t\t}\r\n\t\t\r\n\t\t//convert to a string\r\n\t\treturn response.toString();\r\n\t}", "public String doHttpGet(String url, final String ...head);", "public String getBaseUrl()\r\n {\r\n return this.url;\r\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "public HTTPGetUtility(String requestURL) {\n super(requestURL, \"GET\");\n }", "private String buildGetUrl(final String job, final String securityToken) {\n\n final RemoteJenkinsServer remoteServer = this.findRemoteHost(this.getRemoteJenkinsName());\n String urlString = remoteServer.getAddress()\n .toString();\n\n urlString += \"/job/\";\n urlString += this.encodeValue(job);\n\n // don't try to include a security token in the URL if none is provided\n if (!securityToken.equals(\"\")) {\n this.addToQueryString(\"token=\" + encodeValue(securityToken));\n }\n return urlString;\n }", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "@Test\n public void getRequest4() {\n str = METHOD_GET + \"http://foo.com/someservlet.jsp?param1=foo \" + HTTP_VERSION + ENDL +\n ACCEPT + \": text/jsp\" + ENDL +\n CONNECTION_CLOSE;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"foo.com/someservlet.jsp\");\n assertEquals(request.getDomainName(), \"foo.com\");\n assertEquals(request.getHeader(ACCEPT), \"text/jsp\");\n assertEquals(request.getHeader(CONNECTION), CLOSE_STR);\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n\n assertEquals(request.getParameter(\"param1\"), \"foo\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public static String getURL() {\n\t return getURL(BackOfficeGlobals.ENV.NIS_USE_HTTPS, BackOfficeGlobals.ENV.NIS_HOST, BackOfficeGlobals.ENV.NIS_PORT);\n\t}", "public String getUrl() {\n return _Web_search.getBaseUrl() + getQuery();\n }", "private String getUrlPrefix(HttpServletRequest req) {\n StringBuffer url = new StringBuffer();\n String scheme = req.getScheme();\n int port = req.getServerPort();\n url.append(scheme);\t\t// http, https\n url.append(\"://\");\n url.append(req.getServerName());\n if ((scheme.equals(\"http\") && port != 80)\n \t || (scheme.equals(\"https\") && port != 443)) {\n url.append(':');\n url.append(req.getServerPort());\n }\n return url.toString();\n }", "public String getRestUrl(VariableSpace space) {\n StringBuilder url = new StringBuilder();\n\n if (useSSL) {\n url.append(\"https://\");\n } else {\n url.append(\"http://\");\n }\n\n url.append(space.environmentSubstitute(tenant)).append('.');\n url.append(space.environmentSubstitute(namespace)).append('.');\n url.append(space.environmentSubstitute(server));\n\n String realPort = space.environmentSubstitute(port);\n if (StringUtils.isNotEmpty(realPort)) {\n url.append(':').append(realPort);\n }\n\n url.append(\"/rest\");\n\n return url.toString();\n }", "public abstract String getURL();", "private String baseUrl() {\n return \"http://\" + xosServerAddress + \":\" +\n Integer.toString(xosServerPort) + XOSLIB + baseUri;\n }", "public String getURL();", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "@Override\n\tprotected String getHttpBaseUrl() {\n\t\treturn this.properties.getHttpUrlBase();\n\t}", "protected abstract HttpUriRequest getHttpUriRequest();", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "@Test\n public void getRequest2() {\n str = METHOD_GET + \"/wiki/page.html \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": ru.wikipedia.org\" + ENDL +\n USER_AGENT + \": Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n CONNECTION_CLOSE;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/wiki/page.html\");\n assertEquals(request.getHeader(HOST_HEADER), \"ru.wikipedia.org\");\n assertEquals(request.getHeader(USER_AGENT),\n \"Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(CONNECTION), CLOSE_STR);\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "private String getRequest(String requestUrl) throws IOException {\n URL url = new URL(requestUrl);\n \n Log.d(TAG, \"Opening URL \" + url.toString());\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setDoInput(true);\n urlConnection.connect();\n String response = streamToString(urlConnection.getInputStream());\n \n return response;\n }", "@Override\r\n public String getURL() {\n return url;\r\n }", "private static String getRequestPath(final IWebRequest request) {\n\n String requestPath = request.getPathWithinApplication();\n\n final int fragmentIndex = requestPath.indexOf(';');\n if (fragmentIndex != -1) {\n requestPath = requestPath.substring(0, fragmentIndex);\n }\n\n return requestPath;\n\n }", "@Api(1.2)\n @NonNull\n public String url() {\n return mRequest.buildOkRequest().url().toString();\n }", "private static String makeRequest(String page, String host) {\n\t\tString format = \"GET %s HTTP/1.0\\r\\n\"\n\t\t\t\t\t\t+\"host: %s\\r\\n\\r\\n\";\n\t\treturn String.format(format, page, host);\n\t}", "@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}", "public static String getRequestUrl(HttpServletRequest argRequest) {\r\n\t\tStringBuffer requestURL = argRequest.getRequestURL();\r\n\t\tString queryString = argRequest.getQueryString();\r\n\t\tif (requestURL != null) {\r\n\t\t\tif (queryString != null && !queryString.isEmpty()) {\r\n\t\t\t\trequestURL.append(HttpConstants.QMARK).append(queryString);\r\n\t\t\t}\r\n\t\t\treturn requestURL.toString();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private String getUrlBaseForLocalServer() {\n\t HttpServletRequest request = ((ServletRequestAttributes) \n\t\t\t RequestContextHolder.getRequestAttributes()).getRequest();\n\t String base = \"http://\" + request.getServerName() + ( \n\t (request.getServerPort() != 80) \n\t \t\t ? \":\" + request.getServerPort() \n\t\t\t\t : \"\");\n\t return base;\n\t}", "private static String buildUrlString(String base, Map<String, String> params) {\n if (params == null || params.isEmpty()) return API_URL + base;\n //construct get parameters list\n StringBuilder get = new StringBuilder();\n boolean first = true;\n for (String param : params.keySet()) {\n if (!first) get.append('&'); else first = false;\n //add the parameter\n get.append(param);\n String value = params.get(param);\n if (value != null) {\n get.append('=');\n get.append(value);\n }\n }\n //return the full string\n if (get.length() == 0) return API_URL + base;\n return API_URL + base + \"?\" + get.toString();\n }", "@GET\n Call<Post> getByDirectUrlRequest(@Url String url);", "public String getRequestUrlName() {\n return \"Source\"; // TODO: parameter\n }", "public static URL getUrlForReg()\r\n {\r\n String strUrl = getBaseURL() + \"account_services/api/1.0/account\";\r\n return str2url( strUrl );\r\n }", "String getUri( );", "public String formURL(){\n String target = feedURL + \"?s=\" + marketInformation.getTickers().stream().reduce( (a, b) -> a + \",\" + b).get();\n // p0 is just the prices ordered the same as the request\n target += \"&f=p0\";\n return target;\n }", "public void determineBaseUrl() {\n if (Environment.isLatest()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isStage()) {\n baseUrl = \"api-stage.wdpro.starwave.com\";\n } else if (Environment.isENV4()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isENV2()) {\n // baseUrl = \"api-qa.wdpro.disney.go.com:8088\";\n baseUrl = \"api-env2.wdpro.starwave.com\";\n } else if (Environment.isSoftLaunch()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else if (Environment.isShadow()) {\n baseUrl = \"api-shadow.wdpro.starwave.com\";\n } else if (Environment.isProduction()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else {\n baseUrl = \"api.wdpro.disney.go.com\";\n }\n }", "String getSpecUrl();", "public String getUnproxiedFieldDataServerUrl() {\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\tString hostName = prefs.getString(\"serverHostName\", \"\");\n\t\tString context = \"bdrs-core\";//prefs.getString(\"contextName\", \"\");\n\t\tString path = prefs.getString(\"path\", \"\");\n\t\t\n\t\tStringBuilder url = new StringBuilder();\n\t\turl.append(\"http://\").append(hostName).append(\"/\").append(context);\n\t\t\n\t\tif (path.length() > 0) {\n\t\t\turl.append(\"/\").append(path);\n\t\t}\n\t\t\n\t\treturn url.toString();\n\t}" ]
[ "0.78377897", "0.75025827", "0.7057026", "0.6888763", "0.674802", "0.67051667", "0.6599489", "0.6520181", "0.64887744", "0.64695144", "0.63877916", "0.6378268", "0.63051605", "0.62771744", "0.6268815", "0.62395346", "0.61903214", "0.6177156", "0.61717695", "0.61717695", "0.61717695", "0.61717695", "0.61717695", "0.61717695", "0.6164552", "0.6162178", "0.61412233", "0.61412233", "0.61412233", "0.61412233", "0.61412233", "0.61188626", "0.61093736", "0.60710126", "0.6069645", "0.6057014", "0.6055643", "0.6046987", "0.6025341", "0.60215425", "0.60209596", "0.60154426", "0.59919816", "0.597856", "0.5974925", "0.59671885", "0.5966399", "0.59533805", "0.5952969", "0.5944927", "0.5929225", "0.59076375", "0.59029293", "0.5900367", "0.5895381", "0.5892438", "0.5856581", "0.58529747", "0.5839483", "0.58207697", "0.5818646", "0.5815276", "0.5811353", "0.5811313", "0.58095896", "0.58011174", "0.57994187", "0.57994187", "0.57994187", "0.57994187", "0.5787245", "0.5778539", "0.57745373", "0.57698226", "0.57661694", "0.57650393", "0.57630223", "0.5760492", "0.57601464", "0.57470757", "0.5739122", "0.57339513", "0.5732195", "0.57119024", "0.5695671", "0.5694017", "0.5693747", "0.56824374", "0.56776065", "0.56771517", "0.56763667", "0.5669133", "0.5664555", "0.5646057", "0.56443757", "0.5641334", "0.5628708", "0.5619298", "0.56105167", "0.560808", "0.5599729" ]
0.0
-1
TODO Autogenerated method stub
@Override public int add(int x, int y) { return x * y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public String getMessage() { return message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Define a constructor that allows the OpMode to pass a reference to itself.
public RobotHardware (LinearOpMode opmode) { myOpMode = opmode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OpDesc() {\n\n }", "public LiveRef(int paramInt) {\n/* 74 */ this(new ObjID(), paramInt);\n/* */ }", "ROp() {super(null); _ops=new HashMap<>(); }", "public Operation(){\n\t}", "public Operation() {\n /* empty */\n }", "OpFunctionArg createOpFunctionArg();", "public Operation() {\n super();\n }", "OpFunction createOpFunction();", "public OrGate() {\n\t\tsuper(2, 1);\n\t}", "public Operation() {\n\t}", "public ChainOperator(){\n\n }", "public OpStack() {\n opStack = new Stack();\n }", "private OperatorManager() {}", "public LiveRef(ObjID paramObjID, int paramInt) {\n/* 93 */ this(paramObjID, TCPEndpoint.getLocalEndpoint(paramInt), true);\n/* */ }", "public RealConjunctiveFeature() { }", "public BinaryExpression(IExpression left, IExpression right, IOperation op) {\r\n\t\tthis.op = op; // passes the reference op parameter to the associated\r\n\t\t\t\t\t\t// field.\r\n\t\tthis.left = left; // passes the reference of the left parameter to the\r\n\t\t\t\t\t\t\t// associated field.\r\n\t\tthis.right = right; // passes the reference of the right parameter to\r\n\t\t\t\t\t\t\t// the associated field.\r\n\t}", "public ThisKeyword(){\n this(1.0);\n }", "OperationCallExp createOperationCallExp();", "public OpTree(String theOp)\n\t{\n\t\tme = ++total;\n\t\tif (DEBUG) System.out.println(\"Terminal Op \" + me);\n\t\top = theOp;\n\t\tdval = null;\n\t\tleft = null;\n\t\tright = null;\n\t}", "Nop createNop();", "@Override\n public abstract void runOpMode();", "UOp createUOp();", "private ExtendedOperations(){}", "public Action(Operation op, String[] args) {\n this.op = op;\n this.restriction = null;\n this.args = args;\n this.reqd = new boolean[this.args.length];\n this.cmps = new String[this.args.length];\n List<String> opts = analyzeRequiredArgs();\n this.opts = opts.toArray(new String[opts.size()]);\n }", "public static void start(LinearOpMode opMode) {\n }", "public Permission( String objName, String opName )\n {\n this.objName = objName;\n this.opName = opName;\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic Operation createOperation(String opName, String[] params, OperationCallback caller) {\n\t\t\tthrow new RuntimeException(\"Method 'createOperation' in class 'DummyNode' not yet implemented!\");\n\t\t\t//return null;\n\t\t}", "public Refrigerator() {\r\n\t\tthis(1, 0, 0);\r\n\t\t\r\n\t}", "public OperationFactory() {\n initMap();\n }", "public OBOMapper() {\n this(true);\n }", "public Employee()\n\t{\n\t\tthis(\"(2)Invoke Employee's overload constructor\");\n\t\tSystem.out.println(\"(3)Employee's no-arg constructor is invoked\");\n\t}", "protected Container2OperationEvaluator(Container2Operation op) {\r\n this.op = op;\r\n }", "public MecanumDrive(RobotMap opModeRobot){\n // initialize the hardware(pass in the opMode Robot map(instance) to this class in order to use it here)\n this.robot = opModeRobot;\n // This is all you need to do to initialize your hardware now when you have to call a motor just use robot.objectName.method\n }", "public FileOpModel()\n\t{ \n\t\tthis(new ArrayList<>());\n\t}", "private static class <init> extends l\n{\n\n public int noteOp(Context context, String s, int i, String s1)\n {\n return AppOpsManagerCompat23.noteOp(context, s, i, s1);\n }", "OpFunctionArgOperand createOpFunctionArgOperand();", "public Deck()\n {\n this(1);\n }", "public PotionEffect(int paramInt1, int paramInt2)\r\n/* 16: */ {\r\n/* 17: 28 */ this(paramInt1, paramInt2, 0);\r\n/* 18: */ }", "public PotionEffect(int paramInt1, int paramInt2, int paramInt3)\r\n/* 21: */ {\r\n/* 22: 32 */ this(paramInt1, paramInt2, paramInt3, false, true);\r\n/* 23: */ }", "public SNode(object obj)\r\n {\r\n\t\r\n\toop=obj;\r\n }", "public native void constructor();", "Reproducible newInstance();", "public TokenFIFOStack(int operationMode) {\r\n\t\tthis.operationMode = operationMode;\r\n\t\tthis.tokenList = new ArrayList<tToken>();\r\n\t}", "public SetOnceRef() {\n this(null, false, false);\n }", "public PContext() {\r\n\t\tthis(new PDirective(), null, null);\r\n\t}", "OpList createOpList();", "O() { super(null); }", "public Reference() {\n super();\n }", "protected AtomicFunction(int in_arity, int out_arity)\n\t{\n\t\tsuper(in_arity, out_arity);\n\t\tm_context = new HashMap<>();\n\t\tm_inputPins = new AtomicFunctionInputPin[in_arity];\n\t\tfor (int i = 0; i < in_arity; i++)\n\t\t{\n\t\t\tm_inputPins[i] = new AtomicFunctionInputPin(i);\n\t\t}\n\t\tm_outputPins = new AtomicFunctionOutputPin[out_arity];\n\t\tfor (int i = 0; i < out_arity; i++)\n\t\t{\n\t\t\tm_outputPins[i] = new AtomicFunctionOutputPin(i);\n\t\t}\n\t}", "protected IOContext _createContext(Object srcRef, boolean resourceManaged)\n/* */ {\n/* 1513 */ return new IOContext(_getBufferRecycler(), srcRef, resourceManaged);\n/* */ }", "public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }", "public OvalTool(DrawContext context) {\n\t\tsuper(context);\n\t}", "public Context() {\n this.mFunctionSet=new ArrayList();\n this.mTerminalSet=new ArrayList();\n this.mPrimitiveMap=new TreeMap();\n this.mCache=new MyLinkedHashMap(500, .75F, true);\n this.previousBest=Double.MAX_VALUE;\n}", "Operation createOperation();", "Operation createOperation();", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "public AllDifferent()\n {\n this(0);\n }", "@Override\n public SymmetricOpDescription build() {\n return new SymmetricOpDescription(operatorType, dataCodecClass, tasks, redFuncClass);\n }", "LWJGLProgramHandler()\r\n {\r\n //instance = this;\r\n }", "protected GenTreeOperation() {}", "public Operation(OperationType type) {\n this.type = type;\n }", "public Permission( String objName, String opName, String objId )\n {\n this.objName = objName;\n this.opName = opName;\n this.objId = objId;\n }", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public Instruction(OpCode op, int o1, int o2, int o3) {\n\t\tthis.op = op;\n\t\tthis.o1 = o1;\n\t\tthis.o2 = o2;\n\t\tthis.o3 = o3;\n\t}", "public OpTree(String theOp, OpTree l, OpTree r)\n\t{\n\t\tme = ++total;\n\t\tif (DEBUG) System.out.println(\"OpTree with left and right \" + me);\n\t\top = theOp;\n\t\tdval = null;\n\t\tleft = l;\n\t\tright = r;\n\t}", "public MM_DriveTrain(LinearOpMode opMode){\n this.opMode = opMode;\n flMotor = opMode.hardwareMap.get(DcMotor.class, \"flMotor\");\n frMotor = opMode.hardwareMap.get(DcMotor.class, \"frMotor\");\n blMotor = opMode.hardwareMap.get(DcMotor.class, \"blMotor\");\n brMotor = opMode.hardwareMap.get(DcMotor.class, \"brMotor\");\n\n flMotor.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n frMotor.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n blMotor.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n brMotor.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n\n setMotorPowerSame(0);\n\n initializeGyro();\n initHardware();\n }", "public LopAdaptor(Activity context, int resource){\n super(context ,resource);\n this.context=context;\n this.resource=resource;\n }", "public lo() {}", "public Open() {\n //creates a new open instance\n }", "public MavBot(HardwareMap origMap, OpMode tgtOpMode) {\n // get reference to the hardware map for this robot.\n // this reference should be passed as an argument in the constructor.\n hardwareMap = origMap;\n\n // get a reference to the op mode that is calling this constructor.\n currOpMode = tgtOpMode;\n\n // get references to the motors\n motorLeft = hardwareMap.get(DcMotor.class, MOTOR_LEFT_NAME);\n motorRight = hardwareMap.get(DcMotor.class, MOTOR_RIGHT_NAME);\n\n // reverse direction of right motor\n motorRight.setDirection(DcMotorSimple.Direction.REVERSE);\n\n // reset encoders.\n motorLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n // set to our default motor mode.\n motorRight.setMode(DEFAULT_MOTOR_MODE);\n motorLeft.setMode(DEFAULT_MOTOR_MODE);\n\n // set default drive mode.\n currDriveMode = MavBotDriveMode.DRIVE_MODE_TANK;\n }", "public Complex(){\r\n\t this(0,0);\r\n\t}", "public Memory() {\n this(false);\n }", "public EnbOper() {\n super(Epc.NAMESPACE, \"enb-oper\");\n }", "public ComplementOp() {\r\n\t\tsuper();\r\n\t}", "public JTensor() {\n this(TH.THTensor_(new)());\n }", "private Action(){\r\n\t\tthis(-1);\r\n\t}", "defaultConstructor(){}", "public void setOp(Operator op) {\n this.op = op;\n }", "public Camera() {\r\n this(1, 1);\r\n }", "IOperationable create(String operationType);", "public TeleoperatedMode(String name) {\n super(name, 9);\n }", "public Operation(int maxLocals, String name) {\n \t\tthis.maxLocals = maxLocals;\n \t\tthis.name = name;\n \t}", "public JFileChooserOperator() {\n this(getEnvironmentOperator());\n }", "protected SNUnOp(SyntaxNode operand,\n OperatorUnFactory opFactory, SyntaxNodeConstructorUn snFactory,\n String name) {\n operand_ = operand;\n opFactory_ = opFactory;\n snFactory_ = snFactory;\n snName_ = name;\n }", "public CacheFIFO()\r\n/* 16: */ {\r\n/* 17: 95 */ this(20);\r\n/* 18: */ }", "public Operation(OperationType code) {\n\t\tthis.code = code;\n\t\tthis.timestamp = System.currentTimeMillis();\n\t}", "public OscillatorCalculator() {\n this(1);\n }", "public BaseExpression(Expression e) {\r\n this.e1 = e;\r\n }", "public Node(){\n this(9);\n }", "public Module() {\n\t\tthis(new Function[0]);\n\t}", "ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}", "private cudaComputeMode()\r\n {\r\n }", "public OreAPI() {\n\t\tthis(DEFAULT_URL, null);\n\t}", "Operator operator();", "private OperatorToken(final CharSequence symbol, final Precedence precedence, final Associativity associativity,\n final Multiplicity multiplicity, final Function<BigDecimal[], BigDecimal> operation) {\n super(symbol, multiplicity, operation);\n this.precedence = precedence;\n this.associativity = associativity;\n }", "public Context() {\n }", "public Expression(Expression exp1, Operator op, Expression exp2) {\r\n\t\t// Remember, this is in postfix notation.\r\n\t\telements.addAll(exp1.elements);\r\n\t\telements.addAll(exp2.elements);\r\n\t\telements.add(op);\r\n\t}", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "public Light() {\n\t\tthis(false);\n\t}", "public LiveRef(int paramInt, RMIClientSocketFactory paramRMIClientSocketFactory, RMIServerSocketFactory paramRMIServerSocketFactory) {\n/* 85 */ this(new ObjID(), paramInt, paramRMIClientSocketFactory, paramRMIServerSocketFactory);\n/* */ }" ]
[ "0.60392046", "0.5963661", "0.59507173", "0.57952684", "0.5751693", "0.5734564", "0.57342094", "0.57095", "0.56813055", "0.5670028", "0.5640019", "0.56193143", "0.56121135", "0.55933493", "0.55817693", "0.55623746", "0.55275315", "0.5485168", "0.5402578", "0.5387105", "0.53859234", "0.5358113", "0.5329511", "0.52895725", "0.5265088", "0.525479", "0.52404004", "0.52334005", "0.5227205", "0.5219088", "0.52174824", "0.52163076", "0.5205667", "0.5204466", "0.51998013", "0.5192188", "0.5185154", "0.5184853", "0.5182275", "0.5171857", "0.5157997", "0.51538265", "0.5151734", "0.5148975", "0.5144866", "0.51433635", "0.51394004", "0.5133802", "0.5130609", "0.5127096", "0.51232016", "0.5121875", "0.5119959", "0.51188207", "0.51188207", "0.51143706", "0.5108339", "0.5104765", "0.50977725", "0.5094618", "0.509321", "0.5090108", "0.50859326", "0.5079216", "0.50791967", "0.50739014", "0.50713277", "0.5070571", "0.5068494", "0.5068248", "0.50625724", "0.504859", "0.5035636", "0.5028068", "0.5007234", "0.5003408", "0.50015247", "0.4995009", "0.49931505", "0.49840483", "0.49802044", "0.49796495", "0.49752086", "0.49728674", "0.49722284", "0.49689403", "0.49651673", "0.49651575", "0.49648046", "0.49641117", "0.495907", "0.49548918", "0.4947694", "0.4945581", "0.49395108", "0.49382213", "0.49366593", "0.49329367", "0.49285713", "0.4925122" ]
0.60263056
1
Initialize all the robot's hardware. This method must be called ONCE when the OpMode is initialized. All of the hardware devices are accessed via the hardware map, and initialized.
public void init() { // Define and Initialize Motors (note: need to use reference to actual OpMode). leftDrive = myOpMode.hardwareMap.get(DcMotor.class, "left_drive"); rightDrive = myOpMode.hardwareMap.get(DcMotor.class, "right_drive"); armMotor = myOpMode.hardwareMap.get(DcMotor.class, "arm"); // To drive forward, most robots need the motor on one side to be reversed, because the axles point in opposite directions. // Pushing the left stick forward MUST make robot go forward. So adjust these two lines based on your first test drive. // Note: The settings here assume direct drive on left and right wheels. Gear Reduction or 90 Deg drives may require direction flips leftDrive.setDirection(DcMotor.Direction.REVERSE); rightDrive.setDirection(DcMotor.Direction.FORWARD); // If there are encoders connected, switch to RUN_USING_ENCODER mode for greater accuracy // leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); // rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); // Define and initialize ALL installed servos. leftHand = myOpMode.hardwareMap.get(Servo.class, "left_hand"); rightHand = myOpMode.hardwareMap.get(Servo.class, "right_hand"); leftHand.setPosition(MID_SERVO); rightHand.setPosition(MID_SERVO); myOpMode.telemetry.addData(">", "Hardware Initialized"); myOpMode.telemetry.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n robot.FL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.FL.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n robot.leftDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n // Possibly add a delay\n robot.leftDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "@Override\n public void init() {\n\n robot.init(hardwareMap);\n\n // Tell the driver that initialization is complete.\n\n telemetry.addData(\"Robot Mode:\", \"Initialized\");\n telemetry.update();\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n elev = hardwareMap.get(DcMotor.class, \"elev\");\n arm = hardwareMap.get(DcMotor.class,\"arm\");\n hook = hardwareMap.get(Servo.class,\"hook\");\n claw = hardwareMap.get(Servo.class,\"claw\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftDrive.setDirection(DcMotor.Direction.FORWARD);\n rightDrive.setDirection(DcMotor.Direction.REVERSE);\n elev.setDirection(DcMotor.Direction.REVERSE);\n arm.setDirection(DcMotor.Direction.REVERSE);\n elev.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n arm.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n lowerLimit = hardwareMap.digitalChannel.get(\"lower_limit\");\n upperLimit = hardwareMap.digitalChannel.get(\"upper_limit\");\n lowerLimit.setMode(DigitalChannel.Mode.INPUT);\n upperLimit.setMode(DigitalChannel.Mode.INPUT);\n\n// rightElev.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); // Encoder on Left Elev only\n\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n }", "private void initHardware(){\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n //ColorSensor colorSensor;\n //colorSensor = hardwareMap.get(ColorSensor.class, \"Sensor_Color\");\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public void init() {\n robot.init(hardwareMap);\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.liftUpDown.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.blinkinLedDriver.setPattern(RevBlinkinLedDriver.BlinkinPattern.GREEN);\n\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n // robot.leftBumper.setPosition(.5);\n // robot.leftStageTwo.setPosition(1);\n // robot.rightStageTwo.setPosition(0.1);\n robot.colorDrop.setPosition(0.45);\n robot.align.setPosition(0.95);\n\n // robot.rightBumper.setPosition(.7);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }", "@Override\n public void init() {\n robot.init(hardwareMap, telemetry, false);\n //robot.resetServo();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"Status\", \"Initialized\");\n // robot.FL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.FR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "public void initializeHardware(HardwareMap hwMap) {\n\n // Save reference to Hardware map\n this.hwMap = hwMap;\n period.reset();\n\n // Define Motors\n frontLeftMotor = hwMap.dcMotor.get(\"front_left\");\n frontRightMotor = hwMap.dcMotor.get(\"front_right\");\n backLeftMotor = hwMap.dcMotor.get(\"back_left\");\n backRightMotor = hwMap.dcMotor.get(\"back_right\");\n clawServo = hwMap.servo.get(\"claw\");\n armServo = hwMap.servo.get(\"arm\");\n barrierServo = hwMap.servo.get(\"barrier_servo\");\n intake = hwMap.dcMotor.get(\"intake\");\n shooter = hwMap.dcMotor.get(\"shooter\");\n\n\n // Initialize Motors\n\n // ******MAY CHANGE ******* Fix Forward/Reverse under testing\n frontLeftMotor.setDirection(DcMotor.Direction.REVERSE);\n frontRightMotor.setDirection(DcMotor.Direction.FORWARD);\n backLeftMotor.setDirection(DcMotor.Direction.REVERSE);\n backRightMotor.setDirection(DcMotor.Direction.FORWARD);\n intake.setDirection(DcMotor.Direction.REVERSE);\n shooter.setDirection(DcMotor.Direction.REVERSE);\n\n\n if(encoder) {\n // May use RUN_USING_ENCODERS if encoders are installed\n frontLeftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //shooter.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n frontLeftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n //shooter.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n }\n else{\n frontLeftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n //shooter.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n\n\n frontLeftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n frontRightMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backLeftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backRightMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //intake.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n //shooter.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n frontLeftMotor.setPower(0);\n frontRightMotor.setPower(0);\n backLeftMotor.setPower(0);\n backRightMotor.setPower(0);\n\n //intake.setPower(0);\n //shooter.setPower(0);\n\n\n\n //Define Sensors\n\n imu = hwMap.get(BNO055IMU.class, \"imu\");\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n\n parameters.mode = BNO055IMU.SensorMode.IMU; //inertial measurement unit\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES; //angle unit to degrees\n parameters.loggingEnabled = false; //will log values if true\n imu.initialize(parameters); //initializing using above parameters\n\n //Define Servos\n }", "@Override\n public void robotInit() {\n\t\t// set up logging\n\t\tlogger = EventLogging.getLogger(Robot.class, Level.INFO);\n\n // set up hardware\n RobotMap.init();\n\n // set up subsystems\n //initalized drive subsystem, which control motors to move robot\n driveSubsystem = new DriveSubsystem();\n\t\tbuttonSubstyem = new ButtonSubsystem();\n servoSubsystem = new ServoSubsystem();\n wingSubsystem = new WingSubsystem();\n flagSpinnerSubsystem = new FlagSpinnerSubsystem();\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // Add commands to Autonomous Sendable Chooser\n chooser.addDefault(\"Autonomous Command\", new AutonomousCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n }", "public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }", "@Override\n public void init() {\n // Get references to dc motors and set initial mode and direction\n // It appears all encoders are reset upon robot startup, but just in case, set all motor\n // modes to Stop-And-Reset-Encoders during initialization.\n motorLeftA = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_A);\n motorLeftA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftA.setDirection(DcMotor.Direction.FORWARD);\n\n motorLeftB = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_B);\n motorLeftB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftB.setDirection(DcMotor.Direction.FORWARD);\n\n motorRightA = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_A);\n motorRightA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightA.setDirection(DcMotor.Direction.REVERSE);\n\n motorRightB = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_B);\n motorRightB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightB.setDirection(DcMotor.Direction.REVERSE);\n\n //motorGlyphLift = hardwareMap.dcMotor.get(GLYPH_LIFT);\n //motorGlyphLift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //motorGlyphLift.setDirection(DcMotor.Direction.FORWARD);\n\n sGlyphL = hardwareMap.servo.get(GLYPH_LEFT);\n //sGlyphL.scaleRange(0,180);\n\n sGlyphR = hardwareMap.servo.get(GLYPH_RIGHT);\n sGem = hardwareMap.servo.get(Gem);\n\n //Initialize vex motor\n sGLift = hardwareMap.crservo.get(Servo_GlyphLift);\n\n //sGLift.setPower(0);\n\n //sGLift2 = hardwareMap.servo.get(Servo_GlyphLift);\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n imu = hardwareMap.get(BNO055IMU.class,\"imu\");\n imu.initialize(parameters);\n\n //servoGlyph1.setPosition(180);\n //servoGlyph2.setPosition(180);\n\n bDirection = true;\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n// frontLeft = hwMap.get(DcMotor.class, \"frontLeft\");\n// frontRight = hwMap.get(DcMotor.class, \"frontRight\");\n// backLeft = hwMap.get(DcMotor.class, \"backLeft\");\n// lift = hwMap.get(DcMotor.class, \"lift\");\n// backRight = hwMap.get(DcMotor.class, \"backRight\");\n\n leftIntake = hwMap.get(DcMotor.class, \"leftIntake\");\n rightIntake = hwMap.get(DcMotor.class, \"rightIntake\");\n dropper = hwMap.get(DcMotor.class, \"dropper\");\n\n\n //range = hwMap.get(ModernRoboticsI2cRangeSensor.class, \"range\");\n gyro = (ModernRoboticsI2cGyro)hwMap.gyroSensor.get(\"gyro\");\n //color = hwMap.get(ModernRoboticsI2cColorSensor.class, \"color\");\n\n frontLeft.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n frontRight.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n backLeft.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n backRight.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n\n // Set all motors to zero power\n frontLeft.setPower(0);\n frontRight.setPower(0);\n backLeft.setPower(0);\n backRight.setPower(0);\n leftIntake.setPower(0);\n rightIntake.setPower(0);\n dropper.setPower(0);\n\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n frontLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frontRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftIntake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightIntake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n dropper.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n // Define and initialize ALL installed servos.\n\n// claimingArm = hwMap.get(Servo.class, \"claimingArm\");\n// claw1 = hwMap.get(Servo.class, \"claw1\");\n// claw2 = hwMap.get(Servo.class, \"claw2\");\n// samplingArm = hwMap.get(Servo.class, \"samplingArm\");\n\n helper = hwMap.get(Servo.class, \"helper\");\n leftUp = hwMap.get(Servo.class, \"leftUp\");\n rightUp = hwMap.get(Servo.class, \"rightUp\");\n outLeft = hwMap.get(Servo.class, \"outLeft\");\n outRight = hwMap.get(Servo.class, \"outRight\");\n\n// claimingArm.setPosition(0); // find out what servo they are using\n// claw1.setPosition(0);\n// claw2.setPosition(0);\n// samplingArm.setPosition(0);\n\n helper.setPosition(MID_SERVO);\n leftUp.setPosition(MID_SERVO);\n rightUp.setPosition(MID_SERVO);\n outLeft.setPosition(0.5);\n outRight.setPosition(0.5);\n\n dim = hwMap.get(DeviceInterfaceModule.class, \"Device Interface Module 1\");\n\n }", "public void init (HardwareMap ahwMap) {\n\n hwMap = ahwMap;\n\n // Initialize the hardware variables.\n lDrive = hwMap.get(DcMotor.class, \"lDrive\");\n rDrive = hwMap.get(DcMotor.class, \"rDrive\");\n\n //Setting direction of motor's rotation\n lDrive.setDirection(DcMotor.Direction.REVERSE);\n rDrive.setDirection(DcMotor.Direction.FORWARD);\n\n //setting motors to use Encoders\n setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n setZeroMode(DcMotor.ZeroPowerBehavior.BRAKE);\n //setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); // Temporary until encoders fixed\n\n //Setting motors with zero power when initializing\n setMotorPower(0.0, 0.0);\n }", "@Override\n public void init() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n\n //the below lines set up the configuration file\n BallSensor = hardwareMap.i2cDevice.get(\"BallSensor\");\n\n BallSensorreader = new I2cDeviceSynchImpl(BallSensor, I2cAddr.create8bit(0x3a), false);\n\n BallSensorreader.engage();\n\n sensorGyro = hardwareMap.gyroSensor.get(\"gyro\"); //Point to the gyro in the configuration file\n mrGyro = (ModernRoboticsI2cGyro)sensorGyro; //ModernRoboticsI2cGyro allows us to .getIntegratedZValue()\n mrGyro.calibrate(); //Calibrate the sensor so it knows where 0 is and what still is. DO NOT MOVE SENSOR WHILE BLUE LIGHT IS SOLID\n\n //touch = hardwareMap.touchSensor.get(\"touch\");\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n telemetry.update();\n\n }", "public void robotInit() {\n // Initialize all subsystems\n CommandBase.init();\n \n SmartDashboard.putNumber(RobotMap.Autonomous.MODE_KEY, 0);\n \n //temperary method to test door closing speeds\n SmartDashboard.putNumber(RobotMap.Force.DOOR_FORCE_KEY, 50);\n }", "public void init (HardwareMap ahwMap) {\n\n hwMap = ahwMap;\n\n // Initialize the hardware variables.\n leftFront = hwMap.get(DcMotor.class, \"left-front\");\n leftRear = hwMap.get(DcMotor.class, \"left-rear\");\n rightFront = hwMap.get(DcMotor.class, \"right-front\");\n rightRear = hwMap.get(DcMotor.class, \"right-rear\");\n\n //Setting direction of motor's rotation\n leftFront.setDirection(DcMotor.Direction.REVERSE);\n leftRear.setDirection(DcMotor.Direction.REVERSE);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n rightRear.setDirection(DcMotor.Direction.FORWARD);\n\n //setting motors to use Encoders\n setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); // Temporary until encoders fixed\n\n //Setting motors with zero power when initializing\n setPower(0.0, 0.0);\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n// leftRearMotor = hwMap.dcMotor.get(\"left_rear_drive\");\n// rightRearMotor = hwMap.dcMotor.get(\"right_rear_drive\");\n leftFrontMotor = hwMap.dcMotor.get(\"left_front_drive\");\n rightFrontMotor = hwMap.dcMotor.get(\"right_front_drive\");\n// liftMotor = hwMap.dcMotor.get(\"lift_motor\");\n brushMotor = hwMap.dcMotor.get(\"brush_motor\");\n leftSpinMotor = hwMap.dcMotor.get(\"left_spin_motor\");\n rightSpinMotor = hwMap.dcMotor.get(\"right_spin_motor\");\n tiltMotor = hwMap.dcMotor.get(\"tilt_motor\");\n\n// rangeSensor = hwMap.get(ModernRoboticsI2cRangeSensor.class, \"range sensor\");\n\n //define and initialize servos\n// loadServo = hwMap.servo.get(\"load_servo\");\n// loadServo.setPosition(BEGIN_SERVO);\n pushServo = hwMap.servo.get(\"push_servo\");\n pushServo.setPosition(MID_SERVO);\n leftLiftServo = hwMap.servo.get(\"left_lift_servo\");\n leftLiftServo.setPosition(MID_SERVO);\n rightLiftServo = hwMap.servo.get(\"right_lift_servo\");\n rightLiftServo.setPosition(MID_SERVO);\n\n //define and initialize buttons\n// bottomTouchButton = hwMap.touchSensor.get(\"bottom_touch_button\");\n// topTouchButton = hwMap.touchSensor.get(\"top_touch_button\");\n\n leftSpinMotor.setDirection(DcMotor.Direction.REVERSE);\n leftFrontMotor.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n rightFrontMotor.setDirection(DcMotor.Direction.FORWARD); // Set to FORWARD if using AndyMark motors\n\n // Set all motors to zero power\n// leftRearMotor.setPower(0);\n// rightRearMotor.setPower(0);\n leftFrontMotor.setPower(0);\n rightFrontMotor.setPower(0);\n// liftMotor.setPower(0);\n brushMotor.setPower(0);\n leftSpinMotor.setPower(0);\n rightSpinMotor.setPower(0);\n tiltMotor.setPower(0);\n\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n// leftRearMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// rightRearMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftFrontMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightFrontMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// liftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n brushMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftSpinMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// rightSpinMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n tiltMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "protected void initialize() {\n\t\tLiquidCrystal lcd = RobotMap.lcd;\n\t\tlcd.clear();\n\n\t\tRobotMap.chassisfrontLeft.set(0);\n\t\tRobotMap.chassisfrontRight.set(0);\n\t\tRobotMap.chassisrearRight.set(0);\n\t\tRobotMap.climberclimbMotor.set(0);\n\t\tRobotMap.floorfloorLift.set(0);\n\t\tRobotMap.acquisitionacquisitionMotor.set(0);\n\n\t\t\n\t\t}", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "public void robotInit() {\n\t\toi = OI.getInstance();\r\n\t\t\r\n\t\t// instantiate the command used for the autonomous and teleop period\r\n\t\treadings = new D_SensorReadings();\r\n\t\t// Start pushing values to the SD.\r\n\t\treadings.start();\r\n\t\t//Gets the single instances of driver and operator, from OI. \r\n\t\tdriver = oi.getDriver();\r\n\t\toperator = oi.getOperator();\r\n\r\n\t\t//Sets our default auto to NoAuto, if the remainder of our code doesn't seem to work. \r\n\t\tauto = new G_NoAuto();\r\n\t\t\r\n\t\t//Sets our teleop commandGroup to T_TeleopGroup, which contains Kaj,ELevator, Intake, and Crossbow Commands. \r\n\t\tteleop = new T_TeleopGroup();\r\n\t\t\r\n\t}", "public void robotInit() {\n RobotMap.init();\n driveTrain = new DriveTrain();\n oi = new OI();\n flippy = new Flipper();\n flappy = new Flapper();\n autonomousCommand = new AutoFlip();\n \n OI.init();\n CommandBase.init();\n autoChooser = new SendableChooser();\n autoChooser.addDefault(\"Flap Left\", new AutoFlip());\n SmartDashboard.putData(\"Autonomous_Mode\", autoChooser); \n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n try {\n leftMotor1 = hwMap.dcMotor.get(\"right_motor1\");\n leftMotor2 = hwMap.dcMotor.get(\"right_motor2\");\n rightMotor1 = hwMap.dcMotor.get(\"left_motor1\");\n rightMotor2 = hwMap.dcMotor.get(\"left_motor2\");\n //servo_one = hwMap.servo.get(\"servant\");\n leftMotor1.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n leftMotor2.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n rightMotor1.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n rightMotor2.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n\n // Set all motors to zero power\n leftMotor1.setPower(0);\n rightMotor1.setPower(0);\n leftMotor2.setPower(0);\n rightMotor2.setPower(0);\n\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n leftMotor1.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightMotor1.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n leftMotor2.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightMotor2.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Enable NavX Sensor\n\n navx_device = AHRS.getInstance(hwMap.deviceInterfaceModule.get(\"DIM1\"),\n NAVX_DIM_I2C_PORT,\n AHRS.DeviceDataType.kProcessedData,\n NAVX_DEVICE_UPDATE_RATE_HZ);\n } catch (Exception e) {\n\n RobotLog.ee(MESSAGETAG,e.getMessage());\n\n }\n }", "@Override\n public void init() {\n touchSensor1 = hardwareMap.touchSensor.get(\"touchSensor1\");\n lightSensor1 = hardwareMap.lightSensor.get(\"lightSensor1\");\n motorLeft1 = hardwareMap.dcMotor.get(\"motorLeft1\");\n motorLeft2 = hardwareMap.dcMotor.get(\"motorLeft2\");\n motorRight1 = hardwareMap.dcMotor.get(\"motorRight1\");\n motorRight2 = hardwareMap.dcMotor.get(\"motorRight2\");\n\n //Setup Hardware\n motorLeft1.setDirection(DcMotor.Direction.REVERSE);\n motorLeft2.setDirection(DcMotor.Direction.REVERSE);\n\n // Set up the parameters with which we will use our IMU. Note that integration\n // algorithm here just reports accelerations to the logcat log; it doesn't actually\n // provide positional information.\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"AdafruitIMUCalibration.json\"; // see the calibration sample opmode\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n // parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n\n // Retrieve and initialize the IMU. We expect the IMU to be attached to an I2C port\n // on a Core Device Interface Module, configured to be a sensor of type \"AdaFruit IMU\",\n // and named \"imu\".\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n currentState = MotorState.WAIT_TO_START;\n nextState = MotorState.WAIT_TO_START;\n count = 0;\n composeTelemetry();\n }", "public void robotInit() {\n RobotMap.init();\n initDashboardInput();\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrain = new DriveTrain();\n power = new Power();\n arm = new Arm();\n sensors = new Sensors();\n ballGrabberSubsystem = new BallGrabberSubsystem();\n winch = new Winch();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // instantiate the command used for the autonomous period\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n arcadeDrive = new ArcadeDrive();\n\n readPreferences();\n }", "public void init(HardwareMap ahwMap) {\n try {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n motor1 = hwMap.dcMotor.get(\"motor1\");\n motor2 = hwMap.dcMotor.get(\"motor2\");\n motor3 = hwMap.dcMotor.get(\"motor3\");\n motor4 = hwMap.dcMotor.get(\"motor4\");\n\n pMotor1 = hwMap.dcMotor.get(\"pMotor1\");\n pMotor2 = hwMap.dcMotor.get(\"pMotor2\");\n beMotor = hwMap.dcMotor.get(\"beMotor\");\n fkMotor = hwMap.dcMotor.get(\"fkMotor\");\n\n\n // Set to FORWARD\n motor1.setDirection(DcMotor.Direction.FORWARD);\n motor2.setDirection(DcMotor.Direction.FORWARD);\n motor3.setDirection(DcMotor.Direction.FORWARD);\n motor4.setDirection(DcMotor.Direction.FORWARD);\n\n pMotor1.setDirection(DcMotor.Direction.FORWARD);\n pMotor2.setDirection(DcMotor.Direction.FORWARD);\n beMotor.setDirection(DcMotor.Direction.FORWARD);\n fkMotor.setDirection(DcMotor.Direction.FORWARD);\n\n\n // Set all motors to zero power\n motor1.setPower(0);\n motor2.setPower(0);\n motor3.setPower(0);\n motor4.setPower(0);\n\n pMotor1.setPower(0);\n pMotor2.setPower(0);\n beMotor.setPower(0);\n fkMotor.setPower(0);\n\n\n // Set all motors to run without encoders.\n // only use RUN_USING_ENCODERS in autonomous\n motor1.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motor2.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motor3.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motor4.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n pMotor1.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n pMotor2.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n beMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n fkMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n/*\n gyro = (ModernRoboticsI2cGyro) hardwareMap.gyroSensor.get(\"gyro\");\n colorSensor = hardwareMap.colorSensor.get(\"color\");\n rangeSensor = hardwareMap.get(ModernRoboticsI2cRangeSensor.class, \"range\");\n ods = hardwareMap.opticalDistanceSensor.get(\"ods\");\n ods2 = hardwareMap.opticalDistanceSensor.get(\"ods2\");\n*/\n // Define and initialize ALL installed servos.\n //servo1 = hwMap.servo.get(\"servo1\");\n\n runtime.reset();\n\n } catch (Exception e) {\n telemetry.addData(\"runOpMode ERROR\", e.toString());\n telemetry.update();\n }\n\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n frontLeft = hwMap.get(DcMotor.class, \"front_left\");\n frontRight = hwMap.get(DcMotor.class, \"front_right\");\n backLeft = hwMap.get(DcMotor.class, \"back_left\");\n backRight = hwMap.get(DcMotor.class, \"back_right\");\n flipper = hwMap.get(DcMotor.class, \"flipper\");\n intake = hwMap.get(CRServo.class, \"intake\");\n reelIn = hwMap.get(DcMotor.class, \"reelIn\");\n reelOut = hwMap.get(DcMotor.class, \"reelOut\");\n bucket = hwMap.get(Servo.class, \"bucket\");\n frontLeft.setDirection(DcMotor.Direction.FORWARD);\n frontRight.setDirection(DcMotor.Direction.REVERSE);\n backLeft.setDirection(DcMotor.Direction.REVERSE);\n backRight.setDirection(DcMotor.Direction.FORWARD);\n \n // Set all motors to zero power\n frontLeft.setPower(0);\n frontRight.setPower(0);\n backLeft.setPower(0);\n backRight.setPower(0);\n reelIn.setPower(0);\n reelOut.setPower(0);\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n frontLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n frontRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n flipper.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n}", "public void initialize() {\n leftfrontmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n leftrearmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n rightfrontmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n rightrearmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n\n leftfrontmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n leftrearmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n rightfrontmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n rightrearmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n \n\n // More Motor Tunes (to occur during each initialization period):\n leftfrontmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n leftrearmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n rightfrontmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n rightrearmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n\n turnController.setSetpoint(Constants.DriveBase.Controllers.zero);\n turnController.setTolerance(Constants.DriveBase.Controllers.turntollerance);\n\n driveController.setSetpoint(Constants.DriveBase.Controllers.zero);\n driveController.setTolerance(Constants.DriveBase.Controllers.drivetollerance);\n\n ballTurnController.setSetpoint(Constants.DriveBase.Controllers.zero);\n ballTurnController.setTolerance(Constants.DriveBase.Controllers.balltollerance);\n\n ballDriveController.setSetpoint(Constants.DriveBase.Controllers.balldrive);\n ballDriveController.setTolerance(Constants.DriveBase.Controllers.balldrivetollerance);\n \n reset();\n }", "@Override\r\n public void init() {\r\n // Define and Initialize Motors\r\nFL = hardwareMap.get(DcMotor.class, \"Front Left\");\r\n FR = hardwareMap.get(DcMotor.class, \"Front Right\");\r\n BL = hardwareMap.get(DcMotor.class, \"Back Left\");\r\n BR = hardwareMap.get(DcMotor.class, \"Back Right\");\r\n\r\n\r\nFL.setDirection(DcMotor.Direction.FORWARD);\r\n FR.setDirection(DcMotor.Direction.REVERSE);\r\n BL.setDirection(DcMotor.Direction.FORWARD);\r\n BR.setDirection(DcMotor.Direction.REVERSE);\r\n // Set all motors to zero power\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); }", "protected void initialize() {\n\t\tRobot.motor.getPIDController().setPID(SmartDashboard.getDouble(\"MotorP\"), SmartDashboard.getDouble(\"MotorI\"), SmartDashboard.getDouble(\"MotorD\"));\n\t\tRobot.motor.setOutputRange(0, 1);\n\t\tRobot.motor.setSetpoint(SmartDashboard.getDouble(\"MotorSpeed\"));\n \tRobot.motor.enable();\n }", "public void robotInit() {\n \tboardSubsystem = new BoardSubsystem();\n }", "@Override\n public void init() {\n telemetry.addData(\">\", \"Initializing...\");\n telemetry.update();\n\n // Sensors\n gyro = new Gyro(hardwareMap, \"gyro\");\n if (!gyro.isAvailable()) {\n telemetry.log().add(\"ERROR: Unable to initalize gyro\");\n }\n\n // Drive motors\n tank = new WheelMotorConfigs().init(hardwareMap, telemetry);\n tank.stop();\n\n // Vuforia\n vuforia = new VuforiaFTC(VuforiaConfigs.AssetName, VuforiaConfigs.TargetCount,\n VuforiaConfigs.Field(), VuforiaConfigs.Bot());\n vuforia.init();\n\n // Wait for the game to begin\n telemetry.addData(\">\", \"Ready for game start\");\n telemetry.update();\n }", "public void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }", "@Override public void init() {\n drive = MecanumDrive.standard(hardwareMap); // Comment this line if you, for some reason, don't need to use the drive motors\n\n // Uncomment the next three lines if you need to use the gyroscope\n // gyro = IMUGyro.standard(hardwareMap);\n // gyro.initialize();\n // gyro.calibrate();\n\n // Uncomment the next two lines if you need to use the vision system\n // vision = new Vision(hardwareMap);\n // vision.init();\n\n // Uncomment the next line if you have a servo\n // myServo = hardwareMap.get(Servo.class, \"myServo\");\n\n /** Place any code that should run when INIT is pressed here. **/\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n leftDrive = hwMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hwMap.get(DcMotor.class, \"right_drive\");\n liftDrive = hwMap.get(DcMotor.class, \"lift_drive\");\n\n markerServo = hwMap.get(Servo.class, \"marker_servo\");\n hookServo = hwMap.get(Servo.class, \"hook_servo\"); //Hook server motor\n// distanceSensor = hardwareMap.get(DistanceSensor.class, \"sensor_color_distance\");\n touchSensor = hardwareMap.get(TouchSensor.class, \"touch_sensor\");\n\n leftDrive.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n rightDrive.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n liftDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // Set all motors to zero power\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n liftDrive.setPower(0);\n\n\n\n }", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n// imu = hwMap.get(BNO055IMU.class, \"imu\");\n\n leftFront = hwMap.get(DcMotor.class, \"left_front\");//hub2 - port 0\n rightFront = hwMap.get(DcMotor.class, \"right_front\");//hub2 - port 1\n leftBack = hwMap.get(DcMotor.class, \"left_back\");//hub2 - port 2\n rightBack = hwMap.get(DcMotor.class, \"right_back\");//hub2 - port 3\n\n leftFront.setDirection(DcMotor.Direction.FORWARD);\n leftBack.setDirection(DcMotor.Direction.FORWARD);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n rightBack.setDirection(DcMotor.Direction.FORWARD);\n\n leftFront.setPower(0);\n leftBack.setPower(0);\n rightFront.setPower(0);\n rightBack.setPower(0);\n\n\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n }", "public void init(HardwareMap ahwMap) {\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n frontLeft = hwMap.dcMotor.get(\"lf\");\n frontRight = hwMap.dcMotor.get(\"rf\");\n backLeft = hwMap.dcMotor.get(\"lb\");\n backRight = hwMap.dcMotor.get(\"rb\");\n leftShooter = hwMap.dcMotor.get(\"ls\");\n rightShooter = hwMap.dcMotor.get(\"rs\");\n ballCollect = hwMap.dcMotor.get(\"bc\");\n shotControl = hwMap.servo.get(\"sc\");\n vortexSpinner = hwMap.dcMotor.get(\"vtx\");\n leftShooter.setDirection(DcMotor.Direction.REVERSE);\n frontRight.setDirection(DcMotor.Direction.REVERSE);\n backRight.setDirection(DcMotor.Direction.REVERSE);\n frontLeft.setDirection(DcMotor.Direction.FORWARD);\n backLeft.setDirection(DcMotor.Direction.FORWARD);\n pusherLeft = hwMap.crservo.get(\"left\");\n pusherRight = hwMap.crservo.get(\"right\");\n pusherLeft.setPower(0);\n pusherRight.setPower(0);\n beaconColorSensor = hwMap.colorSensor.get(\"beacon\");\n beaconTouchSensor = hwMap.touchSensor.get(\"touch\");\n //bottomColorSensor = hwMap.colorSensor.get(\"bottom\");\n frontLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n frontRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n beaconColorSensor.enableLed(false);\n //bottomColorSensor.enableLed(true);\n\n\n }", "public void robotInit() {\n\t\t//Get preferences from robot flash memory\n\t\tprefs = Preferences.getInstance();\n\t\tarmCalMinPosition = prefs.getDouble(\"armCalMinPosition\", 0);\n\t\tarmCal90DegPosition = prefs.getDouble(\"armCal90DegPosition\", 0);\n\t\tif (armCalMinPosition==0 || armCal90DegPosition==0) {\n\t\t\tDriverStation.reportError(\"Error: Preferences missing from RoboRio for Shooter Arm position calibration. Shooter arm disabled.\", true);\n\t\t\tshooterArmEnabled = false;\n\t\t} else {\n\t\t\tshooterArmEnabled = true;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tdebugStream = new FileWriter(\"/home/lvuser/debug.log\", true);\n\t\t\tdebugStream.write(\"Robot program started\\n\");\n\t\t\tdebugStream.flush();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not open debug file: \" + e);\n\t\t}\n\n\t\t//Instantiates the subsystems\n\t\tdriveTrain = new DriveTrain();\n\t\tshifter = new Shifter();\n\t\tshooterArm = new ShooterArm();\n\t\tshooter = new Shooter();\n\t\tintake = new Intake();\n\t\tvision = new Vision();\n\t\tpanel = new PowerDistributionPanel();\n\t\tarmPiston = new ArmPiston();\n\n\t\t// OI must be constructed after subsystems. If the OI creates Commands\n\t\t// (which it very likely will), subsystems are not guaranteed to be\n\t\t// constructed yet. Thus, their requires() statements may grab null\n\t\t// pointers. Bad news. Don't move it.\n\t\toi = new OI();\n\n intake.motorCurrentTrigger.whenActive(new IntakeMotorStop());\n\n timerLEDs.start();\n timerTilt.start();\n timerRumble.start();\n \n // instantiate the command used for the autonomous period\n\t\t//autonomousCommand = new AutonomousCommandGroup();\n\t\traiseArm90 = new ShooterArmMoveToSetLocation(90);\n\t\t\n\t\t// Display active commands and subsystem status on SmartDashboard\n\t\tSmartDashboard.putData(Scheduler.getInstance());\n\t\tSmartDashboard.putData(driveTrain);\n\t\tSmartDashboard.putData(shifter);\n\t\tSmartDashboard.putData(shooterArm);\n\t\tSmartDashboard.putData(shooter);\n\t\tSmartDashboard.putData(intake);\n\t\tSmartDashboard.putData(vision);\n\t\tSmartDashboard.putData(armPiston);\n\t}", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n \n // Define and Initialize Motors\n leftMotorFrt = hwMap.get(DcMotor.class, \"LeftMotorFwd\");\n rightMotorFrt = hwMap.get(DcMotor.class, \"RightMotorFwd\");\n //PickupUnit = hwMap.get(DcMotor.class, \"PickupUnit\");\n leftMotorBck = hwMap.get(DcMotor.class, \"LeftMotorBck\");\n rightMotorBck = hwMap.get(DcMotor.class, \"RightMotorBck\");\n foundationHookRight = hwMap.get(Servo.class, \"hookRight\");\n foundationHookLeft = hwMap.get(Servo.class, \"hookLeft\");\n TheClaw = hwMap.get(Servo.class, \"theclaw\");\n foundTouch = hwMap.get(TouchSensor.class, \"foundTouch\");\n intakeRight = hwMap.get(DcMotor.class, \"intakeRight\");\n intakeLeft = hwMap.get(DcMotor.class, \"intakeLeft\");\n \n foundationHookRight.setPosition(0.7);\n foundationHookLeft.setPosition(0.7);\n leftMotorFrt.setDirection(DcMotor.Direction.FORWARD); // Set to REVERSE if using AndyMark motors\n rightMotorFrt.setDirection(DcMotor.Direction.REVERSE);// Set to FORWARD if using AndyMark motors\n leftMotorBck.setDirection(DcMotor.Direction.FORWARD); // Set to REVERSE if using AndyMark motors\n rightMotorBck.setDirection(DcMotor.Direction.REVERSE);// Set to FORWARD if using AndyMark motors\n intakeRight.setDirection(DcMotor.Direction.REVERSE);\n intakeLeft.setDirection(DcMotor.Direction.FORWARD);\n\n // Set all motors to zero power\n leftMotorFrt.setPower(0);\n rightMotorFrt.setPower(0);\n leftMotorBck.setPower(0);\n rightMotorBck.setPower(0);\n //PickupUnit.setPower(0);\n \n leftMotorFrt.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotorFrt.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotorBck.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotorBck.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n //PickupUnit.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n leftMotorFrt.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n rightMotorFrt.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n leftMotorBck.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n rightMotorBck.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n //PickupUnit.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n \n }", "@Override\n public void init() {\n imu = new IMU(hardwareMap, \"imu\");\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n\n left.setDirection(DcMotorSimple.Direction.FORWARD);\n right.setDirection(DcMotorSimple.Direction.REVERSE);\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\\\n frontLeft = hwMap.get(DcMotor.class, \"frontLeft\");\n backLeft = hwMap.get(DcMotor.class, \"backLeft\");\n frontRight = hwMap.get(DcMotor.class, \"frontRight\");\n backRight = hwMap.get(DcMotor.class, \"backRight\");\n conveyorBelt = hwMap.get(DcMotor.class, \"conveyorBelt\");\n arm = hwMap.get(DcMotor.class, \"arm\");\n shooter = hwMap.get(DcMotor.class, \"conBeltWheels\");\n platform = hwMap.get(DcMotor.class, \"platform\");\n\n // Set all motors to zero power\n frontLeft.setPower(0);\n backLeft.setPower(0);\n frontRight.setPower(0);\n backRight.setPower(0);\n arm.setPower(0);\n conveyorBelt.setPower(0);\n shooter.setPower(0);\n platform.setPower(0);\n\n\n // sets zeroPowerBehavior\n frontLeft.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n frontRight.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backLeft.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backRight.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n arm.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n conveyorBelt.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n shooter.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n platform.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n // Sets motor directions\n frontLeft.setDirection(DcMotor.Direction.REVERSE);\n backLeft.setDirection(DcMotor.Direction.REVERSE);\n frontRight.setDirection(DcMotor.Direction.FORWARD);\n backRight.setDirection(DcMotor.Direction.FORWARD);\n arm.setDirection(DcMotor.Direction.FORWARD);\n conveyorBelt.setDirection(DcMotor.Direction.FORWARD);\n shooter.setDirection(DcMotor.Direction.REVERSE);\n platform.setDirection(DcMotor.Direction.FORWARD);\n\n // sets enconder mode to run with encoder\n frontRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frontLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n arm.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n conveyorBelt.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n shooter.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n platform.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n // Define and initialize ALL installed servos.\n claw = hwMap.get(Servo.class, \"claw\");\n intakeWheel1 = hwMap.get(Servo.class, \"intakeWheel1\");\n intakeWheel2 = hwMap.get(Servo.class, \"intakeWheel2\");\n ringBringer = hwMap.get(Servo.class, \"ringBringer\");\n\n //platform.setPosition(SERVO_HOME);\n claw.setPosition(SERVO_HOME);\n intakeWheel1.setPosition(SERVO_HOME);\n intakeWheel2.setPosition(SERVO_HOME);\n ringBringer.setPosition(SERVO_HOME);\n\n }", "private void initializeMap() {\n FLMotor = hardwareMap.get(DcMotor.class, \"FLMotor\");\n FRMotor = hardwareMap.get(DcMotor.class, \"FRMotor\");\n BLMotor = hardwareMap.get(DcMotor.class, \"BLMotor\");\n BRMotor = hardwareMap.get(DcMotor.class, \"BRMotor\");\n //ods = hardwareMap.get(OpticalDistanceSensor.class, \"ods\");\n //color = hardwareMap.get(ColorSensor.class, \"color\");\n //touch = hardwareMap.get(TouchSensor.class, \"touch\");\n gyro = hardwareMap.get(GyroSensor.class, \"gyro\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n BRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n BLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n FRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n FLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n\n VinceHardwareBruinBot robot = new VinceHardwareBruinBot();\n // Inititalize last wheel speed\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n lastwheelSpeeds[i] = 0;\n }\n robot.init(hardwareMap);\n {\n //init all drive wheels\n leftFrontDrive = robot.leftFrontDrive;\n rightFrontDrive = robot.rightFrontDrive;\n leftRearDrive = robot.leftRearDrive;\n rightRearDrive = robot.rightRearDrive;\n\n // init all other motors & servos\n intakeMotor = robot.intakeMotor;\n wobbleMotor = robot.wobbleMotor;\n ringShooterMotor = robot.ringShooterMotor;\n\n fireServo = robot.fireServo;\n\n //init imu\n imu = robot.imu;\n }\n initVuforiaNavigation();\n\n // Reset the wobble motor - Use a repeatable starting position\n wobbleMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n /*\n // Get PID constants for wobble motor\n int motorIndex = ((robot.wobbleMotor).getPortNumber());\n DcMotorControllerEx motorControllerEx = (DcMotorControllerEx)robot.wobbleMotor.getController();\n PIDCoefficients pidModified = motorControllerEx.getPIDCoefficients(motorIndex, DcMotor.RunMode.RUN_TO_POSITION);\n\n // change coefficients using methods included with DcMotorEx class.\n PIDCoefficients pidNew = new PIDCoefficients(10, 2, 3);\n motorControllerEx.setPIDCoefficients(motorIndex, DcMotor.RunMode.RUN_TO_POSITION, pidNew);\n */\n //wobbleMotor.setPIDFCoefficients(DcMotor.RunMode.RUN_TO_POSITION,pidNew);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public void robotInit() {\r\n\t\t// Create and start the compressor. It will control pressure automagically\r\n\t\tCompressor comp = new Compressor(RobotMap.pneumaticPreasureSwitch, RobotMap.compresserRelay);\r\n\t\tcomp.start();\r\n\r\n\t\t// instantiate the command used for the autonomous period\r\n\t\tautonomousCommand = new Autonomous();\r\n\r\n\t\t// Initialize all subsystems\r\n\t\tCommandBase.init();\r\n\t}", "public void init(HardwareMap ahwMap) {\n hwMap = ahwMap;\n lf_motor = hwMap.dcMotor.get(\"lf_drive\");\n lb_motor = hwMap.dcMotor.get(\"lb_drive\");\n rf_motor = hwMap.dcMotor.get(\"rf_drive\");\n rb_motor = hwMap.dcMotor.get(\"rb_drive\");\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n FrontLeft = hwMap.dcMotor.get(\"frontLeft\");\n FrontRight = hwMap.dcMotor.get(\"frontRight\");\n RearLeft = hwMap.dcMotor.get(\"rearLeft\");\n RearRight = hwMap.dcMotor.get(\"rearRight\");\n Collector = hwMap.dcMotor.get(\"collector\");\n Launcher = hwMap.dcMotor.get(\"launcher\");\n Elevator = hwMap.dcMotor.get(\"elevator\");\n\n ServoElevate = hwMap.crservo.get(\"Servo\");\n\n imu = hwMap.get(BNO055IMU.class, \"imu\");\n\n FrontLeft.setPower(0);\n FrontRight.setPower(0);\n RearLeft.setPower(0);\n RearRight.setPower(0);\n }", "public void initDevice() {\r\n\t\t\r\n\t}", "public Hardware() {\n hwMap = null;\n }", "public void init(HardwareMap ahwMap) {\n // save reference to HW Map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n name = hwMap.dcMotor.get(\"left motor\");\n\n // Set all motors to zero power\n name.setPower(0);\n\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n name.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n // Define and initialize ALL installed servos.\n name1 = hwMap.servo.get(\"arm\");\n name1.setPosition(0);\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n try {\n leftMotor = hwMap.dcMotor.get(LEFT_MOTOR);\n rightMotor = hwMap.dcMotor.get(RIGHT_MOTOR);\n\n scooperMotor = hwMap.dcMotor.get(LEFT_SCOP_MOTOR);\n\n leftShotMotor = hwMap.dcMotor.get(LEFT_SHOT_MOTOR);\n rightShotMotor = hwMap.dcMotor.get(RIGHT_SHOT_MOTOR);\n beaconPresserServo = hwMap.servo.get(\"beaconPresserServo\");\n } catch (IllegalArgumentException e) {\n\n }\n //setp with encoders, can change it later\n setupMotors(true);\n }", "public RobotHardware (LinearOpMode opmode) {\n myOpMode = opmode;\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n leftDriveBack = hwMap.get(DcMotor.class, \"left_drive_back\");\n rightDriveBack = hwMap.get(DcMotor.class, \"right_drive_back\");\n leftDriveFront = hwMap.get(DcMotor.class, \"left_drive_front\");\n rightDriveFront = hwMap.get(DcMotor.class, \"right_drive_front\");\n leftDriveBack.setDirection(DcMotor.Direction.REVERSE);\n rightDriveBack.setDirection(DcMotor.Direction.FORWARD);\n leftDriveFront.setDirection(DcMotor.Direction.REVERSE);\n rightDriveFront.setDirection(DcMotor.Direction.FORWARD);\n\n resetEncoders();\n\n initMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Set all motors to zero power\n leftDriveBack.setPower(0);\n rightDriveBack.setPower(0);\n leftDriveFront.setPower(0);\n rightDriveFront.setPower(0);\n\n\n //arm\n arm = hwMap.get(DcMotor.class, \"arm\");\n //wrist = hwMap.get(Servo.class, \"wrist\");\n\n //wrist.setDirection(Servo.Direction.REVERSE);\n //wrist.scaleRange(0, 1);\n //wrist.setPosition(WRIST_DEFAULT_VALUE);\n\n arm.setDirection(DcMotor.Direction.REVERSE);\n arm.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n arm.setPower(0);\n\n //claws\n leftClaw = hwMap.get(Servo.class, \"left_claw\");\n rightClaw = hwMap.get(Servo.class, \"right_claw\");\n this.leftClaw.scaleRange(0, 1);\n this.rightClaw.scaleRange(0, 1);\n\n this.leftClaw.setPosition(LEFT_CLAW_START);\n this.rightClaw.setPosition(RIGHT_CLAW_START);\n\n //jewelkicker\n jewelKicker = hwMap.get(Servo.class, \"kicker\");\n this.jewelKicker.scaleRange(0, 1);\n this.jewelKicker.setPosition(KICKER_UP_VALUE);\n\n }", "@Override\n public void robotInit() {\n\toi = new OI();\n\tgameData = new GameData();\n\tcubeVision.start();\n\n\tinitializeDashboard();\n }", "public void robotInit()\r\n {\r\n // Initialize all subsystems\r\n CommandBase.init();\r\n // instantiate the command used for the autonomous period\r\n //Initializes triggers\r\n mecanumDriveTrigger = new MechanumDriveTrigger();\r\n tankDriveTrigger = new TankDriveTrigger();\r\n resetGyro = new ResetGyro();\r\n }", "public void init(HardwareMap hwMap) {\r\n\r\n //DRIVE//\r\n front_left = hwMap.dcMotor.get(\"front_left\");\r\n front_right = hwMap.dcMotor.get(\"front_right\");\r\n back_left = hwMap.dcMotor.get(\"back_left\");\r\n back_right = hwMap.dcMotor.get(\"back_right\");\r\n\r\n hook = hwMap.dcMotor.get(\"hook\");\r\n\r\n //intake1 = hwMap.servo.get(\"intake1\");\r\n //intake2 = hwMap.servo.get(\"intake2\");\r\n //intake3 = hwMap.servo.get(\"intake3\");\r\n //intake4 = hwMap.servo.get(\"intake4\");\r\n\r\n phone = hwMap.servo.get(\"phone\");\r\n marker = hwMap.servo.get(\"marker\");\r\n\r\n //linSlide1 = hwMap.dcMotor.get(\"lin_slide1\");\r\n //linSlide2 = hwMap.dcMotor.get(\"lin_slide2\");\r\n\r\n //arm_motor_1 = hwMap.dcMotor.get(\"arm1\");\r\n //arm_motor_2 = hwMap.dcMotor.get(\"arm2\");\r\n\r\n\r\n front_left.setDirection(DcMotor.Direction.FORWARD);\r\n front_right.setDirection(DcMotor.Direction.FORWARD);\r\n back_left.setDirection(DcMotor.Direction.REVERSE);\r\n back_right.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n /* front_left.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n front_right.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n back_left.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n back_right.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n */\r\n hook.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n //linSlide1.setDirection(DcMotor.Direction.FORWARD);\r\n //linSlide1.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n //arm_motor_1.setDirection(DcMotor.Direction.FORWARD);\r\n //arm_motor_2.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n front_left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n front_right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n back_left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n back_right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n\r\n //encoder1 = hwMap.analogInput.get(\"encoder1\");\r\n //encoder2 = hwMap.analogInput.get(\"encoder2\");\r\n\r\n imu = hwMap.get(BNO055IMU.class, \"imu\");\r\n }", "@Override\r\n public void init() {\r\n BackRight = hardwareMap.dcMotor.get(\"BackRight\");\r\n BackLeft = hardwareMap.dcMotor.get(\"BackLeft\");\r\n FrontRight = hardwareMap.dcMotor.get(\"FrontRight\");\r\n FrontLeft = hardwareMap.dcMotor.get(\"FrontLeft\");\r\n FrontRight.setDirection(DcMotor.Direction.REVERSE);\r\n BackRight.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n TreadLeft = hardwareMap.dcMotor.get(\"TreadLeft\");\r\n TreadRight = hardwareMap.dcMotor.get(\"TreadRight\");\r\n\r\n ArmMotor = hardwareMap.dcMotor.get(\"ArmMotor\");\r\n }", "@Override\n\tpublic void robotInit() {\n\t\tfr = new Spark(HardwareMap.PWM.DRIVE_FR);\n\t\tfl = new Spark(HardwareMap.PWM.DRIVE_FL);\n\t\tbr = new Spark(HardwareMap.PWM.DRIVE_BR);\n\t\tbl = new Spark(HardwareMap.PWM.DRIVE_BL);\n\t\t\n\t\t// Create the side modules\n\t\tleftGroup = new SpeedControllerGroup(bl, fl);\n\t\trightGroup = new SpeedControllerGroup(br, fr);\n\n\t\t// Init the the drive train\n\t\tdrive = new DifferentialDrive(leftGroup, rightGroup);\n\t\t\n\t\t//Init the gyro\n\t\tgyro.calibrate();\n\t\tSmartDashboard.putData(\"Gyro\", gyro);\n\t\t\n\t\tdrive.setSafetyEnabled(false);\n\t\tthis.setName(Subsystems.DRIVE);\n\t}", "public void robotInit() {\n\t\tmyRobot = new RobotDrive(0,1);\n\t\tteleop = new Teleop(myRobot);\n\t\tauto = new AutonomousDrive(myRobot);\n\t}", "public void robotInit()\n\t{\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\t// autonomousCommand = new Driver();\n\t}", "protected void initialize() {\n\t\tRobot.resetSensors();\n\t}", "public void initDevices() {\n for (Device device: deviceList) {\n device.init(getCpu().getTime());\n }\n }", "protected abstract void initHardwareInstructions();", "public void init(HardwareMap ahwMap) throws InterruptedException {\r\n // Save reference to Hardware map\r\n hwMap = ahwMap;\r\n\r\n //------------------------------------------------\r\n // Define and init arm motors\r\n motorShoulder = hwMap.dcMotor.get(\"motorShoulder\");\r\n motorShoulder.setDirection(DcMotor.Direction.FORWARD);\r\n resetShoulderEncoder();\r\n\r\n motorElbow = hwMap.dcMotor.get(\"motorElbow\");\r\n motorElbow.setDirection(DcMotor.Direction.FORWARD);\r\n resetElbowEncoder();\r\n\r\n //define and init sweeper motor\r\n motorSweep = hwMap.dcMotor.get(\"motorSweep\");\r\n motorSweep.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n // define and init drive motors\r\n motorLeft = hwMap.dcMotor.get(\"motorLeft\");\r\n motorLeft.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n motorRight = hwMap.dcMotor.get(\"motorRight\");\r\n motorRight.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n resetDriveEncoders();\r\n\r\n //------------------------------------------------\r\n //Define and init servos:\r\n servoBucket = hwMap.servo.get(\"servoBucket\");\r\n servoKickstandRight = hwMap.servo.get(\"servoKickstandRight\");\r\n servoKickstandLeft = hwMap.servo.get(\"servoKickstandLeft\");\r\n\r\n //------------------------------------------------\r\n //Define and init sensors:\r\n sensorShoulder = hwMap.touchSensor.get(\"sensorShoulder\");\r\n sensorElbow = hwMap.touchSensor.get(\"sensorElbow\");\r\n sensorGyro = hwMap.gyroSensor.get(\"sensorGyro\");\r\n sensorColor = hwMap.colorSensor.get(\"sensorColor\");\r\n\r\n sensorColor.enableLed(true);\r\n sensorGyro.calibrate(); //set 0 heading\r\n while (sensorGyro.isCalibrating()) {\r\n Thread.sleep(20);\r\n }\r\n\r\n //---------------------------------------------\r\n //init method calls\r\n initShoulder();\r\n initServos();\r\n initElbow();\r\n\r\n finishInit();\r\n }", "private void init()\n {\n sendData(REG_MMXCOMMAND, MMXCOMMAND_RESET);\n Delay.msDelay(50);\n // init motor operation parameters\n for (int i=0;i<CHANNELS;i++){\n motorParams[MOTPARAM_RAMPING][i] = MOTPARAM_OP_TRUE;\n motorParams[MOTPARAM_ENCODER_BRAKING][i] = MOTPARAM_OP_TRUE;\n motorParams[MOTPARAM_POWER][i] = 0;\n motorParams[MOTPARAM_REGULATE][i] = MOTPARAM_OP_TRUE;\n doCommand(CMD_SETPOWER, 100, i); // will set motorParams[MOTPARAM_POWER][channel]\n }\n \n }", "@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public static void initialize()\n\t{\n\t\t// USB\n\t\tdriveJoystick = new EJoystick(getConstantAsInt(USB_DRIVE_STICK));\n\t\tcontrolGamepad = new EGamepad(getConstantAsInt(USB_CONTROL_GAMEPAD));\n\n\t\t// Power Panel\n\t\tpowerPanel = new PowerDistributionPanel();\n\n\t\t//Compressor\n\t\tcompressor = new Compressor(Constants.getConstantAsInt(Constants.PCM_CAN));\n\t\tcompressor.start();\n\t}", "private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }", "public void init() {\n \tpidControllers.add(leftMotorPID);\n\t\tpidControllers.add(rightMotorPID);\n\t\tpidControllers.add(leftMiniCIMMotorPID);\n\t\tpidControllers.add(rightMiniCIMMotorPID);\n\t\t\n \tgyro.initGyro();\n \tgyro.setSensitivity(RobotMap.gyroGain);\n \tgyro.calibrate();\n }", "protected void initialize() {\n \t//instantiate PIDs with motor groups\n \t\n \tPIDOutputGroup leftSide = new PIDOutputGroup(new PIDOutput[] {Robot.drive.frontLeftMotor, Robot.drive.backLeftMotor}, new Boolean[] {false, false}, 1.0);\n \t\n \tPIDOutputGroup rightSide = new PIDOutputGroup(new PIDOutput[] {Robot.drive.frontRightMotor, Robot.drive.backRightMotor}, new Boolean[] {true, true}, 1.0);\n\n \t//reset PIDs\n \tRobot.drive.leftEncoder.reset();\n \tRobot.drive.rightEncoder.reset();\n \t\n \t//set PID type\n \tRobot.drive.leftEncoder.setPIDSourceType(PIDSourceType.kRate);\n \tRobot.drive.rightEncoder.setPIDSourceType(PIDSourceType.kRate);\n \t\n \tleftEncoderPID = new PIDController(lEncoderP, lEncoderI, lEncoderD, Robot.drive.leftEncoder, leftSide);\n \t\n \trightEncoderPID = new PIDController(rEncoderP, rEncoderI, rEncoderD, Robot.drive.rightEncoder, rightSide);\n \t\n \tleftEncoderPID.setContinuous();\n \trightEncoderPID.setContinuous();\n \t\n \t\n \tleftEncoderPID.enable();\n \trightEncoderPID.enable();\n \t\n \t\n \t//timer things\n \ttimer = new Timer();\n \ttimer.start();\n \t\n \t//set timer times\n \ttAccelerating = maxVelocity / acceleration;\n \ttCruising = (distance - (Math.pow(maxVelocity, 2) / acceleration)) / maxVelocity;\n \ttTotal = 2 * tAccelerating + tCruising;\n \t\n \t//reset gyro\n \tRobot.gyroscope.reset();\n \t\n \t//set starting state\n \tcurrentState = DriveState.accelerating;\n }", "public void robotInit() {\n\t\trightFront = new CANTalon(1);\n\t\tleftFront = new CANTalon(3);\n\t\trightBack = new CANTalon(2);\n\t\tleftBack = new CANTalon(4);\n\t\t\n\t\trightBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\tleftBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\t\n\t\tleftBack.set(leftFront.getDeviceID());\n\t\trightBack.set(rightFront.getDeviceID());\n\t\t\n\t\tturn = new Joystick(0);\n\t\tthrottle = new Joystick(1);\n\t}", "@Override\n public void init() {\n\n try {\n\n // Get wheel motors\n wheelMotor1 = hardwareMap.dcMotor.get(\"Wheel 1\");\n wheelMotor2 = hardwareMap.dcMotor.get(\"Wheel 2\");\n\n // Initialize wheel motors\n wheelMotor1.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor2.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor1.setDirection(DcMotor.Direction.FORWARD);\n wheelMotor2.setDirection(DcMotor.Direction.REVERSE);\n robotDirection = DriveMoveDirection.Forward;\n motion = new Motion(wheelMotor1, wheelMotor2);\n\n // Get hook motor\n motorHook = hardwareMap.dcMotor.get(\"Hook\");\n motorHook.setDirection(DcMotor.Direction.REVERSE);\n\n // Get servos\n servoTapeMeasureUpDown = hardwareMap.servo.get(\"Hook Control\");\n servoClimberDumperArm = hardwareMap.servo.get(\"Climber Dumper Arm\");\n servoDebrisPusher = hardwareMap.servo.get(\"Debris Pusher\");\n servoZipLineLeft = hardwareMap.servo.get(\"Zip Line Left\");\n servoZipLineRight = hardwareMap.servo.get(\"Zip Line Right\");\n servoAllClearRight = hardwareMap.servo.get (\"All Clear Right\");\n servoAllClearLeft = hardwareMap.servo.get (\"All Clear Left\");\n\n setServoPositions();\n }\n catch (Exception ex)\n {\n telemetry.addData(\"error\", ex.getMessage());\n }\n }", "@Override\n public void robotInit() {\n\n // Motor controllers\n leftMotor = new CANSparkMax(1, MotorType.kBrushless);\n leftMotor.setInverted(false);\n leftMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax leftSlave1 = new CANSparkMax(2, MotorType.kBrushless);\n leftSlave1.setInverted(false);\n leftSlave1.setIdleMode(IdleMode.kBrake);\n leftSlave1.follow(leftMotor);\n\n CANSparkMax leftSlave2 = new CANSparkMax(3, MotorType.kBrushless);\n leftSlave2.setInverted(false);\n leftSlave2.setIdleMode(IdleMode.kBrake);\n leftSlave2.follow(leftMotor);\n\n rightMotor = new CANSparkMax(4, MotorType.kBrushless);\n rightMotor.setInverted(false);\n rightMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax rightSlave1 = new CANSparkMax(5, MotorType.kBrushless);\n rightSlave1.setInverted(false);\n rightSlave1.setIdleMode(IdleMode.kBrake);\n rightSlave1.follow(leftMotor);\n\n CANSparkMax rightSlave2 = new CANSparkMax(6, MotorType.kBrushless);\n rightSlave2.setInverted(false);\n rightSlave2.setIdleMode(IdleMode.kBrake);\n rightSlave2.follow(leftMotor);\n\n // Encoders\n leftEncoder = leftMotor.getEncoder();\n rightEncoder = rightMotor.getEncoder();\n\n // Gyro\n gyro = new ADXRS450_Gyro();\n\n }", "public void initialize() {\n\n Robot.driveSubsystem.resetGyro();\n\n }", "protected void initialize() {\n \tRobot.chassisSubsystem.setShootingMotors(0);\n }", "public MecanumDrive(RobotMap opModeRobot){\n // initialize the hardware(pass in the opMode Robot map(instance) to this class in order to use it here)\n this.robot = opModeRobot;\n // This is all you need to do to initialize your hardware now when you have to call a motor just use robot.objectName.method\n }", "public void init(HardwareMap ahwMap){\n init(ahwMap, true);\n }", "protected void initialize() {\n\t\tif (type == switchType.True) {\n\t\t\tVariables.platformStatus = true;\n\t\t}\n\t\telse if (type == switchType.False) {\n\t\t\tVariables.platformStatus = false;\n\t\t}\n\t\telse {\n\t\t\tVariables.platformStatus = !Variables.platformStatus;\n\t\t}\n\t\tgo.start();\n\t}", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n // left frond drive motor\n try\n {\n\n left_front_drv_Motor = hwMap.dcMotor.get(\"l_f_drv\");\n }\n catch (Exception p_exeception)\n {\n\n\n left_front_drv_Motor = null;\n }\n //left back drive motor\n\n try\n {\n\n left_back_drv_Motor = hwMap.dcMotor.get(\"l_b_drv\");\n }\n catch (Exception p_exeception)\n {\n\n\n left_back_drv_Motor = null;\n }\n // right front drive motor\n try\n {\n\n right_front_drv_Motor = hwMap.dcMotor.get(\"r_f_drv\");\n }\n catch (Exception p_exeception)\n {\n\n right_front_drv_Motor = null;\n }\n //right back drive motor\n try\n {\n\n right_back_drv_Motor = hwMap.dcMotor.get(\"r_b_drv\");\n }\n catch (Exception p_exeception)\n {\n\n\n right_back_drv_Motor = null;\n }\n\n //hinge motor for arm\n\n try\n {\n\n hinge = hwMap.dcMotor.get(\"hinge\");\n }\n catch (Exception p_exeception)\n {\n\n\n hinge = null;\n }\n //hang motor to land\n try\n {\n\n hang_motor = hwMap.dcMotor.get(\"hang\");\n }\n catch (Exception p_exeception)\n {\n\n\n hang_motor= null;\n }\n //intake motor\n try\n {\n\n fly_wheel = hwMap.dcMotor.get(\"intake\");\n }\n catch (Exception p_exeception)\n {\n\n\n hang_motor= null;\n }\n\n // Servos :\n\n\n try\n {\n //v_motor_left_drive = hardwareMap.dcMotor.get (\"l_drv\");\n //v_motor_left_drive.setDirection (DcMotor.Direction.REVERSE);\n marker = hwMap.servo.get(\"marker\");\n if (marker != null) {\n marker.setPosition(SERVO_LEFT_MIN);\n }\n\n\n }\n\n catch (Exception p_exeception)\n {\n //m_warning_message (\"l_drv\");\n // DbgLog.msg (p_exeception.getLocalizedMessage ());\n\n marker = null;\n }\n\n\n //set dc motors to run without an encoder and set intial power to 0\n //l_f_drv\n if (left_front_drv_Motor != null)\n {\n //l_return = left_drv_Motor.getPower ();\n left_front_drv_Motor.setDirection(DcMotor.Direction.FORWARD); // FORWARD was moving it backwards\n left_front_drv_Motor.setPower(0);\n left_front_drv_Motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //l_b_drv\n if (left_back_drv_Motor != null)\n {\n //l_return = left_drv_Motor.getPower ();\n left_back_drv_Motor.setDirection(DcMotor.Direction.FORWARD); // FORWARD was moving it backwards\n left_back_drv_Motor.setPower(0);\n left_back_drv_Motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n\n //r_f_drv\n if (right_front_drv_Motor != null)\n {\n //l_return = left_drv_Motor.getPower ();\n right_front_drv_Motor.setDirection(DcMotor.Direction.FORWARD);// REVERSE was moving it backwards\n right_front_drv_Motor.setPower(0);\n right_front_drv_Motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //r_b_drv\n if (right_back_drv_Motor != null)\n {\n //l_return = left_drv_Motor.getPower ();\n right_back_drv_Motor.setDirection(DcMotor.Direction.FORWARD);// REVERSE was moving it backwards\n right_back_drv_Motor.setPower(0);\n right_back_drv_Motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //hinge\n if (hinge != null)\n {\n //l_return = left_drv_Motor.getPower ();\n hinge.setPower(0);\n hinge.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //hang\n if(hang_motor != null)\n\n {\n hang_motor.setPower(0);\n hang_motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //intake\n if(fly_wheel != null)\n\n {\n fly_wheel.setPower(0);\n fly_wheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n\n/*\ninitalize the colorSensor and colorSensor\n*/\n try {\n colorSensor = hwMap.colorSensor.get(\"color\");\n }\n catch (Exception p_exeception)\n {\n //m_warning_message (\"colr_f\");\n // DbgLog.msg (p_exeception.getLocalizedMessage ());\n colorSensor = null;\n }\n\n\n try {\n LightSensorBottom = hwMap.lightSensor.get(\"ods\");\n }\n catch (Exception p_exeception)\n {\n //m_warning_message (\"ods\");\n // DbgLog.msg (p_exeception.getLocalizedMessage ());\n LightSensorBottom = null;\n }\n\n\n if (colorSensor != null) {\n //ColorFront reads beacon light and is in passive mode\n colorSensor.setI2cAddress(i2CAddressColorFront);\n colorSensor.enableLed(false);\n }\n\n if (LightSensorBottom != null) {\n //OpticalDistance sensor measures dist from the beacon\n LightSensorBottom.enableLed(false);\n }\n\n }", "@Override\n\tpublic void robotInit() {\n\t\tleftDriveBack = new VictorSP(0); // PWM Port, madke sure this is set correctly.\n\t\tleftDriveFront = new VictorSP(1);\n\t\t\n\t\trightDriveFront = new VictorSP(2);\n\t\trightDriveBack = new VictorSP(3);\n\t\t\n\t\tleftIntake = new Spark(5);\n\t\trightIntake = new Spark(6);\n\t\t\n\t\tarmMotor = new TalonSRX(10);\n\t\tarmMotor.setNeutralMode(NeutralMode.Brake);\n\t\tarmMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 0);\n\t\tarmMotor.configPeakCurrentLimit(30, 0);\n\t\tarmMotor.configPeakCurrentDuration(250, 0);\n\t\tarmMotor.configContinuousCurrentLimit(20, 0);\n\t\tarmMotor.configClosedloopRamp(0.25, 0);\n\t\tarmMotor.configOpenloopRamp(0.375, 0);\n\t\tarmMotor.enableCurrentLimit(true);\n\t\t\n\t\tarmMotor.configPeakOutputForward(1.0, 0);\n\t\tarmMotor.configPeakOutputReverse(-1.0, 0);\n\t\t\n\t\tarmMotor.config_kP(0, 0.0, 0);\n\t\t\n\t\tarmSetpoint = armMotor.getSelectedSensorPosition(0);\n\t\t\n\t\tstick = new Joystick(0);\n\t\tstickReversed = false;\n\t\txbox = new XboxController(1); // USB port, set in driverstation.\n\t\t\n\t\tdriveCamera = CameraServer.getInstance().startAutomaticCapture(0);\n\t}", "@Override\n public void robotInit() \n {\n CommandBase.init();\n PIDCommandBase.init();\n\n CameraServer.getInstance().startAutomaticCapture();\n\n start.addDefault(\"Left\", Autonomous.StartPosition.LEFT);\n start.addObject(\"Center\", Autonomous.StartPosition.CENTER);\n start.addObject(\"Right\", Autonomous.StartPosition.RIGHT);\n SmartDashboard.putData(\"Start\", start);\n \n chooser.addObject(\"Scale\", Autonomous.AutoMode.SCALE);\n chooser.addObject(\"Switch\", Autonomous.AutoMode.SWITCH);\n chooser.addDefault(\"Drive\", Autonomous.AutoMode.DRIVE);\n SmartDashboard.putData(\"Auto Mode\", chooser);\n\n compressor = new Compressor();\n compressor.start();\n }", "@Override \n public void init() {\n intakeLeft = hardwareMap.crservo.get(\"intakeLeft\");\n intakeRight = hardwareMap.crservo.get(\"intakeRight\");\n topLeft = hardwareMap.servo.get(\"topLeft\");\n bottomLeft = hardwareMap.servo.get(\"bottomRight\");\n topRight = hardwareMap.servo.get(\"topRight\");\n bottomRight = hardwareMap.servo.get(\"bottomRight\");\n lift = hardwareMap.dcMotor.get(\"lift\");\n }", "@Override\n public void initialize() {\n //m_camera.setDriverMode(true);\n //m_camera.setLED(LEDMode.kOn);\n RobotContainer.m_Drive.auto = true;\n RobotContainer.m_Drive.setLightMode(3);\n }", "private void MotorInit()\n {\n intake_up.configFactoryDefault();\n intake_down.configFactoryDefault();\n intake_up.configOpenloopRamp(Constants.kMotorRampRate);\n intake_down.configOpenloopRamp(Constants.kMotorRampRate);\n intake_up.setInverted(PortReversed.intake_up_reversed.value);\n intake_down.setInverted(PortReversed.intake_down_reversed.value);\n intake_up.setNeutralMode(NeutralMode.Brake);\n intake_down.setNeutralMode(NeutralMode.Brake);\n }", "public void initialize() throws MMDeviceException;", "public void robotInit() {\n\t\toi = new OI();\n // instantiate the command used for the autonomous period\n }", "@Override\n protected void initialize() {\n Robot.leftDriveEncoder.reset();\n Robot.rightDriveEncoder.reset();\n tempTargetDirection = Robot.targetDirection + Robot.navX.getYaw();\n\n\n }", "public void robotInit() {\n\t\t\n\t\tupdateDashboard();\n\t\t\n \tautoChooser = new SendableChooser();\n \tautoChooser.addDefault(\"Default Autonomous does nothing!\", new Default());\n \t// Default Autonomous does nothing\n \tautoChooser.addObject(\"Cross the Low Bar Don't Run This it doesn't work\", new LowBar());\n \tautoChooser.addObject(\"Cross Rough Patch/Stone Wall\", new Main());\n \tautoChooser.addObject(\"Cross the Low Bar, Experimental!\", new LowBarEx());\n \t//autoChooser.addObject(\"If Jonathan lied to us and we can cross twice\", new RoughPatch());\n \tCameraServer server = CameraServer.getInstance();\n\n \tserver.setQuality(50);\n \t\n \tSmartDashboard.putData(\"Autonomous\", autoChooser);\n\n \tserver.startAutomaticCapture(\"cam0\");\n \tLowBar.gyro.reset();\n \t\n \tDriverStation.reportWarning(\"The Robot is locked and loaded. Time to kick some ass guys!\", !(server.isAutoCaptureStarted()));\n\n\t}", "public void robotInit() {\n RobotMap.init();\r\n CommandBase.init();\r\n //Add autonomous prefs\r\n Preferences p = Preferences.getInstance();\r\n if (!p.containsKey(\"AutonInitialDelay\")) {\r\n p.putDouble(\"AutonInitialDelay\", kDefaultInitialDelay);\r\n }\r\n if (!p.containsKey(\"AutonTimeout\")) {\r\n p.putDouble(\"AutonTimeout\", kDefaultTimeout);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondOn\")) {\r\n p.putBoolean(\"HangerLastSecondOn\", kDefaultLastSecondOn);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondTimeout\")) {\r\n p.putDouble(\"HangerLastSecondTimeout\", kDefaultLastSecondTimeout);\r\n }\r\n }", "public void init(HardwareMap ahwMap, boolean auto) {\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n extensionArm = hwMap.get(DcMotor.class, \"extensionArm\");\n leftDrive = hwMap.get(DcMotor.class, \"leftDrive\");\n rightDrive = hwMap.get(DcMotor.class, \"rightDrive\");\n leftrotationArm = hwMap.get(DcMotor.class, \"leftrotationArm\");\n rightrotationArm = hwMap.get(DcMotor.class, \"rightrotationArm\");\n intake_motor = hwMap.get(DcMotor.class, \"intakeMotor\");\n if (auto) {\n leftDrive.setDirection(DcMotorSimple.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); // Set to REVERSE if using AndyMark motors\n rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightDrive.setDirection(DcMotorSimple.Direction.FORWARD);\n }else{\n rightDrive.setDirection(DcMotorSimple.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n leftDrive.setDirection(DcMotorSimple.Direction.FORWARD);\n }\n\n leftrotationArm.setDirection(DcMotorSimple.Direction.REVERSE);\n rightrotationArm.setDirection(DcMotorSimple.Direction.REVERSE);\n\n intake_motor.setDirection(DcMotorSimple.Direction.FORWARD);\n extensionArm.setDirection(DcMotorSimple.Direction.REVERSE);\n\n // Set all motors to zero power\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n\n\n leftrotationArm.setPower(0);\n\n extensionArm.setPower(0);\n intake_motor.setPower(0);\n\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Define and initialize ALL installed servos.\n latching_linear = hwMap.get(DcMotor.class, \"latching_linear\");\n\n latchServo = hwMap.get(Servo.class, \"latchServo\");\n verticalServo = hwMap.get(Servo.class, \"yServo\");\n //horizontalServo = hwMap.get(Servo.class, \"zServo\");\n teamMarker = hwMap.get(Servo.class, \"teamMarker\");\n }", "protected void init() {\n try {\n updateDevice();\n } catch (Exception e) {\n RemoteHomeManager.log.error(42,e);\n }\n }", "protected void initialize() {\n\t\t// set the target for the PID subsystem\n\t\tRobot.minipidSubsystem.setSetpoint(90);\n\n\t\t// set the minimum and maximum output limits for the PID subsystem\n\t\tRobot.minipidSubsystem.setOutputLimits(-80, 80);\n\n\t\t// Disable safety checks on drive subsystem\n\t\tRobot.driveSubsystem.robotDrive.setSafetyEnabled(false);\n\t\t\n\t\tRobot.camera.setBrightness(0);\n\n\t}" ]
[ "0.79131025", "0.77721184", "0.7767777", "0.77206177", "0.7647931", "0.75933135", "0.75905377", "0.75334346", "0.7441407", "0.73987526", "0.7394714", "0.738616", "0.7325365", "0.7249096", "0.71773183", "0.7176627", "0.71762097", "0.7152679", "0.7152045", "0.7144612", "0.71367127", "0.71267104", "0.7120186", "0.7108568", "0.710579", "0.708674", "0.70367384", "0.7016543", "0.7015704", "0.70083004", "0.70069444", "0.6995516", "0.69837683", "0.6977699", "0.697143", "0.69694626", "0.6961254", "0.69589716", "0.69509935", "0.6939791", "0.69375604", "0.69352067", "0.6934885", "0.69146717", "0.69007903", "0.68977726", "0.68929684", "0.6892896", "0.68918204", "0.68878853", "0.6882994", "0.6877619", "0.68769866", "0.68579376", "0.68476593", "0.6844333", "0.68204695", "0.6812061", "0.6781897", "0.67754096", "0.67692184", "0.67687297", "0.6745349", "0.6741889", "0.67378795", "0.6735955", "0.6735294", "0.6729922", "0.6723341", "0.67195445", "0.67164993", "0.67135656", "0.6712817", "0.6674019", "0.66729885", "0.6660895", "0.66502154", "0.6635601", "0.663176", "0.6561776", "0.65504766", "0.65475404", "0.6543329", "0.65404904", "0.6537633", "0.65344346", "0.65151215", "0.64988637", "0.64766854", "0.64646053", "0.645399", "0.6451824", "0.64515376", "0.6448108", "0.64460474", "0.6445894", "0.6444511", "0.64421743", "0.6415979", "0.6404733" ]
0.80333334
0
Calculates the left/right motor powers required to achieve the requested robot motions: Drive (Axial motion) and Turn (Yaw motion). Then sends these power levels to the motors.
public void driveRobot(double Drive, double Turn) { // Combine drive and turn for blended motion. double left = Drive + Turn; double right = Drive - Turn; // Scale the values so neither exceed +/- 1.0 double max = Math.max(Math.abs(left), Math.abs(right)); if (max > 1.0) { left /= max; right /= max; } // Use existing function to drive both wheels. setDrivePower(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void robotMovement()\n {\n\n /* If it will be rotating, don't drive */\n if (!joystick.rightShouldMove()) {\n\n if (joystick.leftShouldMove()) {\n\n /* Derive movement values from gamepad */\n Joystick.Direction direction = joystick.getLeftDirection();\n double power = joystick.getLeftPower();\n\n int[] modifier;\n\n if (direction == Joystick.Direction.UP) {\n modifier = modUP;\n } else if (direction == Joystick.Direction.DOWN) {\n modifier = modDOWN;\n } else if (direction == Joystick.Direction.RIGHT) {\n modifier = modRIGHT;\n } else {\n modifier = modLEFT;\n }\n\n motorLeftFront.setPower(modifier[0] * ((power * 0.8) + (0.01 * frontInc)));\n motorRightFront.setPower(modifier[1] * ((power * 0.8) + (0.01 * frontInc)));\n motorLeftBack.setPower(modifier[2] * ((power * 0.8) + (0.01 * backInc)));\n motorRightBack.setPower(modifier[3] * ((power * 0.8) + (0.01 * backInc)));\n\n } else {\n setMotorPowerToZero();\n }\n\n } else {\n\n /* Rotation modifiers for sides of bot */\n Joystick.Direction d = joystick.getRightDirection();\n double power = joystick.getRightPower();\n boolean left = d == Joystick.Direction.LEFT;\n double sideMod = left ? 1 : -1;\n\n /* Set motor power */\n motorLeftFront.setPower(sideMod * power);\n motorLeftBack.setPower(sideMod * power);\n motorRightFront.setPower(sideMod * power);\n motorRightBack.setPower(sideMod * power);\n\n }\n\n }", "public void setMotorPower (double left, double right) {\n left = Range.clip(left, -1.0, 1.0);\n right = Range.clip(right, -1.0, 1.0);\n lDrive.setPower(left);\n rDrive.setPower(right);\n }", "public void ApplyMovement() {\n long currTime = SystemClock.uptimeMillis();\n if(currTime - lastUpdateTime < 16){\n return;\n }\n lastUpdateTime = currTime;\n\n\n double tl_power_raw = movement_y-movement_turn+movement_x*1.5;\n double bl_power_raw = movement_y-movement_turn- movement_x*1.5;\n double br_power_raw = -movement_y-movement_turn-movement_x*1.5;\n double tr_power_raw = -movement_y-movement_turn+movement_x*1.5;\n\n\n\n\n //find the maximum of the powers\n double maxRawPower = Math.abs(tl_power_raw);\n if(Math.abs(bl_power_raw) > maxRawPower){ maxRawPower = Math.abs(bl_power_raw);}\n if(Math.abs(br_power_raw) > maxRawPower){ maxRawPower = Math.abs(br_power_raw);}\n if(Math.abs(tr_power_raw) > maxRawPower){ maxRawPower = Math.abs(tr_power_raw);}\n\n //if the maximum is greater than 1, scale all the powers down to preserve the shape\n double scaleDownAmount = 1.0;\n if(maxRawPower > 1.0){\n //when max power is multiplied by this ratio, it will be 1.0, and others less\n scaleDownAmount = 1.0/maxRawPower;\n }\n tl_power_raw *= scaleDownAmount;\n bl_power_raw *= scaleDownAmount;\n br_power_raw *= scaleDownAmount;\n tr_power_raw *= scaleDownAmount;\n\n\n //now we can set the powers ONLY IF THEY HAVE CHANGED TO AVOID SPAMMING USB COMMUNICATIONS\n topLeft.setPower(tl_power_raw);\n bottomLeft.setPower(bl_power_raw);\n bottomRight.setPower(br_power_raw);\n topRight.setPower(tr_power_raw);\n }", "void drive(double power, double leftInches, double rightInches, double seconds) {\n\n //Make new integer to set left and right motor targets\n int leftTarget;\n int rightTarget;\n\n if (opModeIsActive()) {\n\n //Determine left and right target to move to\n leftTarget = robot.leftMotor.getCurrentPosition() + (int) (leftInches * COUNTS_PER_INCH);\n rightTarget = robot.rightMotor.getCurrentPosition() + (int) (rightInches * COUNTS_PER_INCH);\n\n //Set target and move to position\n robot.leftMotor.setTargetPosition(leftTarget);\n robot.rightMotor.setTargetPosition(rightTarget);\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //Reset runtime and start motion\n robot.leftMotor.setPower(Math.abs(power));\n robot.rightMotor.setPower(Math.abs(power));\n\n //Test if motors are busy, runtime is less than timeout and motors are busy and then run code\n while (opModeIsActive() && (runtime.seconds() < seconds) && (robot.leftMotor.isBusy() && robot.rightMotor.isBusy())) {\n\n //Tell path to driver\n telemetry.addData(\"Path1\", \"Running to: \", leftTarget, rightTarget);\n telemetry.addData(\"Path2\", \"Running at: \", robot.leftMotor.getCurrentPosition(), robot.rightMotor.getCurrentPosition());\n telemetry.update();\n }\n\n //Stop motors after moved to position\n robot.leftMotor.setPower(0);\n robot.rightMotor.setPower(0);\n\n //Set motors back to using run using encoder\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public void operatorControl() {\n \tdouble ctrlThresh = .2; \n \tdouble minPower = .05; \n \tdouble maxPower = .75; \n \tdouble recip = (1 - ctrlThresh); \n \tdouble mult = (maxPower - minPower); \n \tdouble right; \n \tdouble strafe; \n \tdouble rotate; \n \tdouble rightAxis; \n \tdouble strafeAxis; \n \tdouble rotateAxis; \n \t// \tboolean leftLeft; \n \t// \tboolean leftRight; \n \tdouble rightDir; \n \tdouble strafeDir; \n \tdouble rotateDir; \n \tdouble rightPower; \n \tdouble rotatePower; \n \tdouble strafePower; \n \t\n \tint winchCount;\n \tboolean winchDirection;\n \n \t// \tdouble frontLeftPower; \n \t// \tdouble frontRightPower; \n \t// \tdouble backLeftPower; \n \t// \tdouble backRightPower; \n \n \t//myRobot.setSafetyEnabled(true); \n \t\n \tAccelerometer test = new BuiltInAccelerometer();\n \t\n \twhile (isOperatorControl() && isEnabled()) { \n \t\t// ACCEL TEST CODE\n// \t\tSystem.out.println(test.getX() + \", \" + test.getY() + \", \" + test.getZ());\n \t\t// END ACCEL TEST CODE\n \n \t\t// ********** BEGIN DRIVING CODE ********** \n \t\t// Code for driving using omniwheels and two wheels for strafing \n \t\t// Diagram for the wheels of the robot below. \n \n \t\t// L S R \n \t\t// /--------------------------\\ \n \t\t//\t ||------------------------|| \n \t\t// || [][] || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || [][] || \n \t\t// ||------------------------|| \n \t\t// \\--------------------------/ \n \t\t// \n \t\t// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ \n \n \t\tctrlThresh = .2; // the point at which we want to sense joystick action \n \t\trecip = 1-ctrlThresh; \t\t // = 0.8 \n \n \t\trightAxis = rightStick.getRawAxis(1);\t\t\t\t// right joystick, y (up/down) axis\n \t\t\n \t\t//System.out.println(\"\"+rightAxis);\n \t\tstrafeAxis = rightStick.getRawAxis(0);\t\t\t\t// right joystick, x (left/right) axis; this is \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// arbitrary and could have been the left stick\n \t\trotateAxis = rightStick.getRawAxis(4);\t\t\t\t\t// left joystick, y axis\n \n \t\trightDir = rightAxis/Math.abs(rightAxis);\t\t\t// forward or backward (+1 or -1)\n \t\tstrafeDir = strafeAxis/Math.abs(strafeAxis); \t// \t\t\t'' \n \t\trotateDir = rotateAxis/Math.abs(rotateAxis); // \t\t\t'' \n \n \t\tright = 0; // right input formatted for range of detected values [0.2,1] \n \t\trotate = 0; // left input formatted \n \t\tstrafe = 0; // strafe input formatted \n \n \t\tif(Math.abs(rightAxis) > ctrlThresh) \t// user moved stick beyond threshold \n \t\t{right = (rightAxis-ctrlThresh*rightDir)/recip;} // format right: scale back, set direction, proportion it \n \t\tif(Math.abs(strafeAxis) > ctrlThresh) \n \t\t{strafe = (strafeAxis-ctrlThresh*strafeDir)/recip;} // format left... \n \t\tif(Math.abs(rotateAxis) > ctrlThresh) \n \t\t{rotate = (rotateAxis-ctrlThresh*rotateDir)/recip;}\t\t// format strafe... \n \n \n \t\trightDir = right/Math.abs(right); \n \t\trightPower = (Math.abs(right*mult) + minPower) * rightDir; \t\t// re-proportion for power's range, strip direction,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// and then add back threshold and direction. \n \t\trotateDir = rotate/Math.abs(rotate); \n \t\trotatePower = (Math.abs(rotate*mult) + minPower) * rotateDir;\t\t\t// \t\t'' \n \n \t\tstrafeDir = strafe/Math.abs(strafe); \n \t\tstrafePower = (Math.abs(strafe*mult) + minPower) * strafeDir;\t// \t\t'' \n \n \t\tif(Math.abs(rightPower)>0.2){\n \t\t\tfrontRight.set(rightPower);\t\t\t\t\t\t// set all the motors with the powers we \n \t\t\tbackRight.set(rightPower);\t\t\t\t\t\t/// calculated above : drive! \n \t\t\tfrontLeft.set(-1*rightPower); \n \t\t\tbackLeft.set(-1*rightPower);\n \t\t}\n \t\telse{\n \t\t\tfrontRight.set(rotatePower);\n \t\t\tbackRight.set(rotatePower);\n \t\t\tfrontLeft.set(rotatePower);\n \t\t\tbackLeft.set(rotatePower);\n \t\t}\n \t\t\n// \t\tfrontStrafe.set(strafePower); \n// \t\tbackStrafe.set(-1*strafePower); \n \n// \t\tmyRobot.tankDrive(leftStick, rightStick); \n \t\t \n \t\t// ********** END OF DRIVING CODE ********** \n \t\t//======================================================================= \n \t\t// ************ BEGIN WINCH CODE *********** \n \t\t// We need to code the winch to help raise and lower the elevator \n \t\t// This is just one option between the winch and the lead screw. \n \t\t \n \t\t\n \t\t//second winch test\n \t\t/*\n \t\twinchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n \t \tSystem.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n \t \tif(winchCount<240){\n \t \t\t\n \t \t\twinchCim1.set(.1);\n \t \t\twinchCim2.set(.1);\n \t \t}\n \t \telse{\n \t \t\twinchCim1.set(0);\n \t \t\twinchCim2.set(0);\n \t \t\t\n \t \t}\n \t if(rightStick.getRawButton(5)) \n { \n\t\t\t winchEncoder.reset();// reset the pulse count\n\t\t\t winchCount = 0;\n\t\t\t winchCim1.set(0);\n\t\t\t winchCim2.set(0);\n\t\t\t \n } */ //end of second winch test \n \t \t\n \t\t\n \t\t if(rightStick.getRawButton(5)) \n { \n \t\t\t //winchEncoder.reset();// reset the pulse count\n \tSystem.out.println(\"A\");\n \t winchCim1.set(.5); \t// set winchCim1 to 0.5 power (upwards) \n \t winchCim2.set(.5); \t\t\t\t\t\t\t// set winchCim2 to 0.5 power\n \t\t\t \n } \n \t\telse if(rightStick.getRawButton(4))\n \t\t{\n \t\t\tSystem.out.println(\"B\");\n \t\t\t//winchEncoder.reset();\t\t\t\t\t\t\t// reset the pulse count\n \t \twinchCim1.set(-.3); // set winchCim1 to -0.5 power (downwards) \n \t \twinchCim2.set(-.3);\t \t\t\t\t\t\t\t// set winchCim2 to -0.5 power\n \t\t}\n \n \t \telse// if(rightStick.getRawButton(2)) \n { \n \t winchCim1.set(0); \t\t\t\t\t\t\t// set winchCim1 to 0 power (off/stop) \n \t winchCim2.set(0);\t\t\t\t\t\t\t\t// set winchCim2 to 0 pwoer (off/stop)\n// \t winchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n// \t System.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n } \n \n \t\t// ********** END OF WINCH CODE ********** \n \t\t//======================================================================= \n \t\t \n \t\t \n \t\tTimer.delay(0.005);\t\t// wait for a motor update time \n } \n }", "public void drive(double leftPower, double rightPower) {\n\t\t// Send calculated power (Motors)\n\t\tleft_drive.setPower(leftPower);\n\t\tright_drive.setPower(rightPower);\n\t\t\n\t\t//sendTelemetry(leftPower, rightPower);\n\t}", "public void moveLeftRight(double power, int tics){\n\t\tint angle = getAngle();\n\t\tif(tics<0) power = power*-1;\n\t\tint initPos = robot.motor0.getCurrentPosition();\n\t\tint currPos = initPos;\n\t\twhile(Math.abs(currPos) < initPos+tics&&opModeIsActive()){\n\t\t\trobot.motor0.setPower(-power);\n\t\t\trobot.motor1.setPower(-power);\n\t\t\trobot.motor2.setPower(power);\n\t\t\trobot.motor3.setPower(power);\n\t\t\tcurrPos = robot.motor0.getCurrentPosition();\n\t\t}\n\t\tstopMotors();\n\t\trotateToAngle(angle);\n\t}", "public void manualControl(double power){\n leftMotor.set(power);\n rightMotor.set(power);\n }", "public void setPower(double leftPower, double rightPower) {\n\t\tleftMiddleMotor.set(ControlMode.PercentOutput, leftPower);\n\t\trightMiddleMotor.set(ControlMode.PercentOutput, rightPower);\n\t}", "public void moveLeftRight(double power){\n\t\trobot.motor0.setPower(-power);\n\t\trobot.motor1.setPower(-power);\n\t\trobot.motor2.setPower(power);\n\t\trobot.motor3.setPower(power);\n\t}", "public static void drive(double leftspeed, double rightspeed) {\n\n leftMotorA.set(ControlMode.PercentOutput, leftspeed);\n rightMotorA.set(ControlMode.PercentOutput, rightspeed);\n\n }", "public void tankDrive(double leftPower, double rightPower){\n motorFrontLeft.setPower(leftPower);\n motorFrontRight.setPower(rightPower);\n motorBackLeft.setPower(leftPower*.5);\n motorBackRight.setPower(rightPower*.5);\n }", "public void operatorDrive() {\n\n changeMode();\n checkForGearShift();\n\n if (Robot.rightJoystick.getRawButton(1)) {\n currentMode = DriveMode.AUTO;\n\n } else if (Robot.rightJoystick.getRawButton(2)) {\n currentMode = DriveMode.CLIMB;\n } else {\n currentMode = DEFAULT_MODE;\n }\n\n isDeploying = false;\n\n if (currentMode == DriveMode.AUTO) {\n currentMode_s = \"Auto\";\n } else if (currentMode == DriveMode.ARCADE) {\n currentMode_s = \"Arcade\";\n } else {\n currentMode_s = \"Tank\";\n }\n\n double leftY = 0;\n double rightY = 0;\n\n switch (currentMode) {\n\n case AUTO:\n rotateCam(4, Robot.visionTargetInfo.visionPixelX);\n\n // driveFwd(4, .25);\n\n break;\n\n case CLIMB:\n\n climb();\n\n break;\n\n case ARCADE:\n resetAuto();\n double linear = 0;\n double turn = 0;\n\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n linear = -Robot.rightJoystick.getY();\n }\n if (Math.abs(Robot.leftJoystick.getX()) > deadband) {\n turn = Math.pow(Robot.leftJoystick.getX(), 3);\n }\n\n leftY = -linear - turn;\n rightY = linear - turn;\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n\n break;\n\n case TANK:\n\n resetAuto();\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n rightY = -Math.pow(Robot.rightJoystick.getY(), 3 / 2);\n }\n if (Math.abs(Robot.leftJoystick.getY()) > deadband) {\n leftY = Math.pow(Robot.leftJoystick.getY(), 3 / 2);\n }\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n break;\n\n default:\n break;\n }\n\n updateTelemetry();\n }", "public void driveTank(double leftPower, double rightPower) {\r\n if(leftPower > 1.0) {\r\n leftPower = 1.0;\r\n } else if(leftPower < -1.0) {\r\n leftPower = -1.0;\r\n }\r\n \r\n if(rightPower > 1.0) {\r\n rightPower = 1.0;\r\n } else if(rightPower < -1.0) {\r\n rightPower = -1.0;\r\n }\r\n \r\n tankLeftRamp.setTarget(leftPower);\r\n tankRightRamp.setTarget(rightPower);\r\n \r\n tankLeftRamp.tick();\r\n tankRightRamp.tick();\r\n \r\n robotDrive.tankDrive(getDirection() * tankLeftRamp.getOutput(),\r\n getDirection() * tankRightRamp.getOutput());\r\n //TODO set motor speeds in console\r\n }", "private void calculateMotorOutputs(int angle, int strength) {\n Point cart_point = polarToCart(angle,strength);\n\n final double max_motor_speed = 1024.0;\n final double min_motor_speed = 600.0;\n\n final double max_joy_val = 100;\n\n final double fPivYLimit = 24.0; // 32.0 was originally recommended\n\n // TEMP VARIABLES\n double nMotPremixL; // Motor (left) premixed output (-100..+99)\n double nMotPremixR; // Motor (right) premixed output (-100..+99)\n int nPivSpeed; // Pivot Speed (-100..+99)\n double fPivScale; // Balance scale b/w drive and pivot ( 0..1 )\n\n\n // Calculate Drive Turn output due to Joystick X input\n if (cart_point.y >= 0) {\n // Forward\n nMotPremixL = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n nMotPremixR = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n } else {\n // Reverse\n nMotPremixL = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n nMotPremixR = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n }\n\n // Scale Drive output due to Joystick Y input (throttle)\n nMotPremixL = nMotPremixL * cart_point.y/max_joy_val;\n nMotPremixR = nMotPremixR * cart_point.y/max_joy_val;\n\n // Now calculate pivot amount\n // - Strength of pivot (nPivSpeed) based on Joystick X input\n // - Blending of pivot vs drive (fPivScale) based on Joystick Y input\n nPivSpeed = cart_point.x;\n fPivScale = (Math.abs(cart_point.y)>fPivYLimit)? 0.0 : (1.0 - Math.abs(cart_point.y)/fPivYLimit);\n\n // Calculate final mix of Drive and Pivot, produces normalised values between -1 and 1\n double motor_a_prescale = ( (1.0-fPivScale)*nMotPremixL + fPivScale*( nPivSpeed) ) /100;\n double motor_b_prescale = ( (1.0-fPivScale)*nMotPremixR + fPivScale*(-nPivSpeed) ) /100;\n\n // convert normalised values to usable motor range\n motor_a = (int)( motor_a_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_a_prescale)*min_motor_speed) );\n motor_b = (int)( motor_b_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_b_prescale)*min_motor_speed) );\n\n }", "public boolean encoderDrive(int encoderDelta, driveStyle drive, double motorPower, double timeout, DcMotor[] motors)\n {\n\n\n switch(drive)\n {\n case FORWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, -motorPower, 0)[0]);\n motors[1].setPower(setPower(0, -motorPower, 0)[1]);\n motors[2].setPower(setPower(0, -motorPower, 0)[2]);\n motors[3].setPower(setPower(0, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n\n\n }\n\n case BACKWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, motorPower, 0)[0]);\n motors[1].setPower(setPower(0, motorPower, 0)[1]);\n motors[2].setPower(setPower(0, motorPower, 0)[2]);\n motors[3].setPower(setPower(0, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (encoderReadingLB - encoderDelta))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_RIGHT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, -motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() >= (-encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_LEFT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() <= (encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, -motorPower)[0]);\n motors[1].setPower(setPower(0, 0, -motorPower)[1]);\n motors[2].setPower(setPower(0, 0, -motorPower)[2]);\n motors[3].setPower(setPower(0, 0, -motorPower)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, motorPower)[0]);\n motors[1].setPower(setPower(0, 0, motorPower)[1]);\n motors[2].setPower(setPower(0, 0, motorPower)[2]);\n motors[3].setPower(setPower(0, 0, motorPower)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n\n }\n\n return true;\n }", "public void setMotors(double leftSpeed, double rightSpeed, double multiplier){\n double z = 0.1;\n if(multiplier<0){\n z = (1-Math.abs(multiplier))*0.5+0.25;\n }\n else{\n z = multiplier*0.25+0.75;\n }\n m_leftMotor.set(leftSpeed*z); \n m_rightMotor.set(rightSpeed*z);\n}", "public void setDrivePower(double leftWheel, double rightWheel) {\n // Output the values to the motor drives.\n leftDrive.setPower(leftWheel);\n rightDrive.setPower(rightWheel);\n }", "public void setLeftMotors(double speed){\n motorLeft1.set(speed);\n // motorLeft2.set(-speed);\n }", "double a_right_front_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_front_drv_Motor != null)\n {\n l_return = right_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "public void movePower(String movement, double power, double duration)\n {\n double startTime = getRuntime();\n switch(movement)\n {\n case \"forward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"backward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"right\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"left\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"leftTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"rightTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n }\n stop();\n }", "void GoDir( double power, double theta_degrees ){\n \n double gain = 0.1; // torque power per degree angle\n \n double theta_radians = Math.toRadians(theta_degrees);\n double Fx = power * Math.cos( theta_radians );\n double Fy = power * Math.sin( theta_radians );\n double Tau = gain*(gTheta - getAngle());\n \n double P1 = Fx*2.0/3.0 + Tau/3.0;\n double P2 = -Fx*1.0/3.0 + 1.0/Math.sqrt(3.0)*Fy + Tau/3.0;\n double P3 = -Fx*2.0/3.0 - 1.0/Math.sqrt(3.0)*Fy + Tau/3.0;\n\n topDrive.setPower( P1 );\n leftDrive.setPower( P2 );\n rightDrive.setPower( P3 );\n }", "private void displayMotorsPower() {\n int powers = Motor.A.getPower() * 100\n + Motor.B.getPower() * 10\n + Motor.C.getPower(); \n LCD.showNumber(powers);\n }", "private void adjustPower (TurnType dir,\n float p) {\n float adjust = Math.signum(p) * gyroSensor.adjustDirection();\n // with RUN_TO_POSITION sign of power is ignored\n // we have to clip so that (1 + adjust) and (1 - adjust) have the same sign\n adjust = Range.clip(adjust, -1, 1);\n // BNO055 positive for left turn\n float pwrl = p * (1 - adjust);\n float pwrr = p * (1 + adjust);\n\n float max = Math.max(Math.abs(pwrl), Math.abs(pwrr));\n if (max > 1f) {\n // scale to 1\n pwrl = pwrl / max;\n pwrr = pwrr / max;\n }\n setPower(pwrl,\n pwrr,\n dir);\n /*if (dir == TurnType.STRAFE) {\n long timeStamp = System.currentTimeMillis();\n if (timeStamp - logTimeStamp > 25) {\n RobotLog.i(\"Power left:\" + pwrl + \" right:\" + pwrr);\n logTimeStamp = timeStamp;\n }\n }*/\n }", "public double calcTankWheelPower(int iDriveType, int iWheel, double dLeftPower, double dRightPower ) {\n switch (iWheel) {\n case k_iLeftFrontDrive:\n return dLeftPower;\n case k_iRightFrontDrive:\n return dRightPower;\n case k_iLeftRearDrive:\n return dLeftPower;\n case k_iRightRearDrive:\n return dRightPower;\n\n default:\n // Tell user that the wheel is not valid.\n //telemetry.addData(\"ERROR: ApplyWheelPower: getWheelPower\", \"iWheel is not known.\");\n //telemetry.update();\n return 0.0;\n }\n }", "public void setMotorBehaviors(){\n motors = new ArrayList<>();\n motors.add(rf);\n motors.add(rb);\n motors.add(lf);\n motors.add(lb);\n\n //reset motor encoders\n rf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //Set motor behaviors\n rf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rf.setDirection(DcMotorSimple.Direction.REVERSE);\n rb.setDirection(DcMotorSimple.Direction.REVERSE);\n relic_extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n lift.setDirection(DcMotorSimple.Direction.REVERSE);\n\n //Set servo behaviors\n leftWheel2.setDirection(DcMotorSimple.Direction.REVERSE);\n rightWheel1.setDirection(DcMotorSimple.Direction.REVERSE);\n\n }", "public static final void control(float args_cmd_forward, float args_cmd_turn,\r\n\t\t\tfloat args_gyro, float args_gyro_offset, float args_theta_m_l,\r\n\t\t\tfloat args_theta_m_r, float args_battery) {\r\n\t\tfloat tmp_theta;\r\n\t\tfloat tmp_theta_lpf;\r\n\t\tfloat tmp_pwm_r_limiter;\r\n\t\tfloat tmp_psidot;\r\n\t\tfloat tmp_pwm_turn;\r\n\t\tfloat tmp_pwm_l_limiter;\r\n\t\tfloat tmp_thetadot_cmd_lpf;\r\n\t\tint tmp_0;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S8>/Sum' incorporates: Constant: '<S3>/Constant6' Constant:\r\n\t\t * '<S8>/Constant' Constant: '<S8>/Constant1' Gain: '<S3>/Gain1' Gain:\r\n\t\t * '<S8>/Gain2' Inport: '<Root>/cmd_forward' Product: '<S3>/Divide'\r\n\t\t * Product: '<S8>/Product' Sum: '<S8>/Sum1' UnitDelay: '<S8>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_thetadot_cmd_lpf = (((args_cmd_forward / CMD_MAX) * K_THETADOT) * (1.0F - A_R))\r\n\t\t\t\t+ (A_R * ud_thetadot_cmd_lpf);\r\n\r\n\t\t/*\r\n\t\t * Gain: '<S4>/Gain' incorporates: Gain: '<S4>/deg2rad' Gain:\r\n\t\t * '<S4>/deg2rad1' Inport: '<Root>/theta_m_l' Inport: '<Root>/theta_m_r'\r\n\t\t * Sum: '<S4>/Sum1' Sum: '<S4>/Sum4' Sum: '<S4>/Sum6' UnitDelay:\r\n\t\t * '<S10>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_theta = (((DEG2RAD * args_theta_m_l) + ud_psi) + ((DEG2RAD * args_theta_m_r) + ud_psi)) * 0.5F;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S11>/Sum' incorporates: Constant: '<S11>/Constant' Constant:\r\n\t\t * '<S11>/Constant1' Gain: '<S11>/Gain2' Product: '<S11>/Product' Sum:\r\n\t\t * '<S11>/Sum1' UnitDelay: '<S11>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_theta_lpf = ((1.0F - A_D) * tmp_theta) + (A_D * ud_theta_lpf);\r\n\r\n\t\t/*\r\n\t\t * Gain: '<S4>/deg2rad2' incorporates: Inport: '<Root>/gyro'\r\n\t\t * Sum: '<S4>/Sum2'\r\n\t\t */\r\n\t\ttmp_psidot = (args_gyro - args_gyro_offset) * DEG2RAD;\r\n\r\n\t\t/*\r\n\t\t * Gain: '<S2>/Gain' incorporates: Constant: '<S3>/Constant2' Constant:\r\n\t\t * '<S3>/Constant3' Constant: '<S6>/Constant' Constant: '<S9>/Constant'\r\n\t\t * Gain: '<S1>/FeedbackGain' Gain: '<S1>/IntegralGain' Gain:\r\n\t\t * '<S6>/Gain3' Inport: '<Root>/battery' Product: '<S2>/Product'\r\n\t\t * Product: '<S9>/Product' Sum: '<S1>/Sum2' Sum: '<S1>/sum_err' Sum:\r\n\t\t * '<S6>/Sum2' Sum: '<S9>/Sum' UnitDelay: '<S10>/Unit Delay' UnitDelay:\r\n\t\t * '<S11>/Unit Delay' UnitDelay: '<S5>/Unit Delay' UnitDelay: '<S7>/Unit\r\n\t\t * Delay'\r\n\t\t */\r\n\t\ttmp[0] = ud_theta_ref;\r\n\t\ttmp[1] = 0.0F;\r\n\t\ttmp[2] = tmp_thetadot_cmd_lpf;\r\n\t\ttmp[3] = 0.0F;\r\n\t\ttmp_theta_0[0] = tmp_theta;\r\n\t\ttmp_theta_0[1] = ud_psi;\r\n\t\ttmp_theta_0[2] = (tmp_theta_lpf - ud_theta_lpf) / EXEC_PERIOD;\r\n\t\ttmp_theta_0[3] = tmp_psidot;\r\n\t\ttmp_pwm_r_limiter = 0.0F;\r\n\t\tfor (tmp_0 = 0; tmp_0 < 4; tmp_0++) {\r\n\t\t\ttmp_pwm_r_limiter += (tmp[tmp_0] - tmp_theta_0[tmp_0])\r\n\t\t\t\t\t* K_F[(tmp_0)];\r\n\t\t}\r\n\r\n\t\ttmp_pwm_r_limiter = (((K_I * ud_err_theta) + tmp_pwm_r_limiter) / ((BATTERY_GAIN * args_battery) - BATTERY_OFFSET)) * 100.0F;\r\n\r\n\t\t/*\r\n\t\t * Gain: '<S3>/Gain2' incorporates: Constant: '<S3>/Constant1' Inport:\r\n\t\t * '<Root>/cmd_turn' Product: '<S3>/Divide1'\r\n\t\t */\r\n\t\ttmp_pwm_turn = (args_cmd_turn / CMD_MAX) * K_PHIDOT;\r\n\r\n\t\t/* Sum: '<S2>/Sum' */\r\n\t\ttmp_pwm_l_limiter = tmp_pwm_r_limiter + tmp_pwm_turn;\r\n\r\n\t\t/* Saturate: '<S2>/pwm_l_limiter' */\r\n\t\ttmp_pwm_l_limiter = rt_SATURATE(tmp_pwm_l_limiter, -100.0F, 100.0F);\r\n\r\n\t\t/*\r\n\t\t * Outport: '<Root>/pwm_l' incorporates: DataTypeConversion: '<S1>/Data\r\n\t\t * Type Conversion'\r\n\t\t */\r\n\t\tpwm_l = (int) tmp_pwm_l_limiter;\r\n\r\n\t\t/* Sum: '<S2>/Sum1' */\r\n\t\ttmp_pwm_r_limiter -= tmp_pwm_turn;\r\n\r\n\t\t/* Saturate: '<S2>/pwm_r_limiter' */\r\n\t\ttmp_pwm_r_limiter = rt_SATURATE(tmp_pwm_r_limiter, -100.0F, 100.0F);\r\n\r\n\t\t/*\r\n\t\t * Outport: '<Root>/pwm_r' incorporates: DataTypeConversion: '<S1>/Data\r\n\t\t * Type Conversion6'\r\n\t\t */\r\n\t\tpwm_r = (int) tmp_pwm_r_limiter;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S7>/Sum' incorporates: Gain: '<S7>/Gain' UnitDelay: '<S7>/Unit\r\n\t\t * Delay'\r\n\t\t */\r\n\t\ttmp_pwm_l_limiter = (EXEC_PERIOD * tmp_thetadot_cmd_lpf) + ud_theta_ref;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S10>/Sum' incorporates: Gain: '<S10>/Gain' UnitDelay:\r\n\t\t * '<S10>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_pwm_turn = (EXEC_PERIOD * tmp_psidot) + ud_psi;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S5>/Sum' incorporates: Gain: '<S5>/Gain' Sum: '<S1>/Sum1'\r\n\t\t * UnitDelay: '<S5>/Unit Delay' UnitDelay: '<S7>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_pwm_r_limiter = ((ud_theta_ref - tmp_theta) * EXEC_PERIOD)\r\n\t\t\t\t+ ud_err_theta;\r\n\r\n\t\t/* user code (Update function Body) */\r\n\t\t/* System '<Root>' */\r\n\t\t/* 次回演算用状態量保存処理 */\r\n\r\n\t\t/* Update for UnitDelay: '<S5>/Unit Delay' */\r\n\t\tud_err_theta = tmp_pwm_r_limiter;\r\n\r\n\t\t/* Update for UnitDelay: '<S7>/Unit Delay' */\r\n\t\tud_theta_ref = tmp_pwm_l_limiter;\r\n\r\n\t\t/* Update for UnitDelay: '<S8>/Unit Delay' */\r\n\t\tud_thetadot_cmd_lpf = tmp_thetadot_cmd_lpf;\r\n\r\n\t\t/* Update for UnitDelay: '<S10>/Unit Delay' */\r\n\t\tud_psi = tmp_pwm_turn;\r\n\r\n\t\t/* Update for UnitDelay: '<S11>/Unit Delay' */\r\n\t\tud_theta_lpf = tmp_theta_lpf;\r\n\t}", "@Override\n public void loop() {\n // Setup a variable for each drive wheel to save power level for telemetry\n double leftDrivePower;\n double rightDrivePower;\n double driveMultiplier;\n double slowMultiplier;\n double fastMultiplier;\n double BASE_DRIVE_SPEED = 0.6;\n double elevPower;\n double armPower;\n boolean lowerLimitPressed;\n boolean upperLimitPressed;\n\n\n\n\n // Tank Mode uses one stick to control each wheel.\n // - This requires no math, but it is hard to drive forward slowly and keep straight.\n armPower = -gamepad2.right_stick_x * 0.3;\n\n lowerLimitPressed = !lowerLimit.getState();\n upperLimitPressed = !upperLimit.getState();\n\n if((lowerLimitPressed && -gamepad2.left_stick_y < 0) || (upperLimitPressed && -gamepad2.left_stick_y > 0)){\n elevPower = 0;\n }\n else {\n elevPower = -gamepad2.left_stick_y * 1;\n }\n\n if (gamepad2.left_bumper){\n hookPosDeg = HOOK_UP;\n }\n else if (gamepad2.left_trigger > 0){\n hookPosDeg = HOOK_DOWN;\n }\n\n if (gamepad2.right_bumper){\n clawPosDeg = CLAW_OPEN;\n }\n else if (gamepad2.right_trigger > 0){\n clawPosDeg = CLAW_CLOSED;\n }\n\n if (gamepad1.left_trigger > 0){\n slowMultiplier = 0.10;\n }\n else\n slowMultiplier = 0;\n\n if (gamepad1.right_trigger > 0){\n fastMultiplier = 0.30;\n }\n else\n fastMultiplier = 0;\n\n driveMultiplier = BASE_DRIVE_SPEED + slowMultiplier + fastMultiplier;\n leftDrivePower = -gamepad1.left_stick_y * driveMultiplier;\n rightDrivePower = -gamepad1.right_stick_y * driveMultiplier;\n\n // Send power to actuators\n leftDrive.setPower(leftDrivePower);\n rightDrive.setPower(rightDrivePower);\n elev.setPower(elevPower);\n// arm.setTargetPosition(armTarget);\n// arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n arm.setPower(armPower);\n hookPos = map(hookPosDeg, HOOK_MIN_POS_DEG, HOOK_MAX_POS_DEG, HOOK_MIN_POS, HOOK_MAX_POS);\n clawPos = map(clawPosDeg, CLAW_MIN_POS_DEG, CLAW_MAX_POS_DEG, CLAW_MIN_POS, CLAW_MAX_POS);\n hook.setPosition(hookPos);\n claw.setPosition(clawPos);\n\n // Show the elapsed game time and wheel power.\n telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n telemetry.addData(\"Drive\", \"left (%.2f), right (%.2f)\", leftDrivePower, rightDrivePower);\n telemetry.addData( \"Elev\", \"power (%.2f)\", elevPower);\n telemetry.addData(\"Limit\", \"lower (%b), upper (%b)\", lowerLimitPressed, upperLimitPressed);\n telemetry.addData(\"Arm Enc\", arm.getCurrentPosition());\n\n }", "double a_left_front_drive_power()\n {\n double l_return = 0.0;\n if (left_front_drv_Motor != null)\n {\n l_return = left_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "@Override\n public void runOpMode(){\n motors[0][0] = hardwareMap.dcMotor.get(\"frontLeft\");\n motors[0][1] = hardwareMap.dcMotor.get(\"frontRight\");\n motors[1][0] = hardwareMap.dcMotor.get(\"backLeft\");\n motors[1][1] = hardwareMap.dcMotor.get(\"backRight\");\n // The motors on the left side of the robot need to be in reverse mode\n for(DcMotor[] motor : motors){\n motor[0].setDirection(DcMotor.Direction.REVERSE);\n }\n // Being explicit never hurt anyone, right?\n for(DcMotor[] motor : motors){\n motor[1].setDirection(DcMotor.Direction.FORWARD);\n }\n\n waitForStart();\n\n //Kill ten seconds\n runtime.reset();\n while(runtime.seconds()<10); runtime.reset();\n\n while(runtime.milliseconds()<700){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(100);\n // Set right motor power\n motor[1].setPower(100);\n }\n }\n\n while(runtime.milliseconds()<200){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(-100);\n // Set right motor power\n motor[1].setPower(-100);\n }\n }\n\n runtime.reset();\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(0);\n // Set right motor power\n motor[1].setPower(0);\n }\n }", "public void drive(double leftMotors, double rightMotors) {\n\t\tleft1.set(leftMotors);\n\t\tleft2.set(leftMotors);\n\t\tleft3.set(leftMotors);\n\t\tright1.set(rightMotors);\n\t\tright2.set(rightMotors);\n\t\tright3.set(rightMotors);\n\t}", "public void smoothMovePower(String movement, double power, double duration)\n {\n double startTime = getRuntime();\n switch(movement)\n {\n case \"forward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"backward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"right\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"left\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"leftTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"rightTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n }\n }", "@Override\n public void loop() { //Starts this loop after you press the START Button\n /**\n * Functional control of up down lift with no limit switches Meet 0 ready\n */\n double liftposition = robot.liftUpDown.getCurrentPosition();\n double liftrotposition = robot.liftRotate.getCurrentPosition();\n telemetry.addData(\"Lift Position\",\"%5.2f\",liftposition);\n telemetry.addData(\"LiftRot Position\", \"%5.2f\", liftrotposition);\n // telemetry.addData(\"Block Stack\", BlockStack);\n telemetry.update();\n\n/**Main drive controls\n * Driver 1\n */\n\n/**\n * Drag servos\n */\n if (gamepad1.a){ //release\n robot.drag1.setPosition(0);\n robot.drag2.setPosition(1);\n } else if (gamepad1.b){//grab\n robot.drag1.setPosition(1);\n robot.drag2.setPosition(0);\n }\n\n/**Mast and Lift controls\n *\n *\n * Driver Two\n *\n *\n*/\n\n/**\n * Need controls to\n * Maybe predetermined locations based on number of pushes of a button.\n */\n\n /**\n * Functional arm rotation with limit switches and encoder limits. Meet 2 ready\n */\n\n //Twists lift up after verifying that rotate up limit switch is not engaged and that step count is less than 5400\n if ( gamepad2.dpad_up && robot.rotateup.getState() == true){\n robot.liftRotate.setPower(1.0);\n }\n else if (gamepad2.dpad_down && robot.rotatedown.getState() == true){ //Twists lift down\n robot.liftRotate.setPower(-1.0);\n }\n //required or lift rotate motor continues to run in last direction (breaks the motor shaft)\n else robot.liftRotate.setPower(0);\n\n /**\n * claw controls a= open b= close\n * FUNCTIONAL Meet 2 ready\n */\n if (gamepad2.a){\n robot.claw1.setPosition(0);\n robot.claw2.setPosition(1);\n } else if (gamepad2.b){\n robot.claw1.setPosition(1);\n robot.claw2.setPosition(0);\n }\n\n /**\n * Lift controls with limit switches and encoder position Meet 2 ready\n * right_trigger = lift\n * left_trigger = down\n */\n\n if ( gamepad2.right_trigger>= 0.2 && robot.liftup.getState()) {\n triggerpress=true;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftUpDown.setPower(.9);\n robot.liftRotate.setPower(.15);\n }\n if (gamepad2.left_trigger>=0.2){\n triggerpress=true;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftUpDown.setPower(-0.9);\n robot.liftRotate.setPower(-0.15);\n }\n if (gamepad2.left_trigger<.2 && gamepad2.right_trigger<.2 && triggerpress ){\n robot.liftUpDown.setPower(0);\n robot.liftRotate.setPower(0);\n triggerpress=false;\n }\n\n int x;\n int y;\n double motorDelayTime;\n //Necessary Debounce to keep bumper from being seen as multiple touches\n/* motorDelayTime=.1;\n if (robot.liftUpDown.getCurrentPosition()<50){\n BlockStack =0;\n }\n //skips servos unless runtime is greater than 20 ms.\n if( runtime.time() > motorDelayTime ) {\n //Need to move 5.5 inches on position 2, subsequent blocks will only need to move up 4 inches.\n x = robot.liftUpDown.getCurrentPosition();\n y= robot.liftRotate.getCurrentPosition();\n if (gamepad2.right_bumper ) {\n\n BlockStack= BlockStack + 1;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftUpDown.setTargetPosition(x + robot.floorheight);\n robot.liftUpDown.setPower(.9);\n robot.liftRotate.setTargetPosition(y + robot.floorheightrotate);\n robot.liftRotate.setPower(.1);\n bumperpress=true;\n\n //don't want to drive the cable too far loose checks that we can move a full block down\n } else if (gamepad2.left_bumper && x >= robot.floorheight ) {\n BlockStack= BlockStack - 1;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftUpDown.setTargetPosition(x - robot.floorheight);\n robot.liftUpDown.setPower(-.5);\n}\n\n runtime.reset();\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }*/\n\n /**\n * Limit switch tests that reset the encoders Meet 1 ready\n * * liftdown also allows the X button to work\n * * rotatedown also allows the Y button to work\n */\n\n if (robot.rotatedown.getState() == false) {\n robot.liftRotate.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "void drive(double x_stick, double y_stick, double x_right_stick, double multiplier) {\n if (Math.abs(x_stick) >= (2 * Math.abs(y_stick)) + .1) {\n flMotor.setPower(x_stick * multiplier);\n frMotor.setPower(-x_stick * multiplier);\n blMotor.setPower(-x_stick * multiplier);\n brMotor.setPower(x_stick * multiplier);\n } else {\n flMotor.setPower((y_stick + x_right_stick) * multiplier);\n frMotor.setPower((y_stick - x_right_stick) * multiplier);\n blMotor.setPower((y_stick + x_right_stick) * multiplier);\n brMotor.setPower((y_stick - x_right_stick) * multiplier);\n }\n }", "double a_right_back_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_back_drv_Motor != null)\n {\n l_return = right_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "public void driveRaw (double left, double right) {\n leftBackMotor.set(left);\n leftMiddleMotor.set(left);\n leftFrontMotor.set(left);\n rightBackMotor.set(right);\n rightMiddleMotor.set(right);\n rightFrontMotor.set(right);\n }", "double a_left_back_drive_power()\n {\n double l_return = 0.0;\n if (left_back_drv_Motor != null)\n {\n l_return = left_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "@Override\n public void main() throws InterruptedException {\n this.motorLeft = this.hardwareMap.dcMotor.get(\"motorLeft\");\n this.motorRight = this.hardwareMap.dcMotor.get(\"motorRight\");\n\n motorLeft.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n motorRight.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n\n motorRight.setDirection(DcMotor.Direction.REVERSE);\n\n// boolean test = true;\n// while (test) {\n// motorLeft.setPower(1.0);\n// motorRight.setPower(1.0);\n//\n// if (updateGamepads())\n// {\n// if (gamepad1.b)\n// {\n// test = false;\n// }\n// }\n// }\n\n // while (opModeIsActive())\n // gamepad1.a\n while (true)\n {\n if (updateGamepads())\n {\n motorLeft.setPower(gamepad1.left_stick_y);\n motorRight.setPower(gamepad1.right_stick_y);\n\n // move the arm with controller bumpers\n if (gamepad1.right_bumper)\n {\n motorArm.setPower(0.5);\n Thread.sleep(100);\n }\n else if (gamepad1.left_bumper)\n {\n motorArm.setPower(-0.5);\n Thread.sleep(100);\n }\n else\n {\n motorArm.setPower(0);\n }\n }\n\n telemetry.update();\n idle();\n }\n }", "@Override\n protected void execute() {\n\n int leftMultiplier = -1;\n if (IsLeft) {\n leftMultiplier = 1;\n }\n Robot.m_drivetrain.drive(leftMultiplier * .5, -leftMultiplier * .5);\n\n }", "public void moveBot(double drive, double rotate, double strafe, double scaleFactor)\n {\n double wheelSpeeds[] = new double[4];\n\n wheelSpeeds[0] = drive - rotate - strafe; // Right Read\n wheelSpeeds[1] = drive - rotate + strafe; // Right Front\n wheelSpeeds[2] = drive + rotate + strafe; // Left Rear\n wheelSpeeds[3] = drive + rotate - strafe; // Left Front\n // Find the magnitude of the first element in the array\n double maxMagnitude = Math.abs(wheelSpeeds[0]);\n // If any of the other wheel speeds are bigger, save that value in maxMagnitude\n for (int i = 1; i < wheelSpeeds.length; i++)\n {\n double magnitude = Math.abs(wheelSpeeds[i]);\n if (magnitude > maxMagnitude)\n {\n maxMagnitude = magnitude;\n }\n }\n // Normalize all of the magnitudes to below 1\n if (maxMagnitude > 1.0)\n {\n for (int i = 0; i < wheelSpeeds.length; i++)\n {\n wheelSpeeds[i] /= maxMagnitude;\n }\n }\n\n // Compare last wheel speeds to commanded wheel speeds and ramp as necessary\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n // If the commanded speed value is more than SPEED_INCREMENT away from the last known wheel speed\n if (Math.abs(wheelSpeeds[i] - lastwheelSpeeds[i]) > SPEED_INCREMENT){\n // Set the current wheel speed to the last wheel speed plus speed increment in the signed directin of the difference\n wheelSpeeds[i] = lastwheelSpeeds[i] + Math.copySign(SPEED_INCREMENT,wheelSpeeds[i] - lastwheelSpeeds[i]);\n }\n }\n\n // Send the normalized values to the wheels, further scaled by the user\n rightRearDrive.setPower(wheelSpeeds[0] * scaleFactor);\n rightFrontDrive.setPower(wheelSpeeds[1] * scaleFactor);\n leftRearDrive.setPower(wheelSpeeds[2] * scaleFactor);\n leftFrontDrive.setPower(wheelSpeeds[3] * scaleFactor);\n\n // Save the last wheel speeds to assist in ramping\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n lastwheelSpeeds[i] = wheelSpeeds[i];\n }\n }", "public void mecanumDrive(double forward, double turn, double strafe, double multiplier) {\n double vd = Math.hypot(forward, strafe);\n double theta = Math.atan2(forward, strafe) - (Math.PI / 4);\n turnPower = turn;\n\n// if(forward == 0 && strafe == 0 && turn == 0) {\n// Time.reset();\n// }\n//\n// double accLim = (Time.time()/1.07)*((0.62*Math.pow(Time.time(), 2))+0.45);\n//\n// if(forward < 0 || turn < 0 || strafe < 0) {\n//\n// }\n//\n// if(turn == 0) {\n// targetAngle = getImuAngle();\n// turnPower = pid.run(0.001, 0, 0, 10, targetAngle);\n// } else {\n// targetAngle = getImuAngle();\n// }\n\n double[] v = {\n vd * Math.sin(theta) - turnPower,\n vd * Math.cos(theta) + turnPower,\n vd * Math.cos(theta) - turnPower,\n vd * Math.sin(theta) + turnPower\n };\n\n double[] motorOut = {\n multiplier * (v[0] / 1.07) * ((0.62 * Math.pow(v[0], 2)) + 0.45),\n multiplier * (v[1] / 1.07) * ((0.62 * Math.pow(v[1], 2)) + 0.45),\n multiplier * (v[2] / 1.07) * ((0.62 * Math.pow(v[2], 2)) + 0.45),\n multiplier * (v[3] / 1.07) * ((0.62 * Math.pow(v[3], 2)) + 0.45)\n };\n\n fr.setPower(motorOut[0]);\n fl.setPower(motorOut[1]);\n br.setPower(motorOut[2]);\n bl.setPower(motorOut[3]);\n }", "public void runMotor(Motor motor, double power) {\n\n\n switch (motor) {\n\n case LEFT_LFB:\n motorLFB.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LFT:\n motorLFT.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LBT:\n motorLBT.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LBB:\n motorLBB.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RFB:\n motorRFB.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RFT:\n motorRFT.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RBT:\n motorRBT.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RBB:\n motorRBB.set(ControlMode.PercentOutput, power);\n break;\n }\n }", "@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }", "public void encoderDrive(double speed,\r\n double leftInches, \r\n double rightInches,\r\n String name) \r\n {\n int newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH);\r\n int newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH);\r\n robot.leftDrive.setTargetPosition(newLeftTarget);\r\n robot.rightDrive.setTargetPosition(newRightTarget);\r\n\r\n // Turn On RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n\r\n // reset the timeout time and start motion.\r\n ElapsedTime localTimer = new ElapsedTime();\r\n localTimer.reset();\r\n robot.leftDrive.setPower(Math.abs(speed));\r\n robot.rightDrive.setPower(Math.abs(speed));\r\n\r\n // keep looping while we are still active, and there is time left, and both motors are running.\r\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\r\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\r\n // always end the motion as soon as possible.\r\n // However, if you require that BOTH motors have finished their moves before the robot continues\r\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\r\n while (localTimer.seconds() < EncoderDrive_Timeout_Second \r\n && (robot.leftDrive.isBusy() || robot.rightDrive.isBusy())) {\r\n\r\n // Display it for the driver.\r\n telemetry.addData(\"\", \"%s @ %s\", name, localTimer.toString());\r\n telemetry.addData(\"To\", \"%7d :%7d\", newLeftTarget, newRightTarget);\r\n telemetry.addData(\"At\", \"%7d :%7d\",\r\n robot.leftDrive.getCurrentPosition(),\r\n robot.rightDrive.getCurrentPosition());\r\n telemetry.update();\r\n idle();\r\n }\r\n\r\n // Stop all motion;\r\n robot.leftDrive.setPower(0);\r\n robot.rightDrive.setPower(0);\r\n\r\n // Turn off RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n }", "public void setLeftRightMotorOutputs(double leftOutput, double rightOutput) {\r\n\t\tif (m_rightCIMMotor2 == null || m_rightCIMMotor1 == null || m_rightMiniCIMMotor1 == null || m_leftCIMMotor1 == null\r\n\t\t\t\t|| m_leftCIMMotor2 == null || m_leftMiniCIMMotor1 == null) {\r\n\t\t\tthrow new NullPointerException(\"Null motor provided\");\r\n\t\t}\r\n\t\tif(getIsGearAutomaticMode()) {\r\n\t\t\tsetGear(getNewAutomaticGear());\r\n\t\t}\r\n\t\r\n\t\tif (m_leftCIMMotor1 != null) {\r\n\t\t\tm_leftCIMMotor1.set(limit(leftOutput) * m_maxOutput);\r\n\t\t}\r\n\t\tif (m_leftCIMMotor2 != null) {\r\n\t\t\tm_leftCIMMotor2.set(limit(leftOutput) * m_maxOutput);\r\n\t\t}\r\n\t\tif (m_leftMiniCIMMotor1 != null) {\r\n\t\t\tif(m_useMiniCIMs) {\r\n\t\t\t\tm_leftMiniCIMMotor1.set(limit(leftOutput) * m_maxOutput);\r\n\t\t\t}else {\r\n\t\t\t\tm_leftMiniCIMMotor1.set(0);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (m_rightCIMMotor1 != null) {\r\n\t\t\tm_rightCIMMotor1.set(-limit(rightOutput) * m_maxOutput);\r\n\t\t}\r\n\t\tif (m_rightCIMMotor2 != null) {\r\n\t\t\tm_rightCIMMotor2.set(-limit(rightOutput) * m_maxOutput);\r\n\t\t}\r\n\t\tif (m_rightMiniCIMMotor1 != null) {\r\n\t\t\tif(m_useMiniCIMs) {\r\n\t\t\t\tm_rightMiniCIMMotor1.set(-limit(rightOutput) * m_maxOutput);\r\n\t\t\t}else {\r\n\t\t\t\tm_rightMiniCIMMotor1.set(0);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (m_safetyHelper != null) {\r\n\t\t\tm_safetyHelper.feed();\r\n\t\t}\r\n\t}", "protected void encoderDrive(double leftInches, double rightInches, double speed, double desiredAngle) {\n if (!doMotors)\n return;\n\n if (desiredAngle >= 0.0f) {\n motorPid.reset();\n motorPid.setSetpoint(0);\n motorPid.setOutputRange(0, speed);\n motorPid.setInputRange(-90, 90);\n motorPid.enable();\n }\n\n float startAngle = getGyroscopeAngle();\n double countsPerInch = COUNTS_PER_MOTOR / (WHEEL_DIAMETER * Math.PI);\n int softStartDuration = 2000; // in milliseconds\n int brakeOffsetOne = (int) (18.0f * countsPerInch);\n int brakeOffsetTwo = (int) (8.0f * countsPerInch);\n\n // Get the starting position of the encoders.\n isDriving = true;\n driveLeftStart = leftDrive.getCurrentPosition();\n driveRightStart = rightDrive.getCurrentPosition();\n\n int leftNew = (int) (leftInches * countsPerInch * RAT_FUDGE);\n int rightNew = (int) (rightInches * countsPerInch * RAT_FUDGE);\n driveLeftTarget = driveLeftStart + leftNew;\n driveRightTarget = driveRightStart + rightNew;\n leftDrive.setTargetPosition(driveLeftTarget);\n rightDrive.setTargetPosition(driveRightTarget);\n\n // Turn On RUN_TO_POSITION\n leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // Compute the braking zones.\n int leftBrakeOne = driveLeftStart + brakeOffsetOne; // how many remaining will trigger it\n int rightBrakeOne = driveRightStart + brakeOffsetOne;\n int leftBrakeTwo = driveLeftStart + brakeOffsetTwo;\n int rightBrakeTwo = driveRightStart + brakeOffsetTwo;\n\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n ElapsedTime motorOnTime = new ElapsedTime();\n boolean keepGoing = true;\n while (opModeIsActive() && keepGoing && (motorOnTime.seconds() < 30)) {\n printStatus();\n\n int leftPos = leftDrive.getCurrentPosition();\n int rightPos = rightDrive.getCurrentPosition();\n\n // soft start\n double currSpeed = speed;\n double elapsed = motorOnTime.milliseconds();\n if (elapsed < softStartDuration) {\n double ratio = elapsed / softStartDuration;\n currSpeed *= ratio;\n }\n\n // Throttle speed down as we approach our target\n int remainingLeft = driveLeftTarget - leftPos;\n int remainingRight = driveRightTarget - rightPos;\n if ((Math.abs(remainingLeft) < brakeOffsetTwo) || (Math.abs(remainingRight) < brakeOffsetTwo)) {\n currSpeed *= 0.25;\n } else if ((Math.abs(remainingLeft) < brakeOffsetOne) || (Math.abs(remainingRight) < brakeOffsetOne)) {\n currSpeed *= 0.5;\n }\n\n // Calculate PID correction = straighten out the line!\n if (desiredAngle >= 0.0f) {\n float currentAngle = getGyroscopeAngle();\n driveAngleOffset = getAngleDifference(currentAngle, (float)desiredAngle);\n driveAngleCorrection = (float) motorPid.performPID(driveAngleOffset);\n if ((leftInches < 0) && (rightInches < 0)) {\n driveAngleCorrection = -driveAngleCorrection;\n }\n }\n\n // Record and apply the desired power level.\n driveLeftSpeed = currSpeed - driveAngleCorrection;\n driveRightSpeed = currSpeed + driveAngleCorrection;\n leftDrive.setPower(Math.abs(driveLeftSpeed));\n rightDrive.setPower(Math.abs(driveRightSpeed));\n\n keepGoing = rightDrive.isBusy() && leftDrive.isBusy();\n }\n\n // Turn off RUN_TO_POSITION\n printStatus();\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n driveLeftStart = 0;\n driveRightStart = 0;\n driveLeftTarget = 0;\n driveRightTarget = 0;\n driveLeftSpeed = 0.0f;\n driveRightSpeed = 0.0f;\n driveAngleOffset = 0.0f;\n driveAngleCorrection = 0.0f;\n isDriving = false;\n }", "private void controlLift()\n {\n if (gamepad1.dpad_up) {\n liftMotor.setPower(-0.5);\n } else if (gamepad1.dpad_down) {\n liftMotor.setPower(0.5);\n } else {++backInc;\n liftMotor.setPower(0);\n }\n }", "@SuppressWarnings(\"unused\")\n\tpublic void execute(){\n\t\tdouble mtrFrontRight;\n\t\tdouble mtrFrontLeft;\n\t\tdouble mtrBackRight;\n\t\tdouble mtrBackLeft;\n\t\t\n\t\tdouble speed = 3.0; //The variable we are assigning\n\t\tdouble yawHeading = 0; //Obtained from Robot class\n\t\t\n\t\tdouble getCurrentSetPoint = 0.0; //This Will be obtained via a variable set in the turn to heading class as it is obtained. (possible issues)\n\t\tdouble actualEncoderSetpoint; //Represents the value the encoder is actually at.\n\t\t\n\t\tdouble zeroHeading; //This is a weird one. it is there because of the odd difference calculations issue of say being 5 off of zero and heading being 355;\n\t\t\n\t\t\n\t\t//Switch structure stuff\n\t\tint forward = 0;\n\t\tint left = 1;\n\t\tint right = 2;\n\t\tint state = forward;\n\t\t\n\t\t\n\t\tif(getCurrentSetPoint == 0) {\n\t\t\tstate = forward;\n\t\t} else if(getCurrentSetPoint == 90) {\n\t\t\tstate = right;\n\t\t} else if(getCurrentSetPoint == 270) {\n\t\t\tstate = left;\n\t\t}\n\t\t\n\t\t//where the weirdness of zero heading comes into play.\n\t\tif(yawHeading > 180){\n\t\t\tzeroHeading = 360 - yawHeading;\n\t\t\tzeroHeading = -(zeroHeading);\n\t\t} else {\n\t\t\tzeroHeading = yawHeading;\n\t\t}\n\t\t\n\t\t//Here comes the fun math.\n\t\t// oh yeah and brackets are fun just saying.\n\t\t//try not to get cancer.\n\t\t\n\t\tswitch (state) {\n\t\t\t\n\t\t\tcase 0 :\n\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\tmtrFrontRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrBackRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\tmtrFrontLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\tmtrBackLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\tcase 1 :\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\t\tmtrBackRight = -(speed - ((zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\t\tmtrBackLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\t\tmtrFrontRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\t\tmtrFrontLeft = speed - ((-zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\tcase 2 : \n\t\t\t\tif(zeroHeading < -5) {\n\t\t\t\t\tmtrBackRight = -(speed - ((-zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrBackLeft = speed - ((-zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrBackRight = -speed;\n\t\t\t\t\tmtrBackLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(zeroHeading > 5) {\n\t\t\t\t\tmtrFrontRight = -(speed - ((zeroHeading * Math.pow(10, -1)) * .3) );\n\t\t\t\t\tmtrFrontLeft = speed - ((zeroHeading * Math.pow(10, -1)) * .3);\n\t\t\t\t} else {\n\t\t\t\t\tmtrFrontRight = -speed;\n\t\t\t\t\tmtrFrontLeft = speed;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}", "public void updatePower(double power){\n for(DcMotor motor : this.motors){\n motor.setPower(Range.clip(power*this.direction,-this.power,this.power));\n }\n }", "protected void execute() {\r\n\t//double leftSpeed = oi.leftUpAndDown();\r\n\tdouble leftSpeed = motorScalerLeft.scale(oi.leftUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\leftSpeed\", leftSpeed);\r\n\t\r\n\t//double rightSpeed = oi.rightUpAndDown();\r\n\tdouble rightSpeed = motorScalerRight.scale(oi.rightUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\rightSpeed\", rightSpeed);\r\n\t\r\n\ttheDrive.goVariable(-leftSpeed,-rightSpeed);\r\n }", "public void forward(double power, double distance) {\n\n int ticks = (int) (((distance / (4 * Math.PI) * 1120)) * 4 / 3 + 0.5);\n\n //Reset Encoders358\n// fL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// bL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// fR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// bR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //Set to RUN_TO_POSITION mode\n fL.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n bL.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n fR.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n bR.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //Set Target Position\n fL.setTargetPosition(fL.getCurrentPosition() + ticks);\n bL.setTargetPosition(bL.getCurrentPosition() + ticks);\n fR.setTargetPosition(fR.getCurrentPosition() + ticks);\n bR.setTargetPosition(bR.getCurrentPosition() + ticks);\n\n //Set Drive Power\n fL.setPower(power);\n bL.setPower(power);\n fR.setPower(power);\n bR.setPower(power);\n\n while (fL.isBusy() && fR.isBusy() && bL.isBusy() && bR.isBusy()) {\n //Wait Until Target Position is Reached\n }\n\n //Stop and Change Mode back to Normal\n fL.setPower(0);\n bL.setPower(0);\n fR.setPower(0);\n bR.setPower(0);\n }", "@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }", "public void encoderDrive(double speed,\n double leftInches, double rightInches,\n double timeoutS) {\n int newLeftTarget;\n int newRightTarget;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH);\n newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH);\n robot.leftDrive.setTargetPosition(newLeftTarget);\n robot.rightDrive.setTargetPosition(newRightTarget);\n\n // Turn On RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // reset the timeout time and start motion.\n runtime.reset();\n robot.leftDrive.setPower(Math.abs(speed));\n robot.rightDrive.setPower(Math.abs(speed));\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n while (opModeIsActive() &&\n (runtime.seconds() < timeoutS) &&\n (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Path1\", \"Running to %7d :%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Path2\", \"Running at %7d :%7d\",\n robot.leftDrive.getCurrentPosition(),\n robot.rightDrive.getCurrentPosition());\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "@Override\r\n public void runOpMode() {\n\r\n mtrFL = hardwareMap.dcMotor.get(\"fl_drive\");\r\n mtrFR = hardwareMap.dcMotor.get(\"fr_drive\");\r\n mtrBL = hardwareMap.dcMotor.get(\"bl_drive\");\r\n mtrBR = hardwareMap.dcMotor.get(\"br_drive\");\r\n\r\n\r\n // Set directions for motors.\r\n mtrFL.setDirection(DcMotor.Direction.REVERSE);\r\n mtrFR.setDirection(DcMotor.Direction.FORWARD);\r\n mtrBL.setDirection(DcMotor.Direction.REVERSE);\r\n mtrBR.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n\r\n //zero power behavior\r\n mtrFL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrFR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrBL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrBR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n\r\n\r\n // Set power for all motors.\r\n mtrFL.setPower(powFL);\r\n mtrFR.setPower(powFR);\r\n mtrBL.setPower(powBL);\r\n mtrBR.setPower(powBR);\r\n\r\n\r\n // Set all motors to run with given mode\r\n mtrFL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrFR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrBL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrBR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n\r\n waitForStart();\r\n\r\n // run until the end of the match (driver presses STOP)\r\n while (opModeIsActive()) {\r\n g1ch2 = -gamepad1.left_stick_y;\r\n g1ch3 = gamepad1.right_stick_x;\r\n g2ch2 = -gamepad2.left_stick_x;\r\n g2ch4 = -gamepad2.right_stick_x;\r\n g2left = gamepad2.left_trigger;\r\n g2right = gamepad2.right_trigger;\r\n\r\n\r\n powFL = Range.clip(g1ch2 + g1ch3, -1, 1);\r\n powFR = Range.clip(g1ch2 - g1ch3, -1, 1);\r\n powBL = Range.clip(g1ch2 + g1ch3, -1, 1);\r\n powBR = Range.clip(g1ch2 - g1ch3, -1, 1);\r\n\r\n\r\n mtrFL.setPower(powFL);\r\n mtrFR.setPower(powFR);\r\n mtrBL.setPower(powBL);\r\n mtrBR.setPower(powBR);\r\n sleep(50);\r\n }\r\n }", "private void rotate(int degrees, double power) {\n telemetry.addData(\"command\", \"turn %f.1\\u00B0 turn.\");\n // restart imu angle tracking.\n resetAngle();\n\n // if degrees > 359 we cap at 359 with same sign as original degrees.\n if (Math.abs(degrees) > 359)\n degrees = (int) Math.copySign(359, degrees);\n\n // Start pid controller. PID controller will monitor the turn angle with\n // respect to the target angle and reduce power as we approach the target\n // angle. This is to prevent the robots momentum from overshooting the\n // turn after we turn off the power. The PID controller reports onTarget\n // () = true when the difference between turn angle and target angle is\n // within 1% of target (tolerance) which is about 1 degree. This helps\n // prevent overshoot. Overshoot depends on the motor and gearing\n // configuration, starting power, weight of the robot and the on target\n // tolerance. If the controller overshoots, it will reverse the sign of\n // the output turning the robot back toward the setpoint value.\n\n pidRotate.reset();\n pidRotate.setSetpoint(degrees);\n pidRotate.setInputRange(0, degrees);\n pidRotate.setOutputRange(0, power);\n pidRotate.setTolerance(0.01);\n pidRotate.enable();\n\n // getAngle() returns + when rotating counter clockwise (left) and - when\n // rotating clockwise (right).\n\n // rotate until turn is completed.\n\n if (degrees < 0) {\n do {\n power = pidRotate.performPID(getAngle()); // power will be - on right\n // turn.\n robot.leftDrive.setPower(-power);\n robot.rightDrive.setPower(power);\n } while (opModeIsActive() && !pidRotate.onTarget());\n } else // left turn.\n do {\n power = pidRotate.performPID(getAngle()); // power will be + on left\n // turn.\n robot.leftDrive.setPower(-power);\n robot.rightDrive.setPower(power);\n } while (opModeIsActive() && !pidRotate.onTarget());\n // reset angle tracking on new heading.\n stopMotors();\n pidDrive.disable();\n\n // wait for motors to calm down.\n sleep(500);\n\n rotation = getAngle();\n resetAngle();\n }", "public void tankDrive(double leftSpeed, double rightSpeed) {\n leftSpeed = clipRange(leftSpeed);\n rightSpeed = clipRange(rightSpeed);\n\n double[] wheelSpeeds = new double[2];\n wheelSpeeds[MotorType.kLeft.value] = leftSpeed;\n wheelSpeeds[MotorType.kRight.value] = rightSpeed;\n\n normalize(wheelSpeeds);\n\n motors[MotorType.kLeft.value].set(wheelSpeeds[0] * maxOutput);\n motors[MotorType.kRight.value].set(wheelSpeeds[1] * -maxOutput);\n }", "public void setLeftRightMotorOutputs(double left, double right)\n\t{\n\t\tleft = MathUtil.clamp(left, -1.0, +1.0);\n\t\tright = MathUtil.clamp(right, -1.0, +1.0);\n\t\t\n\t\tleftMotor1.set(ControlMode.PercentOutput, Math.copySign(left * left, left));\n\t\trightMotor1.set(ControlMode.PercentOutput, Math.copySign(right * right, right));\n\t}", "public void operatorControl() {\n \tmyRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tdouble x = stick2.getRawAxis(0);\n \tdouble y = stick2.getRawAxis(1);\n \tdouble rot = stick.getRawAxis(0);\n \tSmartDashboard.putNumber(\"x1\", x);\n SmartDashboard.putNumber(\"y1\", y);\n SmartDashboard.putNumber(\"rot1\", rot);\n \tif(Math.abs(x) < .2)\n \t\tx = 0;\n \tif(Math.abs(y) < .2)\n \t\ty = 0;\n \tif(Math.abs(rot) < .2)\n \t\trot = 0;\n \tmyRobot.mecanumDrive_Cartesian(x*-1, y*-1,rot*-1, gyro.getAngle());\n double current1 = pdp.getCurrent(0);\n double current2 = pdp.getCurrent(13);\n double current3 = pdp.getCurrent(15);\n double current4 = pdp.getCurrent(12);\n SmartDashboard.putNumber(\"Front Left current\", current1);\n SmartDashboard.putNumber(\"back Left current\", current2);\n SmartDashboard.putNumber(\"Front right current\", current3);\n SmartDashboard.putNumber(\"back right current\", current4);\n SmartDashboard.putNumber(\"x\", x);\n SmartDashboard.putNumber(\"y\", y);\n SmartDashboard.putNumber(\"rot\", rot);\n SmartDashboard.putNumber(\"Gyro\", gyro.getAngle());\n \tTimer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "public void collect(double leftspeed,double rightspeed) {\n\t\tleftmotor.set(leftspeed);\n\t\trightmotor.set(-rightspeed);\n\t}", "@Override\n public void loop() {\n rightArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\n leftArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\nrightArm.setPower(.6);\nleftArm.setPower(.6);\nif(runtime.seconds()>4&& stage==-1){\n stage++;\n}\n// telemetry.addData(\"IsAligned\" , detector.getAligned()); // Is the bot aligned with the gold mineral?\n// telemetry.addData(\"X Pos\" , detector.getXPosition()); // Gold X position.\n\n //Point screenpos = detector.getScreenPosition();\n if(stage==0) {\n Rect bestRect = detector.getFoundRect();\n\n double xPos = bestRect.x + (bestRect.width / 2);\n\n if (xPos < alignXMax && xPos > alignXMin) {\n aligned = true;\n } else {\n aligned = false;\n }\n telemetry.addData(\"aligned \", aligned);\n\n telemetry.addData(\"xpos \", xPos);\n telemetry.addData(\"amax \", alignXMax);\n telemetry.addData(\"amin \", alignXMin);\n if(!(xPos>0)){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"not detected\");\n }\n else if (xPos > alignXMax) {\n double power = ((xPos - alignXMax) / scale) * .3 + .4;\n rightWheel.setPower(power);\n leftWheel.setPower(-power);\n telemetry.addData(\"powL: \", power);\n telemetry.addLine(\"turning left\");\n runtime.reset();\n } else if (xPos < alignXMin) {\n double power = ((alignXMin - xPos) / scale) * .3 + .4;\n rightWheel.setPower(-power);\n leftWheel.setPower(power);\n telemetry.addData(\"powR: \", power);\n telemetry.addLine(\"turning right\");\n runtime.reset();\n } else {\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"found\");\n telemetry.addData(\"secks: \", runtime.seconds());\n if(runtime.seconds()>.1){\n runtime.reset();\n stage++;\n resetDriveEncoders();\n }\n }\n\n\n }\n else if (stage==1){\n rightWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setPower(.5);\n rightWheel.setPower(.5);\n if(runtime.seconds()>5){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n }\n\n }\n\n\n telemetry.addData(\"stage: \", stage);\n telemetry.update();\n }", "public void tankDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set(joystickRYAxis);\n\t\t\tmotorRF.set(joystickRYAxis);\n\t\t\tmotorLB.set(-joystickLYAxis);\n\t\t\tmotorLF.set(-joystickLYAxis);\n\n\t\t} else {\n\t\t\tmotorRB.set(joystickRYAxis/2);\n\t\t\tmotorRF.set(joystickRYAxis/2);\n\t\t\tmotorLB.set(-joystickLYAxis/2);\n\t\t\tmotorLF.set(-joystickLYAxis/2);\n\t\t\t//System.out.println(strongBad.motorMultiplier);\n\t\t\t//SmartDashboard.putNumber(\"MM2\", strongBad.motorMultiplier);\n\n\t\t}\n\t}", "public void setPower(double pow){\n if(pow > 0) {\n crServo.setPower(ZERO_POWER_POSITION + (1 - ZERO_POWER_POSITION) * pow);\n } else if (pow < 0) {\n crServo.setPower(ZERO_POWER_POSITION * (1 + pow));\n } else {\n crServo.setPower(ZERO_POWER_POSITION);\n }\n }", "public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }", "public final void GyroTurn (int degrees, double power)\n {\n //Define gyro angle\n float GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n\n //While the gyro is reading degrees that is not the desired, turn right or left\n while (GyroAngle != degrees)\n {\n //\n robot.DriveLeftBack.setPower(-.1);\n robot.DriveRightBack.setPower(.1);\n robot.DriveRightFront.setPower(.1);\n robot.DriveLeftFront.setPower(-.1);\n\n //Update gyro angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n\n //Stop\n Stop();\n }", "public void loop()\n {\n double rightPower, leftPower;\n double gearRatio = gamepad1.right_bumper ? 0.7 : 0.2;\n // If right_bumper is down, the gearRatio is 0.7. Otherwise, the gearRatio is 0.3\n \n rightPower = gearRatio * gamepad1.left_stick_y;\n leftPower = gearRatio * gamepad1.right_stick_y;\n \n leftpower = Range.clip(leftpower, -1, 1); //gamepad controllers have a value of 1 when you push it to its maximum foward\n rightpower = Range.clip(rightpower, -1, 1); //limiting the range of each power, min first then max\n \n motorR.setPower(rightPower);\n motroL.setPower(leftPower);\n \n telemetry.addData(\"Gear Ratio \", gearRatio);\n telemetry.addData(\"Right Power \", rightPower);\n telemetry.addData(\"Left Power \", leftPower);\n \n \n }", "@Override\n protected void execute() {\n //Activate both lifters, throttled by height\n if (Robot.myLifter.getLeftEncoder() > 75) {\n Robot.myLifter.setLeftSpeed(-0.3);\n Robot.myLifter.setRightSpeed(-0.3);\n } else {\n Robot.myLifter.setLeftSpeed(-0.5);\n Robot.myLifter.setRightSpeed(-0.5);\n }\n \n }", "public static synchronized void idleAllLiftMotors() {\r\n\t\t\tsynchronized(armStage1.motorLock) {\r\n//\t\t\t\tsynchronized(armStage2.motorLock) {\r\n\t\t\t\t\tarmStage1.motorObj.set(ControlMode.PercentOutput, 0.0);\r\n//\t\t\t\t\tarmStage1.auxMotorObj.set(ControlMode.PercentOutput, 0.0);\r\n//\t\t\t\t\tarmStage2.motorObj.set(ControlMode.PercentOutput, 0.0);\r\n\t\t\t\t\tarmStage1.operatingMode = OperatingModesE.IDLE;\r\n//\t\t\t\t\tarmStage2.operatingMode = OperatingModesE.IDLE;\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n public void loop() {\n\n //double armRot = robot.Pivot.getPosition();\n\n double deadzone = 0.2;\n\n double trnSpdMod = 0.5;\n\n float xValueRight = gamepad1.right_stick_x;\n float yValueLeft = -gamepad1.left_stick_y;\n\n xValueRight = Range.clip(xValueRight, -1, 1);\n yValueLeft = Range.clip(yValueLeft, -1, 1);\n\n // Pressing \"A\" opens and closes the claw\n if (gamepad1.a) {\n\n if (robot.Claw.getPosition() < 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(1);}\n else if (robot.Claw.getPosition() > 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(0.4);}\n else\n while(gamepad1.a)\n robot.Claw.setPosition(1);\n }\n\n // Pressing \"B\" changes the wrist position\n if (gamepad1.b) {\n\n if (robot.Wrist.getPosition() == 1)\n while(gamepad1.b)\n robot.Wrist.setPosition(0.5);\n else if (robot.Wrist.getPosition() == 0.5)\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n else\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n }\n\n // Turn left/right, overrides forward/back\n if (Math.abs(xValueRight) > deadzone) {\n\n robot.FL.setPower(xValueRight * trnSpdMod);\n robot.FR.setPower(-xValueRight * trnSpdMod);\n robot.BL.setPower(xValueRight * trnSpdMod);\n robot.BR.setPower(-xValueRight * trnSpdMod);\n\n\n } else {//Forward/Back On Solely Left Stick\n if (Math.abs(yValueLeft) > deadzone) {\n robot.FL.setPower(yValueLeft);\n robot.FR.setPower(yValueLeft);\n robot.BL.setPower(yValueLeft);\n robot.BR.setPower(yValueLeft);\n }\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n\n telemetry.addData(\"Drive Encoder Ticks\", robot.FL.getCurrentPosition());\n telemetry.addData(\"Winch Encoder Ticks\", robot.Winch.getCurrentPosition());\n telemetry.addData(\"ColorArm Position\", robot.ColorArm.getPosition());\n telemetry.addData(\"Wrist Position\", robot.Wrist.getPosition());\n telemetry.addData(\"Claw Position\", robot.Claw.getPosition());\n telemetry.addData(\"Grip Position\", robot.Grip.getPosition());\n telemetry.addData(\"Color Sensor Data Red\", robot.Color.red());\n telemetry.addData(\"Color Sensor Data Blue\", robot.Color.blue());\n\n /*\n\n // This is used for an Omniwheel base\n\n // Group a is Front Left and Rear Right, Group b is Front Right and Rear Left\n float a;\n float b;\n float turnPower;\n if(!gamepad1.x) {\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n\n a = Range.clip(yValueLeft + xValueLeft, -1, 1);\n b = Range.clip(yValueLeft - xValueLeft, -1, 1);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n } else {\n\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n a = Range.clip(yValueLeft + xValueLeft, -0.6f, 0.6f);\n b = Range.clip(yValueLeft - xValueLeft, -0.6f, 0.6f);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n }\n\n\n if (gamepad1.dpad_up) {\n\n robot.Swing.setPower(.6);\n\n } else if (gamepad1.dpad_down) {\n\n robot.Swing.setPower(-.6);\n\n } else {\n\n robot.Swing.setPower(0);\n }\n\n if(gamepad1.a){\n\n robot.Claw.setPosition(.4);\n\n } else if(gamepad1.b){\n\n robot.Claw.setPosition(0);\n }\n\n if(gamepad1.left_bumper) {\n\n robot.Pivot.setPosition(armRot+0.0005);\n\n } else if(gamepad1.right_bumper) {\n\n robot.Pivot.setPosition(armRot-0.0005);\n\n } else{\n\n robot.Pivot.setPosition(armRot);\n }\n\n telemetry.addData(\"position\", position);\n\n */\n\n /*\n * Code to run ONCE after the driver hits STOP\n */\n }", "public void gyroDrive ( double speed,\n double distance,\n double angle) {\n\n\n // Ensure that the opmode is still activ\n\n // Determine new target position, and pass to motor controller\n moveCounts = (int)(distance * COUNTS_PER_INCH);\n newLeftTarget = leftmotor.getCurrentPosition() + moveCounts;\n newRightTarget = rightmotor.getCurrentPosition() + moveCounts;\n\n // Set Target and Turn On RUN_TO_POSITION\n leftmotor.setTargetPosition(newLeftTarget);\n rightmotor.setTargetPosition(newRightTarget);\n\n leftmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightmotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // start motion.\n speed = Range.clip(Math.abs(speed), 0.0, 1.0);\n\n maxSpeed = speed;\n speed = INCREMENT;\n rampUp = true;\n\n leftmotor.setPower(speed);\n rightmotor.setPower(speed);\n\n // keep looping while we are still active, and BOTH motors are running.\n while ((leftmotor.isBusy() && rightmotor.isBusy())) {\n if (rampUp){\n speed += INCREMENT ;\n if (speed >= maxSpeed ) {\n speed = maxSpeed;\n }\n }\n\n // adjust relative speed based on heading error.\n error = getError(angle);\n steer = getSteer(error, P_DRIVE_COEFF);\n\n // if driving in reverse, the motor correction also needs to be reversed\n if (distance < 0)\n steer *= -1.0;\n\n leftSpeed = speed - steer;\n rightSpeed = speed + steer;\n\n // Normalize speeds if either one exceeds +/- 1.0;\n max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed));\n if (max > 1.0)\n {\n leftSpeed /= max;\n rightSpeed /= max;\n }\n\n leftmotor.setPower(leftSpeed);\n rightmotor.setPower(rightSpeed);\n }\n\n // Stop all motion;\n leftmotor.setPower(0);\n rightmotor.setPower(0);\n\n // Turn off RUN_TO_POSITION\n leftmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightmotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n gyroHold(TURN_SPEED,angle,0.166);\n\n }", "private void updateLinearDrive() {\n// double rotations = (getLeftRotations() + getRightRotations()) / 2;\n// linearDriveDistance = Conversion.rotationsToInches(rotations, Constants.driveWheelDiameter);\n// double angleController = turnControl.getOutput(linearDriveMultiplier * (navX.getAngle() - linearDriveTargetAngle));\n// double driveController = driveControl.getOutput(linearDriveTargetDistance - linearDriveDistance);\n// setOutput(driveController + angleController, driveController - angleController);\n }", "public void moveUpDown(double power, int tics){\n\t\tint angle=getAngle();\n\t\tif(tics<0) power = power*-1;\n\t\tint initPos = (Math.abs(robot.motor0.getCurrentPosition())+Math.abs(robot.motor1.getCurrentPosition())+Math.abs(robot.motor2.getCurrentPosition())+Math.abs(robot.motor3.getCurrentPosition()))/4;\n\t\tint currPos = initPos;\n\t\twhile(Math.abs(currPos) < initPos+tics&&opModeIsActive()){\n\t\t\trobot.motor0.setPower(power);\n\t\t\trobot.motor1.setPower(-power);\n\t\t\trobot.motor2.setPower(power);\n\t\t\trobot.motor3.setPower(-power);\n\t\t\tcurrPos = (Math.abs(robot.motor0.getCurrentPosition())+Math.abs(robot.motor1.getCurrentPosition())+Math.abs(robot.motor2.getCurrentPosition())+Math.abs(robot.motor3.getCurrentPosition()))/4;\n\t\t\tif(Math.abs(getAngle()-angle)>360) {\n\t\t\t\trotateToAngle(angle);\n\t\t\t}\n\t\t}\n\t\tstopMotors();\n\t}", "public void adjustShooterAngleManual() {\n\n // If the driver pushes the Square Button on the PS4 Controller,\n // set the worm drive motors to go backwards (lower it).\n if (PS4.getRawButton(PS4_X_BUTTON) == true) {\n\n wormDriveMotors.set(-0.2);\n\n // If the driver pushes the Triangle Button on the PS4 Controller,\n // set the worm drive motors to go forwards (raise it up).\n } else if (PS4.getRawButton(PS4_SQUARE_BUTTON) == true) {\n\n wormDriveMotors.set(0.4);\n }\n\n // If the driver is an idiot and is pressing BOTH the Square Button AND the\n // Triangle Button at the same time, OR (||) if the driver is pushing neither\n // button, set the motor speed to 0.\n else if (((PS4.getRawButton(PS4_X_BUTTON) == true) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == true))\n || ((PS4.getRawButton(PS4_X_BUTTON) == false) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == false))) {\n\n wormDriveMotors.set(0);\n }\n\n }", "private void driveLeft() {\n setSpeed(MIN_SPEED, MAX_SPEED);\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\t//For some reason, right is inverted in auto instead of left\n\t\tString start = autonomousCommand; //from smartDashboard\n\t\t//String start = \"R\";//R for right, FR for far right, L for far left\n\t\t//Starting Far Right\n\t\tif (start == \"FR\") {\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t//Go forward for 5 seconds\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t//stop going\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (start == \"R\") {\n\t\t\t//Starting on the right, aligned with the switch\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 2) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'R') {\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 15 && timer.get() > 7) {\n\t\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t}\n\t\t}\n\t\telse if (start == \"L\") {\n\t\t//This is for starting on the far left\n\t\t\tif(autoStep == 0) {\n\t\t\t\tif (timer.get() < 2.5) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'L') {/**Change this to R if we start on the right side, comment out if we're on the far right or left side**/\n\t\t\t\t\trotateTo(270);\n\t\t\t\t\tif (timer.get()>3 && timer.get()<4) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 7 && timer.get() > 4) {\n\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Default Code\n\t\t\tif (true) {\n\t\t\t\tif(autoStep==0) {\n\t\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void loop() {\n\n double driveMult = gamepad1.left_bumper ? 0.5 : (gamepad1.right_bumper ? 0.2 : 1.0);\n\n double x = gamepad1.left_stick_x;\n double y = gamepad1.left_stick_y;\n\n switch (state) {\n case DRIVE:\n left.setPower(driveMult * (y - x));\n right.setPower(driveMult * (y + x));\n break;\n case REVERSE:\n left.setPower(driveMult * -(y + x));\n right.setPower(driveMult * -(y - x));\n break;\n case TANK:\n left.setPower(driveMult * gamepad1.left_stick_y);\n right.setPower(driveMult * gamepad1.right_stick_y);\n break;\n }\n\n if (gamepad1.dpad_up) {\n state = State.DRIVE;\n } else if (gamepad1.dpad_down) {\n state = State.REVERSE;\n } else if (gamepad1.dpad_left) {\n state = State.TANK;\n }\n\n // AUX CONTROLS\n\n double auxMult = gamepad2.left_bumper ? 0.5 : (gamepad2.right_bumper ? 0.2 : 1.0);\n\n rack.setPower(auxMult * ((gamepad2.dpad_up ? 1 : 0) + (gamepad2.dpad_down ? -1 : 0)));\n\n // extend.setPower(auxMult * gamepad2.left_stick_y);\n slurp.setPower(auxMult * gamepad2.right_stick_y);\n\n\n// if (gamepad2.a) {\n// rack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// rack.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// }\n\n // TELEMETRY\n\n telemetry.addData(\"Drive Mode: \", state);\n telemetry.addData(\"Rack Encoder: \", rack.getCurrentPosition());\n telemetry.addData(\"G2 RS Y: \", gamepad2.right_stick_y);\n }", "@Override\n public void loop() {\n float left = -gamepad1.left_stick_y;\n float right = -gamepad1.right_stick_y;\n // clip the right/left values so that the values never exceed +/- 1\n right = Range.clip(right, -1, 1);\n left = Range.clip(left, -1, 1);\n\n // scale the joystick value to make it easier to control\n // the robot more precisely at slower speeds.\n right = (float)scaleInput(right);\n left = (float)scaleInput(left);\n\n // write the values to the motors\n if (motor1!=null) {\n motor1.setPower(right);\n }\n if (motor2!=null) {\n motor2.setPower(left);\n }\n if (motor3!=null) {\n motor3.setPower(right);\n }\n if (motor4!=null) {\n motor4.setPower(left);\n }\n\n if (gamepad1.right_bumper && motor5Timer + 150 < timer) {\n motor5Forward = !motor5Forward;\n motor5Backward = false;\n motor5Timer = timer;\n } else if (gamepad1.left_bumper && motor5Timer + 150 < timer) {\n motor5Forward = false;\n motor5Backward = !motor5Backward;\n motor5Timer = timer;\n }\n if (motor5!=null) {\n if (gamepad1.dpad_left)\n {\n motor5Forward = false;\n motor5.setPower(1);\n }\n else if (gamepad1.dpad_right)\n {\n motor5Backward = false;\n motor5.setPower(-1);\n }\n else if (motor5Forward)\n {\n motor5.setPower(1);\n }\n else if (motor5Backward)\n {\n motor5.setPower(-1);\n }\n else\n {\n motor5.setPower(0);\n }\n }\n if (motor6!=null) {\n if (gamepad1.dpad_up)\n {\n motor6.setPower(1);\n }\n else if (gamepad1.dpad_down)\n {\n motor6.setPower(-1);\n }\n else\n {\n motor6.setPower(0);\n }\n\n\n }\n if (motor7!=null) {\n if (gamepad1.dpad_left)\n {\n motor7.setPower(1);\n }\n else if (gamepad1.dpad_right)\n {\n motor7.setPower(-1);\n }\n else\n {\n motor7.setPower(0);\n }\n }\n if (motor8!=null) {\n if (gamepad1.dpad_up)\n {\n motor8.setPower(1);\n }\n if (gamepad1.dpad_down)\n {\n motor8.setPower(-1);\n }\n else\n {\n motor8.setPower(0);\n }\n }\n if (timer == 0) {\n servo1pos=0.5;\n servo2pos=0.5;\n servo3pos=0.5;\n servo4pos=0.5;\n servo5pos=0.5;\n servo6pos=0.5;\n }\n timer++;\n\n if (servo1!=null){\n if (gamepad1.right_bumper) {\n servo1pos += 0.01;\n }\n if (gamepad1.left_bumper) {\n servo1pos -= 0.01;\n }\n servo1pos = Range.clip(servo1pos, 0.00, 1.0);\n\n servo1.setPosition(servo1pos);\n }\n if (servo2!=null){\n if (gamepad1.x) {\n servo2pos += 0.01;\n }\n if (gamepad1.y) {\n servo2pos -= 0.01;\n }\n servo2pos = Range.clip(servo2pos, 0.00, 1.0);\n\n servo2.setPosition(servo2pos);\n }\n if (servo3!=null){\n if (gamepad1.a) {\n servo3pos += 0.01;\n }\n if (gamepad1.b) {\n servo3pos -= 0.01;\n }\n servo3pos = Range.clip(servo3pos, 0.00, 1.0);\n\n servo3.setPosition(servo3pos);\n }\n if (servo4!=null){\n if (gamepad1.right_bumper) {\n servo4pos -= 0.01;\n }\n if (gamepad1.left_bumper) {\n servo4pos += 0.01;\n }\n servo4pos = Range.clip(servo4pos, 0.00, 1.0);\n\n servo4.setPosition(servo4pos);\n }\n if (servo5!=null){\n if (gamepad1.x) {\n servo5pos -= 0.01;\n }\n if (gamepad1.y) {\n servo5pos += 0.01;\n }\n servo5pos = Range.clip(servo5pos, 0.00, 1.0);\n\n servo5.setPosition(servo5pos);\n }\n if (servo6!=null){\n if (gamepad1.a) {\n servo6pos -= 0.01;\n }\n if (gamepad1.b) {\n servo6pos += 0.01;\n }\n servo6pos = Range.clip(servo6pos, 0.00, 1.0);\n\n servo6.setPosition(servo6pos);\n }\n if (servo1!=null){\n telemetry.addData(\"servoBumpers\", servo1.getPosition());}\n if (servo2!=null){\n telemetry.addData(\"servoX/Y\", servo2.getPosition());}\n if (servo3!=null){\n telemetry.addData(\"servoA/B\", servo3.getPosition());}\n if (servo4!=null){\n telemetry.addData(\"servoBumpers-\", servo4.getPosition());}\n if (servo5!=null){\n telemetry.addData(\"servoX/Y-\", servo5.getPosition());}\n if (servo6!=null){\n telemetry.addData(\"servoA/B-\", servo6.getPosition());}\n if (motor1 != null) {\n telemetry.addData(\"Motor1\", motor1.getCurrentPosition());\n }\n }", "public void setPower (double left, double right) {\n left = Range.clip(left, -1.0, 1.0);\n right = Range.clip(right, -1.0, 1.0);\n leftFront.setPower(left);\n leftRear.setPower(left);\n rightFront.setPower(right);\n rightRear.setPower(right);\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\t\n\t\t\n\t\tif (stick.getRawButtonPressed(2)) {\n\t\t\tstickReversed = !stickReversed;\n\t\t}\n\t\t\n\t\t// double means a floating point (decimal) number with a precision of \"hella\"\n\t\tdouble power = -stick.getY(Hand.kLeft); // negated, because microsoft is weird and up is negative\n\t\tdouble steering = stick.getX(Hand.kRight); \n\t\tif (stickReversed) {\n\t\t\tpower = -power;\n\t\t}\n\t\tdrive(power, steering);\n\t\t\n//\t\tif (xbox.getBumper(Hand.kRight)) {\n//\t\t\tleftIntake.set(xbox.getTriggerAxis(Hand.kLeft));\t\n//\t\t\trightIntake.set(-0.9);\n//\t\t} else if (xbox.getBumper(Hand.kLeft)) {\n//\t\t\tleftIntake.set(-1.0);\n//\t\t\trightIntake.set(1.0);\n//\t\t} else {\n//\t\t\tleftIntake.set(0.0);\n//\t\t\trightIntake.set(0.0);\n//\t\t}\n\t\t\n\t\tif (xbox.getBumper(Hand.kLeft)) { // shoot out\n\t\t\tleftIntake.set(-1.0);\n\t\t} else { // intake\n\t\t\tleftIntake.set(xbox.getTriggerAxis(Hand.kLeft));\n\t\t}\n\t\t\n\t\tif(xbox.getBumper(Hand.kRight)) { //shooty i think\n\t\t\trightIntake.set(1.0);\n\t\t} else { //intake\n\t\t\trightIntake.set(-xbox.getTriggerAxis(Hand.kRight));\n\t\t}\n//\t\tarmSetpoint += xbox.getY(Hand.kLeft) * 60;\n//\t\tSystem.out.println(armSetpoint);\n\t\t\n\t\tarmMotor.set(ControlMode.PercentOutput, xbox.getY(Hand.kLeft) * 0.8);\n\t\tSystem.out.println(xbox.getY(Hand.kLeft));\n\t}", "double a_hang_power ()\n {\n double l_return = 0.0;\n\n if (hang_motor != null) {\n l_return = hang_motor.getPower();\n }\n\n return l_return;\n }", "protected void execute() {\n double rightSpeed, leftSpeed, x, y;\n //Set x and y to their axis values\n x = driver.getRawAxis(InputConstants.rightXAxis);\n y = driver.getRawAxis(InputConstants.leftYAxis);\n //Drive Smoothing\n\n //Set the left and rightspeed using x and y\n leftSpeed = y - x;\n rightSpeed = y + x;\n \n\n //Set the left and right side of the drive\n driveTrain.setLeftVBus(-leftSpeed);\n driveTrain.setRightVBus(-rightSpeed);\n\n\n\n }", "public void drive(double speedLeft, double speedRight){\n \t\tsetRight(speedRight);\n \t\tsetLeft(speedLeft);\n \t}", "protected void execute() {\n \tdouble a = 0.5;\n \tdouble x = Robot.oi.getPilotAxis(Robot.oi.LOGITECH_F510_AXIS_RIGHT_STICK_X);\n \tdouble y = Robot.oi.getPilotAxis(Robot.oi.LOGITECH_F510_AXIS_LEFT_STICK_Y);\n \tx = 0.5*((a * Math.pow(x, 3)) + ((1-a) * x));\n \ty = a * Math.pow(y, 3) + (1-a) * y;\n \tdouble left = y + x;\n\t\tdouble right = y - x;\n\t\t\n\t\t// Apply values to motors\n\t\tRobot.chassis.setLeft(left);\n\t\tRobot.chassis.setRight(right);\n }", "protected void initialize() {\n \t starttime = Timer.getFPGATimestamp();\n \tthis.startAngle = RobotMap.navx.getAngle();\n \tangleorientation.setSetPoint(RobotMap.navx.getAngle());\n \t\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \n //settting talon control mode\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.MotionMagic);\t\t\n\t\tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.Follower);\t\n\t\tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.MotionMagic);\t\n\t\tRobotMap.motorRightOne.changeControlMode(TalonControlMode.Follower);\n\t\t//setting peak and nominal output voltage for the motors\n\t\tRobotMap.motorLeftTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorLeftTwo.configNominalOutputVoltage(0.00f, 0.0f);\n\t\tRobotMap.motorRightTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorRightTwo.configNominalOutputVoltage(0.0f, 0.0f);\n\t\t//setting who is following whom\n\t\tRobotMap.motorLeftOne.set(4);\n\t\tRobotMap.motorRightOne.set(3);\n\t\t//setting pid value for both sides\n\t//\tRobotMap.motorLeftTwo.setCloseLoopRampRate(1);\n\t\tRobotMap.motorLeftTwo.setProfile(0);\n\t RobotMap.motorLeftTwo.setP(0.000014f);\n \tRobotMap.motorLeftTwo.setI(0.00000001);\n\t\tRobotMap.motorLeftTwo.setIZone(0);//325);\n\t\tRobotMap.motorLeftTwo.setD(1.0f);\n\t\tRobotMap.motorLeftTwo.setF(this.fGainLeft+0.014);//0.3625884);\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t RobotMap.motorRightTwo.setCloseLoopRampRate(1);\n\t RobotMap.motorRightTwo.setProfile(0);\n\t\tRobotMap.motorRightTwo.setP(0.000014f);\n\t\tRobotMap.motorRightTwo.setI(0.00000001);\n\t\tRobotMap.motorRightTwo.setIZone(0);//325);\n\t\tRobotMap.motorRightTwo.setD(1.0f);\n\t\tRobotMap.motorRightTwo.setF(this.fGainRight);// 0.3373206);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t\t//setting Acceleration and velocity for the left\n\t\tRobotMap.motorLeftTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorLeftTwo.setMotionMagicCruiseVelocity(250);\n\t\t//setting Acceleration and velocity for the right\n\t\tRobotMap.motorRightTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorRightTwo.setMotionMagicCruiseVelocity(250);\n\t\t//resets encoder position to 0\t\t\n\t\tRobotMap.motorLeftTwo.setEncPosition(0);\n\t\tRobotMap.motorRightTwo.setEncPosition(0);\n\t //Set Allowable error for the loop\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(300);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(300);\n\t\t\n\t\t//sets desired endpoint for the motors\n RobotMap.motorLeftTwo.set(motionMagicEndPoint);\n RobotMap.motorRightTwo.set(-motionMagicEndPoint );\n \t\n }", "public static void driveDistance(double targetLeft, double targetRight) {\n\n leftMotorA.set(ControlMode.MotionMagic, targetLeft);\n rightMotorA.set(ControlMode.MotionMagic, targetRight);\n\n }", "double scale_motor_power(double p_power) //Scales joystick value to output appropriate motor power\n {Scales joystick value to output appropriate motor power\n { //Use like \"scale_motor_power(gamepad1.left_stick_x)\"\n //\n // Assume no scaling.\n //\n double l_scale = 0.0;\n\n //\n // Ensure the values are legal.\n //\n double l_power = Range.clip(p_power, -1, 1);\n\n double[] l_array =\n {0.00, 0.05, 0.09, 0.10, 0.12\n , 0.15, 0.18, 0.24, 0.30, 0.36\n , 0.43, 0.50, 0.60, 0.72, 0.85\n , 1.00, 1.00\n };\n\n //\n // Get the corresponding index for the specified argument/parameter.\n //\n int l_index = (int) (l_power * 16.0);\n if (l_index < 0) {\n l_index = -l_index;\n } else if (l_index > 16) {\n l_index = 16;\n }\n\n if (l_power < 0) {\n l_scale = -l_array[l_index];\n } else {\n l_scale = l_array[l_index];\n }\n\n return l_scale;\n\n }", "private void encoderDrive(double speed,\n double leftInches, double rightInches,\n double timeoutS) {\n int newLeftFrontTarget;\n int newLeftBackTarget;\n int newRightFrontTarget;\n int newRightBackTarget;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n robot.resetWheelEncoders();\n\n // Determine new target position, and pass to motor controller\n newLeftFrontTarget = robot.leftFront.getCurrentPosition() + (int) (leftInches * TICKS_PER_INCH);\n newLeftBackTarget = robot.leftBack.getCurrentPosition() + (int) (leftInches * TICKS_PER_INCH);\n newRightFrontTarget = robot.rightFront.getCurrentPosition() + (int) (rightInches * TICKS_PER_INCH);\n newRightBackTarget = robot.rightBack.getCurrentPosition() + (int) (rightInches * TICKS_PER_INCH);\n robot.leftFront.setTargetPosition(newLeftFrontTarget);\n robot.leftBack.setTargetPosition(newLeftBackTarget);\n robot.rightFront.setTargetPosition(newRightFrontTarget);\n robot.rightBack.setTargetPosition(newRightBackTarget);\n\n // Turn On RUN_TO_POSITION\n robot.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n\n // reset the timeout time and start motion.\n encoderTime.reset();\n robot.driveForward(Math.abs(speed));\n\n // wait for motors to not be busy\n while (opModeIsActive() &&\n (encoderTime.seconds() < timeoutS) &&\n (robot.leftFront.isBusy() && robot.leftBack.isBusy() && robot.rightFront.isBusy() && robot.rightBack.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Goal Position\", \"%7d :%7d :%7d :%7d\", newLeftFrontTarget, newLeftBackTarget, newRightFrontTarget, newRightBackTarget);\n telemetry.addData(\"Current Position\", \"%7d :%7d :%7d :%7d\",\n robot.leftFront.getCurrentPosition(),\n robot.leftBack.getCurrentPosition(),\n robot.rightFront.getCurrentPosition(),\n robot.rightBack.getCurrentPosition());\n telemetry.update();\n }\n\n // Stop all motion;\n robot.stopDriving();\n\n // Turn off RUN_TO_POSITION\n robot.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n sleep(100); // optional pause after each move\n }\n }", "@Override\n public void loop() {\n telemetry.addData(\"Status\", \"Running\"); //inform the driver\n\n //Calculate the power to set to each motor\n\n //left side you subtract right_stick_x\n double FrontLeftVal = (gamepad1.left_stick_y - gamepad1.left_stick_x - gamepad1.right_stick_x) * Power; //front subtract left_stick_x\n double BackLeftVal = (gamepad1.left_stick_y + gamepad1.left_stick_x - gamepad1.right_stick_x) * Power; //back subtract left_stick_x\n\n //right side you add right_stick_x\n double FrontRightVal = (gamepad1.left_stick_y + gamepad1.left_stick_x + gamepad1.right_stick_x) * Power; //front add left_stick_x\n double BackRightVal = (gamepad1.left_stick_y - gamepad1.left_stick_x + gamepad1.right_stick_x) * Power; //back subtract left_stick_x\n\n FLM.setPower(FrontLeftVal); //set the power to the motor\n FRM.setPower(FrontRightVal);\n BLM.setPower(BackLeftVal);\n BRM.setPower(BackRightVal);\n\n if (gamepad1.y) {\n if (!YPressed1) {\n YPressed1 = true;\n if (DragArm.getPosition() < DragArmDownPosition) {\n DragArm.setPosition(DragArmDownPosition);\n } else {\n DragArm.setPosition(DragArmRestPosition);\n }\n }\n } else if (YPressed1) YPressed1 = false;\n\n if (gamepad2.a) {\n SetLiftPosition(Position1Inches);\n } else if (gamepad2.b) {\n SetLiftPosition(Position2Inches);\n } else if (gamepad2.y) {\n SetLiftPosition(Position3Inches);\n } else if (gamepad2.left_bumper) {\n if (UpLift.getCurrentPosition() >= Position1Inches * UpInchesToTicks) {\n SetLiftPosition(UpLift.getCurrentPosition() - 756);\n } else {\n SetLiftPosition(Position0Inches);\n }\n } else {\n UpLift.setPower(0);\n }\n\n if (gamepad2.left_trigger == 1) {\n if (!LeftTrigger2) {\n LeftTrigger2= true;\n if (LiftGrab.getPosition() != LiftGrabGrabPosition)\n LiftGrab.setPosition(LiftGrabGrabPosition);\n else LiftGrab.setPosition(LiftGrabRestPosition);\n }\n } else if (LeftTrigger2) LeftTrigger2= false;\n\n if (gamepad2.right_trigger == 1) {\n if (!RightTrigger2) {\n RightTrigger2 = true;\n if (UpLift.getCurrentPosition() > Position2Inches) {\n if (LiftSwivel.getPosition() != LiftSwivelRestPosition)\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n else LiftSwivel.setPosition(LiftSwivelOutPosition);\n }\n }\n } else if (RightTrigger2) RightTrigger2 = false;\n\n if (gamepad1.b) {\n if (!BPressed1) {\n BPressed1 = true;\n if (BigSuck.getPower() == BigSuckPower) {\n SmallSuck.setPower(0);\n BigSuck.setPower(0);\n\n DragArm.setPosition(DragArmRestPosition);\n } else {\n BigSuck.setPower(BigSuckPower);\n SmallSuck.setPower(SmallSuckPower);\n DragArm.setPosition(DragArmUpPosition);\n }\n }\n } else if (BPressed1) BPressed1 = false;\n\n if (gamepad1.x) {\n if (!XPressed1) {\n XPressed1 = true;\n if (BigSuck.getPower() == -BigSuckPower) {\n BigSuck.setPower(0);\n SmallSuck.setPower(0);\n } else {\n BigSuck.setPower(-BigSuckPower);\n SmallSuck.setPower(-SmallSuckPower);\n }\n }\n } else if (XPressed1) XPressed1 = false;\n\n if (gamepad1.a) {\n if (!A1) {\n A1 = true;\n if (Push.getPosition() == PushRestPosition) {\n Push.setPosition(PushPushPosition);\n } else {\n Push.setPosition(PushRestPosition);\n }\n }\n } else if (A1) A1 = false;\n\n telemetry.addData(\"Up Position\", UpLift.getCurrentPosition());\n telemetry.update(); //update the telemetry\n }", "@Override \n public void runOpMode() \n {\n leftMotors = hardwareMap.get(DcMotor.class, \"left_Motors\");\n rightMotors = hardwareMap.get(DcMotor.class, \"right_Motors\");\n vLiftMotor = hardwareMap.get(DcMotor.class, \"vLift_Motor\"); \n \n leftMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotors.setDirection(DcMotor.Direction.REVERSE);\n rightMotors.setDirection(DcMotor.Direction.FORWARD);\n vLiftMotor.setDirection(DcMotor.Direction.REVERSE);\n vLiftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n waitForStart(); //press play button, actives opMode\n intakePivotServo.setPosition(intakePivotServoPos);\n while (opModeIsActive()) \n { \n drive();\n pivotIntake();\n pivotLift();\n \n }//opModeIsActive \n \n }", "private void updateMotors() {\n\t\t//Pass filtered values to ChopperStatus.\n\t\tmStatus.setMotorFields(mMotorSpeed);\n\t\tString logline = Long.toString(System.currentTimeMillis()) + \" \" + mMotorSpeed[0] + \" \" + mMotorSpeed[1] + \" \" + mMotorSpeed[2] + \" \" + mMotorSpeed[3] + \"\\n\";\n\t\ttry {\n\t\t\tif (logfile != null) {\n\t\t\t\tlogfile.write(logline);\n\t\t\t\tlogfile.flush();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\t//Log.e(TAG, \"Cannot write to logfile\");\n\t\t}\n\t\t//Pass motor values to motor controller!\n\t\tMessage msg = Message.obtain();\n\t\tmsg.what = SEND_MOTOR_SPEEDS;\n\t\tmsg.obj = mMotorSpeed;\n\t\tmBt.sendMessageToHandler(msg);\n\t\t//Log.i(TAG, \"Guidance sending message.\");\n\t\t\n\t}", "public void rawTurret(double power) {\n double encoderAngle = turretEncoder.getDistance();\n // Prevent the turret from turning past hard stops\n if (encoderAngle >= MAX_ENCODER_VALUE && power > 0 || encoderAngle < MIN_ENCODER_VALUE && power < 0) {\n power = 0;\n }\n turretMotor.set(power);\n }", "@Override\n public void setMotorPower(double power)\n {\n final String funcName = \"setMotorPower\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", power);\n }\n\n if (power != currPower)\n {\n motor.set(power);\n currPower = power;\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", power);\n }\n }", "public static void setLeftPower(double leftPower) {\n\t\tSystem.out.println(\"Left: \" + leftPower);\n\t\tShooter.leftPower = leftPower;\n\t}", "protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }", "public void liftSet(Gamepad gamepad1) {\n\n levelPlus = gamepad1.dpad_up;\n levelMinus = gamepad1.dpad_down;\n\n if(!pressP){\n if (levelPlus) {\n if (level < 8){\n level++;\n liftPress=true;\n }\n pressP = true;\n }\n }\n else{\n if (!levelPlus){\n pressP = false;\n }\n }\n\n if(!pressM){\n if (levelMinus) {\n if(level > 0){\n level--;\n liftPress=true;\n }\n pressM = true;\n }\n }\n else{\n if (!levelMinus){\n pressM = false;\n }\n }\n\n if(liftPress) {\n switch (level) {\n case 0:\n if(distanceLift.getDistance(DistanceUnit.CM) > 1) { //3\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0);\n liftPress = false;\n }\n break;\n case 1:\n if (distanceLift.getDistance(DistanceUnit.CM) < 10) { //10.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 11) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 2:\n if (distanceLift.getDistance(DistanceUnit.CM) < 20) { //20.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 21) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 3:\n if (distanceLift.getDistance(DistanceUnit.CM) < 30) { //30.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 31) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 4:\n if (distanceLift.getDistance(DistanceUnit.CM) < 40) { //40.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 41) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 5:\n if (distanceLift.getDistance(DistanceUnit.CM) < 55) { //54\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 56) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 6:\n if (distanceLift.getDistance(DistanceUnit.CM) < 63) { //62\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 64) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 7:\n if (distanceLift.getDistance(DistanceUnit.CM) < 73) { //72\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 74) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 8:\n if (distanceLift.getDistance(DistanceUnit.CM) < 82) { //81\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 83) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n }\n }\n }", "public final void GyroStrafeDistance (int Distance, double power)\n {\n //Define variable for the right range senson that measures centimeters\n double RightRangeDistance = RightRange.getDistance(DistanceUnit.CM);\n\n //While the robot's distance is less than the wanted distance do the following\n while (Distance >= RightRangeDistance && opModeIsActive())\n {\n //Define variable for gyro angle\n float GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n\n //Update the variable for the range sensor\n RightRangeDistance = RightRange.getDistance(DistanceUnit.CM);\n\n //If the gyro's read angle is more than 3 degrees turn right until it is not\n if (GyroAngle > 3 )\n {\n while(GyroAngle > 3 && opModeIsActive())\n {\n //Turn Right\n robot.DriveLeftBack.setPower(-.1);\n robot.DriveRightBack.setPower(.1);\n robot.DriveRightFront.setPower(.1);\n robot.DriveLeftFront.setPower(-.1);\n\n //Update the gyro's angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n }\n\n //If the gyro's read angle is less than -3 degrees turn left until it is not\n else if (GyroAngle < -3)\n {\n while (GyroAngle < -3 && opModeIsActive())\n {\n //Turn Left\n robot.DriveLeftBack.setPower(.1);\n robot.DriveRightBack.setPower(-.1);\n robot.DriveRightFront.setPower(-.1);\n robot.DriveLeftFront.setPower(.1);\n\n //Update the gyro's angle\n GyroAngle = robot.Gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\n }\n }\n\n //Strafe (right or left)\n robot.DriveLeftBack.setPower(-power);\n robot.DriveRightBack.setPower(power);\n robot.DriveRightFront.setPower(-power);\n robot.DriveLeftFront.setPower(power);\n\n //Send feedback to phone\n telemetry.addData(\"Angle\",\n GyroAngle);\n telemetry.addData(\"Distance\", RightRangeDistance);\n telemetry.update();\n\n //End of loop, robot will repeat the above until it reaches the wanted distance\n }\n robot.DriveLeftBack.setPower(0);\n robot.DriveRightBack.setPower(0);\n robot.DriveRightFront.setPower(0);\n robot.DriveLeftFront.setPower(0);\n }", "public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }", "public void setArmPower(double power) {\n armMotor.setPower(power);\n }", "public void gyroTurn(int degrees, double power) throws InterruptedException{\n //restart angle tracking\n resetAngle();\n\n if(degrees < 0){\n turnClockwise(power);\n }else if(degrees > 0){\n turnCounterClockwise(power);\n }else{\n return;\n }\n\n //Rotate until current angle is equal to the target angle\n if (degrees < 0){\n while (opMode.opModeIsActive() && getAngle() > degrees){\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }else{\n while (opMode.opModeIsActive() && getAngle() < degrees) {\n composeAngleTelemetry();\n //display the target angle\n telemetry.addData(\"Target angle\", degrees);\n telemetry.update();\n }\n }\n\n completeStop();\n //Wait .5 seconds to ensure robot is stopped before continuing\n Thread.sleep(500);\n resetAngle();\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }", "public void rotate(double power, int tics){\n\t\tif(tics < 0) power = power*-1;\n\t\tint initPos = robot.motor0.getCurrentPosition();\n\t\tint currPos = initPos;\n\t\twhile(currPos != initPos+tics&&opModeIsActive()){\n\t\t\trobot.motor0.setPower(-power);\n\t\t\trobot.motor1.setPower(-power);\n\t\t\trobot.motor2.setPower(-power);\n\t\t\trobot.motor3.setPower(-power);\n\t\t\tcurrPos = robot.motor0.getCurrentPosition();\n\t\t}\n\t\tstopMotors();\n\t}", "public void setMotorSpeed(double leftSpeed,double rightSpeed){\n\t\tleftMotorPID.setSetpoint(leftSpeed);\n\t\trightMotorPID.setSetpoint(rightSpeed);\n\t\tleftMiniCIMMotorPID.setSetpoint(-rightSpeed);\n\t\trightMiniCIMMotorPID.setSetpoint(-leftSpeed);\n\n\t\tif (!leftMotorPID.isEnabled()) {\n\t\t\tleftMotorPID.enable();\n\t\t}\n\t\tif (!rightMotorPID.isEnabled()) {\n\t\t\trightMotorPID.enable();\n\t\t}\n\t\tif (!leftMiniCIMMotorPID.isEnabled()) {\n\t\t\tleftMiniCIMMotorPID.enable();\n\t\t}\n\t\tif (!rightMiniCIMMotorPID.isEnabled()) {\n\t\t\trightMiniCIMMotorPID.enable();\n\t\t}\n }" ]
[ "0.69485813", "0.68753254", "0.6833562", "0.6768241", "0.67115366", "0.6675888", "0.6505804", "0.64993113", "0.6475633", "0.642934", "0.63650954", "0.63617253", "0.6335693", "0.62590355", "0.624688", "0.6219977", "0.62138695", "0.6184892", "0.615956", "0.6136739", "0.61245877", "0.6121703", "0.6104361", "0.6034046", "0.602268", "0.601219", "0.598838", "0.5980814", "0.5978972", "0.5946471", "0.592341", "0.5915146", "0.591184", "0.59087986", "0.5905388", "0.5888929", "0.5885955", "0.5873821", "0.5856551", "0.5849807", "0.58455896", "0.5844778", "0.58277285", "0.5814401", "0.5805668", "0.58045554", "0.5804146", "0.57911086", "0.577405", "0.5768727", "0.57629603", "0.5760914", "0.57575965", "0.5740108", "0.5737823", "0.5737128", "0.57353425", "0.5727374", "0.5727301", "0.57240206", "0.5723906", "0.5718422", "0.5717512", "0.5710336", "0.57004774", "0.5678663", "0.5670427", "0.5667126", "0.5663582", "0.5663576", "0.5661204", "0.5649729", "0.5645754", "0.5644561", "0.56415534", "0.5638592", "0.5634083", "0.56321716", "0.56316143", "0.5628995", "0.5623688", "0.56126267", "0.5604958", "0.5600757", "0.55996543", "0.5592388", "0.55761015", "0.55747855", "0.5556586", "0.5553487", "0.55480224", "0.5547309", "0.5538722", "0.5538586", "0.5537722", "0.553407", "0.55294657", "0.55214876", "0.5518907", "0.55093277", "0.5504074" ]
0.0
-1
Pass the requested wheel motor powers to the appropriate hardware drive motors.
public void setDrivePower(double leftWheel, double rightWheel) { // Output the values to the motor drives. leftDrive.setPower(leftWheel); rightDrive.setPower(rightWheel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void manualControl(double power){\n leftMotor.set(power);\n rightMotor.set(power);\n }", "public void runMotor(Motor motor, double power) {\n\n\n switch (motor) {\n\n case LEFT_LFB:\n motorLFB.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LFT:\n motorLFT.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LBT:\n motorLBT.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LBB:\n motorLBB.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RFB:\n motorRFB.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RFT:\n motorRFT.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RBT:\n motorRBT.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RBB:\n motorRBB.set(ControlMode.PercentOutput, power);\n break;\n }\n }", "void drive(double power, double leftInches, double rightInches, double seconds) {\n\n //Make new integer to set left and right motor targets\n int leftTarget;\n int rightTarget;\n\n if (opModeIsActive()) {\n\n //Determine left and right target to move to\n leftTarget = robot.leftMotor.getCurrentPosition() + (int) (leftInches * COUNTS_PER_INCH);\n rightTarget = robot.rightMotor.getCurrentPosition() + (int) (rightInches * COUNTS_PER_INCH);\n\n //Set target and move to position\n robot.leftMotor.setTargetPosition(leftTarget);\n robot.rightMotor.setTargetPosition(rightTarget);\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //Reset runtime and start motion\n robot.leftMotor.setPower(Math.abs(power));\n robot.rightMotor.setPower(Math.abs(power));\n\n //Test if motors are busy, runtime is less than timeout and motors are busy and then run code\n while (opModeIsActive() && (runtime.seconds() < seconds) && (robot.leftMotor.isBusy() && robot.rightMotor.isBusy())) {\n\n //Tell path to driver\n telemetry.addData(\"Path1\", \"Running to: \", leftTarget, rightTarget);\n telemetry.addData(\"Path2\", \"Running at: \", robot.leftMotor.getCurrentPosition(), robot.rightMotor.getCurrentPosition());\n telemetry.update();\n }\n\n //Stop motors after moved to position\n robot.leftMotor.setPower(0);\n robot.rightMotor.setPower(0);\n\n //Set motors back to using run using encoder\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public boolean encoderDrive(int encoderDelta, driveStyle drive, double motorPower, double timeout, DcMotor[] motors)\n {\n\n\n switch(drive)\n {\n case FORWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, -motorPower, 0)[0]);\n motors[1].setPower(setPower(0, -motorPower, 0)[1]);\n motors[2].setPower(setPower(0, -motorPower, 0)[2]);\n motors[3].setPower(setPower(0, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n\n\n }\n\n case BACKWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, motorPower, 0)[0]);\n motors[1].setPower(setPower(0, motorPower, 0)[1]);\n motors[2].setPower(setPower(0, motorPower, 0)[2]);\n motors[3].setPower(setPower(0, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (encoderReadingLB - encoderDelta))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_RIGHT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, -motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() >= (-encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_LEFT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() <= (encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, -motorPower)[0]);\n motors[1].setPower(setPower(0, 0, -motorPower)[1]);\n motors[2].setPower(setPower(0, 0, -motorPower)[2]);\n motors[3].setPower(setPower(0, 0, -motorPower)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, motorPower)[0]);\n motors[1].setPower(setPower(0, 0, motorPower)[1]);\n motors[2].setPower(setPower(0, 0, motorPower)[2]);\n motors[3].setPower(setPower(0, 0, motorPower)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n\n }\n\n return true;\n }", "public void setMotorBehaviors(){\n motors = new ArrayList<>();\n motors.add(rf);\n motors.add(rb);\n motors.add(lf);\n motors.add(lb);\n\n //reset motor encoders\n rf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //Set motor behaviors\n rf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rf.setDirection(DcMotorSimple.Direction.REVERSE);\n rb.setDirection(DcMotorSimple.Direction.REVERSE);\n relic_extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n lift.setDirection(DcMotorSimple.Direction.REVERSE);\n\n //Set servo behaviors\n leftWheel2.setDirection(DcMotorSimple.Direction.REVERSE);\n rightWheel1.setDirection(DcMotorSimple.Direction.REVERSE);\n\n }", "static void encoderMotorsRun(DcMotor[] motors, int ticks, double power) {\n\n for (DcMotor motor : motors) {\n motor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motor.setTargetPosition(ticks);\n motor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n }\n\n for (DcMotor motor : motors) motor.setPower(power);\n\n for (DcMotor motor : motors) {\n while (motor.isBusy());\n motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n\n }", "public void setMotorPower (double left, double right) {\n left = Range.clip(left, -1.0, 1.0);\n right = Range.clip(right, -1.0, 1.0);\n lDrive.setPower(left);\n rDrive.setPower(right);\n }", "public final void modifyMotorcycle(){\r\n \tgetOffer();\r\n \tgetExhaustSystem();\r\n \tgetTires();\r\n getWindshield();\r\n getLED();\r\n getEngineGuards();\r\n /* Note that any of this methods \r\n \t * could provide a default implementation \r\n \t * by being concretely defined\r\n \t */\r\n }", "public void operatorDrive() {\n\n changeMode();\n checkForGearShift();\n\n if (Robot.rightJoystick.getRawButton(1)) {\n currentMode = DriveMode.AUTO;\n\n } else if (Robot.rightJoystick.getRawButton(2)) {\n currentMode = DriveMode.CLIMB;\n } else {\n currentMode = DEFAULT_MODE;\n }\n\n isDeploying = false;\n\n if (currentMode == DriveMode.AUTO) {\n currentMode_s = \"Auto\";\n } else if (currentMode == DriveMode.ARCADE) {\n currentMode_s = \"Arcade\";\n } else {\n currentMode_s = \"Tank\";\n }\n\n double leftY = 0;\n double rightY = 0;\n\n switch (currentMode) {\n\n case AUTO:\n rotateCam(4, Robot.visionTargetInfo.visionPixelX);\n\n // driveFwd(4, .25);\n\n break;\n\n case CLIMB:\n\n climb();\n\n break;\n\n case ARCADE:\n resetAuto();\n double linear = 0;\n double turn = 0;\n\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n linear = -Robot.rightJoystick.getY();\n }\n if (Math.abs(Robot.leftJoystick.getX()) > deadband) {\n turn = Math.pow(Robot.leftJoystick.getX(), 3);\n }\n\n leftY = -linear - turn;\n rightY = linear - turn;\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n\n break;\n\n case TANK:\n\n resetAuto();\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n rightY = -Math.pow(Robot.rightJoystick.getY(), 3 / 2);\n }\n if (Math.abs(Robot.leftJoystick.getY()) > deadband) {\n leftY = Math.pow(Robot.leftJoystick.getY(), 3 / 2);\n }\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n break;\n\n default:\n break;\n }\n\n updateTelemetry();\n }", "public void operatorControl() {\n \tdouble ctrlThresh = .2; \n \tdouble minPower = .05; \n \tdouble maxPower = .75; \n \tdouble recip = (1 - ctrlThresh); \n \tdouble mult = (maxPower - minPower); \n \tdouble right; \n \tdouble strafe; \n \tdouble rotate; \n \tdouble rightAxis; \n \tdouble strafeAxis; \n \tdouble rotateAxis; \n \t// \tboolean leftLeft; \n \t// \tboolean leftRight; \n \tdouble rightDir; \n \tdouble strafeDir; \n \tdouble rotateDir; \n \tdouble rightPower; \n \tdouble rotatePower; \n \tdouble strafePower; \n \t\n \tint winchCount;\n \tboolean winchDirection;\n \n \t// \tdouble frontLeftPower; \n \t// \tdouble frontRightPower; \n \t// \tdouble backLeftPower; \n \t// \tdouble backRightPower; \n \n \t//myRobot.setSafetyEnabled(true); \n \t\n \tAccelerometer test = new BuiltInAccelerometer();\n \t\n \twhile (isOperatorControl() && isEnabled()) { \n \t\t// ACCEL TEST CODE\n// \t\tSystem.out.println(test.getX() + \", \" + test.getY() + \", \" + test.getZ());\n \t\t// END ACCEL TEST CODE\n \n \t\t// ********** BEGIN DRIVING CODE ********** \n \t\t// Code for driving using omniwheels and two wheels for strafing \n \t\t// Diagram for the wheels of the robot below. \n \n \t\t// L S R \n \t\t// /--------------------------\\ \n \t\t//\t ||------------------------|| \n \t\t// || [][] || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || [][] || \n \t\t// ||------------------------|| \n \t\t// \\--------------------------/ \n \t\t// \n \t\t// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ \n \n \t\tctrlThresh = .2; // the point at which we want to sense joystick action \n \t\trecip = 1-ctrlThresh; \t\t // = 0.8 \n \n \t\trightAxis = rightStick.getRawAxis(1);\t\t\t\t// right joystick, y (up/down) axis\n \t\t\n \t\t//System.out.println(\"\"+rightAxis);\n \t\tstrafeAxis = rightStick.getRawAxis(0);\t\t\t\t// right joystick, x (left/right) axis; this is \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// arbitrary and could have been the left stick\n \t\trotateAxis = rightStick.getRawAxis(4);\t\t\t\t\t// left joystick, y axis\n \n \t\trightDir = rightAxis/Math.abs(rightAxis);\t\t\t// forward or backward (+1 or -1)\n \t\tstrafeDir = strafeAxis/Math.abs(strafeAxis); \t// \t\t\t'' \n \t\trotateDir = rotateAxis/Math.abs(rotateAxis); // \t\t\t'' \n \n \t\tright = 0; // right input formatted for range of detected values [0.2,1] \n \t\trotate = 0; // left input formatted \n \t\tstrafe = 0; // strafe input formatted \n \n \t\tif(Math.abs(rightAxis) > ctrlThresh) \t// user moved stick beyond threshold \n \t\t{right = (rightAxis-ctrlThresh*rightDir)/recip;} // format right: scale back, set direction, proportion it \n \t\tif(Math.abs(strafeAxis) > ctrlThresh) \n \t\t{strafe = (strafeAxis-ctrlThresh*strafeDir)/recip;} // format left... \n \t\tif(Math.abs(rotateAxis) > ctrlThresh) \n \t\t{rotate = (rotateAxis-ctrlThresh*rotateDir)/recip;}\t\t// format strafe... \n \n \n \t\trightDir = right/Math.abs(right); \n \t\trightPower = (Math.abs(right*mult) + minPower) * rightDir; \t\t// re-proportion for power's range, strip direction,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// and then add back threshold and direction. \n \t\trotateDir = rotate/Math.abs(rotate); \n \t\trotatePower = (Math.abs(rotate*mult) + minPower) * rotateDir;\t\t\t// \t\t'' \n \n \t\tstrafeDir = strafe/Math.abs(strafe); \n \t\tstrafePower = (Math.abs(strafe*mult) + minPower) * strafeDir;\t// \t\t'' \n \n \t\tif(Math.abs(rightPower)>0.2){\n \t\t\tfrontRight.set(rightPower);\t\t\t\t\t\t// set all the motors with the powers we \n \t\t\tbackRight.set(rightPower);\t\t\t\t\t\t/// calculated above : drive! \n \t\t\tfrontLeft.set(-1*rightPower); \n \t\t\tbackLeft.set(-1*rightPower);\n \t\t}\n \t\telse{\n \t\t\tfrontRight.set(rotatePower);\n \t\t\tbackRight.set(rotatePower);\n \t\t\tfrontLeft.set(rotatePower);\n \t\t\tbackLeft.set(rotatePower);\n \t\t}\n \t\t\n// \t\tfrontStrafe.set(strafePower); \n// \t\tbackStrafe.set(-1*strafePower); \n \n// \t\tmyRobot.tankDrive(leftStick, rightStick); \n \t\t \n \t\t// ********** END OF DRIVING CODE ********** \n \t\t//======================================================================= \n \t\t// ************ BEGIN WINCH CODE *********** \n \t\t// We need to code the winch to help raise and lower the elevator \n \t\t// This is just one option between the winch and the lead screw. \n \t\t \n \t\t\n \t\t//second winch test\n \t\t/*\n \t\twinchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n \t \tSystem.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n \t \tif(winchCount<240){\n \t \t\t\n \t \t\twinchCim1.set(.1);\n \t \t\twinchCim2.set(.1);\n \t \t}\n \t \telse{\n \t \t\twinchCim1.set(0);\n \t \t\twinchCim2.set(0);\n \t \t\t\n \t \t}\n \t if(rightStick.getRawButton(5)) \n { \n\t\t\t winchEncoder.reset();// reset the pulse count\n\t\t\t winchCount = 0;\n\t\t\t winchCim1.set(0);\n\t\t\t winchCim2.set(0);\n\t\t\t \n } */ //end of second winch test \n \t \t\n \t\t\n \t\t if(rightStick.getRawButton(5)) \n { \n \t\t\t //winchEncoder.reset();// reset the pulse count\n \tSystem.out.println(\"A\");\n \t winchCim1.set(.5); \t// set winchCim1 to 0.5 power (upwards) \n \t winchCim2.set(.5); \t\t\t\t\t\t\t// set winchCim2 to 0.5 power\n \t\t\t \n } \n \t\telse if(rightStick.getRawButton(4))\n \t\t{\n \t\t\tSystem.out.println(\"B\");\n \t\t\t//winchEncoder.reset();\t\t\t\t\t\t\t// reset the pulse count\n \t \twinchCim1.set(-.3); // set winchCim1 to -0.5 power (downwards) \n \t \twinchCim2.set(-.3);\t \t\t\t\t\t\t\t// set winchCim2 to -0.5 power\n \t\t}\n \n \t \telse// if(rightStick.getRawButton(2)) \n { \n \t winchCim1.set(0); \t\t\t\t\t\t\t// set winchCim1 to 0 power (off/stop) \n \t winchCim2.set(0);\t\t\t\t\t\t\t\t// set winchCim2 to 0 pwoer (off/stop)\n// \t winchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n// \t System.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n } \n \n \t\t// ********** END OF WINCH CODE ********** \n \t\t//======================================================================= \n \t\t \n \t\t \n \t\tTimer.delay(0.005);\t\t// wait for a motor update time \n } \n }", "private void localSetWheelPower(double _fl, double _fr, double _bl,\n double _br) {\n Optional<Bot> possibleBot = BaseStation.getInstance().getBotManager()\n .getBotByName(botName);\n if (possibleBot.isPresent()) {\n // if bot exists, make it mine\n Bot myBot = possibleBot.get();\n\n if (myBot.getCommandCenter() instanceof FourWheelMovement) {\n // command center is correctly referenced\n FourWheelMovement fwmCommandCenter = (FourWheelMovement) myBot\n .getCommandCenter();\n fwmCommandCenter.setWheelPower(_fl, _fr, _bl, _br);\n }\n }\n }", "public void encoderDrive(double speed, double aInches, double bInches, double cInches, double dInches) {\n double ad = 720 * (aInches / 12.57);\n int aDistance = (int) ad;\n double bd = 720 * (bInches / 12.57);\n int bDistance = (int) bd;\n double cd = 720 * (cInches / 12.57);\n int cDistance = (int) cd;\n double dd = 720 * (dInches / 12.57);\n int dDistance = (int) dd;\n\n aDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n aDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n bDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n bDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n cDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n cDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n dDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n dDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n aDrive.setTargetPosition(aDistance);\n bDrive.setTargetPosition(bDistance);\n cDrive.setTargetPosition(cDistance);\n dDrive.setTargetPosition(dDistance);\n aDrive.setPower(speed);\n bDrive.setPower(speed);\n cDrive.setPower(speed);\n dDrive.setPower(speed);\n\n while (aDrive.isBusy() && bDrive.isBusy() && cDrive.isBusy() && dDrive.isBusy() && opModeIsActive()) {\n idle();\n }\n aDrive.setPower(0);\n bDrive.setPower(0);\n cDrive.setPower(0);\n dDrive.setPower(0);\n }", "public void setMotors(double leftSpeed, double rightSpeed, double multiplier){\n double z = 0.1;\n if(multiplier<0){\n z = (1-Math.abs(multiplier))*0.5+0.25;\n }\n else{\n z = multiplier*0.25+0.75;\n }\n m_leftMotor.set(leftSpeed*z); \n m_rightMotor.set(rightSpeed*z);\n}", "@Override\n public void setMotorPower(double power)\n {\n final String funcName = \"setMotorPower\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", power);\n }\n\n if (power != currPower)\n {\n motor.set(power);\n currPower = power;\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", power);\n }\n }", "public void setClimbMotors(double percentPower) {\n\t\t// If running climb motor, turn off compressor to reduce brownout likelihood\n\t\tcompressor.setClosedLoopControl(percentPower==0);\t\t\n\n\t\tclimbMotor2.set(ControlMode.PercentOutput, percentPower);\n\t\tRobot.log.writeLogEcho(\"Climb motor,percent power,\" + percentPower);\n\t}", "public void moveBot(double drive, double rotate, double strafe, double scaleFactor)\n {\n double wheelSpeeds[] = new double[4];\n\n wheelSpeeds[0] = drive - rotate - strafe; // Right Read\n wheelSpeeds[1] = drive - rotate + strafe; // Right Front\n wheelSpeeds[2] = drive + rotate + strafe; // Left Rear\n wheelSpeeds[3] = drive + rotate - strafe; // Left Front\n // Find the magnitude of the first element in the array\n double maxMagnitude = Math.abs(wheelSpeeds[0]);\n // If any of the other wheel speeds are bigger, save that value in maxMagnitude\n for (int i = 1; i < wheelSpeeds.length; i++)\n {\n double magnitude = Math.abs(wheelSpeeds[i]);\n if (magnitude > maxMagnitude)\n {\n maxMagnitude = magnitude;\n }\n }\n // Normalize all of the magnitudes to below 1\n if (maxMagnitude > 1.0)\n {\n for (int i = 0; i < wheelSpeeds.length; i++)\n {\n wheelSpeeds[i] /= maxMagnitude;\n }\n }\n\n // Compare last wheel speeds to commanded wheel speeds and ramp as necessary\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n // If the commanded speed value is more than SPEED_INCREMENT away from the last known wheel speed\n if (Math.abs(wheelSpeeds[i] - lastwheelSpeeds[i]) > SPEED_INCREMENT){\n // Set the current wheel speed to the last wheel speed plus speed increment in the signed directin of the difference\n wheelSpeeds[i] = lastwheelSpeeds[i] + Math.copySign(SPEED_INCREMENT,wheelSpeeds[i] - lastwheelSpeeds[i]);\n }\n }\n\n // Send the normalized values to the wheels, further scaled by the user\n rightRearDrive.setPower(wheelSpeeds[0] * scaleFactor);\n rightFrontDrive.setPower(wheelSpeeds[1] * scaleFactor);\n leftRearDrive.setPower(wheelSpeeds[2] * scaleFactor);\n leftFrontDrive.setPower(wheelSpeeds[3] * scaleFactor);\n\n // Save the last wheel speeds to assist in ramping\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n lastwheelSpeeds[i] = wheelSpeeds[i];\n }\n }", "void enablePWM(double initialDutyCycle);", "protected void encoderDrive(double leftInches, double rightInches, double speed, double desiredAngle) {\n if (!doMotors)\n return;\n\n if (desiredAngle >= 0.0f) {\n motorPid.reset();\n motorPid.setSetpoint(0);\n motorPid.setOutputRange(0, speed);\n motorPid.setInputRange(-90, 90);\n motorPid.enable();\n }\n\n float startAngle = getGyroscopeAngle();\n double countsPerInch = COUNTS_PER_MOTOR / (WHEEL_DIAMETER * Math.PI);\n int softStartDuration = 2000; // in milliseconds\n int brakeOffsetOne = (int) (18.0f * countsPerInch);\n int brakeOffsetTwo = (int) (8.0f * countsPerInch);\n\n // Get the starting position of the encoders.\n isDriving = true;\n driveLeftStart = leftDrive.getCurrentPosition();\n driveRightStart = rightDrive.getCurrentPosition();\n\n int leftNew = (int) (leftInches * countsPerInch * RAT_FUDGE);\n int rightNew = (int) (rightInches * countsPerInch * RAT_FUDGE);\n driveLeftTarget = driveLeftStart + leftNew;\n driveRightTarget = driveRightStart + rightNew;\n leftDrive.setTargetPosition(driveLeftTarget);\n rightDrive.setTargetPosition(driveRightTarget);\n\n // Turn On RUN_TO_POSITION\n leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // Compute the braking zones.\n int leftBrakeOne = driveLeftStart + brakeOffsetOne; // how many remaining will trigger it\n int rightBrakeOne = driveRightStart + brakeOffsetOne;\n int leftBrakeTwo = driveLeftStart + brakeOffsetTwo;\n int rightBrakeTwo = driveRightStart + brakeOffsetTwo;\n\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n ElapsedTime motorOnTime = new ElapsedTime();\n boolean keepGoing = true;\n while (opModeIsActive() && keepGoing && (motorOnTime.seconds() < 30)) {\n printStatus();\n\n int leftPos = leftDrive.getCurrentPosition();\n int rightPos = rightDrive.getCurrentPosition();\n\n // soft start\n double currSpeed = speed;\n double elapsed = motorOnTime.milliseconds();\n if (elapsed < softStartDuration) {\n double ratio = elapsed / softStartDuration;\n currSpeed *= ratio;\n }\n\n // Throttle speed down as we approach our target\n int remainingLeft = driveLeftTarget - leftPos;\n int remainingRight = driveRightTarget - rightPos;\n if ((Math.abs(remainingLeft) < brakeOffsetTwo) || (Math.abs(remainingRight) < brakeOffsetTwo)) {\n currSpeed *= 0.25;\n } else if ((Math.abs(remainingLeft) < brakeOffsetOne) || (Math.abs(remainingRight) < brakeOffsetOne)) {\n currSpeed *= 0.5;\n }\n\n // Calculate PID correction = straighten out the line!\n if (desiredAngle >= 0.0f) {\n float currentAngle = getGyroscopeAngle();\n driveAngleOffset = getAngleDifference(currentAngle, (float)desiredAngle);\n driveAngleCorrection = (float) motorPid.performPID(driveAngleOffset);\n if ((leftInches < 0) && (rightInches < 0)) {\n driveAngleCorrection = -driveAngleCorrection;\n }\n }\n\n // Record and apply the desired power level.\n driveLeftSpeed = currSpeed - driveAngleCorrection;\n driveRightSpeed = currSpeed + driveAngleCorrection;\n leftDrive.setPower(Math.abs(driveLeftSpeed));\n rightDrive.setPower(Math.abs(driveRightSpeed));\n\n keepGoing = rightDrive.isBusy() && leftDrive.isBusy();\n }\n\n // Turn off RUN_TO_POSITION\n printStatus();\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n driveLeftStart = 0;\n driveRightStart = 0;\n driveLeftTarget = 0;\n driveRightTarget = 0;\n driveLeftSpeed = 0.0f;\n driveRightSpeed = 0.0f;\n driveAngleOffset = 0.0f;\n driveAngleCorrection = 0.0f;\n isDriving = false;\n }", "public void encoderDrive(double speed,\r\n double leftInches, \r\n double rightInches,\r\n String name) \r\n {\n int newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH);\r\n int newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH);\r\n robot.leftDrive.setTargetPosition(newLeftTarget);\r\n robot.rightDrive.setTargetPosition(newRightTarget);\r\n\r\n // Turn On RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n\r\n // reset the timeout time and start motion.\r\n ElapsedTime localTimer = new ElapsedTime();\r\n localTimer.reset();\r\n robot.leftDrive.setPower(Math.abs(speed));\r\n robot.rightDrive.setPower(Math.abs(speed));\r\n\r\n // keep looping while we are still active, and there is time left, and both motors are running.\r\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\r\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\r\n // always end the motion as soon as possible.\r\n // However, if you require that BOTH motors have finished their moves before the robot continues\r\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\r\n while (localTimer.seconds() < EncoderDrive_Timeout_Second \r\n && (robot.leftDrive.isBusy() || robot.rightDrive.isBusy())) {\r\n\r\n // Display it for the driver.\r\n telemetry.addData(\"\", \"%s @ %s\", name, localTimer.toString());\r\n telemetry.addData(\"To\", \"%7d :%7d\", newLeftTarget, newRightTarget);\r\n telemetry.addData(\"At\", \"%7d :%7d\",\r\n robot.leftDrive.getCurrentPosition(),\r\n robot.rightDrive.getCurrentPosition());\r\n telemetry.update();\r\n idle();\r\n }\r\n\r\n // Stop all motion;\r\n robot.leftDrive.setPower(0);\r\n robot.rightDrive.setPower(0);\r\n\r\n // Turn off RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n }", "@Override\n public void periodic() {\n\t\t// myDrive.\n\n\t\t// System.out.println(Robot.m_oi.getSpeed());\n\t\t// SmartDashboard.putNumber(\"Dial Output: \", Robot.m_oi.getSpeed());\n\n\t\t// //Wheel Speed Limits\n\n\t\t// SmartDashboard.putNumber(\"Front Left Percent\", myDrive.getFLSpeed());\n\t\t// SmartDashboard.putNumber(\"Front Right Percent\", myDrive.getFRSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Left Percent\", myDrive.getRLSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Right Percent\", myDrive.getRRSpeed());\n\n\t\t//Test Code for Selecting Calibration Motor \n\t\t//***COMMENT OUT BEFORE REAL GAME USE***\n\t\t// if (Robot.m_oi.getArmDown()) {\n\t\t// \t// System.out.println(\"Front Left Wheel Selected\");\n\t\t// \tWheel = 1;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getArmUp()) {\n\t\t// \t// System.out.println(\"Back Left Wheel Selected\");\n\t\t// \tWheel = 2;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallIn()) {\n\t\t// \t// System.out.println(\"Front Right Wheel Selected\");\n\t\t// \tWheel = 3;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallOut()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 4;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBlueButton()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 0;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t// } \n\n\t\t// if (Wheel == 1) {\n\n\t\t// \tmyDrive.setFLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 2) {\n\n\t\t// \tmyDrive.setRLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 3) {\n\n\t\t// \tmyDrive.setFRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 4) {\n\n\t\t// \tmyDrive.setRRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// }\n\n\t\t// if (Robot.m_oi.getSafety()) {\n\n\t\t// \tspeedLimit = 1.0;\n\t\t// \tstrafeLimit = 1.0;\n\n\t\t// } else {\n\n\t\t// \tspeedLimit = 0.5; \n\t\t// \tstrafeLimit = 0.8;\n\t\t\t\t\n\t\t// }\n\n\n\n\t\t//System.out.print (\"strafeLimit: \" + strafeLimit);\n\t\t//System.out.println(Robot.m_oi.getX() * strafeLimit);\n\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY() * speedLimit), // set Y speed\n\t\t// \t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t// \t(Robot.m_oi.getRotate() * rotateLimit), // set rotation rate\n\t\t// \t0); // gyro angle \n\t\t\n\t\t//TODO: Rotate robot with vision tracking, set up curve to slow down as target approaches center.\n\t\t// if (Robot.m_oi.getStartButton()) {\n\t\t// \tmyDrive.driveCartesian(\n\t\t// \t\t (0.4), // set Rotation\n\t\t// \t\t (0.0), // set Strafe\n\t\t// \t\t (0.0), // set Forward/Back\n\t\t// \t\t 0);\n\t\t// } else {\n\t\tmyDrive.driveCartesian(\n\t\t\t(Robot.m_oi.getY() * rotateLimit), // set Y speed\n\t\t\t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t\t(Robot.m_oi.getRotate() * speedLimit), // set rotation rate\n\t\t\t0);\n\t\t// }\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY()), // set Y speed\n\t\t// \t(Robot.m_oi.getX()), // set X speed\n\t\t// \t(Robot.m_oi.getRotate()), // set rotation rate\n\t\t// \t0); \n\n }", "public void updatePower(double power){\n for(DcMotor motor : this.motors){\n motor.setPower(Range.clip(power*this.direction,-this.power,this.power));\n }\n }", "public void mecanumDrive(double forward, double turn, double strafe, double multiplier) {\n double vd = Math.hypot(forward, strafe);\n double theta = Math.atan2(forward, strafe) - (Math.PI / 4);\n turnPower = turn;\n\n// if(forward == 0 && strafe == 0 && turn == 0) {\n// Time.reset();\n// }\n//\n// double accLim = (Time.time()/1.07)*((0.62*Math.pow(Time.time(), 2))+0.45);\n//\n// if(forward < 0 || turn < 0 || strafe < 0) {\n//\n// }\n//\n// if(turn == 0) {\n// targetAngle = getImuAngle();\n// turnPower = pid.run(0.001, 0, 0, 10, targetAngle);\n// } else {\n// targetAngle = getImuAngle();\n// }\n\n double[] v = {\n vd * Math.sin(theta) - turnPower,\n vd * Math.cos(theta) + turnPower,\n vd * Math.cos(theta) - turnPower,\n vd * Math.sin(theta) + turnPower\n };\n\n double[] motorOut = {\n multiplier * (v[0] / 1.07) * ((0.62 * Math.pow(v[0], 2)) + 0.45),\n multiplier * (v[1] / 1.07) * ((0.62 * Math.pow(v[1], 2)) + 0.45),\n multiplier * (v[2] / 1.07) * ((0.62 * Math.pow(v[2], 2)) + 0.45),\n multiplier * (v[3] / 1.07) * ((0.62 * Math.pow(v[3], 2)) + 0.45)\n };\n\n fr.setPower(motorOut[0]);\n fl.setPower(motorOut[1]);\n br.setPower(motorOut[2]);\n bl.setPower(motorOut[3]);\n }", "public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }", "@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING,\n defaultValue = \"CB\")\n @SimpleProperty\n public void DriveMotors(String motorPortLetters) {\n driveMotors = motorPortLetters;\n driveMotorPorts = new ArrayList<NxtMotorPort>();\n for (int i = 0; i < motorPortLetters.length(); i++) {\n String ch = String.valueOf(motorPortLetters.charAt(i));\n // Make sure ch is a valid NxtMotorPort. Handles lower & upper case.\n NxtMotorPort port = NxtMotorPort.fromUnderlyingValue(ch);\n if (port == null) {\n form.dispatchErrorOccurredEvent(this, \"DriveMotors\",\n ErrorMessages.ERROR_NXT_INVALID_MOTOR_PORT, ch);\n continue;\n }\n driveMotorPorts.add(port);\n }\n }", "public void flywhlGo(int rpm) {\n\t\tflywheelMotor.changeControlMode(TalonControlMode.Speed);\n\t\tflywheelMotor.set(rpm);\n\t\tSystem.out.println(flywheelMotor.getError());\n\n\t}", "void drive(double x_stick, double y_stick, double x_right_stick, double multiplier) {\n if (Math.abs(x_stick) >= (2 * Math.abs(y_stick)) + .1) {\n flMotor.setPower(x_stick * multiplier);\n frMotor.setPower(-x_stick * multiplier);\n blMotor.setPower(-x_stick * multiplier);\n brMotor.setPower(x_stick * multiplier);\n } else {\n flMotor.setPower((y_stick + x_right_stick) * multiplier);\n frMotor.setPower((y_stick - x_right_stick) * multiplier);\n blMotor.setPower((y_stick + x_right_stick) * multiplier);\n brMotor.setPower((y_stick - x_right_stick) * multiplier);\n }\n }", "public void tankDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set(joystickRYAxis);\n\t\t\tmotorRF.set(joystickRYAxis);\n\t\t\tmotorLB.set(-joystickLYAxis);\n\t\t\tmotorLF.set(-joystickLYAxis);\n\n\t\t} else {\n\t\t\tmotorRB.set(joystickRYAxis/2);\n\t\t\tmotorRF.set(joystickRYAxis/2);\n\t\t\tmotorLB.set(-joystickLYAxis/2);\n\t\t\tmotorLF.set(-joystickLYAxis/2);\n\t\t\t//System.out.println(strongBad.motorMultiplier);\n\t\t\t//SmartDashboard.putNumber(\"MM2\", strongBad.motorMultiplier);\n\n\t\t}\n\t}", "private void robotMovement()\n {\n\n /* If it will be rotating, don't drive */\n if (!joystick.rightShouldMove()) {\n\n if (joystick.leftShouldMove()) {\n\n /* Derive movement values from gamepad */\n Joystick.Direction direction = joystick.getLeftDirection();\n double power = joystick.getLeftPower();\n\n int[] modifier;\n\n if (direction == Joystick.Direction.UP) {\n modifier = modUP;\n } else if (direction == Joystick.Direction.DOWN) {\n modifier = modDOWN;\n } else if (direction == Joystick.Direction.RIGHT) {\n modifier = modRIGHT;\n } else {\n modifier = modLEFT;\n }\n\n motorLeftFront.setPower(modifier[0] * ((power * 0.8) + (0.01 * frontInc)));\n motorRightFront.setPower(modifier[1] * ((power * 0.8) + (0.01 * frontInc)));\n motorLeftBack.setPower(modifier[2] * ((power * 0.8) + (0.01 * backInc)));\n motorRightBack.setPower(modifier[3] * ((power * 0.8) + (0.01 * backInc)));\n\n } else {\n setMotorPowerToZero();\n }\n\n } else {\n\n /* Rotation modifiers for sides of bot */\n Joystick.Direction d = joystick.getRightDirection();\n double power = joystick.getRightPower();\n boolean left = d == Joystick.Direction.LEFT;\n double sideMod = left ? 1 : -1;\n\n /* Set motor power */\n motorLeftFront.setPower(sideMod * power);\n motorLeftBack.setPower(sideMod * power);\n motorRightFront.setPower(sideMod * power);\n motorRightBack.setPower(sideMod * power);\n\n }\n\n }", "public void setMotors(final double speed, double spinnerSafetySpeedMod) {\n\n spinnerMotorCan.set(ControlMode.PercentOutput, speed);\n\n /// DEBUG CODE ///\n\n if (RobotMap.driveDebug) {\n System.out.println(\"Spinner Speed : \" + speed);\n }\n }", "public void setPower(double leftPower, double rightPower) {\n\t\tleftMiddleMotor.set(ControlMode.PercentOutput, leftPower);\n\t\trightMiddleMotor.set(ControlMode.PercentOutput, rightPower);\n\t}", "private void updateMotors() {\n\t\t//Pass filtered values to ChopperStatus.\n\t\tmStatus.setMotorFields(mMotorSpeed);\n\t\tString logline = Long.toString(System.currentTimeMillis()) + \" \" + mMotorSpeed[0] + \" \" + mMotorSpeed[1] + \" \" + mMotorSpeed[2] + \" \" + mMotorSpeed[3] + \"\\n\";\n\t\ttry {\n\t\t\tif (logfile != null) {\n\t\t\t\tlogfile.write(logline);\n\t\t\t\tlogfile.flush();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\t//Log.e(TAG, \"Cannot write to logfile\");\n\t\t}\n\t\t//Pass motor values to motor controller!\n\t\tMessage msg = Message.obtain();\n\t\tmsg.what = SEND_MOTOR_SPEEDS;\n\t\tmsg.obj = mMotorSpeed;\n\t\tmBt.sendMessageToHandler(msg);\n\t\t//Log.i(TAG, \"Guidance sending message.\");\n\t\t\n\t}", "public void tankDrive(double leftPower, double rightPower){\n motorFrontLeft.setPower(leftPower);\n motorFrontRight.setPower(rightPower);\n motorBackLeft.setPower(leftPower*.5);\n motorBackRight.setPower(rightPower*.5);\n }", "@Override\n public void execute() {\n\n DifferentialDriveWheelPowers powers = mBasicDrive.drive(mThrottle.getAsDouble(), mTurn.getAsDouble(), mTrim.getAsDouble());\n\n DifferentialDriveWheelSpeeds speeds = new DifferentialDriveWheelSpeeds(\n powers.getLeft() * Constants.Drive.kFeedforward.maxAchievableVelocity(Constants.Robot.kMinBatteryVoltage, 0.0),\n powers.getRight() * Constants.Drive.kFeedforward.maxAchievableVelocity(Constants.Robot.kMinBatteryVoltage, 0.0));\n\n mDriveSubsystem.setVelocity(speeds, mDeadband);\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }", "@Override\n public void runOpMode(){\n motors[0][0] = hardwareMap.dcMotor.get(\"frontLeft\");\n motors[0][1] = hardwareMap.dcMotor.get(\"frontRight\");\n motors[1][0] = hardwareMap.dcMotor.get(\"backLeft\");\n motors[1][1] = hardwareMap.dcMotor.get(\"backRight\");\n // The motors on the left side of the robot need to be in reverse mode\n for(DcMotor[] motor : motors){\n motor[0].setDirection(DcMotor.Direction.REVERSE);\n }\n // Being explicit never hurt anyone, right?\n for(DcMotor[] motor : motors){\n motor[1].setDirection(DcMotor.Direction.FORWARD);\n }\n\n waitForStart();\n\n //Kill ten seconds\n runtime.reset();\n while(runtime.seconds()<10); runtime.reset();\n\n while(runtime.milliseconds()<700){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(100);\n // Set right motor power\n motor[1].setPower(100);\n }\n }\n\n while(runtime.milliseconds()<200){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(-100);\n // Set right motor power\n motor[1].setPower(-100);\n }\n }\n\n runtime.reset();\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(0);\n // Set right motor power\n motor[1].setPower(0);\n }\n }", "public void setPower(double pow){\n if(pow > 0) {\n crServo.setPower(ZERO_POWER_POSITION + (1 - ZERO_POWER_POSITION) * pow);\n } else if (pow < 0) {\n crServo.setPower(ZERO_POWER_POSITION * (1 + pow));\n } else {\n crServo.setPower(ZERO_POWER_POSITION);\n }\n }", "@Override\n public void init() {\n // Get references to dc motors and set initial mode and direction\n // It appears all encoders are reset upon robot startup, but just in case, set all motor\n // modes to Stop-And-Reset-Encoders during initialization.\n motorLeftA = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_A);\n motorLeftA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftA.setDirection(DcMotor.Direction.FORWARD);\n\n motorLeftB = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_B);\n motorLeftB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftB.setDirection(DcMotor.Direction.FORWARD);\n\n motorRightA = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_A);\n motorRightA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightA.setDirection(DcMotor.Direction.REVERSE);\n\n motorRightB = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_B);\n motorRightB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightB.setDirection(DcMotor.Direction.REVERSE);\n\n //motorGlyphLift = hardwareMap.dcMotor.get(GLYPH_LIFT);\n //motorGlyphLift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //motorGlyphLift.setDirection(DcMotor.Direction.FORWARD);\n\n sGlyphL = hardwareMap.servo.get(GLYPH_LEFT);\n //sGlyphL.scaleRange(0,180);\n\n sGlyphR = hardwareMap.servo.get(GLYPH_RIGHT);\n sGem = hardwareMap.servo.get(Gem);\n\n //Initialize vex motor\n sGLift = hardwareMap.crservo.get(Servo_GlyphLift);\n\n //sGLift.setPower(0);\n\n //sGLift2 = hardwareMap.servo.get(Servo_GlyphLift);\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n imu = hardwareMap.get(BNO055IMU.class,\"imu\");\n imu.initialize(parameters);\n\n //servoGlyph1.setPosition(180);\n //servoGlyph2.setPosition(180);\n\n bDirection = true;\n }", "@Override\n public void main() throws InterruptedException {\n this.motorLeft = this.hardwareMap.dcMotor.get(\"motorLeft\");\n this.motorRight = this.hardwareMap.dcMotor.get(\"motorRight\");\n\n motorLeft.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n motorRight.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n\n motorRight.setDirection(DcMotor.Direction.REVERSE);\n\n// boolean test = true;\n// while (test) {\n// motorLeft.setPower(1.0);\n// motorRight.setPower(1.0);\n//\n// if (updateGamepads())\n// {\n// if (gamepad1.b)\n// {\n// test = false;\n// }\n// }\n// }\n\n // while (opModeIsActive())\n // gamepad1.a\n while (true)\n {\n if (updateGamepads())\n {\n motorLeft.setPower(gamepad1.left_stick_y);\n motorRight.setPower(gamepad1.right_stick_y);\n\n // move the arm with controller bumpers\n if (gamepad1.right_bumper)\n {\n motorArm.setPower(0.5);\n Thread.sleep(100);\n }\n else if (gamepad1.left_bumper)\n {\n motorArm.setPower(-0.5);\n Thread.sleep(100);\n }\n else\n {\n motorArm.setPower(0);\n }\n }\n\n telemetry.update();\n idle();\n }\n }", "void setPWMRate(double rate);", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "private void displayMotorsPower() {\n int powers = Motor.A.getPower() * 100\n + Motor.B.getPower() * 10\n + Motor.C.getPower(); \n LCD.showNumber(powers);\n }", "private void encoderDrive(double speed,\n double leftInches, double rightInches,\n double timeoutS) {\n int newLeftFrontTarget;\n int newLeftBackTarget;\n int newRightFrontTarget;\n int newRightBackTarget;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n robot.resetWheelEncoders();\n\n // Determine new target position, and pass to motor controller\n newLeftFrontTarget = robot.leftFront.getCurrentPosition() + (int) (leftInches * TICKS_PER_INCH);\n newLeftBackTarget = robot.leftBack.getCurrentPosition() + (int) (leftInches * TICKS_PER_INCH);\n newRightFrontTarget = robot.rightFront.getCurrentPosition() + (int) (rightInches * TICKS_PER_INCH);\n newRightBackTarget = robot.rightBack.getCurrentPosition() + (int) (rightInches * TICKS_PER_INCH);\n robot.leftFront.setTargetPosition(newLeftFrontTarget);\n robot.leftBack.setTargetPosition(newLeftBackTarget);\n robot.rightFront.setTargetPosition(newRightFrontTarget);\n robot.rightBack.setTargetPosition(newRightBackTarget);\n\n // Turn On RUN_TO_POSITION\n robot.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n\n // reset the timeout time and start motion.\n encoderTime.reset();\n robot.driveForward(Math.abs(speed));\n\n // wait for motors to not be busy\n while (opModeIsActive() &&\n (encoderTime.seconds() < timeoutS) &&\n (robot.leftFront.isBusy() && robot.leftBack.isBusy() && robot.rightFront.isBusy() && robot.rightBack.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Goal Position\", \"%7d :%7d :%7d :%7d\", newLeftFrontTarget, newLeftBackTarget, newRightFrontTarget, newRightBackTarget);\n telemetry.addData(\"Current Position\", \"%7d :%7d :%7d :%7d\",\n robot.leftFront.getCurrentPosition(),\n robot.leftBack.getCurrentPosition(),\n robot.rightFront.getCurrentPosition(),\n robot.rightBack.getCurrentPosition());\n telemetry.update();\n }\n\n // Stop all motion;\n robot.stopDriving();\n\n // Turn off RUN_TO_POSITION\n robot.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n sleep(100); // optional pause after each move\n }\n }", "public void testEach(double power, double timeOn) {\n\t\tfor (SpeedController s : motors) {\n\t\t\ttry {\n\t\t\t\ts.set(power);\n\t\t\t\tThread.sleep(Math.round(timeOn * 1000));\n\t\t\t\ts.set(0);\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (Exception e) {\n\t\t\t\tDriverStation.reportError(\"MotorGroup.testEachWait() exception!\", false);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "private void calculateMotorOutputs(int angle, int strength) {\n Point cart_point = polarToCart(angle,strength);\n\n final double max_motor_speed = 1024.0;\n final double min_motor_speed = 600.0;\n\n final double max_joy_val = 100;\n\n final double fPivYLimit = 24.0; // 32.0 was originally recommended\n\n // TEMP VARIABLES\n double nMotPremixL; // Motor (left) premixed output (-100..+99)\n double nMotPremixR; // Motor (right) premixed output (-100..+99)\n int nPivSpeed; // Pivot Speed (-100..+99)\n double fPivScale; // Balance scale b/w drive and pivot ( 0..1 )\n\n\n // Calculate Drive Turn output due to Joystick X input\n if (cart_point.y >= 0) {\n // Forward\n nMotPremixL = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n nMotPremixR = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n } else {\n // Reverse\n nMotPremixL = (cart_point.x>=0)? (max_joy_val - cart_point.x) : max_joy_val;\n nMotPremixR = (cart_point.x>=0)? max_joy_val : (max_joy_val + cart_point.x);\n }\n\n // Scale Drive output due to Joystick Y input (throttle)\n nMotPremixL = nMotPremixL * cart_point.y/max_joy_val;\n nMotPremixR = nMotPremixR * cart_point.y/max_joy_val;\n\n // Now calculate pivot amount\n // - Strength of pivot (nPivSpeed) based on Joystick X input\n // - Blending of pivot vs drive (fPivScale) based on Joystick Y input\n nPivSpeed = cart_point.x;\n fPivScale = (Math.abs(cart_point.y)>fPivYLimit)? 0.0 : (1.0 - Math.abs(cart_point.y)/fPivYLimit);\n\n // Calculate final mix of Drive and Pivot, produces normalised values between -1 and 1\n double motor_a_prescale = ( (1.0-fPivScale)*nMotPremixL + fPivScale*( nPivSpeed) ) /100;\n double motor_b_prescale = ( (1.0-fPivScale)*nMotPremixR + fPivScale*(-nPivSpeed) ) /100;\n\n // convert normalised values to usable motor range\n motor_a = (int)( motor_a_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_a_prescale)*min_motor_speed) );\n motor_b = (int)( motor_b_prescale * (max_motor_speed - min_motor_speed) + (Math.signum(motor_b_prescale)*min_motor_speed) );\n\n }", "public void drive(double leftPower, double rightPower) {\n\t\t// Send calculated power (Motors)\n\t\tleft_drive.setPower(leftPower);\n\t\tright_drive.setPower(rightPower);\n\t\t\n\t\t//sendTelemetry(leftPower, rightPower);\n\t}", "public void forward(double power, double distance) {\n\n int ticks = (int) (((distance / (4 * Math.PI) * 1120)) * 4 / 3 + 0.5);\n\n //Reset Encoders358\n// fL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// bL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// fR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// bR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //Set to RUN_TO_POSITION mode\n fL.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n bL.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n fR.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n bR.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //Set Target Position\n fL.setTargetPosition(fL.getCurrentPosition() + ticks);\n bL.setTargetPosition(bL.getCurrentPosition() + ticks);\n fR.setTargetPosition(fR.getCurrentPosition() + ticks);\n bR.setTargetPosition(bR.getCurrentPosition() + ticks);\n\n //Set Drive Power\n fL.setPower(power);\n bL.setPower(power);\n fR.setPower(power);\n bR.setPower(power);\n\n while (fL.isBusy() && fR.isBusy() && bL.isBusy() && bR.isBusy()) {\n //Wait Until Target Position is Reached\n }\n\n //Stop and Change Mode back to Normal\n fL.setPower(0);\n bL.setPower(0);\n fR.setPower(0);\n bR.setPower(0);\n }", "public static void setMotorSpeed(double speed){\n setLeftMotorSpeed(speed);\n setRightMotorSpeed(speed);\n }", "@Override\n public void init() {\n\n try {\n\n // Get wheel motors\n wheelMotor1 = hardwareMap.dcMotor.get(\"Wheel 1\");\n wheelMotor2 = hardwareMap.dcMotor.get(\"Wheel 2\");\n\n // Initialize wheel motors\n wheelMotor1.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor2.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor1.setDirection(DcMotor.Direction.FORWARD);\n wheelMotor2.setDirection(DcMotor.Direction.REVERSE);\n robotDirection = DriveMoveDirection.Forward;\n motion = new Motion(wheelMotor1, wheelMotor2);\n\n // Get hook motor\n motorHook = hardwareMap.dcMotor.get(\"Hook\");\n motorHook.setDirection(DcMotor.Direction.REVERSE);\n\n // Get servos\n servoTapeMeasureUpDown = hardwareMap.servo.get(\"Hook Control\");\n servoClimberDumperArm = hardwareMap.servo.get(\"Climber Dumper Arm\");\n servoDebrisPusher = hardwareMap.servo.get(\"Debris Pusher\");\n servoZipLineLeft = hardwareMap.servo.get(\"Zip Line Left\");\n servoZipLineRight = hardwareMap.servo.get(\"Zip Line Right\");\n servoAllClearRight = hardwareMap.servo.get (\"All Clear Right\");\n servoAllClearLeft = hardwareMap.servo.get (\"All Clear Left\");\n\n setServoPositions();\n }\n catch (Exception ex)\n {\n telemetry.addData(\"error\", ex.getMessage());\n }\n }", "public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }", "public void setArmPower(double power) {\n armMotor.setPower(power);\n }", "@Override \n public void runOpMode() \n {\n leftMotors = hardwareMap.get(DcMotor.class, \"left_Motors\");\n rightMotors = hardwareMap.get(DcMotor.class, \"right_Motors\");\n vLiftMotor = hardwareMap.get(DcMotor.class, \"vLift_Motor\"); \n \n leftMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotors.setDirection(DcMotor.Direction.REVERSE);\n rightMotors.setDirection(DcMotor.Direction.FORWARD);\n vLiftMotor.setDirection(DcMotor.Direction.REVERSE);\n vLiftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n waitForStart(); //press play button, actives opMode\n intakePivotServo.setPosition(intakePivotServoPos);\n while (opModeIsActive()) \n { \n drive();\n pivotIntake();\n pivotLift();\n \n }//opModeIsActive \n \n }", "public void tankDrive(double[] motorValues)\n {\n tankDrive(motorValues[0], motorValues[1]);\n }", "public void adjustShooterAngleManual() {\n\n // If the driver pushes the Square Button on the PS4 Controller,\n // set the worm drive motors to go backwards (lower it).\n if (PS4.getRawButton(PS4_X_BUTTON) == true) {\n\n wormDriveMotors.set(-0.2);\n\n // If the driver pushes the Triangle Button on the PS4 Controller,\n // set the worm drive motors to go forwards (raise it up).\n } else if (PS4.getRawButton(PS4_SQUARE_BUTTON) == true) {\n\n wormDriveMotors.set(0.4);\n }\n\n // If the driver is an idiot and is pressing BOTH the Square Button AND the\n // Triangle Button at the same time, OR (||) if the driver is pushing neither\n // button, set the motor speed to 0.\n else if (((PS4.getRawButton(PS4_X_BUTTON) == true) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == true))\n || ((PS4.getRawButton(PS4_X_BUTTON) == false) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == false))) {\n\n wormDriveMotors.set(0);\n }\n\n }", "void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }", "protected void initializeEncoders() throws InterruptedException {\n motorFrontRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorFrontRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorFrontLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorFrontLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorBackRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorBackRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorBackLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorBackLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorGlyphTower.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorGlyphTower.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorBackRight.setDirection(DcMotorSimple.Direction.REVERSE);\n motorBackLeft.setDirection(DcMotorSimple.Direction.FORWARD);\n motorFrontLeft.setDirection(DcMotorSimple.Direction.FORWARD);\n motorFrontRight.setDirection(DcMotorSimple.Direction.REVERSE);\n\n Thread.sleep(200);\n Log.d(\"RHTP\",\"wheel encoder settings set\");\n }", "public void drive(double direction, double speed) {\n if (mode != SwerveMode.Disabled) {\n for (SwerveModule mod: modules) {\n mod.setSetpoint(direction);\n }\n \t\tmodules.get(0).setSpeed(speed * -1);\n \t\tmodules.get(1).setSpeed(speed);\n \t\tmodules.get(2).setSpeed(speed * -1);\n \t\tmodules.get(3).setSpeed(speed);\n\n\n }\n\n}", "public void operatorControl() {\n myRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tmyRobot.tankDrive(controller, 2, controller, 5);\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "void GoDir( double power, double theta_degrees ){\n \n double gain = 0.1; // torque power per degree angle\n \n double theta_radians = Math.toRadians(theta_degrees);\n double Fx = power * Math.cos( theta_radians );\n double Fy = power * Math.sin( theta_radians );\n double Tau = gain*(gTheta - getAngle());\n \n double P1 = Fx*2.0/3.0 + Tau/3.0;\n double P2 = -Fx*1.0/3.0 + 1.0/Math.sqrt(3.0)*Fy + Tau/3.0;\n double P3 = -Fx*2.0/3.0 - 1.0/Math.sqrt(3.0)*Fy + Tau/3.0;\n\n topDrive.setPower( P1 );\n leftDrive.setPower( P2 );\n rightDrive.setPower( P3 );\n }", "Robot (DcMotor leftWheel,\n DcMotor rightWheel,\n Servo rightCollectServo,\n Servo leftCollectServo,\n DcMotor collectMotor,\n DcMotor landerMotor,\n float wheelDiameter,\n float gearRatio,\n float distanceBetweenWheels) {\n\n this.wheels = new Wheels(leftWheel,\n rightWheel,\n wheelDiameter,\n gearRatio,\n distanceBetweenWheels);\n\n this.arms = new Arms(rightCollectServo,\n leftCollectServo,\n collectMotor,\n landerMotor);\n }", "public void drive(double leftMotors, double rightMotors) {\n\t\tleft1.set(leftMotors);\n\t\tleft2.set(leftMotors);\n\t\tleft3.set(leftMotors);\n\t\tright1.set(rightMotors);\n\t\tright2.set(rightMotors);\n\t\tright3.set(rightMotors);\n\t}", "public void encoderDrive(double speed,\n double leftInches, double rightInches,\n double timeoutS) {\n int newLeftTarget;\n int newRightTarget;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n // Determine new target position, and pass to motor controller\n newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH);\n newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH);\n robot.leftDrive.setTargetPosition(newLeftTarget);\n robot.rightDrive.setTargetPosition(newRightTarget);\n\n // Turn On RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n // reset the timeout time and start motion.\n runtime.reset();\n robot.leftDrive.setPower(Math.abs(speed));\n robot.rightDrive.setPower(Math.abs(speed));\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n while (opModeIsActive() &&\n (runtime.seconds() < timeoutS) &&\n (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Path1\", \"Running to %7d :%7d\", newLeftTarget, newRightTarget);\n telemetry.addData(\"Path2\", \"Running at %7d :%7d\",\n robot.leftDrive.getCurrentPosition(),\n robot.rightDrive.getCurrentPosition());\n telemetry.update();\n }\n\n // Stop all motion;\n robot.leftDrive.setPower(0);\n robot.rightDrive.setPower(0);\n\n // Turn off RUN_TO_POSITION\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public void towerIndexing()\n {\n m_towerMotor.set(ControlMode.PercentOutput, 0.5);\n m_intakeHopperMotor.set(ControlMode.PercentOutput, HopperConstants.HOPPER_MOTOR_POWER);\n }", "@Override\r\n public void runOpMode() {\n\r\n mtrFL = hardwareMap.dcMotor.get(\"fl_drive\");\r\n mtrFR = hardwareMap.dcMotor.get(\"fr_drive\");\r\n mtrBL = hardwareMap.dcMotor.get(\"bl_drive\");\r\n mtrBR = hardwareMap.dcMotor.get(\"br_drive\");\r\n\r\n\r\n // Set directions for motors.\r\n mtrFL.setDirection(DcMotor.Direction.REVERSE);\r\n mtrFR.setDirection(DcMotor.Direction.FORWARD);\r\n mtrBL.setDirection(DcMotor.Direction.REVERSE);\r\n mtrBR.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n\r\n //zero power behavior\r\n mtrFL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrFR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrBL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrBR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n\r\n\r\n // Set power for all motors.\r\n mtrFL.setPower(powFL);\r\n mtrFR.setPower(powFR);\r\n mtrBL.setPower(powBL);\r\n mtrBR.setPower(powBR);\r\n\r\n\r\n // Set all motors to run with given mode\r\n mtrFL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrFR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrBL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrBR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n\r\n waitForStart();\r\n\r\n // run until the end of the match (driver presses STOP)\r\n while (opModeIsActive()) {\r\n g1ch2 = -gamepad1.left_stick_y;\r\n g1ch3 = gamepad1.right_stick_x;\r\n g2ch2 = -gamepad2.left_stick_x;\r\n g2ch4 = -gamepad2.right_stick_x;\r\n g2left = gamepad2.left_trigger;\r\n g2right = gamepad2.right_trigger;\r\n\r\n\r\n powFL = Range.clip(g1ch2 + g1ch3, -1, 1);\r\n powFR = Range.clip(g1ch2 - g1ch3, -1, 1);\r\n powBL = Range.clip(g1ch2 + g1ch3, -1, 1);\r\n powBR = Range.clip(g1ch2 - g1ch3, -1, 1);\r\n\r\n\r\n mtrFL.setPower(powFL);\r\n mtrFR.setPower(powFR);\r\n mtrBL.setPower(powBL);\r\n mtrBR.setPower(powBR);\r\n sleep(50);\r\n }\r\n }", "@Override\n public void loop() {\n // Setup a variable for each drive wheel to save power level for telemetry\n double leftDrivePower;\n double rightDrivePower;\n double driveMultiplier;\n double slowMultiplier;\n double fastMultiplier;\n double BASE_DRIVE_SPEED = 0.6;\n double elevPower;\n double armPower;\n boolean lowerLimitPressed;\n boolean upperLimitPressed;\n\n\n\n\n // Tank Mode uses one stick to control each wheel.\n // - This requires no math, but it is hard to drive forward slowly and keep straight.\n armPower = -gamepad2.right_stick_x * 0.3;\n\n lowerLimitPressed = !lowerLimit.getState();\n upperLimitPressed = !upperLimit.getState();\n\n if((lowerLimitPressed && -gamepad2.left_stick_y < 0) || (upperLimitPressed && -gamepad2.left_stick_y > 0)){\n elevPower = 0;\n }\n else {\n elevPower = -gamepad2.left_stick_y * 1;\n }\n\n if (gamepad2.left_bumper){\n hookPosDeg = HOOK_UP;\n }\n else if (gamepad2.left_trigger > 0){\n hookPosDeg = HOOK_DOWN;\n }\n\n if (gamepad2.right_bumper){\n clawPosDeg = CLAW_OPEN;\n }\n else if (gamepad2.right_trigger > 0){\n clawPosDeg = CLAW_CLOSED;\n }\n\n if (gamepad1.left_trigger > 0){\n slowMultiplier = 0.10;\n }\n else\n slowMultiplier = 0;\n\n if (gamepad1.right_trigger > 0){\n fastMultiplier = 0.30;\n }\n else\n fastMultiplier = 0;\n\n driveMultiplier = BASE_DRIVE_SPEED + slowMultiplier + fastMultiplier;\n leftDrivePower = -gamepad1.left_stick_y * driveMultiplier;\n rightDrivePower = -gamepad1.right_stick_y * driveMultiplier;\n\n // Send power to actuators\n leftDrive.setPower(leftDrivePower);\n rightDrive.setPower(rightDrivePower);\n elev.setPower(elevPower);\n// arm.setTargetPosition(armTarget);\n// arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n arm.setPower(armPower);\n hookPos = map(hookPosDeg, HOOK_MIN_POS_DEG, HOOK_MAX_POS_DEG, HOOK_MIN_POS, HOOK_MAX_POS);\n clawPos = map(clawPosDeg, CLAW_MIN_POS_DEG, CLAW_MAX_POS_DEG, CLAW_MIN_POS, CLAW_MAX_POS);\n hook.setPosition(hookPos);\n claw.setPosition(clawPos);\n\n // Show the elapsed game time and wheel power.\n telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n telemetry.addData(\"Drive\", \"left (%.2f), right (%.2f)\", leftDrivePower, rightDrivePower);\n telemetry.addData( \"Elev\", \"power (%.2f)\", elevPower);\n telemetry.addData(\"Limit\", \"lower (%b), upper (%b)\", lowerLimitPressed, upperLimitPressed);\n telemetry.addData(\"Arm Enc\", arm.getCurrentPosition());\n\n }", "public DriveTrain (int motorChannelL1,int motorChannelL2,int motorChannelR1,int motorChannelR2 ){\n leftMotor1 = new Victor(motorChannelL1);\n leftMotor2 = new Victor(motorChannelL2);\n rightMotor1 = new Victor(motorChannelR1);\n rightMotor2 = new Victor(motorChannelR2);\n highDrive = new RobotDrive(motorChannelL1, motorChannelR1);\n lowDrive = new RobotDrive(motorChannelL2, motorChannelR2);\n \n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n // left frond drive motor\n try\n {\n\n left_front_drv_Motor = hwMap.dcMotor.get(\"l_f_drv\");\n }\n catch (Exception p_exeception)\n {\n\n\n left_front_drv_Motor = null;\n }\n //left back drive motor\n\n try\n {\n\n left_back_drv_Motor = hwMap.dcMotor.get(\"l_b_drv\");\n }\n catch (Exception p_exeception)\n {\n\n\n left_back_drv_Motor = null;\n }\n // right front drive motor\n try\n {\n\n right_front_drv_Motor = hwMap.dcMotor.get(\"r_f_drv\");\n }\n catch (Exception p_exeception)\n {\n\n right_front_drv_Motor = null;\n }\n //right back drive motor\n try\n {\n\n right_back_drv_Motor = hwMap.dcMotor.get(\"r_b_drv\");\n }\n catch (Exception p_exeception)\n {\n\n\n right_back_drv_Motor = null;\n }\n\n //hinge motor for arm\n\n try\n {\n\n hinge = hwMap.dcMotor.get(\"hinge\");\n }\n catch (Exception p_exeception)\n {\n\n\n hinge = null;\n }\n //hang motor to land\n try\n {\n\n hang_motor = hwMap.dcMotor.get(\"hang\");\n }\n catch (Exception p_exeception)\n {\n\n\n hang_motor= null;\n }\n //intake motor\n try\n {\n\n fly_wheel = hwMap.dcMotor.get(\"intake\");\n }\n catch (Exception p_exeception)\n {\n\n\n hang_motor= null;\n }\n\n // Servos :\n\n\n try\n {\n //v_motor_left_drive = hardwareMap.dcMotor.get (\"l_drv\");\n //v_motor_left_drive.setDirection (DcMotor.Direction.REVERSE);\n marker = hwMap.servo.get(\"marker\");\n if (marker != null) {\n marker.setPosition(SERVO_LEFT_MIN);\n }\n\n\n }\n\n catch (Exception p_exeception)\n {\n //m_warning_message (\"l_drv\");\n // DbgLog.msg (p_exeception.getLocalizedMessage ());\n\n marker = null;\n }\n\n\n //set dc motors to run without an encoder and set intial power to 0\n //l_f_drv\n if (left_front_drv_Motor != null)\n {\n //l_return = left_drv_Motor.getPower ();\n left_front_drv_Motor.setDirection(DcMotor.Direction.FORWARD); // FORWARD was moving it backwards\n left_front_drv_Motor.setPower(0);\n left_front_drv_Motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //l_b_drv\n if (left_back_drv_Motor != null)\n {\n //l_return = left_drv_Motor.getPower ();\n left_back_drv_Motor.setDirection(DcMotor.Direction.FORWARD); // FORWARD was moving it backwards\n left_back_drv_Motor.setPower(0);\n left_back_drv_Motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n\n //r_f_drv\n if (right_front_drv_Motor != null)\n {\n //l_return = left_drv_Motor.getPower ();\n right_front_drv_Motor.setDirection(DcMotor.Direction.FORWARD);// REVERSE was moving it backwards\n right_front_drv_Motor.setPower(0);\n right_front_drv_Motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //r_b_drv\n if (right_back_drv_Motor != null)\n {\n //l_return = left_drv_Motor.getPower ();\n right_back_drv_Motor.setDirection(DcMotor.Direction.FORWARD);// REVERSE was moving it backwards\n right_back_drv_Motor.setPower(0);\n right_back_drv_Motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //hinge\n if (hinge != null)\n {\n //l_return = left_drv_Motor.getPower ();\n hinge.setPower(0);\n hinge.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //hang\n if(hang_motor != null)\n\n {\n hang_motor.setPower(0);\n hang_motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n //intake\n if(fly_wheel != null)\n\n {\n fly_wheel.setPower(0);\n fly_wheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n\n/*\ninitalize the colorSensor and colorSensor\n*/\n try {\n colorSensor = hwMap.colorSensor.get(\"color\");\n }\n catch (Exception p_exeception)\n {\n //m_warning_message (\"colr_f\");\n // DbgLog.msg (p_exeception.getLocalizedMessage ());\n colorSensor = null;\n }\n\n\n try {\n LightSensorBottom = hwMap.lightSensor.get(\"ods\");\n }\n catch (Exception p_exeception)\n {\n //m_warning_message (\"ods\");\n // DbgLog.msg (p_exeception.getLocalizedMessage ());\n LightSensorBottom = null;\n }\n\n\n if (colorSensor != null) {\n //ColorFront reads beacon light and is in passive mode\n colorSensor.setI2cAddress(i2CAddressColorFront);\n colorSensor.enableLed(false);\n }\n\n if (LightSensorBottom != null) {\n //OpticalDistance sensor measures dist from the beacon\n LightSensorBottom.enableLed(false);\n }\n\n }", "public void setMotors(double rate) {\n\t\tclimberMotor1.set(rate);\n\t}", "public void setLeftMotors(double speed){\n motorLeft1.set(speed);\n // motorLeft2.set(-speed);\n }", "public void runOpMode() {\n leftBackDrive = hardwareMap.get(DcMotor.class, \"left_back_drive\"); //port 0, hub1\n rightBackDrive = hardwareMap.get(DcMotor.class, \"right_back_drive\"); //port 1, hub1\n leftFrontDrive = hardwareMap.get(DcMotor.class, \"left_front_drive\"); //port 2, hub1\n rightFrontDrive = hardwareMap.get(DcMotor.class, \"right_front_drive\"); //port 3, hub1\n craneExtend = hardwareMap.get(DcMotor.class, \"craneExtend\"); //port 0, hub2\n cranePitch = hardwareMap.get(DcMotor.class, \"cranePitch\"); //port 1, hub2\n craneElevate = hardwareMap.get(DcMotor.class, \"craneElevate\"); //port 2, hub2\n fakeMotor = hardwareMap.get(DcMotor.class, \"fakeMotor\"); //port 2, hub3\n craneGrab = hardwareMap.get(Servo.class, \"craneGrab\"); //port 0, servo\n craneGrabAttitude = hardwareMap.get(Servo.class, \"craneGrabAttitude\"); //port 2, servo\n trayGrab = hardwareMap.get(Servo.class, \"trayGrab\"); //port 1, servo\n flipperLeft = hardwareMap.get(Servo.class, \"flipperLeft\"); //port 3. servo\n flipperRight = hardwareMap.get(Servo.class, \"flipperRight\"); //port 4, servo\n \n //Setting the motor directions\n leftBackDrive.setDirection(DcMotor.Direction.FORWARD);\n rightBackDrive.setDirection(DcMotor.Direction.REVERSE);\n leftFrontDrive.setDirection(DcMotor.Direction.FORWARD);\n rightFrontDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //Initializing variables\n \n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update(); //Done initalizing\n\n //Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n \n//******************************************************************************\n\n //Drive controls\n if (gamepad1.left_trigger>0 || gamepad1.right_trigger>0) { //Crab\n leftBackDrive.setPower(gamepad1.left_stick_x*0.8);\n rightBackDrive.setPower(-gamepad1.left_stick_x*0.8);\n leftFrontDrive.setPower(-gamepad1.left_stick_x*0.8);\n rightFrontDrive.setPower(gamepad1.left_stick_x*0.8);\n }\n\n else { //Tank\n leftBackDrive.setPower(-gamepad1.left_stick_x);\n rightBackDrive.setPower(-gamepad1.right_stick_x);\n leftFrontDrive.setPower(-gamepad1.left_stick_x);\n rightFrontDrive.setPower(-gamepad1.right_stick_x);\n }\n }\n \n//******************************************************************************\n\n //Crane control\n \n \n//******************************************************************************\n\n //Telemetry display\n telemetry.addData(\"Run Time:\", \"\" + runtime.toString());\n telemetry.addData(\"Motor Power\", \"L (%.2f), R (%.2f)\", gamepad1.left_stick_y, gamepad1.right_stick_y);\n telemetry.update();\n }", "public void resetDriveEncoders() {\r\n motorLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n motorRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n\r\n motorLeft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n motorRight.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n }", "private void controlLift()\n {\n if (gamepad1.dpad_up) {\n liftMotor.setPower(-0.5);\n } else if (gamepad1.dpad_down) {\n liftMotor.setPower(0.5);\n } else {++backInc;\n liftMotor.setPower(0);\n }\n }", "public static void wheelRadCheck() {\n\t\t// reset the motor\n\t\tfor (EV3LargeRegulatedMotor motor : new EV3LargeRegulatedMotor[] { leftMotor, rightMotor }) {\n\t\t\tmotor.stop();\n\t\t\tmotor.setAcceleration(2000);\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// There is nothing to be done here\n\t\t}\n\t\t//move the robot forward until the Y asis is detected\n\t\tleftMotor.setSpeed(200);\n\t\trightMotor.setSpeed(200);\n\t\tleftMotor.rotate(Navigation_Test.convertDistance(Project_Test.WHEEL_RAD, 2*Project_Test.TILE_SIZE), true);\n\t\trightMotor.rotate(Navigation_Test.convertDistance(Project_Test.WHEEL_RAD, 2*Project_Test.TILE_SIZE), false);\n\t}", "public void rumbleDriverController(double power, double time) {\n rumbleController(driverController, power, time);\n }", "public void initializeHardware(HardwareMap hwMap) {\n\n // Save reference to Hardware map\n this.hwMap = hwMap;\n period.reset();\n\n // Define Motors\n frontLeftMotor = hwMap.dcMotor.get(\"front_left\");\n frontRightMotor = hwMap.dcMotor.get(\"front_right\");\n backLeftMotor = hwMap.dcMotor.get(\"back_left\");\n backRightMotor = hwMap.dcMotor.get(\"back_right\");\n clawServo = hwMap.servo.get(\"claw\");\n armServo = hwMap.servo.get(\"arm\");\n barrierServo = hwMap.servo.get(\"barrier_servo\");\n intake = hwMap.dcMotor.get(\"intake\");\n shooter = hwMap.dcMotor.get(\"shooter\");\n\n\n // Initialize Motors\n\n // ******MAY CHANGE ******* Fix Forward/Reverse under testing\n frontLeftMotor.setDirection(DcMotor.Direction.REVERSE);\n frontRightMotor.setDirection(DcMotor.Direction.FORWARD);\n backLeftMotor.setDirection(DcMotor.Direction.REVERSE);\n backRightMotor.setDirection(DcMotor.Direction.FORWARD);\n intake.setDirection(DcMotor.Direction.REVERSE);\n shooter.setDirection(DcMotor.Direction.REVERSE);\n\n\n if(encoder) {\n // May use RUN_USING_ENCODERS if encoders are installed\n frontLeftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //shooter.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n frontLeftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n //shooter.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n }\n else{\n frontLeftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n //shooter.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n\n\n frontLeftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n frontRightMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backLeftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backRightMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //intake.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n //shooter.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n frontLeftMotor.setPower(0);\n frontRightMotor.setPower(0);\n backLeftMotor.setPower(0);\n backRightMotor.setPower(0);\n\n //intake.setPower(0);\n //shooter.setPower(0);\n\n\n\n //Define Sensors\n\n imu = hwMap.get(BNO055IMU.class, \"imu\");\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n\n parameters.mode = BNO055IMU.SensorMode.IMU; //inertial measurement unit\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES; //angle unit to degrees\n parameters.loggingEnabled = false; //will log values if true\n imu.initialize(parameters); //initializing using above parameters\n\n //Define Servos\n }", "public static void drive(double leftspeed, double rightspeed) {\n\n leftMotorA.set(ControlMode.PercentOutput, leftspeed);\n rightMotorA.set(ControlMode.PercentOutput, rightspeed);\n\n }", "double scale_motor_power(double p_power) //Scales joystick value to output appropriate motor power\n {Scales joystick value to output appropriate motor power\n { //Use like \"scale_motor_power(gamepad1.left_stick_x)\"\n //\n // Assume no scaling.\n //\n double l_scale = 0.0;\n\n //\n // Ensure the values are legal.\n //\n double l_power = Range.clip(p_power, -1, 1);\n\n double[] l_array =\n {0.00, 0.05, 0.09, 0.10, 0.12\n , 0.15, 0.18, 0.24, 0.30, 0.36\n , 0.43, 0.50, 0.60, 0.72, 0.85\n , 1.00, 1.00\n };\n\n //\n // Get the corresponding index for the specified argument/parameter.\n //\n int l_index = (int) (l_power * 16.0);\n if (l_index < 0) {\n l_index = -l_index;\n } else if (l_index > 16) {\n l_index = 16;\n }\n\n if (l_power < 0) {\n l_scale = -l_array[l_index];\n } else {\n l_scale = l_array[l_index];\n }\n\n return l_scale;\n\n }", "public void driveRaw (double speed) {\n leftBackMotor.set(speed);\n leftMiddleMotor.set(speed);\n leftFrontMotor.set(speed);\n rightBackMotor.set(speed);\n rightMiddleMotor.set(speed);\n rightFrontMotor.set(speed);\n }", "public void movePower(String movement, double power, double duration)\n {\n double startTime = getRuntime();\n switch(movement)\n {\n case \"forward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"backward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"right\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"left\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"leftTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"rightTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n }\n stop();\n }", "@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n leftFront = hardwareMap.get(DcMotor.class, \"left_front\");\n rightFront = hardwareMap.get(DcMotor.class, \"right_front\");\n leftBack = hardwareMap.get(DcMotor.class, \"left_back\");\n rightBack = hardwareMap.get(DcMotor.class, \"right_back\");\n\n\n leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n right = hardwareMap.get(Servo.class, \"right\");\n left = hardwareMap.get(Servo.class, \"left\");\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftFront.setDirection(DcMotor.Direction.REVERSE);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n leftBack.setDirection(DcMotor.Direction.REVERSE);\n rightBack.setDirection(DcMotor.Direction.FORWARD);\n\n leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n digitalTouch = hardwareMap.get(DigitalChannel.class, \"sensor_digital\");\n digitalTouch.setMode(DigitalChannel.Mode.INPUT);\n\n right.setDirection(Servo.Direction.REVERSE);\n\n right.scaleRange(0, 0.25);\n left.scaleRange(0.7, 1);\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n\n servo(0);\n runtime.reset();\n encoderSideways(0.25, -5, -5, 5);\n // drive until touch sensor pressed\n // activate servos to grab platform\n // drive backwards for a while\n // release servos\n // sideways part\n // remember to do red autonomous for repackage org.firstinspires.ftc.teamcode;\n }", "public void operatorControl() {\n \tmyRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tdouble x = stick2.getRawAxis(0);\n \tdouble y = stick2.getRawAxis(1);\n \tdouble rot = stick.getRawAxis(0);\n \tSmartDashboard.putNumber(\"x1\", x);\n SmartDashboard.putNumber(\"y1\", y);\n SmartDashboard.putNumber(\"rot1\", rot);\n \tif(Math.abs(x) < .2)\n \t\tx = 0;\n \tif(Math.abs(y) < .2)\n \t\ty = 0;\n \tif(Math.abs(rot) < .2)\n \t\trot = 0;\n \tmyRobot.mecanumDrive_Cartesian(x*-1, y*-1,rot*-1, gyro.getAngle());\n double current1 = pdp.getCurrent(0);\n double current2 = pdp.getCurrent(13);\n double current3 = pdp.getCurrent(15);\n double current4 = pdp.getCurrent(12);\n SmartDashboard.putNumber(\"Front Left current\", current1);\n SmartDashboard.putNumber(\"back Left current\", current2);\n SmartDashboard.putNumber(\"Front right current\", current3);\n SmartDashboard.putNumber(\"back right current\", current4);\n SmartDashboard.putNumber(\"x\", x);\n SmartDashboard.putNumber(\"y\", y);\n SmartDashboard.putNumber(\"rot\", rot);\n SmartDashboard.putNumber(\"Gyro\", gyro.getAngle());\n \tTimer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "@Override\r\n public void init() {\r\n // Define and Initialize Motors\r\nFL = hardwareMap.get(DcMotor.class, \"Front Left\");\r\n FR = hardwareMap.get(DcMotor.class, \"Front Right\");\r\n BL = hardwareMap.get(DcMotor.class, \"Back Left\");\r\n BR = hardwareMap.get(DcMotor.class, \"Back Right\");\r\n\r\n\r\nFL.setDirection(DcMotor.Direction.FORWARD);\r\n FR.setDirection(DcMotor.Direction.REVERSE);\r\n BL.setDirection(DcMotor.Direction.FORWARD);\r\n BR.setDirection(DcMotor.Direction.REVERSE);\r\n // Set all motors to zero power\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); }", "private void setZeroPowerBrakes() {\n //Initialize Mecanum Wheel DC Motor Behavior\n robot2.DriveRightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot2.DriveRightRear.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot2.DriveLeftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot2.DriveLeftRear.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n }", "public void ApplyMovement() {\n long currTime = SystemClock.uptimeMillis();\n if(currTime - lastUpdateTime < 16){\n return;\n }\n lastUpdateTime = currTime;\n\n\n double tl_power_raw = movement_y-movement_turn+movement_x*1.5;\n double bl_power_raw = movement_y-movement_turn- movement_x*1.5;\n double br_power_raw = -movement_y-movement_turn-movement_x*1.5;\n double tr_power_raw = -movement_y-movement_turn+movement_x*1.5;\n\n\n\n\n //find the maximum of the powers\n double maxRawPower = Math.abs(tl_power_raw);\n if(Math.abs(bl_power_raw) > maxRawPower){ maxRawPower = Math.abs(bl_power_raw);}\n if(Math.abs(br_power_raw) > maxRawPower){ maxRawPower = Math.abs(br_power_raw);}\n if(Math.abs(tr_power_raw) > maxRawPower){ maxRawPower = Math.abs(tr_power_raw);}\n\n //if the maximum is greater than 1, scale all the powers down to preserve the shape\n double scaleDownAmount = 1.0;\n if(maxRawPower > 1.0){\n //when max power is multiplied by this ratio, it will be 1.0, and others less\n scaleDownAmount = 1.0/maxRawPower;\n }\n tl_power_raw *= scaleDownAmount;\n bl_power_raw *= scaleDownAmount;\n br_power_raw *= scaleDownAmount;\n tr_power_raw *= scaleDownAmount;\n\n\n //now we can set the powers ONLY IF THEY HAVE CHANGED TO AVOID SPAMMING USB COMMUNICATIONS\n topLeft.setPower(tl_power_raw);\n bottomLeft.setPower(bl_power_raw);\n bottomRight.setPower(br_power_raw);\n topRight.setPower(tr_power_raw);\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n \n // Define and Initialize Motors\n leftMotorFrt = hwMap.get(DcMotor.class, \"LeftMotorFwd\");\n rightMotorFrt = hwMap.get(DcMotor.class, \"RightMotorFwd\");\n //PickupUnit = hwMap.get(DcMotor.class, \"PickupUnit\");\n leftMotorBck = hwMap.get(DcMotor.class, \"LeftMotorBck\");\n rightMotorBck = hwMap.get(DcMotor.class, \"RightMotorBck\");\n foundationHookRight = hwMap.get(Servo.class, \"hookRight\");\n foundationHookLeft = hwMap.get(Servo.class, \"hookLeft\");\n TheClaw = hwMap.get(Servo.class, \"theclaw\");\n foundTouch = hwMap.get(TouchSensor.class, \"foundTouch\");\n intakeRight = hwMap.get(DcMotor.class, \"intakeRight\");\n intakeLeft = hwMap.get(DcMotor.class, \"intakeLeft\");\n \n foundationHookRight.setPosition(0.7);\n foundationHookLeft.setPosition(0.7);\n leftMotorFrt.setDirection(DcMotor.Direction.FORWARD); // Set to REVERSE if using AndyMark motors\n rightMotorFrt.setDirection(DcMotor.Direction.REVERSE);// Set to FORWARD if using AndyMark motors\n leftMotorBck.setDirection(DcMotor.Direction.FORWARD); // Set to REVERSE if using AndyMark motors\n rightMotorBck.setDirection(DcMotor.Direction.REVERSE);// Set to FORWARD if using AndyMark motors\n intakeRight.setDirection(DcMotor.Direction.REVERSE);\n intakeLeft.setDirection(DcMotor.Direction.FORWARD);\n\n // Set all motors to zero power\n leftMotorFrt.setPower(0);\n rightMotorFrt.setPower(0);\n leftMotorBck.setPower(0);\n rightMotorBck.setPower(0);\n //PickupUnit.setPower(0);\n \n leftMotorFrt.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotorFrt.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotorBck.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotorBck.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n //PickupUnit.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n leftMotorFrt.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n rightMotorFrt.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n leftMotorBck.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n rightMotorBck.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n //PickupUnit.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n \n }", "public void driveRaw (double left, double right) {\n leftBackMotor.set(left);\n leftMiddleMotor.set(left);\n leftFrontMotor.set(left);\n rightBackMotor.set(right);\n rightMiddleMotor.set(right);\n rightFrontMotor.set(right);\n }", "public void driveTank(double leftPower, double rightPower) {\r\n if(leftPower > 1.0) {\r\n leftPower = 1.0;\r\n } else if(leftPower < -1.0) {\r\n leftPower = -1.0;\r\n }\r\n \r\n if(rightPower > 1.0) {\r\n rightPower = 1.0;\r\n } else if(rightPower < -1.0) {\r\n rightPower = -1.0;\r\n }\r\n \r\n tankLeftRamp.setTarget(leftPower);\r\n tankRightRamp.setTarget(rightPower);\r\n \r\n tankLeftRamp.tick();\r\n tankRightRamp.tick();\r\n \r\n robotDrive.tankDrive(getDirection() * tankLeftRamp.getOutput(),\r\n getDirection() * tankRightRamp.getOutput());\r\n //TODO set motor speeds in console\r\n }", "public void turnClockwise(double power){\n motorFrontLeft.setPower(-power);\n motorBackLeft.setPower(-power);\n motorFrontRight.setPower(power);\n motorBackRight.setPower(power);\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n\n VinceHardwareBruinBot robot = new VinceHardwareBruinBot();\n // Inititalize last wheel speed\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n lastwheelSpeeds[i] = 0;\n }\n robot.init(hardwareMap);\n {\n //init all drive wheels\n leftFrontDrive = robot.leftFrontDrive;\n rightFrontDrive = robot.rightFrontDrive;\n leftRearDrive = robot.leftRearDrive;\n rightRearDrive = robot.rightRearDrive;\n\n // init all other motors & servos\n intakeMotor = robot.intakeMotor;\n wobbleMotor = robot.wobbleMotor;\n ringShooterMotor = robot.ringShooterMotor;\n\n fireServo = robot.fireServo;\n\n //init imu\n imu = robot.imu;\n }\n initVuforiaNavigation();\n\n // Reset the wobble motor - Use a repeatable starting position\n wobbleMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n /*\n // Get PID constants for wobble motor\n int motorIndex = ((robot.wobbleMotor).getPortNumber());\n DcMotorControllerEx motorControllerEx = (DcMotorControllerEx)robot.wobbleMotor.getController();\n PIDCoefficients pidModified = motorControllerEx.getPIDCoefficients(motorIndex, DcMotor.RunMode.RUN_TO_POSITION);\n\n // change coefficients using methods included with DcMotorEx class.\n PIDCoefficients pidNew = new PIDCoefficients(10, 2, 3);\n motorControllerEx.setPIDCoefficients(motorIndex, DcMotor.RunMode.RUN_TO_POSITION, pidNew);\n */\n //wobbleMotor.setPIDFCoefficients(DcMotor.RunMode.RUN_TO_POSITION,pidNew);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public double calcTankWheelPower(int iDriveType, int iWheel, double dLeftPower, double dRightPower ) {\n switch (iWheel) {\n case k_iLeftFrontDrive:\n return dLeftPower;\n case k_iRightFrontDrive:\n return dRightPower;\n case k_iLeftRearDrive:\n return dLeftPower;\n case k_iRightRearDrive:\n return dRightPower;\n\n default:\n // Tell user that the wheel is not valid.\n //telemetry.addData(\"ERROR: ApplyWheelPower: getWheelPower\", \"iWheel is not known.\");\n //telemetry.update();\n return 0.0;\n }\n }", "void powerOn();", "public void setControlPanelMotor(double speed) {\n controlPanelMotor.set(ControlMode.PercentOutput, speed);\n }", "public void turnCounterClockwise(double power){\n motorFrontLeft.setPower(power);\n motorBackLeft.setPower(power);\n motorFrontRight.setPower(-power);\n motorBackRight.setPower(-power);\n }", "@Override\n protected void execute() {\n\n int leftMultiplier = -1;\n if (IsLeft) {\n leftMultiplier = 1;\n }\n Robot.m_drivetrain.drive(leftMultiplier * .5, -leftMultiplier * .5);\n\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n leftDriveBack = hwMap.get(DcMotor.class, \"left_drive_back\");\n rightDriveBack = hwMap.get(DcMotor.class, \"right_drive_back\");\n leftDriveFront = hwMap.get(DcMotor.class, \"left_drive_front\");\n rightDriveFront = hwMap.get(DcMotor.class, \"right_drive_front\");\n leftDriveBack.setDirection(DcMotor.Direction.REVERSE);\n rightDriveBack.setDirection(DcMotor.Direction.FORWARD);\n leftDriveFront.setDirection(DcMotor.Direction.REVERSE);\n rightDriveFront.setDirection(DcMotor.Direction.FORWARD);\n\n resetEncoders();\n\n initMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Set all motors to zero power\n leftDriveBack.setPower(0);\n rightDriveBack.setPower(0);\n leftDriveFront.setPower(0);\n rightDriveFront.setPower(0);\n\n\n //arm\n arm = hwMap.get(DcMotor.class, \"arm\");\n //wrist = hwMap.get(Servo.class, \"wrist\");\n\n //wrist.setDirection(Servo.Direction.REVERSE);\n //wrist.scaleRange(0, 1);\n //wrist.setPosition(WRIST_DEFAULT_VALUE);\n\n arm.setDirection(DcMotor.Direction.REVERSE);\n arm.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n arm.setPower(0);\n\n //claws\n leftClaw = hwMap.get(Servo.class, \"left_claw\");\n rightClaw = hwMap.get(Servo.class, \"right_claw\");\n this.leftClaw.scaleRange(0, 1);\n this.rightClaw.scaleRange(0, 1);\n\n this.leftClaw.setPosition(LEFT_CLAW_START);\n this.rightClaw.setPosition(RIGHT_CLAW_START);\n\n //jewelkicker\n jewelKicker = hwMap.get(Servo.class, \"kicker\");\n this.jewelKicker.scaleRange(0, 1);\n this.jewelKicker.setPosition(KICKER_UP_VALUE);\n\n }", "protected void execute() {\n if (oi.getButton(1,3).get()){\n speedModifier = 0.6;\n }\n else if(oi.getButton(2,3).get()){\n speedModifier = 1;\n }\n else if(oi.getButton(1,2).get()&&oi.getButton(2, 2).get()){\n speedModifier = 0.75;\n }\n chassis.tankDrive((oi.getJoystick(1).getAxis(Joystick.AxisType.kY)*speedModifier), (oi.getJoystick(2).getAxis(Joystick.AxisType.kY)*speedModifier));\n //While no triggers are pressed the robot moves at .75 the joystick input\n }", "public void drive(double power_cap, double target_distance, double target_acceleration,\n double target_velocity) {\n TL.resetMotor();\n TR.resetMotor();\n BL.resetMotor();\n BR.resetMotor();\n\n // Required Stop Condition\n int success_count = TL.getSuccess_count();\n\n // \"PID\" Loop\n while((opModeIsActive() && !isStopRequested()) && (success_count < 90)){\n success_count = TL.getSuccess_count();\n // IMU PID STUFF\n imu.imu_iter(0.00000001);\n double imu_correction = imu.getCorrection();\n telemetry.addData(\"IMU Correction -> \", imu_correction);\n telemetry.addData(\"Global Angle ->\", imu.getGlobalAngle());\n if (!MotorPlus.isWithin(0.0195, imu_correction, 0.0)){\n // If correction is needed, we correct the angle\n TL.addExternalResponse(-imu_correction);\n TR.addExternalResponse(imu_correction);\n BL.addExternalResponse(-imu_correction);\n BR.addExternalResponse(imu_correction);\n } else {\n TL.addExternalResponse(0.0);\n TR.addExternalResponse(0.0);\n BL.addExternalResponse(0.0);\n BR.addExternalResponse(0.0);\n }\n\n // Supplying the \"targets\" to the Motors\n TL.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n TR.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n BL.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n BR.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n\n // Telemetry Stuff\n telemetry.addData(\"TL, TR, BL, and BR Vels -> \", TL.getCurrent_velocity());\n telemetry.addData(\"Success Count TL -> \", TL.getSuccess_count());\n telemetry.update();\n }\n }", "public void smoothMovePower(String movement, double power, double duration)\n {\n double startTime = getRuntime();\n switch(movement)\n {\n case \"forward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"backward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"right\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"left\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"leftTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"rightTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n }\n }", "public void runOpMode(){\n JAWLDrive3796 drive = new JAWLDrive3796(hardwareMap.dcMotor.get(\"left_drive\"), hardwareMap.dcMotor.get(\"right_drive\"));\n //Set the drive motors to run without encoders\n drive.setEncoders(false);\n //Create Grabber object\n JAWLGrabber3796 grabber = new JAWLGrabber3796(hardwareMap.servo.get(\"left_arm\"), hardwareMap.servo.get(\"right_arm\"));\n //Create Lift object\n JAWLLift3796 lift = new JAWLLift3796(hardwareMap.dcMotor.get(\"lift_motor\"));\n //Create color arm object\n JAWLColorArm3796 colorArm = new JAWLColorArm3796(hardwareMap.servo.get(\"color_arm\"));\n //Creates color sensor name\n ColorSensor colorSensorTemp = hardwareMap.get(ColorSensor.class, \"color_distance\");\n //Creates distance sensor name\n DistanceSensor distanceSensorTemp = hardwareMap.get(DistanceSensor.class, \"color_distance\");\n //Creates the color-distance sensor object\n JAWLColorSensor3796 colorDistanceSensor = new JAWLColorSensor3796(colorSensorTemp, distanceSensorTemp);\n //Creates the variable that will hold the color of the jewel\n String colorOfBall;\n //Creates relic arm objects\n //TTTTRelicArm3796 relicArm = new TTTTRelicArm3796(hardwareMap.dcMotor.get(\"relic_up_down\"), hardwareMap.dcMotor.get(\"relic_out_in\"), hardwareMap.dcMotor.get(\"relic_grab\"));\n //We never ended up having a relic arm!\n //The lift helper will set the idle power of the motor to a small double, keeping the lift from idly falling down\n boolean liftHelper = false;\n int i = 0;\n\n waitForStart();\n\n colorArm.armUp();\n\n while (opModeIsActive()) {\n //Here is where we define how the controllers should work\n //In theory, no logic retaining to controlling the components should be in here\n\n /*\n * Drive\n */\n\n //The left drive wheel is controlled by the opposite value of the left stick's y value on the first gamepad\n //The right drive is the same way except with the right drive wheel\n drive.leftDrive(-gamepad1.left_stick_y);\n drive.rightDrive(-gamepad1.right_stick_y);\n\n /*\n * Lift\n */\n telemetry.addData(\"Gamepad2 Right Stick Y\", -gamepad2.right_stick_y);\n\n if (-gamepad2.right_stick_y > 0) {\n //First checks to see if the right stick's negative y value is greater then zero.\n lift.moveMotor(-gamepad2.right_stick_y);\n //If it is, it sets the power for the motor to 1, and adds telemetry\n telemetry.addData(\"Lift Power\", 1);\n } else if (-gamepad2.right_stick_y < 0) {\n //Checks if the negative value of the right right stick's y position is less than zero\n lift.moveMotor(-0.1);\n //Sets the power for the motor to -0.1, and adds telemetry\n telemetry.addData(\"Lift Power\", -0.1);\n } else {\n //We check to see if the liftHelper is enabled\n if(liftHelper) {\n lift.moveMotor(0.1466 );\n } else {\n lift.moveMotor(0);\n }\n }\n\n\n\n /*\n * Lift helper control\n */\n\n if(gamepad2.a) {\n if(i == 0) {\n liftHelper = !liftHelper;\n }\n i = 5;\n }\n\n if(i != 0) {\n i--;\n }\n\n telemetry.addData(\"Lift Helper Enabled\", liftHelper);\n\n\n\n /*\n * Grabbers\n */\n if (gamepad2.left_trigger > 0) {\n //Closes the left arm, then displays the position in telemetry\n grabber.leftArmClose();\n double a = grabber.leftPosition();\n //Adds telemetry to display positions of grabbers, mostly for testing, but can be useful later on\n telemetry.addData(\"Left\", a);\n }\n\n if (gamepad2.left_bumper) {\n //Opens the left arm, then displays the position in telemetry\n grabber.leftArmOpen();\n double b = grabber.leftPosition();\n //We made the variables different as to avoid any and all possible errors\n telemetry.addData(\"Left\", b);\n }\n\n if (gamepad2.right_trigger > 0) {\n //Opens the right arm, then displays the position in telemetry\n grabber.rightArmClose();\n double c = grabber.rightPosition();\n telemetry.addData(\"Right\", c);\n }\n\n if (gamepad2.right_bumper) {\n //Closes the right arm, then displays the position in telemetry\n grabber.rightArmOpen();\n double d = grabber.rightPosition();\n telemetry.addData(\"Right\", d);\n }\n\n if (gamepad2.dpad_left){\n //Closes the left arm to a shorter distance\n grabber.leftArmShort();\n }\n\n if(gamepad2.dpad_right){\n //Closes the right arm to a shorter distance\n grabber.rightArmShort();\n\n }\n\n //Update all of our telemetries at once so we can see all of it at the same time\n telemetry.update();\n }\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\t//For some reason, right is inverted in auto instead of left\n\t\tString start = autonomousCommand; //from smartDashboard\n\t\t//String start = \"R\";//R for right, FR for far right, L for far left\n\t\t//Starting Far Right\n\t\tif (start == \"FR\") {\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t//Go forward for 5 seconds\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t//stop going\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (start == \"R\") {\n\t\t\t//Starting on the right, aligned with the switch\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 2) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'R') {\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 15 && timer.get() > 7) {\n\t\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t}\n\t\t}\n\t\telse if (start == \"L\") {\n\t\t//This is for starting on the far left\n\t\t\tif(autoStep == 0) {\n\t\t\t\tif (timer.get() < 2.5) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'L') {/**Change this to R if we start on the right side, comment out if we're on the far right or left side**/\n\t\t\t\t\trotateTo(270);\n\t\t\t\t\tif (timer.get()>3 && timer.get()<4) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 7 && timer.get() > 4) {\n\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Default Code\n\t\t\tif (true) {\n\t\t\t\tif(autoStep==0) {\n\t\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6841703", "0.6767636", "0.66457796", "0.65989083", "0.64600515", "0.64584154", "0.6429878", "0.6359894", "0.63456744", "0.6301923", "0.62197125", "0.62147593", "0.6195109", "0.61827797", "0.6158894", "0.6146954", "0.6145983", "0.6145102", "0.6141393", "0.6139617", "0.6131088", "0.6127873", "0.6103583", "0.6084194", "0.6084188", "0.60793173", "0.60461193", "0.6017058", "0.6005827", "0.6004463", "0.5959165", "0.5956489", "0.59524107", "0.5932765", "0.592334", "0.5910752", "0.5902451", "0.588027", "0.5879045", "0.58636314", "0.58627385", "0.5851471", "0.58096135", "0.5806074", "0.58039427", "0.5798674", "0.57894284", "0.5789054", "0.5786514", "0.5776839", "0.575904", "0.5746014", "0.5733569", "0.5729099", "0.5724209", "0.5723772", "0.56939083", "0.5685075", "0.56813973", "0.5675607", "0.56747824", "0.5654084", "0.565056", "0.564858", "0.56483036", "0.56472844", "0.56421155", "0.56401867", "0.56216496", "0.5621034", "0.5617076", "0.5616465", "0.5613311", "0.5601027", "0.5593362", "0.55929786", "0.55882895", "0.55870813", "0.5582346", "0.55805236", "0.5578881", "0.55787206", "0.55719984", "0.55381465", "0.55311346", "0.5524071", "0.5520174", "0.551942", "0.5517507", "0.5503978", "0.5502989", "0.5501619", "0.5499275", "0.54988533", "0.5498467", "0.54831666", "0.5482732", "0.5480704", "0.54791635", "0.54785967" ]
0.6898525
0
Pass the requested arm power to the appropriate hardware drive motor
public void setArmPower(double power) { armMotor.setPower(power); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void runMotor(Motor motor, double power) {\n\n\n switch (motor) {\n\n case LEFT_LFB:\n motorLFB.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LFT:\n motorLFT.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LBT:\n motorLBT.set(ControlMode.PercentOutput, power);\n break;\n case LEFT_LBB:\n motorLBB.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RFB:\n motorRFB.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RFT:\n motorRFT.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RBT:\n motorRBT.set(ControlMode.PercentOutput, power);\n break;\n case RIGHT_RBB:\n motorRBB.set(ControlMode.PercentOutput, power);\n break;\n }\n }", "public void manualControl(double power){\n leftMotor.set(power);\n rightMotor.set(power);\n }", "void drive(double power, double leftInches, double rightInches, double seconds) {\n\n //Make new integer to set left and right motor targets\n int leftTarget;\n int rightTarget;\n\n if (opModeIsActive()) {\n\n //Determine left and right target to move to\n leftTarget = robot.leftMotor.getCurrentPosition() + (int) (leftInches * COUNTS_PER_INCH);\n rightTarget = robot.rightMotor.getCurrentPosition() + (int) (rightInches * COUNTS_PER_INCH);\n\n //Set target and move to position\n robot.leftMotor.setTargetPosition(leftTarget);\n robot.rightMotor.setTargetPosition(rightTarget);\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //Reset runtime and start motion\n robot.leftMotor.setPower(Math.abs(power));\n robot.rightMotor.setPower(Math.abs(power));\n\n //Test if motors are busy, runtime is less than timeout and motors are busy and then run code\n while (opModeIsActive() && (runtime.seconds() < seconds) && (robot.leftMotor.isBusy() && robot.rightMotor.isBusy())) {\n\n //Tell path to driver\n telemetry.addData(\"Path1\", \"Running to: \", leftTarget, rightTarget);\n telemetry.addData(\"Path2\", \"Running at: \", robot.leftMotor.getCurrentPosition(), robot.rightMotor.getCurrentPosition());\n telemetry.update();\n }\n\n //Stop motors after moved to position\n robot.leftMotor.setPower(0);\n robot.rightMotor.setPower(0);\n\n //Set motors back to using run using encoder\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public void operatorDrive() {\n\n changeMode();\n checkForGearShift();\n\n if (Robot.rightJoystick.getRawButton(1)) {\n currentMode = DriveMode.AUTO;\n\n } else if (Robot.rightJoystick.getRawButton(2)) {\n currentMode = DriveMode.CLIMB;\n } else {\n currentMode = DEFAULT_MODE;\n }\n\n isDeploying = false;\n\n if (currentMode == DriveMode.AUTO) {\n currentMode_s = \"Auto\";\n } else if (currentMode == DriveMode.ARCADE) {\n currentMode_s = \"Arcade\";\n } else {\n currentMode_s = \"Tank\";\n }\n\n double leftY = 0;\n double rightY = 0;\n\n switch (currentMode) {\n\n case AUTO:\n rotateCam(4, Robot.visionTargetInfo.visionPixelX);\n\n // driveFwd(4, .25);\n\n break;\n\n case CLIMB:\n\n climb();\n\n break;\n\n case ARCADE:\n resetAuto();\n double linear = 0;\n double turn = 0;\n\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n linear = -Robot.rightJoystick.getY();\n }\n if (Math.abs(Robot.leftJoystick.getX()) > deadband) {\n turn = Math.pow(Robot.leftJoystick.getX(), 3);\n }\n\n leftY = -linear - turn;\n rightY = linear - turn;\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n\n break;\n\n case TANK:\n\n resetAuto();\n if (Math.abs(Robot.rightJoystick.getY()) > deadband) {\n rightY = -Math.pow(Robot.rightJoystick.getY(), 3 / 2);\n }\n if (Math.abs(Robot.leftJoystick.getY()) > deadband) {\n leftY = Math.pow(Robot.leftJoystick.getY(), 3 / 2);\n }\n if (!isShifting) {\n assignMotorPower(rightY, leftY);\n } else {\n\n assignMotorPower(0, 0);\n }\n break;\n\n default:\n break;\n }\n\n updateTelemetry();\n }", "double a_right_front_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_front_drv_Motor != null)\n {\n l_return = right_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "@Override\n public void setMotorPower(double power)\n {\n final String funcName = \"setMotorPower\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", power);\n }\n\n if (power != currPower)\n {\n motor.set(power);\n currPower = power;\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", power);\n }\n }", "double a_right_back_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_back_drv_Motor != null)\n {\n l_return = right_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "public void drive(double leftPower, double rightPower) {\n\t\t// Send calculated power (Motors)\n\t\tleft_drive.setPower(leftPower);\n\t\tright_drive.setPower(rightPower);\n\t\t\n\t\t//sendTelemetry(leftPower, rightPower);\n\t}", "public void setMotorPower (double left, double right) {\n left = Range.clip(left, -1.0, 1.0);\n right = Range.clip(right, -1.0, 1.0);\n lDrive.setPower(left);\n rDrive.setPower(right);\n }", "public void drive(double power_cap, double target_distance, double target_acceleration,\n double target_velocity) {\n TL.resetMotor();\n TR.resetMotor();\n BL.resetMotor();\n BR.resetMotor();\n\n // Required Stop Condition\n int success_count = TL.getSuccess_count();\n\n // \"PID\" Loop\n while((opModeIsActive() && !isStopRequested()) && (success_count < 90)){\n success_count = TL.getSuccess_count();\n // IMU PID STUFF\n imu.imu_iter(0.00000001);\n double imu_correction = imu.getCorrection();\n telemetry.addData(\"IMU Correction -> \", imu_correction);\n telemetry.addData(\"Global Angle ->\", imu.getGlobalAngle());\n if (!MotorPlus.isWithin(0.0195, imu_correction, 0.0)){\n // If correction is needed, we correct the angle\n TL.addExternalResponse(-imu_correction);\n TR.addExternalResponse(imu_correction);\n BL.addExternalResponse(-imu_correction);\n BR.addExternalResponse(imu_correction);\n } else {\n TL.addExternalResponse(0.0);\n TR.addExternalResponse(0.0);\n BL.addExternalResponse(0.0);\n BR.addExternalResponse(0.0);\n }\n\n // Supplying the \"targets\" to the Motors\n TL.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n TR.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n BL.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n BR.actuate(power_cap, target_distance, target_acceleration, target_velocity);\n\n // Telemetry Stuff\n telemetry.addData(\"TL, TR, BL, and BR Vels -> \", TL.getCurrent_velocity());\n telemetry.addData(\"Success Count TL -> \", TL.getSuccess_count());\n telemetry.update();\n }\n }", "public void tankDrive(double leftPower, double rightPower){\n motorFrontLeft.setPower(leftPower);\n motorFrontRight.setPower(rightPower);\n motorBackLeft.setPower(leftPower*.5);\n motorBackRight.setPower(rightPower*.5);\n }", "public void armDrive(double pivValue, double fwdValue){\n if (pivValue!=0) {\n pivValue = pivValue / 6;\n left_drive.setPower(pivValue);\n right_drive.setPower(-pivValue);\n }else {\n fwdValue = fwdValue / 6;\n left_drive.setPower(fwdValue);\n right_drive.setPower(fwdValue);\n }\n\n }", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }", "public void setDrivePower(double leftWheel, double rightWheel) {\n // Output the values to the motor drives.\n leftDrive.setPower(leftWheel);\n rightDrive.setPower(rightWheel);\n }", "@Override\n public void main() throws InterruptedException {\n this.motorLeft = this.hardwareMap.dcMotor.get(\"motorLeft\");\n this.motorRight = this.hardwareMap.dcMotor.get(\"motorRight\");\n\n motorLeft.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n motorRight.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n\n motorRight.setDirection(DcMotor.Direction.REVERSE);\n\n// boolean test = true;\n// while (test) {\n// motorLeft.setPower(1.0);\n// motorRight.setPower(1.0);\n//\n// if (updateGamepads())\n// {\n// if (gamepad1.b)\n// {\n// test = false;\n// }\n// }\n// }\n\n // while (opModeIsActive())\n // gamepad1.a\n while (true)\n {\n if (updateGamepads())\n {\n motorLeft.setPower(gamepad1.left_stick_y);\n motorRight.setPower(gamepad1.right_stick_y);\n\n // move the arm with controller bumpers\n if (gamepad1.right_bumper)\n {\n motorArm.setPower(0.5);\n Thread.sleep(100);\n }\n else if (gamepad1.left_bumper)\n {\n motorArm.setPower(-0.5);\n Thread.sleep(100);\n }\n else\n {\n motorArm.setPower(0);\n }\n }\n\n telemetry.update();\n idle();\n }\n }", "public void tankDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set(joystickRYAxis);\n\t\t\tmotorRF.set(joystickRYAxis);\n\t\t\tmotorLB.set(-joystickLYAxis);\n\t\t\tmotorLF.set(-joystickLYAxis);\n\n\t\t} else {\n\t\t\tmotorRB.set(joystickRYAxis/2);\n\t\t\tmotorRF.set(joystickRYAxis/2);\n\t\t\tmotorLB.set(-joystickLYAxis/2);\n\t\t\tmotorLF.set(-joystickLYAxis/2);\n\t\t\t//System.out.println(strongBad.motorMultiplier);\n\t\t\t//SmartDashboard.putNumber(\"MM2\", strongBad.motorMultiplier);\n\n\t\t}\n\t}", "public boolean encoderDrive(int encoderDelta, driveStyle drive, double motorPower, double timeout, DcMotor[] motors)\n {\n\n\n switch(drive)\n {\n case FORWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, -motorPower, 0)[0]);\n motors[1].setPower(setPower(0, -motorPower, 0)[1]);\n motors[2].setPower(setPower(0, -motorPower, 0)[2]);\n motors[3].setPower(setPower(0, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n\n\n }\n\n case BACKWARD:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, motorPower, 0)[0]);\n motors[1].setPower(setPower(0, motorPower, 0)[1]);\n motors[2].setPower(setPower(0, motorPower, 0)[2]);\n motors[3].setPower(setPower(0, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (encoderReadingLB - encoderDelta))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case STRAFE_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(motorPower, 0, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, -motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case FORWARD_RIGHT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, -motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, -motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, -motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, -motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() >= (-encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_LEFT:\n {\n double encoderReadingRB = motors[1].getCurrentPosition();\n motors[0].setPower(setPower(-motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(-motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(-motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(-motorPower, motorPower, 0)[3]);\n\n while (motors[1].getCurrentPosition() <= (encoderDelta + encoderReadingRB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case BACKWARD_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(motorPower, motorPower, 0)[0]);\n motors[1].setPower(setPower(motorPower, motorPower, 0)[1]);\n motors[2].setPower(setPower(motorPower, motorPower, 0)[2]);\n motors[3].setPower(setPower(motorPower, motorPower, 0)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_LEFT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, -motorPower)[0]);\n motors[1].setPower(setPower(0, 0, -motorPower)[1]);\n motors[2].setPower(setPower(0, 0, -motorPower)[2]);\n motors[3].setPower(setPower(0, 0, -motorPower)[3]);\n\n while (motors[2].getCurrentPosition() >= (-encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n case PIVOT_RIGHT:\n {\n double encoderReadingLB = motors[2].getCurrentPosition();\n motors[0].setPower(setPower(0, 0, motorPower)[0]);\n motors[1].setPower(setPower(0, 0, motorPower)[1]);\n motors[2].setPower(setPower(0, 0, motorPower)[2]);\n motors[3].setPower(setPower(0, 0, motorPower)[3]);\n\n while (motors[2].getCurrentPosition() <= (encoderDelta + encoderReadingLB))\n {\n\n }\n\n\n motors[0].setPower(setPower(-motorPower, 0, 0)[0]);\n motors[1].setPower(setPower(-motorPower, 0, 0)[1]);\n motors[2].setPower(setPower(-motorPower, 0, 0)[2]);\n motors[3].setPower(setPower(-motorPower, 0, 0)[3]);\n\n break;\n }\n\n\n }\n\n return true;\n }", "@Override \n public void runOpMode() \n {\n leftMotors = hardwareMap.get(DcMotor.class, \"left_Motors\");\n rightMotors = hardwareMap.get(DcMotor.class, \"right_Motors\");\n vLiftMotor = hardwareMap.get(DcMotor.class, \"vLift_Motor\"); \n \n leftMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotors.setDirection(DcMotor.Direction.REVERSE);\n rightMotors.setDirection(DcMotor.Direction.FORWARD);\n vLiftMotor.setDirection(DcMotor.Direction.REVERSE);\n vLiftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n waitForStart(); //press play button, actives opMode\n intakePivotServo.setPosition(intakePivotServoPos);\n while (opModeIsActive()) \n { \n drive();\n pivotIntake();\n pivotLift();\n \n }//opModeIsActive \n \n }", "public void flywhlGo(int rpm) {\n\t\tflywheelMotor.changeControlMode(TalonControlMode.Speed);\n\t\tflywheelMotor.set(rpm);\n\t\tSystem.out.println(flywheelMotor.getError());\n\n\t}", "void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }", "public void updatePower(double power){\n for(DcMotor motor : this.motors){\n motor.setPower(Range.clip(power*this.direction,-this.power,this.power));\n }\n }", "void powerOn();", "public void setPower(double leftPower, double rightPower) {\n\t\tleftMiddleMotor.set(ControlMode.PercentOutput, leftPower);\n\t\trightMiddleMotor.set(ControlMode.PercentOutput, rightPower);\n\t}", "public void forward(double power, double distance) {\n\n int ticks = (int) (((distance / (4 * Math.PI) * 1120)) * 4 / 3 + 0.5);\n\n //Reset Encoders358\n// fL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// bL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// fR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// bR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //Set to RUN_TO_POSITION mode\n fL.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n bL.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n fR.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n bR.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //Set Target Position\n fL.setTargetPosition(fL.getCurrentPosition() + ticks);\n bL.setTargetPosition(bL.getCurrentPosition() + ticks);\n fR.setTargetPosition(fR.getCurrentPosition() + ticks);\n bR.setTargetPosition(bR.getCurrentPosition() + ticks);\n\n //Set Drive Power\n fL.setPower(power);\n bL.setPower(power);\n fR.setPower(power);\n bR.setPower(power);\n\n while (fL.isBusy() && fR.isBusy() && bL.isBusy() && bR.isBusy()) {\n //Wait Until Target Position is Reached\n }\n\n //Stop and Change Mode back to Normal\n fL.setPower(0);\n bL.setPower(0);\n fR.setPower(0);\n bR.setPower(0);\n }", "public void rumbleDriverController(double power, double time) {\n rumbleController(driverController, power, time);\n }", "@Override\n public void periodic() {\n\t\t// myDrive.\n\n\t\t// System.out.println(Robot.m_oi.getSpeed());\n\t\t// SmartDashboard.putNumber(\"Dial Output: \", Robot.m_oi.getSpeed());\n\n\t\t// //Wheel Speed Limits\n\n\t\t// SmartDashboard.putNumber(\"Front Left Percent\", myDrive.getFLSpeed());\n\t\t// SmartDashboard.putNumber(\"Front Right Percent\", myDrive.getFRSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Left Percent\", myDrive.getRLSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Right Percent\", myDrive.getRRSpeed());\n\n\t\t//Test Code for Selecting Calibration Motor \n\t\t//***COMMENT OUT BEFORE REAL GAME USE***\n\t\t// if (Robot.m_oi.getArmDown()) {\n\t\t// \t// System.out.println(\"Front Left Wheel Selected\");\n\t\t// \tWheel = 1;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getArmUp()) {\n\t\t// \t// System.out.println(\"Back Left Wheel Selected\");\n\t\t// \tWheel = 2;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallIn()) {\n\t\t// \t// System.out.println(\"Front Right Wheel Selected\");\n\t\t// \tWheel = 3;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallOut()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 4;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBlueButton()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 0;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t// } \n\n\t\t// if (Wheel == 1) {\n\n\t\t// \tmyDrive.setFLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 2) {\n\n\t\t// \tmyDrive.setRLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 3) {\n\n\t\t// \tmyDrive.setFRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 4) {\n\n\t\t// \tmyDrive.setRRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// }\n\n\t\t// if (Robot.m_oi.getSafety()) {\n\n\t\t// \tspeedLimit = 1.0;\n\t\t// \tstrafeLimit = 1.0;\n\n\t\t// } else {\n\n\t\t// \tspeedLimit = 0.5; \n\t\t// \tstrafeLimit = 0.8;\n\t\t\t\t\n\t\t// }\n\n\n\n\t\t//System.out.print (\"strafeLimit: \" + strafeLimit);\n\t\t//System.out.println(Robot.m_oi.getX() * strafeLimit);\n\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY() * speedLimit), // set Y speed\n\t\t// \t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t// \t(Robot.m_oi.getRotate() * rotateLimit), // set rotation rate\n\t\t// \t0); // gyro angle \n\t\t\n\t\t//TODO: Rotate robot with vision tracking, set up curve to slow down as target approaches center.\n\t\t// if (Robot.m_oi.getStartButton()) {\n\t\t// \tmyDrive.driveCartesian(\n\t\t// \t\t (0.4), // set Rotation\n\t\t// \t\t (0.0), // set Strafe\n\t\t// \t\t (0.0), // set Forward/Back\n\t\t// \t\t 0);\n\t\t// } else {\n\t\tmyDrive.driveCartesian(\n\t\t\t(Robot.m_oi.getY() * rotateLimit), // set Y speed\n\t\t\t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t\t(Robot.m_oi.getRotate() * speedLimit), // set rotation rate\n\t\t\t0);\n\t\t// }\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY()), // set Y speed\n\t\t// \t(Robot.m_oi.getX()), // set X speed\n\t\t// \t(Robot.m_oi.getRotate()), // set rotation rate\n\t\t// \t0); \n\n }", "public void movePower(String movement, double power, double duration)\n {\n double startTime = getRuntime();\n switch(movement)\n {\n case \"forward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"backward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"right\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"left\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"leftTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"rightTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n }\n stop();\n }", "public void driveTank(double leftPower, double rightPower) {\r\n if(leftPower > 1.0) {\r\n leftPower = 1.0;\r\n } else if(leftPower < -1.0) {\r\n leftPower = -1.0;\r\n }\r\n \r\n if(rightPower > 1.0) {\r\n rightPower = 1.0;\r\n } else if(rightPower < -1.0) {\r\n rightPower = -1.0;\r\n }\r\n \r\n tankLeftRamp.setTarget(leftPower);\r\n tankRightRamp.setTarget(rightPower);\r\n \r\n tankLeftRamp.tick();\r\n tankRightRamp.tick();\r\n \r\n robotDrive.tankDrive(getDirection() * tankLeftRamp.getOutput(),\r\n getDirection() * tankRightRamp.getOutput());\r\n //TODO set motor speeds in console\r\n }", "public void encoderDrive(double speed,\r\n double leftInches, \r\n double rightInches,\r\n String name) \r\n {\n int newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH);\r\n int newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH);\r\n robot.leftDrive.setTargetPosition(newLeftTarget);\r\n robot.rightDrive.setTargetPosition(newRightTarget);\r\n\r\n // Turn On RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n\r\n // reset the timeout time and start motion.\r\n ElapsedTime localTimer = new ElapsedTime();\r\n localTimer.reset();\r\n robot.leftDrive.setPower(Math.abs(speed));\r\n robot.rightDrive.setPower(Math.abs(speed));\r\n\r\n // keep looping while we are still active, and there is time left, and both motors are running.\r\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\r\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\r\n // always end the motion as soon as possible.\r\n // However, if you require that BOTH motors have finished their moves before the robot continues\r\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\r\n while (localTimer.seconds() < EncoderDrive_Timeout_Second \r\n && (robot.leftDrive.isBusy() || robot.rightDrive.isBusy())) {\r\n\r\n // Display it for the driver.\r\n telemetry.addData(\"\", \"%s @ %s\", name, localTimer.toString());\r\n telemetry.addData(\"To\", \"%7d :%7d\", newLeftTarget, newRightTarget);\r\n telemetry.addData(\"At\", \"%7d :%7d\",\r\n robot.leftDrive.getCurrentPosition(),\r\n robot.rightDrive.getCurrentPosition());\r\n telemetry.update();\r\n idle();\r\n }\r\n\r\n // Stop all motion;\r\n robot.leftDrive.setPower(0);\r\n robot.rightDrive.setPower(0);\r\n\r\n // Turn off RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "public void moveLeftRight(double power){\n\t\trobot.motor0.setPower(-power);\n\t\trobot.motor1.setPower(-power);\n\t\trobot.motor2.setPower(power);\n\t\trobot.motor3.setPower(power);\n\t}", "double a_left_front_drive_power()\n {\n double l_return = 0.0;\n if (left_front_drv_Motor != null)\n {\n l_return = left_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "@Override\n public void runOpMode() {\n try {\n leftfrontDrive = hardwareMap.get(DcMotor.class, \"frontLeft\");\n leftfrontDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n rightfrontDrive = hardwareMap.get(DcMotor.class, \"frontRight\");\n rightfrontDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n leftbackDrive = hardwareMap.get(DcMotor.class, \"backLeft\");\n leftbackDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftbackDrive.setDirection(DcMotor.Direction.REVERSE);\n\n rightbackDrive = hardwareMap.get(DcMotor.class, \"backRight\");\n rightbackDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n lift = hardwareMap.get(DcMotor.class, \"Lift\");\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setDirection(DcMotor.Direction.REVERSE);\n\n markerArm = hardwareMap.get(Servo.class, \"markerArm\");\n\n armActivator = hardwareMap.get(DcMotor.class, \"armActivator\");\n armActivator.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n } catch (IllegalArgumentException iax) {\n bDebug = true;\n }\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"BNO055IMUCalibration.json\";\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n waitForStart(); //the rest of the code begins after the play button is pressed\n\n sleep(3000);\n\n drive(0.35, 0.5);\n\n turn(90.0f);\n\n drive(1.8, 0.5);\n\n turn(45.0f);\n\n drive(2.5, -0.5);\n\n sleep(1000);\n\n markerArm.setPosition(1);\n\n sleep(1000);\n\n markerArm.setPosition(0);\n\n sleep(1000);\n\n drive(2.5,.75);\n\n turn(179.0f);\n\n drive(1.5, 1.0);\n\n requestOpModeStop(); //end of autonomous\n }", "public abstract void PowerOn();", "@Override\r\n public void runOpMode() {\n\r\n mtrFL = hardwareMap.dcMotor.get(\"fl_drive\");\r\n mtrFR = hardwareMap.dcMotor.get(\"fr_drive\");\r\n mtrBL = hardwareMap.dcMotor.get(\"bl_drive\");\r\n mtrBR = hardwareMap.dcMotor.get(\"br_drive\");\r\n\r\n\r\n // Set directions for motors.\r\n mtrFL.setDirection(DcMotor.Direction.REVERSE);\r\n mtrFR.setDirection(DcMotor.Direction.FORWARD);\r\n mtrBL.setDirection(DcMotor.Direction.REVERSE);\r\n mtrBR.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n\r\n //zero power behavior\r\n mtrFL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrFR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrBL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n mtrBR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n\r\n\r\n // Set power for all motors.\r\n mtrFL.setPower(powFL);\r\n mtrFR.setPower(powFR);\r\n mtrBL.setPower(powBL);\r\n mtrBR.setPower(powBR);\r\n\r\n\r\n // Set all motors to run with given mode\r\n mtrFL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrFR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrBL.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n mtrBR.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\r\n\r\n waitForStart();\r\n\r\n // run until the end of the match (driver presses STOP)\r\n while (opModeIsActive()) {\r\n g1ch2 = -gamepad1.left_stick_y;\r\n g1ch3 = gamepad1.right_stick_x;\r\n g2ch2 = -gamepad2.left_stick_x;\r\n g2ch4 = -gamepad2.right_stick_x;\r\n g2left = gamepad2.left_trigger;\r\n g2right = gamepad2.right_trigger;\r\n\r\n\r\n powFL = Range.clip(g1ch2 + g1ch3, -1, 1);\r\n powFR = Range.clip(g1ch2 - g1ch3, -1, 1);\r\n powBL = Range.clip(g1ch2 + g1ch3, -1, 1);\r\n powBR = Range.clip(g1ch2 - g1ch3, -1, 1);\r\n\r\n\r\n mtrFL.setPower(powFL);\r\n mtrFR.setPower(powFR);\r\n mtrBL.setPower(powBL);\r\n mtrBR.setPower(powBR);\r\n sleep(50);\r\n }\r\n }", "public abstract void drive(double leftSpeed, double rightSpeed);", "double a_left_back_drive_power()\n {\n double l_return = 0.0;\n if (left_back_drv_Motor != null)\n {\n l_return = left_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "@Override\n public void runOpMode() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n intake = hardwareMap.get (DcMotor.class, \"intake\");\n dropServo = hardwareMap.get(Servo.class, \"drop_Servo\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n dropServo.setPosition(1.0);\n waitForStart();\n dropServo.setPosition(0.6);\n sleep(500);\n VuforiaOrientator();\n encoderSequence(\"dumbDrive\");\n\n\n }", "public void power()\r\n {\r\n powerOn = true;\r\n }", "private void controlLift()\n {\n if (gamepad1.dpad_up) {\n liftMotor.setPower(-0.5);\n } else if (gamepad1.dpad_down) {\n liftMotor.setPower(0.5);\n } else {++backInc;\n liftMotor.setPower(0);\n }\n }", "public void turnClockwise(double power){\n motorFrontLeft.setPower(-power);\n motorBackLeft.setPower(-power);\n motorFrontRight.setPower(power);\n motorBackRight.setPower(power);\n }", "public void encoderDrive(double speed, double aInches, double bInches, double cInches, double dInches) {\n double ad = 720 * (aInches / 12.57);\n int aDistance = (int) ad;\n double bd = 720 * (bInches / 12.57);\n int bDistance = (int) bd;\n double cd = 720 * (cInches / 12.57);\n int cDistance = (int) cd;\n double dd = 720 * (dInches / 12.57);\n int dDistance = (int) dd;\n\n aDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n aDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n bDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n bDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n cDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n cDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n dDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n dDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n aDrive.setTargetPosition(aDistance);\n bDrive.setTargetPosition(bDistance);\n cDrive.setTargetPosition(cDistance);\n dDrive.setTargetPosition(dDistance);\n aDrive.setPower(speed);\n bDrive.setPower(speed);\n cDrive.setPower(speed);\n dDrive.setPower(speed);\n\n while (aDrive.isBusy() && bDrive.isBusy() && cDrive.isBusy() && dDrive.isBusy() && opModeIsActive()) {\n idle();\n }\n aDrive.setPower(0);\n bDrive.setPower(0);\n cDrive.setPower(0);\n dDrive.setPower(0);\n }", "public void run() {\r\n if (stateRegistry.getDriveDirection() == REVERSE) {\r\n robotDrive.setInvertedMotor(RobotDrive.MotorType.kFrontLeft, true);\r\n robotDrive.setInvertedMotor(RobotDrive.MotorType.kFrontRight, true);\r\n robotDrive.setInvertedMotor(RobotDrive.MotorType.kRearLeft, true);\r\n robotDrive.setInvertedMotor(RobotDrive.MotorType.kRearRight, true);\r\n robotDrive.tankDrive(rightDriveJoystick, leftDriveJoystick);\r\n }\r\n else {\r\n robotDrive.setInvertedMotor(RobotDrive.MotorType.kFrontLeft, false);\r\n robotDrive.setInvertedMotor(RobotDrive.MotorType.kFrontRight, false);\r\n robotDrive.setInvertedMotor(RobotDrive.MotorType.kRearLeft, false);\r\n robotDrive.setInvertedMotor(RobotDrive.MotorType.kRearRight, false);\r\n robotDrive.tankDrive(leftDriveJoystick, rightDriveJoystick);\r\n }\r\n }", "public void driveRaw (double speed) {\n leftBackMotor.set(speed);\n leftMiddleMotor.set(speed);\n leftFrontMotor.set(speed);\n rightBackMotor.set(speed);\n rightMiddleMotor.set(speed);\n rightFrontMotor.set(speed);\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\t\n\t\t\n\t\tif (stick.getRawButtonPressed(2)) {\n\t\t\tstickReversed = !stickReversed;\n\t\t}\n\t\t\n\t\t// double means a floating point (decimal) number with a precision of \"hella\"\n\t\tdouble power = -stick.getY(Hand.kLeft); // negated, because microsoft is weird and up is negative\n\t\tdouble steering = stick.getX(Hand.kRight); \n\t\tif (stickReversed) {\n\t\t\tpower = -power;\n\t\t}\n\t\tdrive(power, steering);\n\t\t\n//\t\tif (xbox.getBumper(Hand.kRight)) {\n//\t\t\tleftIntake.set(xbox.getTriggerAxis(Hand.kLeft));\t\n//\t\t\trightIntake.set(-0.9);\n//\t\t} else if (xbox.getBumper(Hand.kLeft)) {\n//\t\t\tleftIntake.set(-1.0);\n//\t\t\trightIntake.set(1.0);\n//\t\t} else {\n//\t\t\tleftIntake.set(0.0);\n//\t\t\trightIntake.set(0.0);\n//\t\t}\n\t\t\n\t\tif (xbox.getBumper(Hand.kLeft)) { // shoot out\n\t\t\tleftIntake.set(-1.0);\n\t\t} else { // intake\n\t\t\tleftIntake.set(xbox.getTriggerAxis(Hand.kLeft));\n\t\t}\n\t\t\n\t\tif(xbox.getBumper(Hand.kRight)) { //shooty i think\n\t\t\trightIntake.set(1.0);\n\t\t} else { //intake\n\t\t\trightIntake.set(-xbox.getTriggerAxis(Hand.kRight));\n\t\t}\n//\t\tarmSetpoint += xbox.getY(Hand.kLeft) * 60;\n//\t\tSystem.out.println(armSetpoint);\n\t\t\n\t\tarmMotor.set(ControlMode.PercentOutput, xbox.getY(Hand.kLeft) * 0.8);\n\t\tSystem.out.println(xbox.getY(Hand.kLeft));\n\t}", "@Override\n public void runOpMode(){\n motors[0][0] = hardwareMap.dcMotor.get(\"frontLeft\");\n motors[0][1] = hardwareMap.dcMotor.get(\"frontRight\");\n motors[1][0] = hardwareMap.dcMotor.get(\"backLeft\");\n motors[1][1] = hardwareMap.dcMotor.get(\"backRight\");\n // The motors on the left side of the robot need to be in reverse mode\n for(DcMotor[] motor : motors){\n motor[0].setDirection(DcMotor.Direction.REVERSE);\n }\n // Being explicit never hurt anyone, right?\n for(DcMotor[] motor : motors){\n motor[1].setDirection(DcMotor.Direction.FORWARD);\n }\n\n waitForStart();\n\n //Kill ten seconds\n runtime.reset();\n while(runtime.seconds()<10); runtime.reset();\n\n while(runtime.milliseconds()<700){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(100);\n // Set right motor power\n motor[1].setPower(100);\n }\n }\n\n while(runtime.milliseconds()<200){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(-100);\n // Set right motor power\n motor[1].setPower(-100);\n }\n }\n\n runtime.reset();\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(0);\n // Set right motor power\n motor[1].setPower(0);\n }\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }", "void drive(double x_stick, double y_stick, double x_right_stick, double multiplier) {\n if (Math.abs(x_stick) >= (2 * Math.abs(y_stick)) + .1) {\n flMotor.setPower(x_stick * multiplier);\n frMotor.setPower(-x_stick * multiplier);\n blMotor.setPower(-x_stick * multiplier);\n brMotor.setPower(x_stick * multiplier);\n } else {\n flMotor.setPower((y_stick + x_right_stick) * multiplier);\n frMotor.setPower((y_stick - x_right_stick) * multiplier);\n blMotor.setPower((y_stick + x_right_stick) * multiplier);\n brMotor.setPower((y_stick - x_right_stick) * multiplier);\n }\n }", "@Override\n public void start() {\n\n\n // IF YOU ARE NOT USING THE AUTO MODE\n\n /*\n\n runtime.reset();\n\n ElapsedTime time = new ElapsedTime();\n\n time.reset();\n\n while (time.time() < 1) {\n\n armMotor.setPower(0.5);\n\n }\n\n armMotor.setPower(0);\n\n // get the grabbers ready to grip the blocks\n leftGrab.setPosition(0.9);\n rightGrab.setPosition(0.1);\n\n /*\n time.reset();\n\n while(time.time() < 0.6) {\n\n armMotor.setPower(-0.5);\n\n }\n\n */\n\n\n }", "public void driveRaw (double left, double right) {\n leftBackMotor.set(left);\n leftMiddleMotor.set(left);\n leftFrontMotor.set(left);\n rightBackMotor.set(right);\n rightMiddleMotor.set(right);\n rightFrontMotor.set(right);\n }", "public void rawTurret(double power) {\n double encoderAngle = turretEncoder.getDistance();\n // Prevent the turret from turning past hard stops\n if (encoderAngle >= MAX_ENCODER_VALUE && power > 0 || encoderAngle < MIN_ENCODER_VALUE && power < 0) {\n power = 0;\n }\n turretMotor.set(power);\n }", "public static void drive(double leftspeed, double rightspeed) {\n\n leftMotorA.set(ControlMode.PercentOutput, leftspeed);\n rightMotorA.set(ControlMode.PercentOutput, rightspeed);\n\n }", "public void mecanumDrive(double forward, double turn, double strafe, double multiplier) {\n double vd = Math.hypot(forward, strafe);\n double theta = Math.atan2(forward, strafe) - (Math.PI / 4);\n turnPower = turn;\n\n// if(forward == 0 && strafe == 0 && turn == 0) {\n// Time.reset();\n// }\n//\n// double accLim = (Time.time()/1.07)*((0.62*Math.pow(Time.time(), 2))+0.45);\n//\n// if(forward < 0 || turn < 0 || strafe < 0) {\n//\n// }\n//\n// if(turn == 0) {\n// targetAngle = getImuAngle();\n// turnPower = pid.run(0.001, 0, 0, 10, targetAngle);\n// } else {\n// targetAngle = getImuAngle();\n// }\n\n double[] v = {\n vd * Math.sin(theta) - turnPower,\n vd * Math.cos(theta) + turnPower,\n vd * Math.cos(theta) - turnPower,\n vd * Math.sin(theta) + turnPower\n };\n\n double[] motorOut = {\n multiplier * (v[0] / 1.07) * ((0.62 * Math.pow(v[0], 2)) + 0.45),\n multiplier * (v[1] / 1.07) * ((0.62 * Math.pow(v[1], 2)) + 0.45),\n multiplier * (v[2] / 1.07) * ((0.62 * Math.pow(v[2], 2)) + 0.45),\n multiplier * (v[3] / 1.07) * ((0.62 * Math.pow(v[3], 2)) + 0.45)\n };\n\n fr.setPower(motorOut[0]);\n fl.setPower(motorOut[1]);\n br.setPower(motorOut[2]);\n bl.setPower(motorOut[3]);\n }", "public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}", "protected void execute() {\r\n\t//double leftSpeed = oi.leftUpAndDown();\r\n\tdouble leftSpeed = motorScalerLeft.scale(oi.leftUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\leftSpeed\", leftSpeed);\r\n\t\r\n\t//double rightSpeed = oi.rightUpAndDown();\r\n\tdouble rightSpeed = motorScalerRight.scale(oi.rightUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\rightSpeed\", rightSpeed);\r\n\t\r\n\ttheDrive.goVariable(-leftSpeed,-rightSpeed);\r\n }", "@Override\n protected void execute() {\n\n int leftMultiplier = -1;\n if (IsLeft) {\n leftMultiplier = 1;\n }\n Robot.m_drivetrain.drive(leftMultiplier * .5, -leftMultiplier * .5);\n\n }", "public final void modifyMotorcycle(){\r\n \tgetOffer();\r\n \tgetExhaustSystem();\r\n \tgetTires();\r\n getWindshield();\r\n getLED();\r\n getEngineGuards();\r\n /* Note that any of this methods \r\n \t * could provide a default implementation \r\n \t * by being concretely defined\r\n \t */\r\n }", "public void arcadeDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set((joystickLYAxis + joystickLXAxis/2));\n\t\t\tmotorRF.set((joystickLYAxis + joystickLXAxis/2));\n\t\t\tmotorLB.set(-(joystickLYAxis - joystickLXAxis/2));\n\t\t\tmotorLF.set(-(joystickLYAxis - joystickLXAxis/2));\n\t\t} else {\n\t\t\tmotorRB.set((joystickLYAxis + joystickLXAxis/2)/2);\n\t\t\tmotorRF.set((joystickLYAxis + joystickLXAxis/2)/2);\n\t\t\tmotorLB.set(-(joystickLYAxis - joystickLXAxis/2)/2);\n\t\t\tmotorLF.set(-(joystickLYAxis - joystickLXAxis/2)/2);\n\t\t}\n\t}", "@Override\r\n public void runOpMode() {\n robot.init(hardwareMap);\r\n\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n telemetry.update();\r\n\r\n //Wait for the Pressing of the Start Button\r\n waitForStart();\r\n\r\n // run until the end of the match (driver presses STOP)\r\n while (opModeIsActive()) {\r\n\r\n motorSpeed[0] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[0];\r\n motorSpeed[1] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[1];\r\n motorSpeed[2] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[2];\r\n motorSpeed[3] = driveSpeed(gamepad1.left_stick_x, gamepad1.left_stick_y, gamepad2.left_stick_x)[3];\r\n\r\n robot.drive1.setPower(motorSpeed[0]);\r\n robot.drive1.setPower(motorSpeed[1]);\r\n robot.drive1.setPower(motorSpeed[2]);\r\n robot.drive1.setPower(motorSpeed[3]);\r\n\r\n telemetry.addData(\"Drive 1 Speed\", motorSpeed[0]);\r\n telemetry.addData(\"Drive 2 Speed\", motorSpeed[1]);\r\n telemetry.addData(\"Drive 3 Speed\", motorSpeed[2]);\r\n telemetry.addData(\"Drive 4 Speed\", motorSpeed[3]);\r\n telemetry.update();\r\n\r\n }\r\n }", "@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }", "public void updateDrive () {\n leftCurrSpeed = scale (leftCurrSpeed, leftTargetSpeed, Constants.Drivetrain.ACCELERATION_SCALING, Constants.Drivetrain.ACCELERATION_THRESHOLD);\n rightCurrSpeed = scale (rightCurrSpeed, rightTargetSpeed, Constants.Drivetrain.ACCELERATION_SCALING, Constants.Drivetrain.ACCELERATION_THRESHOLD);\n driveRaw (leftCurrSpeed, rightCurrSpeed);\n }", "@Override\n public void runOpMode() throws InterruptedException\n {\n leftDrive = hardwareMap.dcMotor.get(\"left_drive\");\n rightDrive = hardwareMap.dcMotor.get(\"right_drive\");\n\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n\n telemetry.addData(\"Mode\", \"waiting\");\n telemetry.update();\n\n // wait for start button.\n\n waitForStart();\n\n telemetry.addData(\"Mode\", \"running\");\n telemetry.update();\n\n // set both motors to 25% power.\n\n leftDrive.setPower(0.25);\n rightDrive.setPower(0.25);\n\n sleep(2000); // wait for 2 seconds.\n\n // set motor power to zero to stop motors.\n\n leftDrive.setPower(0.0);\n rightDrive.setPower(0.0);\n }", "public void runOpMode() {\n leftBackDrive = hardwareMap.get(DcMotor.class, \"left_back_drive\"); //port 0, hub1\n rightBackDrive = hardwareMap.get(DcMotor.class, \"right_back_drive\"); //port 1, hub1\n leftFrontDrive = hardwareMap.get(DcMotor.class, \"left_front_drive\"); //port 2, hub1\n rightFrontDrive = hardwareMap.get(DcMotor.class, \"right_front_drive\"); //port 3, hub1\n craneExtend = hardwareMap.get(DcMotor.class, \"craneExtend\"); //port 0, hub2\n cranePitch = hardwareMap.get(DcMotor.class, \"cranePitch\"); //port 1, hub2\n craneElevate = hardwareMap.get(DcMotor.class, \"craneElevate\"); //port 2, hub2\n fakeMotor = hardwareMap.get(DcMotor.class, \"fakeMotor\"); //port 2, hub3\n craneGrab = hardwareMap.get(Servo.class, \"craneGrab\"); //port 0, servo\n craneGrabAttitude = hardwareMap.get(Servo.class, \"craneGrabAttitude\"); //port 2, servo\n trayGrab = hardwareMap.get(Servo.class, \"trayGrab\"); //port 1, servo\n flipperLeft = hardwareMap.get(Servo.class, \"flipperLeft\"); //port 3. servo\n flipperRight = hardwareMap.get(Servo.class, \"flipperRight\"); //port 4, servo\n \n //Setting the motor directions\n leftBackDrive.setDirection(DcMotor.Direction.FORWARD);\n rightBackDrive.setDirection(DcMotor.Direction.REVERSE);\n leftFrontDrive.setDirection(DcMotor.Direction.FORWARD);\n rightFrontDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //Initializing variables\n \n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update(); //Done initalizing\n\n //Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n \n//******************************************************************************\n\n //Drive controls\n if (gamepad1.left_trigger>0 || gamepad1.right_trigger>0) { //Crab\n leftBackDrive.setPower(gamepad1.left_stick_x*0.8);\n rightBackDrive.setPower(-gamepad1.left_stick_x*0.8);\n leftFrontDrive.setPower(-gamepad1.left_stick_x*0.8);\n rightFrontDrive.setPower(gamepad1.left_stick_x*0.8);\n }\n\n else { //Tank\n leftBackDrive.setPower(-gamepad1.left_stick_x);\n rightBackDrive.setPower(-gamepad1.right_stick_x);\n leftFrontDrive.setPower(-gamepad1.left_stick_x);\n rightFrontDrive.setPower(-gamepad1.right_stick_x);\n }\n }\n \n//******************************************************************************\n\n //Crane control\n \n \n//******************************************************************************\n\n //Telemetry display\n telemetry.addData(\"Run Time:\", \"\" + runtime.toString());\n telemetry.addData(\"Motor Power\", \"L (%.2f), R (%.2f)\", gamepad1.left_stick_y, gamepad1.right_stick_y);\n telemetry.update();\n }", "private void updateLinearDrive() {\n// double rotations = (getLeftRotations() + getRightRotations()) / 2;\n// linearDriveDistance = Conversion.rotationsToInches(rotations, Constants.driveWheelDiameter);\n// double angleController = turnControl.getOutput(linearDriveMultiplier * (navX.getAngle() - linearDriveTargetAngle));\n// double driveController = driveControl.getOutput(linearDriveTargetDistance - linearDriveDistance);\n// setOutput(driveController + angleController, driveController - angleController);\n }", "@Override\n public void loop() {\n // Setup a variable for each drive wheel to save power level for telemetry\n double leftDrivePower;\n double rightDrivePower;\n double driveMultiplier;\n double slowMultiplier;\n double fastMultiplier;\n double BASE_DRIVE_SPEED = 0.6;\n double elevPower;\n double armPower;\n boolean lowerLimitPressed;\n boolean upperLimitPressed;\n\n\n\n\n // Tank Mode uses one stick to control each wheel.\n // - This requires no math, but it is hard to drive forward slowly and keep straight.\n armPower = -gamepad2.right_stick_x * 0.3;\n\n lowerLimitPressed = !lowerLimit.getState();\n upperLimitPressed = !upperLimit.getState();\n\n if((lowerLimitPressed && -gamepad2.left_stick_y < 0) || (upperLimitPressed && -gamepad2.left_stick_y > 0)){\n elevPower = 0;\n }\n else {\n elevPower = -gamepad2.left_stick_y * 1;\n }\n\n if (gamepad2.left_bumper){\n hookPosDeg = HOOK_UP;\n }\n else if (gamepad2.left_trigger > 0){\n hookPosDeg = HOOK_DOWN;\n }\n\n if (gamepad2.right_bumper){\n clawPosDeg = CLAW_OPEN;\n }\n else if (gamepad2.right_trigger > 0){\n clawPosDeg = CLAW_CLOSED;\n }\n\n if (gamepad1.left_trigger > 0){\n slowMultiplier = 0.10;\n }\n else\n slowMultiplier = 0;\n\n if (gamepad1.right_trigger > 0){\n fastMultiplier = 0.30;\n }\n else\n fastMultiplier = 0;\n\n driveMultiplier = BASE_DRIVE_SPEED + slowMultiplier + fastMultiplier;\n leftDrivePower = -gamepad1.left_stick_y * driveMultiplier;\n rightDrivePower = -gamepad1.right_stick_y * driveMultiplier;\n\n // Send power to actuators\n leftDrive.setPower(leftDrivePower);\n rightDrive.setPower(rightDrivePower);\n elev.setPower(elevPower);\n// arm.setTargetPosition(armTarget);\n// arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n arm.setPower(armPower);\n hookPos = map(hookPosDeg, HOOK_MIN_POS_DEG, HOOK_MAX_POS_DEG, HOOK_MIN_POS, HOOK_MAX_POS);\n clawPos = map(clawPosDeg, CLAW_MIN_POS_DEG, CLAW_MAX_POS_DEG, CLAW_MIN_POS, CLAW_MAX_POS);\n hook.setPosition(hookPos);\n claw.setPosition(clawPos);\n\n // Show the elapsed game time and wheel power.\n telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n telemetry.addData(\"Drive\", \"left (%.2f), right (%.2f)\", leftDrivePower, rightDrivePower);\n telemetry.addData( \"Elev\", \"power (%.2f)\", elevPower);\n telemetry.addData(\"Limit\", \"lower (%b), upper (%b)\", lowerLimitPressed, upperLimitPressed);\n telemetry.addData(\"Arm Enc\", arm.getCurrentPosition());\n\n }", "public void smoothMovePower(String movement, double power, double duration)\n {\n double startTime = getRuntime();\n switch(movement)\n {\n case \"forward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"backward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"right\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"left\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"leftTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"rightTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n }\n }", "@Override\n public void loop() {\n\n\n if (gamepad1.right_bumper) {\n leftDrive.setDirection(DcMotor.Direction.FORWARD);\n leftDrive.setPower(3);\n } else if (gamepad1.left_bumper) {\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n leftDrive.setPower(3);\n\n }\n\n }", "public void ldrive(double speed){\n left1.set(ControlMode.PercentOutput, speedRamp(speed));\n left2.set(ControlMode.PercentOutput, speedRamp(speed));\n }", "public void driveArcade(double drive, double turn) { //Takes a drive and turn value and converts it to motor values.\n leftMotor.setPower(Range.clip((drive + turn), -DRIVE_FULL_SPEED, DRIVE_FULL_SPEED));\n rightMotor.setPower(Range.clip((drive - turn), -DRIVE_FULL_SPEED, DRIVE_FULL_SPEED));\n }", "@Override\n public void execute() {\n\n DifferentialDriveWheelPowers powers = mBasicDrive.drive(mThrottle.getAsDouble(), mTurn.getAsDouble(), mTrim.getAsDouble());\n\n DifferentialDriveWheelSpeeds speeds = new DifferentialDriveWheelSpeeds(\n powers.getLeft() * Constants.Drive.kFeedforward.maxAchievableVelocity(Constants.Robot.kMinBatteryVoltage, 0.0),\n powers.getRight() * Constants.Drive.kFeedforward.maxAchievableVelocity(Constants.Robot.kMinBatteryVoltage, 0.0));\n\n mDriveSubsystem.setVelocity(speeds, mDeadband);\n }", "protected void execute() { \t\n \tif (isLowered != Robot.oi.getOperator().getRawButton(2)) {\n \t\tisLowered = Robot.oi.getOperator().getRawButton(2);\n \t\tif (isLowered)\n \t\t\tRobot.gearSubsystem.getRaiser().set(DoubleSolenoid.Value.kForward);\n \t\telse\n \t\t\tRobot.gearSubsystem.getRaiser().set(DoubleSolenoid.Value.kReverse);\n \t}\n \t\n \tif (Robot.oi.getOperator().getRawButton(11))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(0.75);\n \telse if (Robot.oi.getOperator().getRawButton(12))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(0);\n \telse if (Robot.oi.getOperator().getRawButton(10))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(-0.75);\n }", "public void operatorControl() {\n \tdouble ctrlThresh = .2; \n \tdouble minPower = .05; \n \tdouble maxPower = .75; \n \tdouble recip = (1 - ctrlThresh); \n \tdouble mult = (maxPower - minPower); \n \tdouble right; \n \tdouble strafe; \n \tdouble rotate; \n \tdouble rightAxis; \n \tdouble strafeAxis; \n \tdouble rotateAxis; \n \t// \tboolean leftLeft; \n \t// \tboolean leftRight; \n \tdouble rightDir; \n \tdouble strafeDir; \n \tdouble rotateDir; \n \tdouble rightPower; \n \tdouble rotatePower; \n \tdouble strafePower; \n \t\n \tint winchCount;\n \tboolean winchDirection;\n \n \t// \tdouble frontLeftPower; \n \t// \tdouble frontRightPower; \n \t// \tdouble backLeftPower; \n \t// \tdouble backRightPower; \n \n \t//myRobot.setSafetyEnabled(true); \n \t\n \tAccelerometer test = new BuiltInAccelerometer();\n \t\n \twhile (isOperatorControl() && isEnabled()) { \n \t\t// ACCEL TEST CODE\n// \t\tSystem.out.println(test.getX() + \", \" + test.getY() + \", \" + test.getZ());\n \t\t// END ACCEL TEST CODE\n \n \t\t// ********** BEGIN DRIVING CODE ********** \n \t\t// Code for driving using omniwheels and two wheels for strafing \n \t\t// Diagram for the wheels of the robot below. \n \n \t\t// L S R \n \t\t// /--------------------------\\ \n \t\t//\t ||------------------------|| \n \t\t// || [][] || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || [][] || \n \t\t// ||------------------------|| \n \t\t// \\--------------------------/ \n \t\t// \n \t\t// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ \n \n \t\tctrlThresh = .2; // the point at which we want to sense joystick action \n \t\trecip = 1-ctrlThresh; \t\t // = 0.8 \n \n \t\trightAxis = rightStick.getRawAxis(1);\t\t\t\t// right joystick, y (up/down) axis\n \t\t\n \t\t//System.out.println(\"\"+rightAxis);\n \t\tstrafeAxis = rightStick.getRawAxis(0);\t\t\t\t// right joystick, x (left/right) axis; this is \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// arbitrary and could have been the left stick\n \t\trotateAxis = rightStick.getRawAxis(4);\t\t\t\t\t// left joystick, y axis\n \n \t\trightDir = rightAxis/Math.abs(rightAxis);\t\t\t// forward or backward (+1 or -1)\n \t\tstrafeDir = strafeAxis/Math.abs(strafeAxis); \t// \t\t\t'' \n \t\trotateDir = rotateAxis/Math.abs(rotateAxis); // \t\t\t'' \n \n \t\tright = 0; // right input formatted for range of detected values [0.2,1] \n \t\trotate = 0; // left input formatted \n \t\tstrafe = 0; // strafe input formatted \n \n \t\tif(Math.abs(rightAxis) > ctrlThresh) \t// user moved stick beyond threshold \n \t\t{right = (rightAxis-ctrlThresh*rightDir)/recip;} // format right: scale back, set direction, proportion it \n \t\tif(Math.abs(strafeAxis) > ctrlThresh) \n \t\t{strafe = (strafeAxis-ctrlThresh*strafeDir)/recip;} // format left... \n \t\tif(Math.abs(rotateAxis) > ctrlThresh) \n \t\t{rotate = (rotateAxis-ctrlThresh*rotateDir)/recip;}\t\t// format strafe... \n \n \n \t\trightDir = right/Math.abs(right); \n \t\trightPower = (Math.abs(right*mult) + minPower) * rightDir; \t\t// re-proportion for power's range, strip direction,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// and then add back threshold and direction. \n \t\trotateDir = rotate/Math.abs(rotate); \n \t\trotatePower = (Math.abs(rotate*mult) + minPower) * rotateDir;\t\t\t// \t\t'' \n \n \t\tstrafeDir = strafe/Math.abs(strafe); \n \t\tstrafePower = (Math.abs(strafe*mult) + minPower) * strafeDir;\t// \t\t'' \n \n \t\tif(Math.abs(rightPower)>0.2){\n \t\t\tfrontRight.set(rightPower);\t\t\t\t\t\t// set all the motors with the powers we \n \t\t\tbackRight.set(rightPower);\t\t\t\t\t\t/// calculated above : drive! \n \t\t\tfrontLeft.set(-1*rightPower); \n \t\t\tbackLeft.set(-1*rightPower);\n \t\t}\n \t\telse{\n \t\t\tfrontRight.set(rotatePower);\n \t\t\tbackRight.set(rotatePower);\n \t\t\tfrontLeft.set(rotatePower);\n \t\t\tbackLeft.set(rotatePower);\n \t\t}\n \t\t\n// \t\tfrontStrafe.set(strafePower); \n// \t\tbackStrafe.set(-1*strafePower); \n \n// \t\tmyRobot.tankDrive(leftStick, rightStick); \n \t\t \n \t\t// ********** END OF DRIVING CODE ********** \n \t\t//======================================================================= \n \t\t// ************ BEGIN WINCH CODE *********** \n \t\t// We need to code the winch to help raise and lower the elevator \n \t\t// This is just one option between the winch and the lead screw. \n \t\t \n \t\t\n \t\t//second winch test\n \t\t/*\n \t\twinchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n \t \tSystem.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n \t \tif(winchCount<240){\n \t \t\t\n \t \t\twinchCim1.set(.1);\n \t \t\twinchCim2.set(.1);\n \t \t}\n \t \telse{\n \t \t\twinchCim1.set(0);\n \t \t\twinchCim2.set(0);\n \t \t\t\n \t \t}\n \t if(rightStick.getRawButton(5)) \n { \n\t\t\t winchEncoder.reset();// reset the pulse count\n\t\t\t winchCount = 0;\n\t\t\t winchCim1.set(0);\n\t\t\t winchCim2.set(0);\n\t\t\t \n } */ //end of second winch test \n \t \t\n \t\t\n \t\t if(rightStick.getRawButton(5)) \n { \n \t\t\t //winchEncoder.reset();// reset the pulse count\n \tSystem.out.println(\"A\");\n \t winchCim1.set(.5); \t// set winchCim1 to 0.5 power (upwards) \n \t winchCim2.set(.5); \t\t\t\t\t\t\t// set winchCim2 to 0.5 power\n \t\t\t \n } \n \t\telse if(rightStick.getRawButton(4))\n \t\t{\n \t\t\tSystem.out.println(\"B\");\n \t\t\t//winchEncoder.reset();\t\t\t\t\t\t\t// reset the pulse count\n \t \twinchCim1.set(-.3); // set winchCim1 to -0.5 power (downwards) \n \t \twinchCim2.set(-.3);\t \t\t\t\t\t\t\t// set winchCim2 to -0.5 power\n \t\t}\n \n \t \telse// if(rightStick.getRawButton(2)) \n { \n \t winchCim1.set(0); \t\t\t\t\t\t\t// set winchCim1 to 0 power (off/stop) \n \t winchCim2.set(0);\t\t\t\t\t\t\t\t// set winchCim2 to 0 pwoer (off/stop)\n// \t winchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n// \t System.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n } \n \n \t\t// ********** END OF WINCH CODE ********** \n \t\t//======================================================================= \n \t\t \n \t\t \n \t\tTimer.delay(0.005);\t\t// wait for a motor update time \n } \n }", "private void driveRight() {\n setSpeed(MAX_SPEED, MIN_SPEED);\n }", "@Override\n\t\tpublic void driveRobot(double power, double pivot) {\n\t\t\tclosedLoopArcade(power, pivot);\n\t\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\t//For some reason, right is inverted in auto instead of left\n\t\tString start = autonomousCommand; //from smartDashboard\n\t\t//String start = \"R\";//R for right, FR for far right, L for far left\n\t\t//Starting Far Right\n\t\tif (start == \"FR\") {\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t//Go forward for 5 seconds\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t//stop going\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (start == \"R\") {\n\t\t\t//Starting on the right, aligned with the switch\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 2) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'R') {\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 15 && timer.get() > 7) {\n\t\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t}\n\t\t}\n\t\telse if (start == \"L\") {\n\t\t//This is for starting on the far left\n\t\t\tif(autoStep == 0) {\n\t\t\t\tif (timer.get() < 2.5) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'L') {/**Change this to R if we start on the right side, comment out if we're on the far right or left side**/\n\t\t\t\t\trotateTo(270);\n\t\t\t\t\tif (timer.get()>3 && timer.get()<4) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 7 && timer.get() > 4) {\n\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Default Code\n\t\t\tif (true) {\n\t\t\t\tif(autoStep==0) {\n\t\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void drive(double lSpeed, double rSpeed) {\n\t\tRobotMap.frontLeft.set(ControlMode.PercentOutput, -lSpeed);\n\t\tRobotMap.backLeft.set(ControlMode.PercentOutput, -lSpeed);\n\t\tRobotMap.frontRight.set(ControlMode.PercentOutput, rSpeed);\n\t\tRobotMap.backRight.set(ControlMode.PercentOutput, rSpeed);\n\t}", "public void runOpMode(){\n JAWLDrive3796 drive = new JAWLDrive3796(hardwareMap.dcMotor.get(\"left_drive\"), hardwareMap.dcMotor.get(\"right_drive\"));\n //Set the drive motors to run without encoders\n drive.setEncoders(false);\n //Create Grabber object\n JAWLGrabber3796 grabber = new JAWLGrabber3796(hardwareMap.servo.get(\"left_arm\"), hardwareMap.servo.get(\"right_arm\"));\n //Create Lift object\n JAWLLift3796 lift = new JAWLLift3796(hardwareMap.dcMotor.get(\"lift_motor\"));\n //Create color arm object\n JAWLColorArm3796 colorArm = new JAWLColorArm3796(hardwareMap.servo.get(\"color_arm\"));\n //Creates color sensor name\n ColorSensor colorSensorTemp = hardwareMap.get(ColorSensor.class, \"color_distance\");\n //Creates distance sensor name\n DistanceSensor distanceSensorTemp = hardwareMap.get(DistanceSensor.class, \"color_distance\");\n //Creates the color-distance sensor object\n JAWLColorSensor3796 colorDistanceSensor = new JAWLColorSensor3796(colorSensorTemp, distanceSensorTemp);\n //Creates the variable that will hold the color of the jewel\n String colorOfBall;\n //Creates relic arm objects\n //TTTTRelicArm3796 relicArm = new TTTTRelicArm3796(hardwareMap.dcMotor.get(\"relic_up_down\"), hardwareMap.dcMotor.get(\"relic_out_in\"), hardwareMap.dcMotor.get(\"relic_grab\"));\n //We never ended up having a relic arm!\n //The lift helper will set the idle power of the motor to a small double, keeping the lift from idly falling down\n boolean liftHelper = false;\n int i = 0;\n\n waitForStart();\n\n colorArm.armUp();\n\n while (opModeIsActive()) {\n //Here is where we define how the controllers should work\n //In theory, no logic retaining to controlling the components should be in here\n\n /*\n * Drive\n */\n\n //The left drive wheel is controlled by the opposite value of the left stick's y value on the first gamepad\n //The right drive is the same way except with the right drive wheel\n drive.leftDrive(-gamepad1.left_stick_y);\n drive.rightDrive(-gamepad1.right_stick_y);\n\n /*\n * Lift\n */\n telemetry.addData(\"Gamepad2 Right Stick Y\", -gamepad2.right_stick_y);\n\n if (-gamepad2.right_stick_y > 0) {\n //First checks to see if the right stick's negative y value is greater then zero.\n lift.moveMotor(-gamepad2.right_stick_y);\n //If it is, it sets the power for the motor to 1, and adds telemetry\n telemetry.addData(\"Lift Power\", 1);\n } else if (-gamepad2.right_stick_y < 0) {\n //Checks if the negative value of the right right stick's y position is less than zero\n lift.moveMotor(-0.1);\n //Sets the power for the motor to -0.1, and adds telemetry\n telemetry.addData(\"Lift Power\", -0.1);\n } else {\n //We check to see if the liftHelper is enabled\n if(liftHelper) {\n lift.moveMotor(0.1466 );\n } else {\n lift.moveMotor(0);\n }\n }\n\n\n\n /*\n * Lift helper control\n */\n\n if(gamepad2.a) {\n if(i == 0) {\n liftHelper = !liftHelper;\n }\n i = 5;\n }\n\n if(i != 0) {\n i--;\n }\n\n telemetry.addData(\"Lift Helper Enabled\", liftHelper);\n\n\n\n /*\n * Grabbers\n */\n if (gamepad2.left_trigger > 0) {\n //Closes the left arm, then displays the position in telemetry\n grabber.leftArmClose();\n double a = grabber.leftPosition();\n //Adds telemetry to display positions of grabbers, mostly for testing, but can be useful later on\n telemetry.addData(\"Left\", a);\n }\n\n if (gamepad2.left_bumper) {\n //Opens the left arm, then displays the position in telemetry\n grabber.leftArmOpen();\n double b = grabber.leftPosition();\n //We made the variables different as to avoid any and all possible errors\n telemetry.addData(\"Left\", b);\n }\n\n if (gamepad2.right_trigger > 0) {\n //Opens the right arm, then displays the position in telemetry\n grabber.rightArmClose();\n double c = grabber.rightPosition();\n telemetry.addData(\"Right\", c);\n }\n\n if (gamepad2.right_bumper) {\n //Closes the right arm, then displays the position in telemetry\n grabber.rightArmOpen();\n double d = grabber.rightPosition();\n telemetry.addData(\"Right\", d);\n }\n\n if (gamepad2.dpad_left){\n //Closes the left arm to a shorter distance\n grabber.leftArmShort();\n }\n\n if(gamepad2.dpad_right){\n //Closes the right arm to a shorter distance\n grabber.rightArmShort();\n\n }\n\n //Update all of our telemetries at once so we can see all of it at the same time\n telemetry.update();\n }\n }", "public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }", "@Override\n protected void execute() {\n double armSpeed;\n\n \n //Auxilary controller\n if (Constants.operatorBoardMode == 1) {\n\n armSpeed = -OI.operatorController.getRawAxis(RobotMap.armAxisAuxPort)*0.75;\n\n //Button pad\n } else {\n armSpeed = OI.operatorRightPad.getRawAxis(RobotMap.armAxisPort)*0.75;\n if (armSpeed < 0) armSpeed = OI.operatorRightPad.getRawAxis(RobotMap.armAxisPort)*0.5;\n }\n\n //bring the arm in if it falls out from inertia\n if (Math.abs(armSpeed) < 0.1 && Robot.myArm.getEncoderCount() < -20 && Robot.myArm.getEncoderCount() > -700) {\n\n armSpeed = -0.5;\n }\n\n Robot.myArm.setArmSpeed(armSpeed);\n \n }", "public void loop() {\n\n double driveMult = gamepad1.left_bumper ? 0.5 : (gamepad1.right_bumper ? 0.2 : 1.0);\n\n double x = gamepad1.left_stick_x;\n double y = gamepad1.left_stick_y;\n\n switch (state) {\n case DRIVE:\n left.setPower(driveMult * (y - x));\n right.setPower(driveMult * (y + x));\n break;\n case REVERSE:\n left.setPower(driveMult * -(y + x));\n right.setPower(driveMult * -(y - x));\n break;\n case TANK:\n left.setPower(driveMult * gamepad1.left_stick_y);\n right.setPower(driveMult * gamepad1.right_stick_y);\n break;\n }\n\n if (gamepad1.dpad_up) {\n state = State.DRIVE;\n } else if (gamepad1.dpad_down) {\n state = State.REVERSE;\n } else if (gamepad1.dpad_left) {\n state = State.TANK;\n }\n\n // AUX CONTROLS\n\n double auxMult = gamepad2.left_bumper ? 0.5 : (gamepad2.right_bumper ? 0.2 : 1.0);\n\n rack.setPower(auxMult * ((gamepad2.dpad_up ? 1 : 0) + (gamepad2.dpad_down ? -1 : 0)));\n\n // extend.setPower(auxMult * gamepad2.left_stick_y);\n slurp.setPower(auxMult * gamepad2.right_stick_y);\n\n\n// if (gamepad2.a) {\n// rack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// rack.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// }\n\n // TELEMETRY\n\n telemetry.addData(\"Drive Mode: \", state);\n telemetry.addData(\"Rack Encoder: \", rack.getCurrentPosition());\n telemetry.addData(\"G2 RS Y: \", gamepad2.right_stick_y);\n }", "double scale_motor_power(double p_power) //Scales joystick value to output appropriate motor power\n {Scales joystick value to output appropriate motor power\n { //Use like \"scale_motor_power(gamepad1.left_stick_x)\"\n //\n // Assume no scaling.\n //\n double l_scale = 0.0;\n\n //\n // Ensure the values are legal.\n //\n double l_power = Range.clip(p_power, -1, 1);\n\n double[] l_array =\n {0.00, 0.05, 0.09, 0.10, 0.12\n , 0.15, 0.18, 0.24, 0.30, 0.36\n , 0.43, 0.50, 0.60, 0.72, 0.85\n , 1.00, 1.00\n };\n\n //\n // Get the corresponding index for the specified argument/parameter.\n //\n int l_index = (int) (l_power * 16.0);\n if (l_index < 0) {\n l_index = -l_index;\n } else if (l_index > 16) {\n l_index = 16;\n }\n\n if (l_power < 0) {\n l_scale = -l_array[l_index];\n } else {\n l_scale = l_array[l_index];\n }\n\n return l_scale;\n\n }", "public void setPower(int power) {\n \t\tthis.power = power;\n \t}", "@Override\n protected void end() {\n Robot.m_drive.SetPower(0);\n }", "public static void driveMode(){\n\n\t\tSmartDashboard.putBoolean(\"Is Climbing:\", TalonDio.climbEncodDio(Actuators.getClimbMotor()));\n\t\tSmartDashboard.putBoolean(\"Is Driving:\", TalonDio.driveEncodDio(Actuators.getLeftDriveMotor(), Actuators.getRightDriveMotor()));\n\t\tSmartDashboard.putBoolean(\"Is Intake Disabled:\", Intake.intakeDisabled);\n\t\tSmartDashboard.putNumber(\"motorSpeed\", Intake.intakeMotorSpeed);\n\t\tSmartDashboard.putNumber(\"conveyorMotorSpeed\", Score.conveyorMotorSpeed);\n\t\tSmartDashboard.putBoolean(\"Intake Motor Inverted?:\", Actuators.getFuelIntakeMotor().getInverted());\n\t\tSmartDashboard.putBoolean(\"Is Climbing Motor Stalling:\", TalonDio.CIMStall(Actuators.getClimbMotor()));\n\n\t\t\n\n\t\tSmartDashboard.putBoolean(\"Is Climbing:\", TalonDio.climbEncodDio(Actuators.getClimbMotor()));\n\t\tSmartDashboard.putBoolean(\"Is Driving:\", TalonDio.driveEncodDio(Actuators.getLeftDriveMotor(), Actuators.getRightDriveMotor()));\n\t\tSmartDashboard.putBoolean(\"Is Climbing Motor Stalling:\", TalonDio.CIMStall(Actuators.getClimbMotor()));\n\t\tSmartDashboard.putNumber(\"Total Current Draw:\", SensorsDio.PDPCurrent(Sensors.getPowerDistro()));\n\n\t\n\t//TODO: Add Gear Vibrations for both controllers\n\t//Vibration Feedback\n\t\t//Sets the Secondary to vibrate if climbing motor is going to stall\n\t\tVibrations.climbStallVibrate(Constants.MAX_RUMBLE);\t\n\t\t//If within the second of TIME_RUMBLE then both controllers are set to HALF_RUMBLE\n\t\tVibrations.timeLeftVibrate(Constants.HALF_RUMBLE, Constants.TIME_RUMBLE);\t\n\t\t\n\t}", "@Override\n public void runOpMode () {\n motor1 = hardwareMap.get(DcMotor.class, \"motor1\");\n motor2 = hardwareMap.get(DcMotor.class, \"motor2\");\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n //Wait for game to start (driver presses PLAY)\n waitForStart();\n\n /*\n the overridden runOpMode method happens with every OpMode using the LinearOpMode type.\n hardwareMap is an object that references the hardware listed above (private variables).\n The hardwareMap.get method matches the name of the device used in the configuration, so\n we would have to change the names (ex. motorTest to Motor 1 or Motor 2 (or something else))\n if not, the opMode won't recognize the device\n\n in the second half of this section, it uses something called telemetry. In the first and\n second lines it sends a message to the driver station saying (\"Status\", \"Initialized\") and\n then it prompts the driver to press start and waits. All linear functions should have a wait\n for start command so that the robot doesn't start executing the commands before the driver\n wants to (or pushes the start button)\n */\n\n //run until end of match (driver presses STOP)\n double tgtpower = 0;\n while (opModeIsActive()) {\n telemetry.addData(\"Left Stick X\", this.gamepad1.left_stick_x);\n telemetry.addData(\"Left Stick Y\", this.gamepad1.left_stick_y);\n telemetry.addData(\"Right Stick X\", this.gamepad1.right_stick_x);\n telemetry.addData(\"Right Stick Y\", this.gamepad1.right_stick_y);\n if (this.gamepad1.left_stick_y < 0){\n tgtpower=-this.gamepad1.left_stick_y;\n motor1.setPower(tgtpower);\n motor2.setPower(-tgtpower);\n }else if (this.gamepad1.left_stick_y > 0){\n tgtpower=this.gamepad1.left_stick_y;\n motor1.setPower(-tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x > 0){\n tgtpower=this.gamepad1.left_stick_x;\n motor1.setPower(tgtpower);\n motor2.setPower(tgtpower);\n }else if (this.gamepad1.left_stick_x < 0){\n tgtpower=-this.gamepad1.left_stick_x;\n motor1.setPower(-tgtpower);\n motor2.setPower(-tgtpower);\n }else{\n motor1.setPower(0);\n motor2.setPower(0);\n }\n telemetry.addData(\"Motor1 Power\", motor1.getPower());\n telemetry.addData(\"Motor2 Power\", motor2.getPower());\n telemetry.addData(\"Status\", \"Running\");\n telemetry.update ();\n\n\n /*\n if (this.gamepad1.right_stick_x == 1){\n //trying to make robot turn right, == 1 may be wrong\n motor2.setPower(-1);\n }\n else if (this.gamepad1.right_stick_x == -1){\n //trying to make robot turn left, == -1 may be wrong\n motor1.setPower(-1);\n }\n else {\n\n }\n */\n\n\n /*\n After the driver presses start,the opMode enters a while loop until the driver presses stop,\n while the loop is running it will continue to send messages of (\"Status\", \"Running\") to the\n driver station\n */\n\n\n }\n }", "public void rdrive(double speed){\n right1.set(ControlMode.PercentOutput, -speedRamp(speed));\n right2.set(ControlMode.PercentOutput, -speedRamp(speed));\n }", "private void localSetWheelPower(double _fl, double _fr, double _bl,\n double _br) {\n Optional<Bot> possibleBot = BaseStation.getInstance().getBotManager()\n .getBotByName(botName);\n if (possibleBot.isPresent()) {\n // if bot exists, make it mine\n Bot myBot = possibleBot.get();\n\n if (myBot.getCommandCenter() instanceof FourWheelMovement) {\n // command center is correctly referenced\n FourWheelMovement fwmCommandCenter = (FourWheelMovement) myBot\n .getCommandCenter();\n fwmCommandCenter.setWheelPower(_fl, _fr, _bl, _br);\n }\n }\n }", "@Override\n public void execute() {\n Robot.driveBase.arcadeDrive(Robot.oi.driver.getLeftY() * m_powerScale, Robot.oi.driver.getRightX() * m_powerScale, false);\n }", "@Override\n public void runOpMode() {\n ringShooterMotor1 = hardwareMap.get(DcMotorEx.class, \"ringShooterMotor1\");\n ringShooterMotor2 = hardwareMap.get(DcMotorEx.class, \"ringShooterMotor2\");\n ringFeederServo = hardwareMap.get(Servo.class, \"ringFeederServo\");\n ringFeederServo.setPosition(0.6); // sets initial position of servo\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n // runs until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n\n // here: add telemetry to see motor velocity if you want\n telemetry.addData(\"ring motor velocity\", ringShooterMotor1.getVelocity());\n telemetry.update();\n\n\n // Press right trigger for ring feeder servo\n if (gamepad2.right_trigger == 1) {\n// if (ringShooterMotor1.getVelocity() <= powerShootMotorVelocity){\n ringFeederServo.setPosition(1);\n sleep(300);\n ringFeederServo.setPosition(0.6);\n// }\n }\n\n // press Y for shooter motor for tower goal\n if (gamepad2.y) {\n ringShooterMotor1.setVelocity(towerGoalMotorVelocity);\n ringShooterMotor2.setVelocity(towerGoalMotorVelocity);\n\n }\n\n // press X for shooter motor for powershot\n if (gamepad2.x) {\n ringShooterMotor1.setVelocity(powerShootMotorVelocity);\n ringShooterMotor2.setVelocity(powerShootMotorVelocity);\n\n }\n }\n }", "boolean run(final double POWER)\n {\n boolean success = true; // Tells whether attempt to power lift is successful or not\n\n try\n {\n _motor.setPower(POWER);\n }\n catch(Exception e)\n {\n Log.e(\"Error\" , \"Cannot power lift, check your mapping\");\n success = false;\n }\n\n return success;\n }", "public void forward(double targetDistance, double power) {\n setDriveMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n setDriveMode(DcMotor.RunMode.RUN_USING_ENCODER);\n double targetDistanceTicks = Math.abs(targetDistance * ticksPerCm);\n double currentDistanceTicks = 0;\n while ((Math.abs(currentDistanceTicks) < targetDistanceTicks) && opModeIsActive()) {\n telemetry.addData(\"Target pos ticks: \", targetDistanceTicks);\n telemetry.addData(\"Target Distance:\", targetDistance + \"cm\");\n currentDistanceTicks = (frontRight.getCurrentPosition() +\n frontLeft.getCurrentPosition() +\n backRight.getCurrentPosition() +\n backLeft.getCurrentPosition()) / 4.0;\n telemetry.addData(\"Current pos ticks Avg: \", currentDistanceTicks);\n telemetry.addData(\"Current Distance cm\", currentDistanceTicks / ticksPerCm);\n telemetry.update();\n\n frontLeft.setPower(-power);\n frontRight.setPower(-power);\n backLeft.setPower(-power);\n backRight.setPower(-power);\n }\n stopMotors();\n }", "public void action() {\r\n\t\tsuppressed = false;\r\n\t\tMotor.B.stop();\r\n\t\tMotor.C.stop();\r\n\t\tDelay.msDelay(1000);\r\n\t\tMotor.B.setSpeed(180);\r\n\t\tMotor.C.setSpeed(180);\r\n\t\tMotor.B.forward();\r\n\t\tMotor.C.forward();\r\n\t\tif((light.getLightValue()>46 && light.getLightValue()<49) || (light.getLightValue()>27 && light.getLightValue()<31)){\r\n\t\t\tMotor.B.stop();\r\n\t\t\tMotor.C.stop();\r\n\t\t\tDelay.msDelay(500);\r\n\t\t\tMotor.B.forward();\r\n\t\t\tMotor.C.forward();\r\n\t\t\tif(light.getLightValue()>44 && light.getLightValue()<45){//home base\r\n\t\t\t\tMotor.B.stop();\r\n\t\t\t\tMotor.C.stop();\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!suppressed){\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t}", "public void init(HardwareMap hwMap) {\r\n\r\n //DRIVE//\r\n front_left = hwMap.dcMotor.get(\"front_left\");\r\n front_right = hwMap.dcMotor.get(\"front_right\");\r\n back_left = hwMap.dcMotor.get(\"back_left\");\r\n back_right = hwMap.dcMotor.get(\"back_right\");\r\n\r\n hook = hwMap.dcMotor.get(\"hook\");\r\n\r\n //intake1 = hwMap.servo.get(\"intake1\");\r\n //intake2 = hwMap.servo.get(\"intake2\");\r\n //intake3 = hwMap.servo.get(\"intake3\");\r\n //intake4 = hwMap.servo.get(\"intake4\");\r\n\r\n phone = hwMap.servo.get(\"phone\");\r\n marker = hwMap.servo.get(\"marker\");\r\n\r\n //linSlide1 = hwMap.dcMotor.get(\"lin_slide1\");\r\n //linSlide2 = hwMap.dcMotor.get(\"lin_slide2\");\r\n\r\n //arm_motor_1 = hwMap.dcMotor.get(\"arm1\");\r\n //arm_motor_2 = hwMap.dcMotor.get(\"arm2\");\r\n\r\n\r\n front_left.setDirection(DcMotor.Direction.FORWARD);\r\n front_right.setDirection(DcMotor.Direction.FORWARD);\r\n back_left.setDirection(DcMotor.Direction.REVERSE);\r\n back_right.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n /* front_left.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n front_right.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n back_left.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n back_right.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n */\r\n hook.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n //linSlide1.setDirection(DcMotor.Direction.FORWARD);\r\n //linSlide1.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n //arm_motor_1.setDirection(DcMotor.Direction.FORWARD);\r\n //arm_motor_2.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n front_left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n front_right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n back_left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n back_right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n\r\n //encoder1 = hwMap.analogInput.get(\"encoder1\");\r\n //encoder2 = hwMap.analogInput.get(\"encoder2\");\r\n\r\n imu = hwMap.get(BNO055IMU.class, \"imu\");\r\n }", "public void setPower(double pow){\n if(pow > 0) {\n crServo.setPower(ZERO_POWER_POSITION + (1 - ZERO_POWER_POSITION) * pow);\n } else if (pow < 0) {\n crServo.setPower(ZERO_POWER_POSITION * (1 + pow));\n } else {\n crServo.setPower(ZERO_POWER_POSITION);\n }\n }", "@Override\n public void setPower(double power) {\n\n }", "public void setPower(int power) {\n\t\t\r\n\t}", "protected void execute() {\n double rightSpeed, leftSpeed, x, y;\n //Set x and y to their axis values\n x = driver.getRawAxis(InputConstants.rightXAxis);\n y = driver.getRawAxis(InputConstants.leftYAxis);\n //Drive Smoothing\n\n //Set the left and rightspeed using x and y\n leftSpeed = y - x;\n rightSpeed = y + x;\n \n\n //Set the left and right side of the drive\n driveTrain.setLeftVBus(-leftSpeed);\n driveTrain.setRightVBus(-rightSpeed);\n\n\n\n }", "@Override\r\n public void start() {\r\n runtime.reset();\r\n FL.setPower(1);\r\n FR.setPower(1);\r\n BR.setPower(1);\r\n BL.setPower(1);\r\n try{\r\n Thread.sleep(850);\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); \r\n }", "public void drive(double direction, double speed) {\n if (mode != SwerveMode.Disabled) {\n for (SwerveModule mod: modules) {\n mod.setSetpoint(direction);\n }\n \t\tmodules.get(0).setSpeed(speed * -1);\n \t\tmodules.get(1).setSpeed(speed);\n \t\tmodules.get(2).setSpeed(speed * -1);\n \t\tmodules.get(3).setSpeed(speed);\n\n\n }\n\n}" ]
[ "0.7226187", "0.7159613", "0.7001959", "0.69388634", "0.68468267", "0.6819414", "0.6718352", "0.66439134", "0.6643332", "0.66162765", "0.6575681", "0.65149987", "0.6446143", "0.640966", "0.63919085", "0.632715", "0.63151336", "0.63042325", "0.63011223", "0.62819916", "0.62808555", "0.6273649", "0.6272368", "0.6242726", "0.6239209", "0.6228751", "0.62013", "0.6194355", "0.6187722", "0.61767304", "0.6167987", "0.61648965", "0.6148165", "0.6133068", "0.6117753", "0.61160666", "0.61120933", "0.6104275", "0.60933876", "0.60714656", "0.60662585", "0.6062562", "0.6056098", "0.6045108", "0.6044856", "0.6022399", "0.6021164", "0.60176736", "0.6016715", "0.6014145", "0.6003179", "0.59970325", "0.599562", "0.5988398", "0.598", "0.59778243", "0.5975809", "0.59751314", "0.59661955", "0.59608406", "0.59560364", "0.5953369", "0.5948911", "0.5947768", "0.5942857", "0.59377927", "0.5936876", "0.5930432", "0.5928931", "0.5920981", "0.5901456", "0.58977515", "0.5881251", "0.5875284", "0.5872811", "0.5864854", "0.58535546", "0.58493346", "0.5845459", "0.58432335", "0.5841071", "0.58384234", "0.5832022", "0.5831886", "0.5820035", "0.5819573", "0.58150864", "0.58098", "0.5806467", "0.57842076", "0.5783512", "0.57803774", "0.5775597", "0.5774165", "0.5771448", "0.5761162", "0.5756582", "0.5753482", "0.57530254", "0.5752502" ]
0.72817415
0
Send the two handservos to opposing (mirrored) positions, based on the passed offset.
public void setHandPositions(double offset) { offset = Range.clip(offset, -0.5, 0.5); leftHand.setPosition(MID_SERVO + offset); rightHand.setPosition(MID_SERVO - offset); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void mate(NeuralPlayer org1, NeuralPlayer org2, NeuralPlayer offspring)\n\t{\n\t\tBasicNetwork newGuy = (BasicNetwork)org1.net.clone();\n\t\tRandom g = new Random();\n\t\tdouble[] genome1 = NetworkCODEC.networkToArray(org1.net);\n\t\tdouble[] genome2 = NetworkCODEC.networkToArray(org2.net);\n\t\t\n\t\tint numCrosses = 1;//g.nextInt(20)+2;//g.nextInt(genome1.length/4)+1;\n\t\tfor (int j = 0; j< numCrosses; j++)\n\t\t{\n\t\t\tint crossIndex = g.nextInt(genome1.length);\n\t\t\t//int crossLength = g.nextInt(genome1.length)+1;//g.nextInt(50);\n\t\t\t//int stop = Math.min(crossIndex+crossLength,genome1.length);\n\t\t\tfor (int i = crossIndex; i<genome1.length; i++)\n\t\t\t\tgenome2[i] = genome1[i]; // 1 point crossover\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome2, newGuy);\n\t\toffspring.net = newGuy;\n\t}", "public void sendMoveLookPacket(int entityId, Vector offset, byte yaw, byte pitch) {\n short x = (short) (offset.getX() * 4096);\n short y = (short) (offset.getY() * 4096);\n short z = (short) (offset.getZ() * 4096);\n\n // In newer versions, a short is used for relative move packets, but in 1.13 and under, a long is used\n if(ReflectUtils.useNewEntitySpawnAndMoveImpl) {\n sendPacket(ReflectUtils.newInstance(\"PacketPlayOutEntity$PacketPlayOutRelEntityMoveLook\", \n new Class[]{int.class, short.class, short.class, short.class, byte.class, byte.class, boolean.class},\n new Object[]{entityId, x, y, z, yaw, pitch, true}));\n } else {\n sendPacket(ReflectUtils.newInstance(\"PacketPlayOutEntity$PacketPlayOutRelEntityMoveLook\", \n new Class[]{int.class, long.class, long.class, long.class, byte.class, byte.class, boolean.class},\n new Object[]{entityId, (long) x, (long) y, (long) z, yaw, pitch, true}));\n }\n }", "public void\nshiftToOrigin()\n{\n\tthis.setLine(0.0, 0.0,\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n}", "private static void applyPresenter2FromBToAChanges(\n final int offset, @NonNull final ListUpdateCallback callback) {\n callback.onMoved(4 + offset, offset);\n // [M, P, X, Y, Z] -> [M, P]\n callback.onRemoved(2 + offset, 3);\n // [M, P] -> [M, N, O, P]\n callback.onInserted(1 + offset, 2);\n }", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "private void moveAllignedMhos() {\n\n\t\t//Assign playerX and playerY to the X and Y of the player\n\t\tint playerX = getNewPlayerLocation()[0];\n\t\tint playerY = getNewPlayerLocation()[1];\n\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\n\t\t\t//set the default X and Y offsets to 0, and the move to NO_MOVEMENT\n\t\t\tint xOffset = 0;\n\t\t\tint yOffset = 0;\n\t\t\tchar move = Legend.NO_MOVEMENT;\n\n\t\t\t//Check if the playerX is equal to mhoX (aligned on x-axis)\n\t\t\tif(playerX == mhoX) {\n\n\t\t\t\t//Check which direction the mho would have to move, and assign the corresponding move and yOffset\n\t\t\t\tif(playerY > mhoY) {\n\t\t\t\t\tyOffset = 1;\n\t\t\t\t\tmove = Legend.DOWN;\n\t\t\t\t} else {\n\t\t\t\t\tyOffset = -1;\n\t\t\t\t\tmove = Legend.UP;\n\t\t\t\t}\n\t\t\t} else if(playerY == mhoY) {\n\n\t\t\t\t//Check which direction the mho would have to move, and assign the corresponding move and XOffset\n\t\t\t\tif(playerX > mhoX) {\n\t\t\t\t\txOffset = 1;\n\t\t\t\t\tmove = Legend.RIGHT;\n\t\t\t\t} else {\n\t\t\t\t\txOffset = -1;\n\t\t\t\t\tmove = Legend.LEFT;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Only move if the new location is not an instance of mho (in order to make sure they are moved in the right order)\n\t\t\tif(!(newMap[mhoX+xOffset][mhoY+yOffset] instanceof Mho)) {\n\n\t\t\t\t//Set the previous location to a BlankSpace\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\n\t\t\t\t//If the new square would be a player, end the game\n\t\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof Player) {\n\t\t\t\t\tmoveList[mhoX+xOffset][mhoY+yOffset] = Legend.SHRINK;\n\t\t\t\t\tgameOver();\n\t\t\t\t}\n\n\t\t\t\t//If the new square would be a fence, remove the mho from the map\n\t\t\t\tif(!(newMap[mhoX+xOffset][mhoY+yOffset] instanceof Fence)) {\n\t\t\t\t\tnewMap[mhoX+xOffset][mhoY+yOffset] = new Mho(mhoX+xOffset, mhoY+yOffset, board);\n\t\t\t\t} else {\n\t\t\t\t\tmove = Legend.SHRINK;\n\t\t\t\t}\n\n\t\t\t\t//Set the move of the mho on moveList\n\t\t\t\tmoveList[mhoX][mhoY] = move;\n\n\t\t\t\t//remove the mhoX and mhoY in mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\n\t\t\t\t//Call moveAllignedMhos() again, because the list failed to be checked through completely\n\t\t\t\tmoveAllignedMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public void Move(float offset) {\n\t\tif(mApplications.get(CurIndex).getZ() == Constants.displayedPlace)\r\n\t\t{\r\n\t\t\tLog.d(TAG, \"Move offset:\"+offset);\r\n\t\t\tif(offset > 0)\r\n\t\t\t{\r\n\t\t\t\tsetReadyNext();\r\n\t\t\t}\r\n\t\t\telse if(offset < 0)\r\n\t\t\t{\r\n\t\t\t\tsetReadyPre();\r\n\t\t\t}\r\n\t\t}\r\n\t\tApplicationInfo.setOffset(offset);\r\n\t}", "void playRoadCard(EdgeLocation spot1, EdgeLocation spot2);", "private Point move(Point[] players, int[] chat_ids, Point self)\n\t{\n\t\t//Move to a new position within the room anywhere within 6 meters of your current position. Any conversation you were previously engaged in is terminated: you have to be stationary to chat.\n\t\t//Initiate a conversation with somebody who is standing at a distance between 0.5 meters and 2 meters of you. In this case you do not move. You can only initiate a conversation with somebody on the next turn if they and you are both not currently engaged in a conversation with somebody else. \t\n\t\tint i = 0, target = 0;\n\t\twhile (players[i].id != self_id) i++;\n\t\t//look through players who are within 6 meters => Point[] players\n\t\tPoint p = self;\n for (target = 0; target<players.length; ++target) {\n\t\t\t//if we do not contain any information on them, they are our target => W[]\n\t\t\tif (W[p.id] != -1 || p.id == self.id) continue;\n p = players[target];\n }\n if (p.equals(self)) {\n for (target = 0; target < players.length; ++target) {\n if (W[p.id] == 0 || p.id == self.id) continue;\n p = players[target];\n }\n }\n if (!p.equals(self)) {\n\t\t\t// compute squared distance\n\t\t\tdouble dx1 = self.x - p.x;\n\t\t\tdouble dy1 = self.y - p.y;\n\t\t\tdouble dd1 = dx1 * dx1 + dy1 * dy1;\n\t\t\t//check if they are engaged in conversations with someone\n\t\t\tint chatter = 0;\n\t\t\twhile (chatter<players.length && players[chatter].id != chat_ids[target]) chatter++;\n\n\t\t\t//check if they are engaged in conversations with someone and whether that person is in our vicinity\n\t\t\tif(chat_ids[target]!=p.id && chatter!=players.length)\n\t\t\t{\n\t\t\t\t//if they are, we want to stand in front of them, .5 meters in the direction of who they're conversing with => check if result is within 6meters\n\t\t\t\tPoint other = players[chatter];\n\t\t\t\tdouble dx2 = self.x - other.x;\n\t\t\t\tdouble dy2 = self.y - other.y;\n\t\t\t\tdouble dd2 = dx2 * dx2 + dy2 * dy2;\n\n\t\t\t\tdouble dx3 = dx2-dx1;\n\t\t\t\tdouble dy3 = dy2-dy1;\n\t\t\t\tdouble dd3 = Math.sqrt(dx3 * dx3 + dy3 * dy3);\n\n\t\t\t\tdouble dx4 = (dx2 - 0.5*(dx3/dd3)) * -1;\n\t\t\t\tdouble dy4 = (dy2 - 0.5*(dy3/dd3)) * -1;\n\t\t\t\tdouble dd4 = dx4 * dx4 + dy4 * dy4;\n\n\t\t\t\tif (dd4 <= 2.0)\n\t\t\t\t\treturn new Point(dx4, dy4, self.id);\n }\n\t\t\t//if not chatting to someone or don't know position of chatter, just get as close to them as possible\n\t\t\telse return new Point((dx1-0.5*(dx1/dd1)) * -1, (dy1-0.5*(dy1/dd1)) * -1, self.id);\t\t\t\t\n\t\t}\n\n\t\t\tdouble dir = random.nextDouble() * 2 * Math.PI;\n\t\t\tdouble dx = 6 * Math.cos(dir);\n\t\t\tdouble dy = 6 * Math.sin(dir);\n\t\t\treturn new Point(dx, dy, self_id);\n\t}", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "public static void borderExchange(double[] a, int width, int height,\n\t\t\t\t\t\t\t\t\t int off, int stride, int ySize)\n\tthrows Exception\n\t{\n\n\t\tint part1 = myCPU-1;\n\t\tint part2 = myCPU+1;\n\t\tint xSize = width+stride;\n\n\n\t\t// Send to first partner and receive from second partner\n\n\t\tif (part1 >= 0) {\n\t\t\tif (sps[part1] == null) {\n\t\t\t\tsps[part1] = ibis.createSendPort(portType);\n\t\t\t\tsps[part1].connect(world[part1], COMM_ID + myCPU);\n\t\t\t}\n\t\t\tWriteMessage w = sps[part1].newMessage();\n\t\t\tw.writeArray(a, off - stride/2, xSize*ySize);\n\t\t\tw.finish();\n\t\t}\n\t\tif (part2 < PxSystem.nrCPUs()) {\n\t\t\tif (rps[part2] == null) {\n\t\t\t\trps[part2] = ibis.createReceivePort(portType,\n\t\t\t\t\t\t\t\t\t\t\t\tCOMM_ID + part2);\n\t\t\t\trps[part2].enableConnections();\n\t\t\t}\n\t\t\tReadMessage r = rps[part2].receive();\n\t\t\tr.readArray(a, off - stride/2 + height*xSize, xSize*ySize);\n\t\t\tr.finish();\n\n\t\t// Send to second partner and receive from first partner\n\n\t\t\tif (sps[part2] == null) {\n\t\t\t\tsps[part2] = ibis.createSendPort(portType);\n\t\t\t\tsps[part2].connect(world[part2], COMM_ID + myCPU);\n\t\t\t}\n\t\t\tWriteMessage w = sps[part2].newMessage();\n\t\t\tw.writeArray(a, off - stride/2 + (height-ySize)*xSize,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\txSize*ySize);\n\t\t\tw.finish();\n\t\t}\n\t\tif (part1 >= 0) {\n\t\t\tif (rps[part1] == null) {\n\t\t\t\trps[part1] = ibis.createReceivePort(portType,\n\t\t\t\t\t\t\t\t\t\t\t\tCOMM_ID + part1);\n\t\t\t\trps[part1].enableConnections();\n\t\t\t}\n\t\t\tReadMessage r = rps[part1].receive();\n\t\t\tr.readArray(a, 0, xSize*ySize);\n\t\t\tr.finish();\n\t\t}\n\t}", "private static void applyPresenter2FromAToBChanges(\n final int offset, @NonNull final ListUpdateCallback callback) {\n callback.onMoved(3 + offset, offset);\n // [P, M, N, O] -> [P, M]\n callback.onRemoved(2 + offset, 2);\n // [P, M] -> [P, X, Y, Z, M]\n callback.onInserted(1 + offset, 3);\n }", "private void sendmessage(int new_offset[], int[] port_list) {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * \n\t\t\t * port_list has the port of all processes. Message will be sent to\n\t\t\t * all process.\n\t\t\t * \n\t\t\t */\n\n\t\t\tfor (int i = 0; i < port_list.length; i++) {\n\t\t\t\tSocket processClient = new Socket(\"localhost\", port_list[i]);\n\t\t\t\tprocessClient.setReuseAddress(true);\n\t\t\t\tOutputStream processStream = processClient.getOutputStream();\n\t\t\t\tBufferedWriter processWriter = new BufferedWriter(\n\t\t\t\t\t\tnew OutputStreamWriter(processStream));\n\n\t\t\t\tprocessWriter.write(\"Master: Offset =\" + new_offset[i]);\n\n\t\t\t\t// System.out.println(\"Sending data from Master to other process running on \"\n\t\t\t\t// + port_list[i]);\n\n\t\t\t\tprocessWriter.flush();\n\t\t\t\t// processWriter.close();\n\t\t\t\tprocessClient.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void sendMovement(int[] receiverIds, int userId, float[] targetPosition) {\n\t\tList<SocketConnection> connectionList = SocketController.getConnectionList();\n\t\tfor (SocketConnection connection : connectionList) {\n\t\t\tif (connection.getName().startsWith(GatewayServerNamePrefix)) {\n\t\t\t\tTransferObjectFactory transferObjectFactoryGateway = new TransferObjectFactory(connection.getName(), true);\n\t\t\t\t\n\t\t\t\tNewTransferObject to = transferObjectFactoryGateway.createNewTransferObject();\n\t\t\t\tto.setCalleeMethod(\"executeServerCall\");\n\t\t\t\tto.putString(\"receiveMovement\");\n\t\t\t\tto.putIntArray(receiverIds);\n\t\t\t\tto.putInt(userId);\n\t\t\t\tto.putFloatArray(targetPosition);\n\t\t\t\tto.registerReturnType(TransferObject.DATATYPE_VOID);\n\n\t\t\t\tServerExecutor.execute(to);\n\t\t\t}\n\t\t}\n\t}", "private void connectOnLine(int index1, int index2) {\n\t\tif (index1 < index2) {\n\t\t\tcopyOfChunks.get(index1).addPointer(getChunks().get(index2), noteForConnection);\n\t\t}\n\t}", "public void mergeWires(int[][] wiresMap, Point offset, List<Wire> wires) {\n \n \n int intersectionMarker = 1; //Initial interceptionMarker, This variables controls\n for (Wire wire : wires) {\n Point last = null;\n for (Point current : wire.getPoints()) {\n if (last == null) {\n last = current;\n } else {\n int direction = (current.x < last.x) ? -1 : 1; //if current x is less than before then is moving to the left\n int difference = Math.abs(current.x - last.x);\n for (int i = 1; i <= difference; i++) {\n int offsetX = offset.x + last.x + (i * direction);\n int offsetY = offset.y + last.y;\n\n if (wiresMap[offsetX][offsetY] == intersectionMarker - 1) {\n wiresMap[offsetX][offsetY]++;\n }\n }\n\n direction = (current.y < last.y) ? -1 : 1; //if current x is less than before then is moving upp\n difference = Math.abs(current.y - last.y);\n for (int i = 1; i <= difference; i++) {\n int offsetX = offset.x + last.x;\n int offsetY = offset.y + last.y + (i * direction);\n\n //It can only by updated if\n if (wiresMap[offsetX][offsetY] == intersectionMarker - 1) {\n wiresMap[offsetX][offsetY]++;\n }\n }\n last = current;\n }\n }\n intersectionMarker++; // For each wire, intersectionMarker is incremented\n }\n }", "public int handler(int offset) {\n return (portA_out & ddrA) | (portA_in & ~ddrA);\n }", "public void offsetCamera(Location offset){\n //updateCoordinateToScreenPosition();\n xCameraOffset = offset.getX();\n yCameraOffset = offset.getY();\n }", "private void dist2Pos2Beacons(){\n double dist = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n //Wenn Distanz ist größer als summe der Radien, dann gibt es keine Überschneidungen\n if (dist > (radius[0] + radius[1])) {\n //Berechne mittlere Distanz zwischen den Empfängern, da sich Kreise nicht überschneiden\n xPos_func = (posReceiver[0][0] + posReceiver[1][0]) / 2;\n yPos_func = (posReceiver[0][1] + posReceiver[1][1]) / 2;\n }\n else {\n double[][] pos = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n //Schnittpunkte sind identisch, Beacon ist exakt zu lokalisieren\n if ((pos[0][0] == pos[1][0]) && (pos[0][1] == pos[1][1])) {\n xPos_func = pos[0][0];\n yPos_func = pos[0][1];\n }else {\n xPos_func = (pos[0][0] + pos[1][0]) / 2;\n yPos_func = (pos[0][1] + pos[1][1]) / 2;\n errRad_func = Math.abs(dist -(radius[0] + radius[1]));\n }\n }\n }", "public abstract void snapPoseToTileMid();", "private void crossover(Chromosome c1, Chromosome c2){\n int split = (int)(Math.random()*c1.getNumWeights());\n \n double[][] m1 = c1.getGeneData();\n double[][] m2 = c2.getGeneData();\n double store;\n \n //Begin the switch\n for(int r=0; r<m1.length; r++){\n //Stop spliting\n if(split <= 0){\n break;\n }\n for(int c=0; c<m1[r].length;c++){\n store = m1[r][c];\n m1[r][c] = m2[r][c];\n m2[r][c] = store;\n split--;\n //Stop spliting\n if(split <= 0){\n break;\n }\n }\n }\n }", "private void dist2Pos3Beacons()\n {\n //Betrachtung bei 3 Empfaengern\n double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[2][1], 2));\n double dist23 = Math.sqrt(Math.pow(posReceiver[1][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[1][1] - posReceiver[2][1], 2));\n\n boolean temp12 = Math.abs(radius[0] - radius[1]) > dist12;\n boolean temp23 = Math.abs(radius[1] - radius[2]) > dist23;\n boolean temp13 = Math.abs(radius[0] - radius[2]) > dist13;\n\n //Zwei Kreise innerhalb eines anderen Kreises\n if ((temp12 && temp23) || (temp12 && temp13) || (temp23 && temp13))\n {\n double f0 = (dist12 / radius[0] + dist13 / radius[0]) / 2;\n double f1 = (dist12 / radius[1] + dist23 / radius[1]) / 2;\n double f2 = (dist12 / radius[2] + dist13 / radius[2]) / 2;\n\n radius[0] = radius[0] * f0;\n radius[1] = radius[1] * f1;\n radius[2] = radius[2] * f2;\n }\n //Kreis 2 in Kreis 1\n if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[0] > radius[1]))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[0],radius[1],radius[2]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kreis 1 in Kreis 2\n else if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[1] > radius[0]))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[1],radius[0],radius[2]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 1\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[0] > radius[2]))//Kreis 3 in 1\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[2],radius[0],radius[1]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 1 in Kreis 3\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[2] > radius[0]))//Kreis 1 in 3\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[0],radius[2],radius[1]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 2\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[1] > radius[2]))//Kreis 3 in 2\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[2],radius[1],radius[0]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 2 in Kreis 3\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[2] > radius[1]))//Kreis 2 ind 3\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[1],radius[2],radius[0]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kein Kreis liegt innerhalb eines Anderen\n else\n {\n\n if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double p1[] = new double[2];\t//x\n double p2[] = new double[2];\t//y\n\n double norm12 = norm(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1]);\n // Verbindungspunkte Kreis 1 und 2\n p1[0] = posReceiver[0][0] + (radius[0]/ norm12) * (posReceiver[1][0] - posReceiver[0][0]); //x-P1\n p1[1] = posReceiver[0][1] + (radius[0]/ norm12) * (posReceiver[1][1] - posReceiver[0][1]); //y-P1\n p2[0] = posReceiver[1][0] + (radius[1]/ norm12) * (posReceiver[0][0] - posReceiver[1][0]); //x-P2\n p2[1] = posReceiver[1][1] + (radius[1]/ norm12) * (posReceiver[0][1] - posReceiver[1][1]); //y-P2\n double m12[] = new double[2];\n m12[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m12[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm23 = norm(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1]);\n // Verbindungspunkte Kreis 2 und 3\n p1[0] = posReceiver[1][0] + (radius[1]/ norm23) * (posReceiver[2][0] - posReceiver[1][0]); //x-P1\n p1[1] = posReceiver[1][1] + (radius[1]/ norm23) * (posReceiver[2][1] - posReceiver[1][1]); //y-P1\n p2[0] = posReceiver[2][0] + (radius[2]/ norm23) * (posReceiver[1][0] - posReceiver[2][0]); //x-P2\n p2[1] = posReceiver[2][1] + (radius[2]/ norm23) * (posReceiver[1][1] - posReceiver[2][1]); //y-P2\n double m23[] = new double[2];\n m23[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m23[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm31 = norm(posReceiver[2][0], posReceiver[2][1], posReceiver[0][0], posReceiver[0][1]);\n // Verbindungspunkte Kreis 3 und 1\n p1[0] = posReceiver[2][0] + (radius[2]/ norm31) * (posReceiver[0][0] - posReceiver[2][0]); //x-P1\n p1[1] = posReceiver[2][1] + (radius[2]/ norm31) * (posReceiver[0][1] - posReceiver[2][1]); //y-P1\n p2[0] = posReceiver[0][0] + (radius[0]/ norm31) * (posReceiver[2][0] - posReceiver[0][0]); //x-P2\n p2[1] = posReceiver[0][1] + (radius[0]/ norm31) * (posReceiver[2][1] - posReceiver[0][1]); //y-P2\n double m31[] = new double[2];\n m31[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m31[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n // Norm der drei Punkte berechnen\n double a_p = Math.sqrt((m12[0] * m12[0]) + (m12[1] * m12[1]));\n double b_p = Math.sqrt((m23[0] * m23[0]) + (m23[1] * m23[1]));\n double c_p = Math.sqrt((m31[0] * m31[0]) + (m31[1] * m31[1]));\n\n double denominator = 2 * (((m12[0] * m23[1]) - (m12[1] * m23[0])) + (m23[0] * m31[1] - m23[1] * m31[0]) + (m31[0] * m12[1] - m31[1] * m12[0]));\n xPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*(-m12[1]) + (c_p * c_p - a_p * a_p)* (-m23[1]) + (a_p * a_p - b_p * b_p)*(-m31[1])));\n yPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*m12[0] + (c_p * c_p - a_p * a_p)* m23[0] + (a_p * a_p - b_p * b_p)*m31[0]));\n errRad_func = norm(xPos_func, yPos_func, m12[0], m12[1]);\n\n }\n // Kreis 1 und 3 schneiden sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc2Circle(posRec,rad);\n }\n //Kreis 2 und 3 schneide sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc2Circle(posRec,rad);\n }\n //Kreis 1 und 2 schneiden sich\n else if ((dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc2Circle(posRec,rad);\n }\n else if ((dist12 > (radius[0] + radius[1])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc1Circle(posRec,rad);\n }\n else if ((dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc1Circle(posRec,rad);\n }\n else if ((dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc1Circle(posRec,rad);\n }\n else\n {\n double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n double pos12[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n double pos23[][] = circlepoints2(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1], radius[1], radius[2]);\n double pos13[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[2][0], posReceiver[2][1], radius[0], radius[2]);\n\n if(radius[0] >= norm(pos23[0][0],pos23[0][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[0][0];\n y1 = pos23[0][1];\n }\n else if(radius[0] >= norm(pos23[1][0], pos23[1][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[1][0];\n y1 = pos23[1][1];\n }\n\n if(radius[1] >= norm(pos13[0][0], pos13[0][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[0][0];\n y2 = pos13[0][1];\n }\n else if(radius[1] >= norm(pos13[1][0], pos13[1][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[1][0];\n y2 = pos13[1][1];\n }\n\n if(radius[2] >= norm(pos12[0][0], pos12[0][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[0][0];\n y3 = pos12[0][1];\n }\n else if(radius[2] >= norm(pos12[1][0], pos12[1][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[1][0];\n y3 = pos12[1][1];\n }\n\n double tempD = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;\n\n xPos_func = (0.5*(\n -y1*(y2*y2)\n +y1*(y3*y3)\n -y1*(x2*x2)\n +y1*(x3*x3)\n\n +y2*(y1*y1)\n -y2*(y3*y3)\n +y2*(x1*x1)\n -y2*(x3*x3)\n\n -y3*(y1*y1)\n +y3*(y2*y2)\n -y3*(x1*x1)\n +y3*(x2*x2)\n ))/ tempD;\n\n yPos_func = (0.5*(\n +x1*(x2*x2)\n -x1*(x3*x3)\n +x1*(y2*y2)\n -x1*(y3*y3)\n\n -x2*(x1*x1)\n +x2*(x3*x3)\n -x2*(y1*y1)\n +x2*(y3*y3)\n\n +x3*(x1*x1)\n -x3*(x2*x2)\n +x3*(y1*y1)\n -x3*(y2*y2)\n ))/ tempD;\n\n errRad_func = norm(x1, y1, xPos_func, yPos_func);\n }\n }\n }", "boolean teleport(Player p1, Player p2, boolean change);", "private void moveShipRight()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit right\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n int temp1 = (currentPos + 1) % mapWidth;\r\n if(temp1 == 0)\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth + 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - mapWidth + 1);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos + 1);\r\n }\r\n }//end if\r\n\r\n //if secondPlayer move unit right\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n int temp1 = (currentPos + 1) % mapWidth;\r\n if(temp1 == 0)\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth + 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - mapWidth + 1);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + 1];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos + 1);\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}", "public abstract void disconnectInDirection(N n1, N n2);", "private void moveTheCardsTotheWinner(int winPlayer,Player tempPlayer)\n {\n for(int i=0;i<tempPlayer.getLastIndex();i++)\n if(winPlayer == 1)\n FirstPlayer.addCardToBegining(tempPlayer.removeTheCard());\n else if (winPlayer == 2) \n SecondPlayer.addCardToBegining(tempPlayer.removeTheCard()); \n }", "private void moveRobots() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == Player.PlayerType.Robot) {\n\t\t\t\tPoint old = new Point(p.getX(), p.getY());\n\t\t\t\tPoint newPoint = new Point(p.getX(), p.getY());\n\t\t\t\t\n\t\t\t\toccupiedPositions.remove(old);\n\t\t\t\t\n\t\t\t\tint playerX = p.getPlayerToFollow().getX();\n\t\t\t\tint playerY = p.getPlayerToFollow().getY();\n\t\t\t\t\n\t\t\t\t//move towards the agent\n\t\t\t\tif(p.getX() < playerX)\n\t\t\t\t\tnewPoint.x += 1;\n\t\t\t\telse if(p.getX() > playerX)\n\t\t\t\t\tnewPoint.x -= 1;\n\t\t\t\t\n\t\t\t\tif(p.getY() < playerY)\n\t\t\t\t\tnewPoint.y += 1;\n\t\t\t\telse if(p.getY() > playerY)\n\t\t\t\t\tnewPoint.y -= 1;\n\t\t\t\t\n\t\t\t\tp.setPosition(newPoint);\n\t\t\t\t\n\t\t\t\t//check if the robot has moved on to something\n\t\t\t\tif(occupiedPositions.contains(newPoint)) { \t\t// check if the position is occupied\n\t\t\t\t\tfor(Player p2 : playerList) { \t\t\t\n\t\t\t\t\t\tif(!p.getName().equals(p2.getName())) {\t// check so it not is the robot itself\n\t\t\t\t\t\t\tif(newPoint.equals(p2.getPosition())) {\n\t\t\t\t\t\t\t\tif(p2.getType() == PlayerType.Robot) { // if it is a robot, both should be rubble\n\t\t\t\t\t\t\t\t\tp2.setType(PlayerType.Rubble);\n\t\t\t\t\t\t\t\t\tp2.getPlayerToFollow().decreaseRobotsFollowing();\n\t\t\t\t\t\t\t\t\tp.setType(PlayerType.Rubble);\n\t\t\t\t\t\t\t\t\tp.getPlayerToFollow().decreaseRobotsFollowing();\n\t\t\t\t\t\t\t\t\tHandleCommunication.broadcastToClient(null, server.getConnectedClientList(), SendSetting.ChangedType, p.getName(), p2.getName());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(p2.getType() == PlayerType.Rubble) { // if it is rubble\n\t\t\t\t\t\t\t\t\tp.setType(PlayerType.Rubble);\n\t\t\t\t\t\t\t\t\tp.getPlayerToFollow().decreaseRobotsFollowing();\n\t\t\t\t\t\t\t\t\tHandleCommunication.broadcastToClient(null, server.getConnectedClientList(), SendSetting.ChangedType, p.getName(), p2.getName());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if(p2.getType() == PlayerType.Agent) {\n\t\t\t\t\t\t\t\t\tString send = generateSendableHighscoreList();\n\t\t\t\t\t\t\t\t\tserver.sendMessageToClient(p2.getName(), \"@132@\" + highscore.size() + \"@\" + send);\n\t\t\t\t\t\t\t\t\tserver.addTextToLoggingWindow(\"Robot killed player (\" + p2.getName() + \")\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toccupiedPositions.add(newPoint);\n\t\t\t\tserver.broadcastToClient(p.getName(), SendSetting.PlayerMoved, old, newPoint);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t//send that it is agents turn again\n\t\tserver.broadcastToClient(null, SendSetting.AgentsTurnToMove, null, null);\n\t}", "void sendMessage(int cycleCount, int index, int offset, long time)\n {\n Message msg = handler.obtainMessage(state, index, offset); //pos.offset);\n handler.sendMessage(msg);\n }", "void onIdentityMove(int fromPosition, int toPosition);", "private void swap(int pos1, int pos2) {\n\t\tE temp = apq.get(pos1);\n\t\tapq.set(pos1, apq.get(pos2));\n\t\tapq.set(pos2, temp);\n\n\t\tlocator.set(apq.get(pos1), pos1);\n\t\tlocator.set(apq.get(pos2), pos2);\n\t}", "public void teleport(boolean penalty) { \n\t\tPublisher teleport_h = new Publisher(\"/ariac_human/go_home\", \"std_msgs/Bool\", bridge);\n\t\tif(penalty)\t\n\t\t\tteleport_h.publish(new Bool(true));\t\n\t\telse\n\t\t\tteleport_h.publish(new Bool(false));\t\n\n\t\t// Reset \"smart\" orientation variables\n\t\tlastHumanState_MsgT = System.currentTimeMillis();\n\t\tlastUnsafeD_MsgT = System.currentTimeMillis();\n\t\tpreviousDistance = 50.0;\n\t\tisAproximating = false;\n\t}", "void setOffset(com.walgreens.rxit.ch.cda.IVLPPDPQ offset);", "private void processPacket(Packet msg, int sourceClientID)\n\t{\n\t\tif (msg.getPacketID() == 1)\n\t\t{\n\t\t\t// Position updates, broadcast to everyone else\n\t\t\tPCSPosRotUpdate posUpdate = (PCSPosRotUpdate)msg;\n\t\t\t\n\t\t\t// CSPosRotUpdate\n\t\t\t// Get the specific entity to update\n\t\t\tEntityPlayer player = (EntityPlayer) entityMap.getEntity(posUpdate.clientID, EntityPlayer.class);\n\t\t\t\n\t\t\t// If non-existant, move on (probably a stale id)\n\t\t\tif (player == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tSystem.out.printf(\"\\t Ply%d-Pos: (%f, %f, %f) - (%f, %f)\\n\", posUpdate.clientID, posUpdate.xPos, posUpdate.yPos, posUpdate.zPos, posUpdate.pitch, posUpdate.yaw);\n\t\t\tplayer.setPos(posUpdate.xPos, posUpdate.yPos, posUpdate.zPos);\n\t\t\tplayer.setVelocity(posUpdate.xVel, posUpdate.yVel, posUpdate.zVel);\n\t\t\tplayer.setOrientation(posUpdate.pitch, posUpdate.yaw);\n\t\t\tplayer.xAccel = posUpdate.xAccel;\n\t\t\tplayer.zAccel = posUpdate.zAccel;\n\t\t\t\n\t\t\tplayer.isFlying = posUpdate.isFlying;\n\t\t\tplayer.isSneaking = posUpdate.isSneaking;\n\t\t\tplayer.isSprinting = posUpdate.isSprinting;\n\t\t\t\n\t\t\tclientChannels.write(posUpdate);\n\t\t}\n\t\telse if (msg.getPacketID() == 5)\n\t\t{\n\t\t\t// Block place, handle that\n\t\t\tPCSPlaceBlock blockPlace = (PCSPlaceBlock)msg;\n\t\t\tRaycastResult lastHit = blockPlace.hitResult;\n\t\t\tBlock block = blockPlace.placingBlock;\n\t\t\t\n\t\t\t// If the block can't be placed, don't place it\n\t\t\tif(!block.canPlaceBlock(\n\t\t\t\t\tinstance.world,\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ()))\n\t\t\t\treturn;\n\t\t\t\n\t\t\tinstance.world.setBlock(\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ(),\n\t\t\t\t\tblock);\n\t\t\tblock.onBlockPlaced(\n\t\t\t\t\tinstance.world,\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ());\n\t\t\t\n\t\t\t// Broadcast to the other players\n\t\t\t// TODO: Correct for misplaces\n\t\t\tclientChannels.write(blockPlace);\n\t\t}\n\t\telse if (msg.getPacketID() == 6)\n\t\t{\n\t\t\t// Block break, handle that\n\t\t\tPCSBreakBlock blockBreak = (PCSBreakBlock)msg;\n\t\t\tRaycastResult lastHit = blockBreak.hitResult;\n\t\t\t\n\t\t\t// Break the block, with the appropriate block callbacks being called\n\t\t\tBlock block = instance.world.getBlock(lastHit.blockX, lastHit.blockY, lastHit.blockZ);\n\t\t\tblock.onBlockBroken(instance.world, lastHit.blockX, lastHit.blockY, lastHit.blockZ);\n\t\t\tinstance.world.setBlock(lastHit.blockX, lastHit.blockY, lastHit.blockZ, Blocks.AIR);\n\t\t\t\n\t\t\t// Broadcast to the other players\n\t\t\t// TODO: Correct for mis-breaks\n\t\t\tclientChannels.write(blockBreak);\n\t\t}\n\t\telse if (msg.getPacketID() == 7)\n\t\t{\n\t\t\t// Load the requested chunk column\n\t\t\tPCLoadChunkColumn loadRequest = (PCLoadChunkColumn)msg;\n\t\t\t// Get the channel id\n\t\t\tChannelId channelId = clientToChannelId.get(sourceClientID);\n\t\t\t\n\t\t\t// No id found means stale id\n\t\t\tif (channelId == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tChannel clientChannel = clientChannels.find(channelId);\n\t\t\t\n\t\t\t// Null channel means stale id\n\t\t\tif (clientChannel == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t// Send back the chunk column\n\t\t\tif (sendChunkColumnTo(loadRequest.columnX, loadRequest.columnZ, clientChannel))\n\t\t\t{\n\t\t\t\t// TODO: Queue up requests\n\t\t\t\tSystem.out.println(\"Fulfilled rq for \" + loadRequest.columnX + \", \" + loadRequest.columnZ + \" to Ply\" + sourceClientID);\n\t\t\t\t// Flush pending requests\n\t\t\t\tclientChannel.flush();\n\t\t\t}\n\t\t}\n\t}", "private static void positionNode(NodeFigure nodeFigure, SocketFigure socketFigure, int offset)\r\n\t{\r\n\t\tRectangle socketBox = socketFigure.displayBox();\r\n\t\tRectangle nodeBox = nodeFigure.compactDisplayBox();\r\n\t\tdouble angle = socketFigure.getAngle();\r\n\t\tPoint nodeCenter = new Point(0, socketBox.y + socketBox.height / 2);\r\n\r\n\t\tif (angle >= Math.PI / 2 && angle < 3 * Math.PI / 2)\r\n\t\t{\r\n\t\t\t// Position node to the left of the socket\r\n\t\t\tnodeCenter.x = socketBox.x - offset - nodeBox.width / 2;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnodeCenter.x = socketBox.x + offset + nodeBox.width / 2;\r\n\t\t}\r\n\r\n\t\t// Make sure the node figure is within the drawing's bounds\r\n\t\tif (nodeCenter.x - nodeBox.width / 2 - 10 < 0)\r\n\t\t\tnodeCenter.x = nodeBox.width / 2 + 10;\r\n\t\tif (nodeCenter.y - nodeBox.height / 2 - 10 < 0)\r\n\t\t\tnodeCenter.y = nodeBox.height / 2 + 10;\r\n\r\n\t\t// Place the figure at the calculated position\r\n\t\tnodeFigure.displayBox(nodeCenter, nodeCenter);\r\n\r\n\t\t// Make sure the figure doesn't overlap a similar one\r\n\t\tpreventOverlap(socketFigure.getDrawing(), nodeFigure);\r\n\t}", "public void makeSyncNailBetweenLocations() {\n final double x = Grid.snap((getSourceLocation().getX() + getTargetLocation().getX()) / 2.0);\n final double y = Grid.snap((getSourceLocation().getY() + getTargetLocation().getY()) / 2.0);\n\n final Nail nail = new Nail(x, y);\n nail.setPropertyType(Edge.PropertyType.SYNCHRONIZATION);\n addNail(nail);\n }", "public void moveEncoder(double countsToMove) {\n\t\tRobotMap.backLeft.set(ControlMode.Position, countsToMove);\n\t\tRobotMap.frontLeft.set(ControlMode.Follower, RobotMap.backLeft.getDeviceID());\n\t\tRobotMap.frontRight.set(ControlMode.Position, countsToMove);\n\t\tRobotMap.backRight.set(ControlMode.Follower, RobotMap.frontRight.getDeviceID());\n\t}", "private void setOtherGameelementPosition(Vector2 newPos, Vector2 startPos,\n\t\t\tVector2 paddingScreen) {\n\n\t\tif (this.getNext() != null) {\n\t\t\tthis.getNext().setOtherGameelementPosition(\n\t\t\t\t\tnew Vector2(newPos.x + this.getWidth(), newPos.y),\n\t\t\t\t\tstartPos, paddingScreen);\n\t\t}\n\n\t\t// Clone Pre Set\n\t\tif (this.getGameElement().getPosition().equals(new Vector2(0, 0))) {\n\t\t\tthis.getGameElement().setPosition(startPos);\n\t\t}\n\n\t\t// Move\n\t\tint centerVertex = (Constants.GAMEELEMENT_WIDTH * (this.getWidth() - 1)) / 2;\n\t\tint x = Constants.GAMEELEMENT_WIDTH * (int) newPos.x;\n\t\tint y = Constants.GAMEELEMENT_WIDTH * (int) newPos.y;\n\n\t\t// Move\n\t\tEvaluationExecutioner.moveAnimation(new Vector2(x + centerVertex\n\t\t\t\t+ paddingScreen.x, y + paddingScreen.y), this.getGameElement(),\n\t\t\t\tfalse);\n\n\t\tif (this.getFamily() != null) {\n\t\t\tthis.getFamily().setOtherGameelementPosition(\n\t\t\t\t\tnew Vector2(newPos.x, newPos.y\n\t\t\t\t\t\t\t+ Constants.EVALUATION_DEFALT_LAYER_DIF), startPos,\n\t\t\t\t\tpaddingScreen);\n\t\t}\n\t}", "void otherPlayerMoved()\r\n {\r\n socketWriter.println(\"OPPONENT_MOVED ,\" + getCurrentBoard());\r\n }", "private static void shift(RescueMap rm, int n1, int n2, int n3, int[] c){\n\t\t//get the normal to the first road\n\t\tlong n1y = rm.getX(n2) - rm.getX(n1);\n\t\tlong n1x = rm.getY(n1) - rm.getY(n2);\n\t\t//get normal to the second road\n\t\tlong n2y = rm.getX(n3) - rm.getX(n2);\n\t\tlong n2x = rm.getY(n2) - rm.getY(n3);\n\t\t//get length of each normal\n\t\tdouble len1 = Math.sqrt(n1y*n1y+n1x*n1x);\n\t\tdouble len2 = Math.sqrt(n2y*n2y+n2x*n2x);\n\n\t\tint d = 3000;//Math.max(rm.getRoad(n1,n2),rm.getRoad(n2,n3))*2000 +500;\n\n\t\tint x1 = rm.getX(n1) - (int)(n1x*d*1.0/len1);\n\t\tint x2 = rm.getX(n2) - (int)(n1x*d*1.0/len1);\n\t\tint y1 = rm.getY(n1) - (int)(n1y*d*1.0/len1);\n\t\tint y2 = rm.getY(n2) - (int)(n1y*d*1.0/len1);\n\t\tint x3 = rm.getX(n2) - (int)(n2x*d*1.0/len2);\n\t\tint x4 = rm.getX(n3) - (int)(n2x*d*1.0/len2);\n\t\tint y3 = rm.getY(n2) - (int)(n2y*d*1.0/len2);\n\t\tint y4 = rm.getY(n3) - (int)(n2y*d*1.0/len2);\n\n\t\tint[] intersect = intersection(x1,y1,x2,y2,x3,y3,x4,y4);\n\t\tif(intersect == null){\n\t\t\tc[0] -= (n1x/len1)*d;\n\t\t\tc[1] -= (n1y/len1)*d;\n\t\t}\n\t\telse{\n\t\t\tc[0] = intersect[0];\n\t\t\tc[1] = intersect[1];\n\t\t}\n\t}", "private void sendUpdates() {\n\n List<PeerUpdateMessage.Part> parts = new ArrayList<PeerUpdateMessage.Part>();\n for (ActivePlayer peer : player.getSavedNeighbors()) {\n PeerUpdateMessage.Part part = new PeerUpdateMessage.Part(\n peer.character.id, peer.character.getExtrapolatedMotionState());\n parts.add(part);\n }\n\n if (!parts.isEmpty()) {\n PeerUpdateMessage msg = new PeerUpdateMessage(parts);\n new ToClientMessageSink(player.session).sendWithoutConfirmation(msg);\n }\n }", "private void moveShipUp()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit up\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }\r\n }//end if\r\n\r\n //if secondPlayer move unit up\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "public void sendMove(int startIndex, int endIndex, String pawnUpgrade){\n if (isNetworkGame() && !team.equals(currentBoard.turn())){\n sender.println(\"promotion\");\n sender.println(startIndex);\n sender.println(endIndex);\n sender.println(pawnUpgrade);\n sender.flush();\n }\n }", "@Override\r\n public void updateMixer() {\n playerPosition = mixer.getGlobalCoordinates();\r\n playerOrientation = mixer.getGlobalOrientation();\r\n Vec3d playerScalling = mixer.getGlobalScale();\r\n\r\n //scale ears\r\n rightEarPosition = Vec3d.multiplicationOfComponents((new Vec3d(-earsDistance, 0, 0)), playerScalling);\r\n leftEarPosition = Vec3d.multiplicationOfComponents((new Vec3d(earsDistance, 0, 0)), playerScalling);\r\n }", "@Override\r\n\tpublic void move(MoverType mover, double currOffX, double currOffY, double currOffZ) {\r\n\t\t// FIXME: most likely incorrect\r\n\t\tif (this.noClip) {\r\n\t\t\tthis.offsetEntity(currOffX, currOffY, currOffZ);\r\n\t\t} else {\r\n\t\t\tdouble originalOffX = currOffX;\r\n\t\t\tdouble originalOffY = currOffY;\r\n\t\t\tdouble originalOffZ = currOffZ;\r\n\r\n\t\t\tif (this.isInWeb) {\r\n\t\t\t\tthis.isInWeb = false;\r\n\t\t\t\tcurrOffX *= 0.25D;\r\n\t\t\t\tcurrOffY *= 0.05000000074505806D;\r\n\t\t\t\tcurrOffZ *= 0.25D;\r\n\t\t\t\tthis.motionX = 0.0D;\r\n\t\t\t\tthis.motionY = 0.0D;\r\n\t\t\t\tthis.motionZ = 0.0D;\r\n\t\t\t}\r\n\r\n\t\t\tdouble correctedOffX = currOffX;\r\n\t\t\tdouble correctedOffY = currOffY;\r\n\t\t\tdouble correctedOffZ = currOffZ;\r\n\t\t\tCollisionParts[] parts = this.getParts();\r\n\t\t\tif (parts == null) {\r\n\t\t\t\tparts = new CollisionParts[0];\r\n\t\t\t}\r\n\r\n\t\t\tAxisAlignedBB ourBoundingBox = this.getEntityBoundingBox();\r\n\t\t\tList<AxisAlignedBB> bbsInWay = this.world\r\n\t\t\t\t\t.getCollisionBoxes(this, ourBoundingBox.addCoord(currOffX, currOffY, currOffZ));\r\n\t\t\t// Calculates the smallest possible offset in Y direction\r\n\t\t\tfor (AxisAlignedBB bb : bbsInWay) {\r\n\t\t\t\tcurrOffY = bb.calculateYOffset(ourBoundingBox, currOffY);\r\n\t\t\t}\r\n\t\t\tfor (AxisAlignedBB bb : bbsInWay) {\r\n\t\t\t\tcurrOffX = bb.calculateXOffset(ourBoundingBox, currOffX);\r\n\t\t\t}\r\n\t\t\tfor (AxisAlignedBB bb : bbsInWay) {\r\n\t\t\t\tcurrOffZ = bb.calculateZOffset(ourBoundingBox, currOffZ);\r\n\t\t\t}\r\n\t\t\tfor (CollisionParts part : parts) {\r\n\t\t\t\tAxisAlignedBB partBoundingBox = part.getEntityBoundingBox();\r\n\t\t\t\tList<AxisAlignedBB> bbsInWayPart = this.world\r\n\t\t\t\t\t\t.getCollisionBoxes(this, partBoundingBox.addCoord(currOffX, currOffY, currOffZ));\r\n\t\t\t\t// Calculates the smallest possible offset in Y direction\r\n\t\t\t\tfor (AxisAlignedBB bb : bbsInWayPart) {\r\n\t\t\t\t\tcurrOffY = bb.calculateYOffset(partBoundingBox, currOffY);\r\n\t\t\t\t}\r\n\t\t\t\tfor (AxisAlignedBB bb : bbsInWayPart) {\r\n\t\t\t\t\tcurrOffX = bb.calculateXOffset(partBoundingBox, currOffX);\r\n\t\t\t\t}\r\n\t\t\t\tfor (AxisAlignedBB bb : bbsInWayPart) {\r\n\t\t\t\t\tcurrOffZ = bb.calculateZOffset(partBoundingBox, currOffZ);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/** If we will are or will land on something */\r\n\t\t\tboolean landed = this.onGround || (correctedOffY != currOffY && correctedOffY < 0.0D);\r\n\r\n\t\t\tif (this.stepHeight > 0.0F && landed && (this.height < 0.125F)\r\n\t\t\t\t\t&& (correctedOffX != currOffX || correctedOffZ != currOffZ)) {\r\n\t\t\t\tdouble nostepOffX = currOffX;\r\n\t\t\t\tdouble nostepOffY = currOffY;\r\n\t\t\t\tdouble nostepOffZ = currOffZ;\r\n\r\n\t\t\t\tcurrOffX = correctedOffX;\r\n\t\t\t\tcurrOffY = this.stepHeight;\r\n\t\t\t\tcurrOffZ = correctedOffZ;\r\n\r\n\t\t\t\tList<AxisAlignedBB> bbsInStepup = this.world\r\n\t\t\t\t\t\t.getCollisionBoxes(this, ourBoundingBox.addCoord(correctedOffX, currOffY, correctedOffZ));\r\n\r\n\t\t\t\tfor (AxisAlignedBB bb : bbsInStepup) {\r\n\t\t\t\t\tcurrOffY = bb.calculateYOffset(ourBoundingBox, currOffY);\r\n\t\t\t\t}\r\n\t\t\t\tfor (AxisAlignedBB bb : bbsInStepup) {\r\n\t\t\t\t\tcurrOffX = bb.calculateXOffset(ourBoundingBox, currOffX);\r\n\t\t\t\t}\r\n\t\t\t\tfor (AxisAlignedBB bb : bbsInStepup) {\r\n\t\t\t\t\tcurrOffZ = bb.calculateZOffset(ourBoundingBox, currOffZ);\r\n\t\t\t\t}\r\n\t\t\t\tfor (CollisionParts part : parts) {\r\n\t\t\t\t\tAxisAlignedBB partBoundingBox = part.getEntityBoundingBox();\r\n\t\t\t\t\tList<AxisAlignedBB> bbsInStepupPart = this.world\r\n\t\t\t\t\t\t\t.getCollisionBoxes(this, partBoundingBox.addCoord(currOffX, currOffY, currOffZ));\r\n\t\t\t\t\tfor (AxisAlignedBB bb : bbsInStepupPart) {\r\n\t\t\t\t\t\tcurrOffY = bb.calculateYOffset(partBoundingBox, currOffY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (AxisAlignedBB bb : bbsInStepupPart) {\r\n\t\t\t\t\t\tcurrOffX = bb.calculateXOffset(partBoundingBox, currOffX);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor (AxisAlignedBB bb : bbsInStepupPart) {\r\n\t\t\t\t\t\tcurrOffZ = bb.calculateZOffset(partBoundingBox, currOffZ);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdouble groundOffY = -this.stepHeight;\r\n\t\t\t\tfor (AxisAlignedBB bb : bbsInStepup) {\r\n\t\t\t\t\tgroundOffY = bb.calculateYOffset(ourBoundingBox.offset(currOffX, currOffY, currOffZ), groundOffY);\r\n\t\t\t\t}\r\n\t\t\t\tfor (CollisionParts part : parts) {\r\n\t\t\t\t\tAxisAlignedBB partBoundingBox = part.getEntityBoundingBox();\r\n\t\t\t\t\tList<AxisAlignedBB> bbsInStepDown = this.world\r\n\t\t\t\t\t\t\t.getCollisionBoxes(this, partBoundingBox.addCoord(currOffX, currOffY, currOffZ));\r\n\t\t\t\t\t// Calculates the smallest possible offset in Y direction\r\n\t\t\t\t\tfor (AxisAlignedBB bb : bbsInStepDown) {\r\n\t\t\t\t\t\tcurrOffY = bb.calculateYOffset(partBoundingBox, currOffY);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcurrOffY += groundOffY;\r\n\r\n\t\t\t\tif (nostepOffX * nostepOffX + nostepOffY * nostepOffY >= currOffX * currOffX + currOffZ * currOffZ) {\r\n\t\t\t\t\tcurrOffX = nostepOffX;\r\n\t\t\t\t\tcurrOffY = nostepOffY;\r\n\t\t\t\t\tcurrOffZ = nostepOffZ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Until this point, unlike the original implementation, nothing\r\n\t\t\t// happened to the\r\n\t\t\t// entity itself, push the state\r\n\t\t\tdouble originalX = this.posX;\r\n\t\t\tdouble originalY = this.posY;\r\n\t\t\tdouble originalZ = this.posZ;\r\n\t\t\t// Handle things like fire, movesounds, etc\r\n\t\t\tsuper.move(mover, originalOffX, originalOffY, originalOffZ);\r\n\t\t\t// Pop the state\r\n\t\t\tthis.posX = originalX;\r\n\t\t\tthis.posY = originalY;\r\n\t\t\tthis.posZ = originalZ;\r\n\t\t\tsetEntityBoundingBox(ourBoundingBox);\r\n\t\t\t// Apply our offset\r\n\t\t\tthis.offsetEntity(currOffX, currOffY, currOffZ);\r\n\t\t}\r\n\t}", "private void swapTwoTroopPositions(int row1, int col1, int row2, int col2) {\n BaseSingle temp = aliveTroopsFormation[row1][col1];\n aliveTroopsFormation[row1][col1] = aliveTroopsFormation[row2][col2];\n aliveTroopsFormation[row2][col2] = temp;\n if (aliveTroopsFormation[row1][col1] != null) {\n aliveTroopsMap.put(aliveTroopsFormation[row1][col1], row1 * width + col1);\n }\n if (aliveTroopsFormation[row2][col2] != null) {\n aliveTroopsMap.put(aliveTroopsFormation[row2][col2], row2 * width + col2);\n }\n }", "private void updateMowerCords() {\n\t\tfor (int i = 0; i < this.map.size(); i++) {\r\n\t\t\tfor (int j = 0; j < this.map.get(i).size(); j++) {\r\n\t\t\t\tif (this.map.get(i).get(j) == this.mower) {\r\n\t\t\t\t\tthis.x = j;\r\n\t\t\t\t\tthis.y = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void moveToId(int offset) {\n\t\tcp.moveToId(offset);\n\t}", "Object moveHologramPacket(int id, Location to);", "public void testSenderOrderWithMultipleSiteMasters() throws Exception {\n MyReceiver<Object> rx=new MyReceiver<>().rawMsgs(true).verbose(true),\n ry=new MyReceiver<>().rawMsgs(true).verbose(true), rz=new MyReceiver<>().rawMsgs(true).verbose(true);\n final int NUM=512;\n final String sm_picker_impl=SiteMasterPickerImpl.class.getName();\n a=createNode(LON, \"A\", LON_CLUSTER, 2, sm_picker_impl, null);\n b=createNode(LON, \"B\", LON_CLUSTER, 2, sm_picker_impl, null);\n c=createNode(LON, \"C\", LON_CLUSTER, 2, sm_picker_impl, null);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, a,b,c);\n\n x=createNode(SFO, \"X\", SFO_CLUSTER, 2, sm_picker_impl, rx);\n y=createNode(SFO, \"Y\", SFO_CLUSTER, 2, sm_picker_impl, ry);\n z=createNode(SFO, \"Z\", SFO_CLUSTER, 2, sm_picker_impl, rz);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, x,y,z);\n\n waitForBridgeView(4, 10000, 1000, a,b,x,y);\n\n // C in LON sends messages to the site master of SFO (via either SM A or B); everyone in SFO (x,y,z)\n // must receive them in correct order\n SiteMaster target_sm=new SiteMaster(SFO);\n System.out.printf(\"%s: sending %d messages to %s:\\n\", c.getAddress(), NUM, target_sm);\n for(int i=1; i <= NUM; i++) {\n Message msg=new BytesMessage(target_sm, i); // the seqno is in the payload of the message\n c.send(msg);\n }\n\n boolean running=true;\n for(int i=0; running && i < 10; i++) {\n for(MyReceiver<Object> r: Arrays.asList(rx,ry,rz)) {\n if(r.size() >= NUM) {\n running=false;\n break;\n }\n }\n Util.sleep(1000);\n }\n\n System.out.printf(\"X: size=%d\\nY: size=%d\\nZ: size=%d\\n\", rx.size(), ry.size(), rz.size());\n assert rx.size() == NUM || ry.size() == NUM;\n assert rz.size() == 0;\n }", "private void reboundCameraOffset(Point offset, EnumSet<Direction> directions) {\n int boundsStartX = 0;\n int boundsEndX = tileMap.getPixelWidth();\n int boundsStartY = 0;\n int boundsEndY = tileMap.getPixelHeight();\n if (offset.x < boundsStartX && directions.contains(Direction.LEFT)) {\n offset.x = boundsStartX;\n } else if (offset.x + screenWidth > boundsEndX && directions.contains(Direction.RIGHT)) {\n offset.x = boundsEndX - screenWidth;\n }\n if (offset.y < boundsStartY && directions.contains(Direction.UP)) {\n offset.y = boundsStartY;\n } else if (offset.y + screenHeight > boundsEndY && directions.contains(Direction.DOWN)) {\n offset.y = boundsEndY - screenHeight;\n }\n }", "private void moveShipDown()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit down\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n int temp1 = mapWidth * mapHeight - mapWidth;\r\n int temp2 = mapWidth * mapHeight;\r\n if(currentPos >= temp1 && currentPos < temp2)\r\n {\r\n int newPos = currentPos % mapHeight;\r\n int mapTemp = mapPieces[0][newPos];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos + mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //if secondPlayer move unit down\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n int temp1 = mapWidth * mapHeight - mapWidth;\r\n int temp2 = mapWidth * mapHeight;\r\n if(currentPos >= temp1 && currentPos < temp2)\r\n {\r\n int newPos = currentPos % mapHeight;\r\n int mapTemp = mapPieces[0][newPos];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos + mapWidth);\r\n }//end if\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "private void handleMove(String[] msg, DataOutputStream os) throws IOException {\n\n\t\t\n\t E_Direction direction = E_Direction.valueOf(msg[2].substring(msg[2].indexOf(\":\")+1));\n\t\t\n\t if(direction == null) \n\t\t os.writeUTF(\"NACK\"+\" \"+\"MOV\"+\" \"+\"NO\"); \n\t \n\t else {\n\t \t\n\t\t entity.moveCar(direction);\n\t\t \n\t \tif(entity.isFinished())os.writeUTF(\"ACK\"+\" \"+\"MOV\"+\" \"+\"NO\");\n\t \t\n\t\t else os.writeUTF(\"ACK\"+\" \"+\"MOV\"+\" \"+\"YES\"+\" \"+\"PDR:\"+getPossibleDirections());\n\t\t \n\t }\n\t \n\t\t\n\t}", "private void followPath(){\r\n\t\tif(noBeepersPresent()){\r\n\t\t\twhile(frontIsClear() && leftIsBlocked() && rightIsBlocked() && noBeepersPresent()){\r\n\t\t\t\tmakeMove();\r\n\t\t\t}\r\n\t\t\tif(frontIsBlocked() && leftIsBlocked() && rightIsBlocked() && noBeepersPresent()){\r\n\t\t\t\tturnAround();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t\tfollowPath();\r\n\t\t\t}else{\r\n\t\t\t\tcheckPaths();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void sendMove(int startIndex, int endIndex){\n if (isNetworkGame() && !team.equals(currentBoard.turn())){\n sender.println(\"move\");\n sender.println(startIndex);\n sender.println(endIndex);\n sender.flush();\n }\n }", "private void drive2Neighbor(int nx, int ny) throws Exception {\n\t\t//note that since the map is upside down, so all left-right turn is switched here\n\t\tswitch(robot.getCurrentDirection()) {\n\t\tcase East:\n\t\t\tif (nx > robot.getCurrentPosition()[0]){\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\telse if (nx == robot.getCurrentPosition()[0]) {\n\t\t\t\tif (ny > robot.getCurrentPosition()[1]) {\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\trobot.rotate(Turn.AROUND);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase West:\n\t\t\tif (nx < robot.getCurrentPosition()[0]){\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\telse if (nx == robot.getCurrentPosition()[0]) {\n\t\t\t\tif (ny > robot.getCurrentPosition()[1]) {\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\trobot.rotate(Turn.AROUND);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase North:\n\t\t\tif (nx > robot.getCurrentPosition()[0]){\n\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\telse if (nx == robot.getCurrentPosition()[0]) {\n\t\t\t\tif (ny > robot.getCurrentPosition()[1]) {\n\t\t\t\t\trobot.rotate(Turn.AROUND);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase South:\n\t\t\tif (nx < robot.getCurrentPosition()[0]){\n\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\telse if (nx == robot.getCurrentPosition()[0]) {\n\t\t\t\tif (ny > robot.getCurrentPosition()[1]) {\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.AROUND);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\trobot.move(1, false);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "private synchronized void sendAdvance(){\r\n\t\t\tfor(PrintWriter p : players){\r\n\t\t\t\tif(p != null){\r\n\t\t\t\t\tp.println(\"5\");\r\n\t\t\t\t\tp.println(Integer.toString(x));\r\n\t\t\t\t\tp.println(Integer.toString(y));\r\n\t\t\t\t\tp.flush();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\r\n\t\t\t}\t\r\n\t\t}", "private void movePirates() {\r\n\t\tshiponeImageView.setX(pirate1.getCurrentLocation().x * scalingFactor);\r\n\t\tshiponeImageView.setY(pirate1.getCurrentLocation().y * scalingFactor);\r\n\r\n\t\tshiptwoImageView.setX(pirate2.getCurrentLocation().x * scalingFactor);\r\n\t\tshiptwoImageView.setY(pirate2.getCurrentLocation().y * scalingFactor);\r\n\t}", "private void sendMove(Coordinates moveCoords, Boolean reset) throws RemoteException{\n\t\tDebug.log(\"Player \" + playerId, \"Sending move: \" + moveCoords.toString());\n\t\tboolean isMoveSuccess = server.makeMove(this, currentPosition, moveCoords, playerId, false);\n\t\tDebug.log(\"Player \" + playerId, \"Sent\");\n\n\t\t/* 2. Wait for reply */\n\t\tDebug.log(\"Player \" + playerId, \"Waiting for reply\");\n\t\tDebug.log(\"Player \" + playerId, \"Reply received, result is: \" + isMoveSuccess);\n\n\t\t/* Reflect in GUI */\n\t\tif(isMoveSuccess){\n\t\t\t/* Execute the move */\n\t\t\tplayerMap.makeMove(playerId, currentPosition, moveCoords);\n\t\t\t/* Update player's current position sync..*/\n\t\t\tcurrentPosition = moveCoords;\n\t\t\tsynchronized(GameMap.gameMapLock){\n\t\t\t\tgui.setGameMap(playerMap);\n\t\t\t\tif(reset){\n\t\t\t\t\tresetsLeft--;\n\t\t\t\t\tgui.setResetsLeft(resetsLeft); // update heads up display (HUD) elements if needed\n\t\t\t\t}\n\t\t\t\tgui.refresh();\n\t\t\t}\n\t\t}\n\t}", "private void changeCharacterLocations() {\n if (locationAnimationDirectionSwitch) {\n locationAnimationTicker++;\n } else {\n locationAnimationTicker--;\n }\n\n // While the user's FaceCharacter bobs up, their opponent should bob down.\n heroLocation[1] += locationAnimationTicker;\n antagonistLocation[1] -= locationAnimationTicker;\n\n if (locationAnimationTicker == 5 || locationAnimationTicker == -5) {\n locationAnimationDirectionSwitch = !locationAnimationDirectionSwitch;\n }\n }", "public void movePiece(Location a, Location b)\n {\n Square s1 = getSquare(a);\n Square s2 = getSquare(b);\n Piece p = s1.getPiece();\n if (p==null)\n return;\n int moveType = canMoveTo(p,b);\n boolean taking = getPiece(b)!=null;\n boolean fiftyMoveBreak = getPiece(b)!=null||p.getType()==Type.PAWN;\n s2.setPiece(s1.removePiece());\n p.setHasMoved(true);\n if (p.getType()==Type.PAWN)\n {\n if (mainBoard&&((p.white()&&getLocation(p).getRow()==0)\n || !p.white()&&getLocation(p).getRow()==7))\n promotePawn(p);\n else if (moveType==EN_PASSANT)\n {\n int row = a.getRow();\n int col = b.getCol();\n removePiece(new Location(row,col));\n taking = true;\n }\n }\n else if (moveType==KINGSIDE_CASTLING||moveType==QUEENSIDE_CASTLING)\n {\n Location rookLoc;\n Location rookDest;\n if (moveType==KINGSIDE_CASTLING)\n {\n rookLoc = b.farther(Direction.EAST);\n rookDest = b.farther(Direction.WEST);\n }\n else\n {\n rookLoc = new Location(b.getRow(),b.getCol()-2);\n rookDest = b.farther(Direction.EAST);\n }\n //movePiece(getLocation(rook),rookDest);\n getSquare(rookDest).setPiece(removePiece(rookLoc)); //moves the rook\n }\n if (mainBoard)\n {\n turn++;\n if (fiftyMoveBreak)\n fiftyMove= 0;\n else fiftyMove++;\n }\n for (Piece piece: getPieces())\n piece.setHasJustMoved(false);\n p.setHasJustMoved(true);\n if (mainBoard)\n {\n positions.add(toString());\n \n //this is all for the notation on the side\n notateMove(p,b,moveType,taking);\n /*JTable not = frame.getNotation();\n DefaultTableModel d = (DefaultTableModel)not.getModel();\n String notation;\n PieceColor color = p.getColor();\n if (color==PieceColor.WHITE)\n notation = turn/2+1+\". \"; //the turn number first, on the left\n else notation = \"\";\n if (moveType==QUEENSIDE_CASTLING)\n notation += \"0-0-0\";\n else if (moveType==KINGSIDE_CASTLING)\n notation += \"0-0\";\n else //normal move\n {\n if (p.getType()!=Type.PAWN)\n notation+=p.getType().toNotation(); //the type of piece (K,N,R,etc)\n if (taking)\n notation+=\"x\"; //this is if the move involves taking\n notation+=Location.LocToNot(b);\n }\n if (checkmate(colorGoing())) //notates # for checkmate\n notation+=\"#\";\n else if (inCheck(colorGoing())) //notates + for check\n notation+=\"+\";\n \n if (color==PieceColor.WHITE)\n d.addRow(new Object[]{notation,\"\"});\n else \n d.setValueAt(notation, (turn-1)/2, 1);*/\n }\n }", "public void moveRobber(HexLocation loc) {\n\n\t}", "public void testMovToPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.moveToPos(5));\n assertTrue(test1.getValue().inRange(5));\n assertFalse(test1.moveToPos(-5));\n assertFalse(test1.getValue().inRange(-5));\n assertFalse(test1.moveToPos(50));\n assertFalse(test1.getValue().inRange(50));\n }", "@Override\n void movePhase() throws IOException, InterruptedException, IOExceptionFromController {\n boolean godPower = false;\n ArrayList<Cell> possibleMoves = findPossibleMoves(activeWorker.getPosition());\n Cell movePosition = client.chooseMovePosition(possibleMoves);\n CellView startView = new CellView(activeWorker.getPosition());\n CellView endView = new CellView(movePosition);\n CellView startView2 = null;\n CellView endView2 = null;\n // + allow pushing away opponents\n if (movePosition.hasWorker()) {\n godPower = true;\n Worker pushedWorker = movePosition.getWorker();\n Cell nextCell;\n int nextX = movePosition.getPosX() + (movePosition.getPosX() - activeWorker.getPosition().getPosX());\n int nextY = movePosition.getPosY() + (movePosition.getPosY() - activeWorker.getPosition().getPosY());\n nextCell = board.getCell(nextX, nextY);\n startView2 = endView;\n endView2 = new CellView(nextCell);\n try {\n pushedWorker.move(nextCell);\n } catch (IllegalMoveException e) {\n gameController.logError(e.getMessage());\n return;\n }\n //\n }\n try {\n activeWorker.move(movePosition);\n } catch (IllegalMoveException e) {\n gameController.logError(e.getMessage());\n }\n if (godPower) displayMove(startView, endView, startView2, endView2, card);\n else displayMove(startView, endView, null);\n }", "public static void hanoiTower(int n) {\r\n\t\tif (n <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tTower source = new Tower(\"source\");\r\n\t\tTower dest = new Tower(\"dest\");\r\n\t\tTower buffer = new Tower(\"buffer\");\r\n\t\tif (n == 1) {\r\n\t\t\tdest.push(1);\r\n\t\t\tdest.print();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor (int i = n; i > 0; i--) {\r\n\t\t\tsource.push(i);\r\n\t\t}\r\n\t\tSystem.out.println(\"Before action:\");\r\n\t\tSystem.out.println(\"Source Tower:\");\r\n\t\tsource.print();\r\n\t\tSystem.out.println(\"Dest Towner:\");\r\n\t\tdest.print();\r\n\t\tSystem.out.println(\"Buffer Towner:\");\r\n\t\tbuffer.print();\r\n\t\tSystem.out.println(\"\\r\\n\");\r\n\t\t\r\n\t\tmoveDisk(n, source, dest, buffer);\r\n\t\t\r\n\t\tSystem.out.println(\"\\r\\nAfter action:\");\r\n\t\tSystem.out.println(\"Source Tower:\");\r\n\t\tsource.print();\r\n\t\tSystem.out.println(\"Dest Towner:\");\r\n\t\tdest.print();\r\n\t\tSystem.out.println(\"Buffer Towner:\");\r\n\t\tbuffer.print();\r\n\t}", "void sendUpdatePlayer(int x, int y, int color, byte tool);", "public void turnOver() {\n if(firstPlayer == whosTurn()) {\n turn = secondPlayer;\n } else {\n turn = firstPlayer;\n }\n hasPlacedPiece = false;\n hasRotatedBoard = false;\n }", "@Override\n\tpublic void setup() {\n\t\tObjectSpace objectSpace = Blackboard.inst().getSpace(ObjectSpace.class, \"object\");\n\t\tList<PhysicsObject> objects = objectSpace.getCognitiveAgents();\n\n\t\tif (objects.size() != 2)\n\t\t\tthrow new RuntimeException(\"Need two agents in order to run PathScenario4!\");\n\t\t\n\t\t// first we determine the line between their two points.\n\t\tPhysicsObject obj1 = objects.get(0);\n\t\tPhysicsObject obj2 = objects.get(1);\n\t\t\t\t\n\t\tVec2 direction = obj1.getPPosition().sub(obj2.getPPosition());\n\t\tVec2 nDirection = new Vec2(direction);\n\t\tnDirection.normalize();\n\t\tfloat radians = (float) Math.atan2(nDirection.y, nDirection.x);\n\t\tfloat PI = (float) Math.PI;\n\t\tfloat PI2 = PI * 0.5f;\n\n\t\tfloat perp = radians + PI2;\n\t\tVec2 v = new Vec2((float) Math.cos(perp), (float) Math.sin(perp));\n\t\tVec2 offset1 = new Vec2(obj1.getPPosition().add(v));\n\n\t\tList<Vec2> waypoints1 = new ArrayList<Vec2>();\n\t\twaypoints1.add(obj2.getPPosition());\n\n\t\tList<Vec2> waypoints2 = new ArrayList<Vec2>();\n\t\twaypoints2.add(offset1);\n\t\t\n\t\t// Set positions and orientations\n\t\tobj1.getBody().setXForm(obj1.getPPosition(), radians + (float) Math.PI);\n\t\tobj2.getBody().setXForm(obj2.getPPosition(), radians);\n\n\t\tEventManager.inst().dispatch(new SetWaypoints(waypoints1, obj1));\n\t\tEventManager.inst().dispatch(new SetWaypoints(waypoints2, obj2));\n\t}", "public String[] moveTwoPlayers(String[] playerNames, Location[] newLocations)\n\t{\n\t\tGamePiece one = GamePiece.movesFirst(playerPieces.get(playerNames[0]),playerPieces.get(playerNames[1]));\n\t\tString[] newPlayer = new String[playerNames.length];\n\t\tif(one.equals(playerPieces.get(playerNames[0])))\n\t\t{\n\t\t\tnewPlayer[0] = playerNames[0];\n\t\t\tnewPlayer[1] = playerNames[1];\n\t\t\tmovePlayer(newPlayer[0], newLocations[0]);\n\t\t\tmovePlayer(newPlayer[1], newLocations[1]);\n\t\t}\n\t\t\n\t\treturn playerNames;\n\t}", "public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }", "protected void mover(){\r\n\t\r\n\t\t\r\n\t\tint centroX;\r\n\t\tint centroY;\r\n\t\tint radioGiro1;\r\n\t\tint coordX;\r\n\t\tint incrementoY;\r\n\t\tint diferenciaEnX;\r\n\t\t\r\n\t\tif(! this.entroAlCirculo){\r\n\t\t\tdirigirHaciaPunto(this.centroGiroX, (this.centroGiroY - this.radioGiro));\r\n\t\t}\r\n\t\t\r\n\t\telse{\t\t\t\t\r\n\t\t\t\r\n\t\t\tcentroX = this.centroGiroX;\r\n\t\t\tcentroY = this.centroGiroY;\r\n\t\t\tincrementoY = 1;\r\n\t\t\tradioGiro1 = this.radioGiro;\r\n\t\t\t\r\n\t\t\tif(this.x > centroX){\t\t\t\t\t\r\n\t\t\t\tthis.regresando = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.regresando){ //chequea si el avion se sobrepasa de los limites verticales del circulo, si es el caso cambia la direccion\r\n\t\t\t\t\r\n\t\t\t\tif((this.y - incrementoY) < (centroY - radioGiro1)){\r\n\t\t\t\t\tthis.regresando = false;\r\n\t\t\t\t}\r\n\t\t\t\telse{}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\tif((this.y + incrementoY) > (centroY + radioGiro1)){\r\n\t\t\t\t\t\tthis.regresando = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse{}\r\n\t\t\t}\t\t\t\r\n\t\t\tif ((this.y <= (centroGiroY + (radioGiro - incrementoY))) || (this.y >= (centroGiroY - (radioGiro - incrementoY)))){\r\n\t\t\t\t\r\n\t\t\t\tif(this.regresando){\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**calcula la posicion de x de acuerdo al movimiento en y, \r\n\t\t\t\t\t* con la formula de una circunferencia plana\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y - 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = coordX;\r\n\t\t\t\t\tthis.y -= incrementoY;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse{\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y + 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = centroX - diferenciaEnX;\r\n\t\t\t\t\tthis.y += incrementoY;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "void copyOffsetPosition (DVector3 pos);", "@Override\n public void playWithTwoPlayers(Player player1, Player player2) {\n int[] combinationPlayer;\n int counter = config.getMaxTries();\n config.getMsgInfo().choiceGameBonus();\n config.getMsgInfo().counter(counter);\n\n // initialize a random number that both players will try to find\n IAPlayer ia = new IAPlayer(config);\n int[] defenseCombination = ia.initialiseCombination();\n if (config.isDevMode())\n config.getMsgCombination().devMode(defenseCombination);\n config.getMsgInfo().computer();\n\n // Proposition player1\n config.getMsgInfo().player1();\n combinationPlayer = player1.research(null);\n config.getMsgCombination().newAnswer(combinationPlayer);\n String[] clues = ia.clues(combinationPlayer);\n if (IsWin.winIf(clues)) {\n config.getMsgInfo().isWin();\n return;\n }\n config.getMsgCombination().cluesAre(clues);\n\n // Proposition player2\n config.getMsgInfo().player2();\n combinationPlayer = player2.research(null);\n config.getMsgCombination().newAnswer(combinationPlayer);\n String[] clews = ia.clues(combinationPlayer);\n if (IsWin.winIf(clews)) {\n config.getMsgInfo().isWin();\n return;\n }\n config.getMsgCombination().cluesAre(clews);\n\n counter--;\n config.getMsgInfo().counterLess(counter);\n\n do {\n // Proposition player1\n config.getMsgInfo().player1();\n combinationPlayer = player1.research(clues);\n config.getMsgCombination().newAnswer(combinationPlayer);\n clues = ia.clues(combinationPlayer);\n if (IsWin.winIf(clues)) {\n config.getMsgInfo().isWin();\n return;\n } else if (counter > 1) {\n config.getMsgCombination().cluesAre(clues);\n } else if (counter == 1) {\n if (!Arrays.equals(combinationPlayer, defenseCombination))\n config.getMsgInfo().notGood();\n }\n\n // Proposition player2\n config.getMsgInfo().player2();\n combinationPlayer = player2.research(clews);\n config.getMsgCombination().newAnswer(combinationPlayer);\n clews = ia.clues(combinationPlayer);\n if (IsWin.winIf(clews)) {\n config.getMsgInfo().isWin();\n return;\n } else if (counter > 1) {\n config.getMsgCombination().cluesAre(clews);\n } else if (counter == 1) {\n if (!Arrays.equals(combinationPlayer, defenseCombination))\n config.getMsgInfo().notGood();\n }\n\n counter--;\n if (counter >= 1)\n config.getMsgInfo().counterLess(counter);\n else {\n config.getMsgInfo().endGameDuel();\n config.getMsgCombination().finallyRevealSecretCombination(defenseCombination);\n break;\n }\n } while (true);\n }", "static void hanoi(int n, int[] A, int[] B, int[] C){\n count++;\n /*\n * a_n = 2*a_n-1 + 1\n * 1. move n-1 disks to B\n * 2. move 1 last disk to C\n * 3. move n-1 disks to C\n */\n int va = end_value(A), la = end_of_array(A);\n int vb = end_value(B), lb = end_of_array(B);\n int vc = end_value(C), lc = end_of_array(C);\n\n if ( n!= 1 ) {\n moveto = 3 - moveto;\n hanoi(n-1,A,B,C);\n } else {\n if ( from == 0 ) {\n\n if(moveto == 2) {\n C[lc] = va;\n A[la-1] = 0;\n }\n else if(moveto == 1){\n B[lb] = va;\n A[la-1] = 0;\n }\n\n } else if ( from == 1 ) {\n\n if(moveto == 0) {\n A[la] = vb;\n B[lb-1] = 0;\n }\n else if(moveto == 2){\n C[lc] = vb;\n B[lb-1] = 0;\n }\n\n } else {\n\n if(moveto == 0) {\n A[la] = vc;\n C[lc-1] = 0;\n }\n else if(moveto == 1){\n B[lb] = vc;\n C[lc-1] = 0;\n }\n\n }\n visualization(A,B,C);\n return ;\n }\n\n moveto = 3 - moveto;\n hanoi(n-1,A,B,C);\n\n if(moveto == 2) {\n C[lc] = A[la];\n A[la] = 0;\n }\n else if(moveto == 1){\n B[lb] = A[la];\n A[la] = 0;\n }\n visualization(A,B,C);\n\n\n }", "public void toCollectPos()throws InterruptedException{\n motorShoulder.setTargetPosition(-90);\r\n motorElbow.setTargetPosition(141);\r\n motorShoulder.setPower(SLOW_POWER);\r\n motorElbow.setPower(SLOW_POWER);\r\n sleep(1000);\r\n\r\n servoBucket.setPosition(0.28);\r\n\r\n motorShoulder.setTargetPosition(-440);\r\n motorElbow.setTargetPosition(280);\r\n motorShoulder.setPower(SLOW_POWER);\r\n motorElbow.setPower(SLOW_POWER);\r\n sleep(1000);\r\n\r\n motorShoulder.setTargetPosition(-500);\r\n motorShoulder.setPower(SLOW_POWER);\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void crossover() {\r\n\t\tfinal double CROSSOVER_PROB = 0.5;\r\n\t\tfor (int i=0; i<this.nChromosomes-(this.nChromosomes%2); i=i+2) {\r\n\t\t\tif (Math.random() < CROSSOVER_PROB) {\r\n\t\t\t\tArrayList<Integer> chr1 = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\t\tArrayList<Integer> chr2 = (ArrayList<Integer>) this.chromosomes.get(i+1);\r\n\t\t\t\t// Uniform crossover\r\n\t\t\t\tif (!chr1.equals(chr2)) {\r\n\t\t\t\t\tfor (int j=0; j<this.nViaPoints; j=j+2) {\r\n\t\t\t\t\t\t// swap via points between 2 chromosomes\r\n\t\t\t\t\t\tInteger tmp = chr2.get(j);\r\n\t\t\t\t\t\tchr2.remove(j);\r\n\t\t\t\t\t\tchr2.add(j, chr1.get(j));\r\n\t\t\t\t\t\tchr1.remove(j);\r\n\t\t\t\t\t\tchr1.add(j, tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.printChromosomes(\"After crossover\");\r\n\t}", "public void write(short[] buffer, int offset, int bufLen) throws IOException {\n for(int i = offset; i< offset + bufLen; i++) {\n byte b1 = (byte) (buffer[i] & 0xFF);\n byte b2 = (byte) (buffer[i] >> 8);\n // Log.d(\"PHILIP\", \"writing \" + b1);\n mOutputStream.write(b1);\n // Log.d(\"PHILIP\", \"writing \" + b2);\n mOutputStream.write(b2);\n }\n }", "private void coins_a2R(){\n\t\tthis.cube[13] = this.cube[53]; \n\t\tthis.cube[53] = this.cube[18];\n\t\tthis.cube[18] = this.cube[0];\n\t\tthis.cube[0] = this.cube[27];\n\t\tthis.cube[27] = this.cube[13];\n\t}", "private void othersturn(String otherplayermsg, int commandlength) {\n boolean burn = false;\n // decode variable that came with message\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n String name = otherplayermsg.substring(commandlength + 1, varlength);\n int varlength2 = 0;\n for (int n = varlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength2 = n;\n break;\n }\n }\n String cardno = otherplayermsg.substring(varlength + 1, varlength2);\n\n // determining which player just had a turn\n int playernumber = 0;\n for (int n = 0; n < 3; n++)\n if (name.equals(otherNames[n])) {\n playernumber = n;\n break;\n }\n\n if (cardno.equals(\"pickup\")) { // other players picks up pile\n cardcount[playernumber] = cardcount[playernumber] + pile.size();\n pile.clear();\n sh.addMsg(otherNames[playernumber] + \" picked up the pile\");\n } else if (cardno.equals(\"burn\")) { // other player burns the pile\n burnPile();\n burn = true;\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n if (deck == 0 || cardcount[playernumber] > 3) {\n if (cardcount[playernumber] > 0) cardcount[playernumber]--;\n } else deck--;\n } else if (cardno.equals(\"faceup\")) { // otherplayer plays a faceup card\n int varlength3 = 0;\n for (int n = varlength2 + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength3 = n;\n break;\n }\n }\n String cardno2 = otherplayermsg.substring(varlength2 + 1, varlength3);\n if (cardno2.equals(\"multi\")) {\n burn = faceupmulti(otherplayermsg, varlength3, playernumber);\n } else {\n try {\n Card card = new Card(Integer.parseInt(cardno2));\n // adding card to pile\n pile.add(card);\n // burning pile if a 10 is played\n if (pile.topValue() == 10 || pile.isFourOfAKind()) {\n burnPile();\n burn = true;\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n }\n // removing card from table\n for (int n = 0; n < 3; n++)\n if (faceup[playernumber][n] != null)\n if (faceup[playernumber][n].getNumber() == card.getNumber()) {\n faceup[playernumber][n] = null;\n break;\n }\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer - variable to Int error: \" + b);\n }\n }\n } else if (cardno.equals(\"facedown\")) { // if player plays one of there face down cards\n int varlength3 = 0;\n for (int n = varlength2 + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength3 = n;\n break;\n }\n }\n String cardno2 = otherplayermsg.substring(varlength2 + 1, varlength3);\n if (cardno2.equals(\"pickup\")) {\n for (int n = varlength3 + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength2 = n;\n break;\n }\n }\n String cardplayed = otherplayermsg.substring(varlength3 + 1, varlength2);\n int numPlayed = 0;\n try {\n numPlayed = Integer.parseInt(cardplayed);\n } catch (NumberFormatException b) {\n sh.addMsg(\"processTurn - facedown pickup - variable to Int error: \" + b);\n }\n cardcount[playernumber] = cardcount[playernumber] + pile.size() + 1;\n pile.clear();\n sh.addMsg(\n otherNames[playernumber]\n + \" played a \"\n + Card.getCardStringValue(numPlayed)\n + \" and had to picked up the pile\");\n } else {\n try {\n Card card = new Card(Integer.parseInt(cardno2));\n pile.add(card);\n // burning pile if a 10 is played\n if (pile.topValue() == 10 || pile.isFourOfAKind()) {\n burnPile();\n burn = true;\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n }\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer - variable to Int error: \" + b);\n }\n }\n carddowncount[playernumber]--;\n } else if (cardno.equals(\"multi\")) { // if more than 1 card is played at a time\n // determining how many card where played\n int varlength3 = 0;\n for (int n = varlength2 + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength3 = n;\n break;\n }\n }\n String numPlayedString = otherplayermsg.substring(varlength2 + 1, varlength3);\n // converting string to int for processing\n int numPlayed = 0;\n try {\n numPlayed = Integer.parseInt(numPlayedString);\n } catch (NumberFormatException b) {\n sh.addMsg(\"processTurn - multi - variable to Int error: \" + b);\n }\n for (int n = 0; n < numPlayed; n++) {\n varlength2 = varlength3;\n // determining how many card where played\n varlength3 = 0;\n for (int i = varlength2 + 1; i < otherplayermsg.length(); i++) {\n char extract = otherplayermsg.charAt(i);\n if (extract == (':')) {\n varlength3 = i;\n break;\n }\n }\n String cardnoString = otherplayermsg.substring(varlength2 + 1, varlength3);\n // converting string to int for processing\n try {\n Card card = new Card(Integer.parseInt(cardnoString));\n pile.add(card);\n } catch (NumberFormatException b) {\n sh.addMsg(\"processTurn - multi - variable to Int error: \" + b);\n }\n\n if (deck == 0 || cardcount[playernumber] > 3) {\n if (cardcount[playernumber] > 0) cardcount[playernumber]--;\n } else deck--;\n }\n\n // burning pile if a 10 is played or 4 of a kind\n if (pile.topValue() == 10 || pile.isFourOfAKind()) {\n burnPile();\n burn = true;\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n }\n\n } else {\n // adding card to pile\n try {\n Card card = new Card(Integer.parseInt(cardno));\n pile.add(card);\n // burning pile if a 10 is played\n if (pile.topValue() == 10 || pile.isFourOfAKind()) {\n burn = true;\n burnPile();\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n }\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer else - variable to Int error: \" + b);\n }\n if (deck == 0 || cardcount[playernumber] > 3) {\n if (cardcount[playernumber] > 0) cardcount[playernumber]--;\n } else deck--;\n }\n if (!burn) nextTurn();\n displayTable();\n }", "private void adjustObserverLocationByClick(int dir, double offset) {\n\t\tHBox n0 = (HBox) uicontrols.getChildren().get(0);\n\t\tHBox n1 = (HBox) uicontrols.getChildren().get(1);\n\t\tTextField t0 = (TextField) n0.getChildren().get(1); // Lat\n\t\tTextField t1 = (TextField) n1.getChildren().get(1); // Long\n\t\tdouble latitude = 0.0;\n\t\tdouble longitude = 0.0;\n\t\ttry {\n\t\t\tlatitude = Double.parseDouble(t0.getText());\n\t\t\tlongitude = Double.parseDouble(t1.getText());\n\t\t} catch(NumberFormatException e) {\n\t\t}\n\t\tif (dir == 1) { // NW\n\t\t\tlatitude += offset;\n\t\t\tlongitude -= (offset * 4);\n\t\t\tif (latitude > 89.99999) {\n\t\t\t\tlatitude = 89.99999;\n\t\t\t}\n\t\t\tif (longitude < -180.0) {\n\t\t\t\tlongitude += 180.0;\n\t\t\t\tlongitude = 180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 2) { // NE\n\t\t\tlatitude += offset;\n\t\t\tlongitude += (offset * 4);\n\t\t\tif (latitude > 89.99999) {\n\t\t\t\tlatitude = 89.99999;\n\t\t\t}\n\t\t\tif (longitude > 180.0) {\n\t\t\t\tlongitude -= 180.0;\n\t\t\t\tlongitude = -180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 3) { // SW\n\t\t\tlatitude -= offset;\n\t\t\tlongitude -= (offset * 4);\n\t\t\tif (latitude < -89.99999) {\n\t\t\t\tlatitude = -89.99999;\n\t\t\t}\n\t\t\tif (longitude < -180.0) {\n\t\t\t\tlongitude += 180.0;\n\t\t\t\tlongitude = 180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 4) { // SE\n\t\t\tlatitude -= offset;\n\t\t\tlongitude += (offset * 4);\n\t\t\tif (latitude < -89.99999) {\n\t\t\t\tlatitude = -89.99999;\n\t\t\t}\n\t\t\tif (longitude > 180.0) {\n\t\t\t\tlongitude -= 180.0;\n\t\t\t\tlongitude = -180.0 + longitude;\n\t\t\t}\n\t\t}\n\t\tt0.setText(\"\" + latitude);\n\t\tt1.setText(\"\" + longitude);\n\t}", "public static void upos(Object... args) throws Exception {\n\t\tlogger.debug(\"Called 'upos' with args: {}\", Arrays.asList(args));\n\t\tif (args.length >= 2) {\n\t\t\t// identify scannables and the positions to move them to\n\t\t\tScannable[] scannables = new Scannable[args.length / 2];\n\t\t\tObject[] positions = new Object[args.length / 2];\n\t\t\tint j = 0;\n\t\t\tfor (int i = 0; i < args.length; i += 2) {\n\t\t\t\tif (args[i] instanceof Scannable) {\n\t\t\t\t\tscannables[j] = (Scannable) args[i];\n\t\t\t\t\tpositions[j] = args[i + 1];\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// send commands\n\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\traiseDeviceExceptionIfPositionNotValid(scannables[i], positions[i]);\n\t\t\t\tscannables[i].asynchronousMoveTo(positions[i]);\n\t\t\t}\n\n\t\t\t// construct print out command\n\t\t\tString jythonCommand = \"print \\\"\\\\rMove in progress: \";\n\t\t\tfor (Scannable scannable : scannables) {\n\t\t\t\tjythonCommand += scannable.getName() + \":\\\" + str(\" + scannable.getName() + \".getPosition()\"\n\t\t\t\t\t\t+ \") + \\\" \";\n\t\t\t}\n\t\t\tjythonCommand = jythonCommand.substring(0, jythonCommand.length() - 5);\n\n\t\t\t// wait\n\t\t\ttry {\n\t\t\t\twhile (areAnyBusy(scannables)) {\n\t\t\t\t\tJythonServerFacade.getInstance().runCommand(jythonCommand);\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// print out exception, but carry on in this method\n\t\t\t\t// to report final positions\n\t\t\t\tlogger.info(\"Exception while waiting for move '{}' to finish: \", jythonCommand, e);\n\t\t\t}\n\n\t\t\tString output = \"Move completed: \";\n\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\toutput += scannables[i].getName();\n\t\t\t\tObject position = scannables[i].getPosition();\n\t\t\t\tif (position != null) {\n\t\t\t\t\toutput += \":\" + position.toString() + \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tInterfaceProvider.getTerminalPrinter().print(\"\\\\n\" + output);\n\t\t}\n\t}", "public void pos60() throws InterruptedException{\r\n bucketOverSweeper();\r\n sleep(2500);\r\n motorShoulder.setTargetPosition(-1160);\r\n motorElbow.setTargetPosition(2271);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n motorShoulder.setPower(POWER_SHOULDER_FAST);\r\n sleep(1000);\r\n\r\n servoBucket.setPosition(0.5);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3075);\r\n motorShoulder.setTargetPosition(-1300);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n motorShoulder.setPower(POWER_SHOULDER_FAST);\r\n sleep(1000);\r\n\r\n motorElbow.setTargetPosition(3500);\r\n motorElbow.setPower(POWER_ELBOW_SLOW);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(MAX_BUCKET);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3600);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n sleep(1000);\r\n\r\n servoBucket.setPosition(0.85);\r\n\r\n servoBucket.setPosition(0.80);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.70);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.65);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.60);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.55);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.50);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.40);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.30);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3000);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n sleep(500);\r\n\r\n posBucket = MAX_BUCKET;\r\n posElbow = 3000;\r\n posShoulder = -1275;\r\n sleep(3000);\r\n returnBucket();\r\n\r\n }", "public void move(int pin, int pos) throws Exception{\r\n\t // keep pos in valid range\r\n\t\tif (pos < 0 || pos >255) {\r\n\t\t\tthrow new Exception(\"Position out of range, must be between 0 and 255. Value was \" + pos + \".\");\r\n\t\t}\r\n\t\t// keep pin in valid range\r\n\t\tif (pin < 0 || pin > maxPin) {\r\n\t\t\tthrow new Exception(\"Pin out of range, must be between 0 and \" \r\n\t\t\t\t\t+ maxPin + \". Value was \" + pin + \".\");\r\n\t\t}\r\n\t\t// create byte[] for commands\r\n\t\tbyte [] b = new byte[] {(byte)255,(byte)pin,(byte)pos};\r\n\t\t// send those bytes to controller\r\n\t\texecute(b,0);\r\n\t}", "private void coins_a2O(){\n\t\tthis.cube[40] = this.cube[8]; \n\t\tthis.cube[8] = this.cube[26];\n\t\tthis.cube[26] = this.cube[45];\n\t\tthis.cube[45] = this.cube[35];\n\t\tthis.cube[35] = this.cube[40];\n\t}", "@Override\r\n\tpublic void turnToward(int x, int y) {\n\t}", "@Override\n public boolean attack(Player attacker, int mode1, int[] mode2, Player[] attackedPlayers, Position[] movements, PowerupCard[] payment) {\n boolean done = false;\n if(isLoaded() && attackedPlayers.length>=1 && attacker.getPosition().reachable(attackedPlayers[0].getPosition())){\n if(mode1==0 && attackedPlayers.length==1){\n attackedPlayers[0].receivedDamages(attacker);\n attackedPlayers[0].setMarksReceived(attacker,2);\n attacker.setMarksGiven(attackedPlayers[0],2);\n attacker.setPosition(attackedPlayers[0].getPosition());\n loaded=false;\n done=true;\n }else if(mode1==1){\n if(attackedPlayers.length==1 && isPaid(attacker, payment)){\n for(int i=0; i<2; i++)\n attackedPlayers[0].receivedDamages(attacker);\n attacker.setPosition(attackedPlayers[0].getPosition());\n loaded=false;\n done=true;\n }else if(attackedPlayers.length==2 && attackedPlayers[0].getPosition().reachable(attackedPlayers[1].getPosition()) && isPaid(attacker, payment)){\n boolean sameValueOfX = attacker.getPosition().getCoordinate()[0] == attackedPlayers[1].getPosition().getCoordinate()[0];\n boolean sameValueOfY = attacker.getPosition().getCoordinate()[1] == attackedPlayers[1].getPosition().getCoordinate()[1];\n boolean sameDirection = (sameValueOfX || sameValueOfY) && attacker.getPosition() != attackedPlayers[1].getPosition();\n if(sameDirection){\n for (int i = 0; i < 2; i++) {\n attackedPlayers[i].receivedDamages(attacker);\n attackedPlayers[i].receivedDamages(attacker);\n }\n attacker.setPosition(attackedPlayers[1].getPosition());\n loaded = false;\n done = true;\n }\n }\n }\n }\n return done;\n }", "@Override\n public void doMove(List<ICrosser> crossers, boolean fromLeftToRightBank) {\n\n }", "public void setMove2(char playerTwo, int location) {\n\t\t\n\t}", "public void setOffset(Point2D offset) {\n\t\tthis.offset.setLocation(offset);\n\t}", "private Vector crossover(Individual mother, Individual father) {\n \n //don't want to do crossover on two chromosomes that are equal\n if(mother.equals(father)) {\n Vector to_return = new Vector();\n to_return.add(mother);\n to_return.add(father);\n return to_return;\n }\n \n println(\"crossover\", 1);\n int[] mom = mother.getChromosome();\n int[] dad = father.getChromosome();\n int[] child1 = new int[num_shipping_points]; \n int[] child2 = new int[num_shipping_points]; \n \n println(\"mother is\", 1);\n displayChromosome(mother, 1);\n println(\"father is\", 1);\n displayChromosome(father, 1);\n \n int breakpoint = (int)(Math.random() * num_shipping_points) + 3;\n println(\"breakpoint = \" + breakpoint, 1);\n \n int comparisons = 0;\n \n for(int i = 0; i < num_shipping_points; i++) {\n if(i < breakpoint) {\n child1[i] = mom[i];\n child2[i] = dad[i];\n }\n else {\n child1[i] = -1;\n child2[i] = -1;\n }\n } \n \n int j = breakpoint; //index on other chromosome\n\n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child2, mom[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n \n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint) //not supposed to happen, but it does\n break;\n }\n child2[i] = mom[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n\n }\n \n j = breakpoint;\n comparisons = 0; \n for(int i = breakpoint; i < num_shipping_points; i++) {\n\n while(containsGene(child1, dad[j])) {\n j++;\n comparisons++;\n if(comparisons > 30) {\n println(\"leaving\", 1);\n System.exit(0);\n }\n if(j == num_shipping_points) {\n j = 0;\n }\n if(j == breakpoint)\n break;\n }\n child1[i] = dad[j];\n j++;\n if(j == num_shipping_points) {\n j = 0;\n }\n }\n \n Vector v = new Vector();\n Individual i1 = new Individual(child1, this);\n Individual i2 = new Individual(child2, this);\n //i1.setFitness(evaluateFitness(i1));\n //i2.setFitness(evaluateFitness(i1));\n v.add(i1);\n v.add(i2);\n println(\"kid1:\",1);\n displayChromosome(i1, 1);\n println(\"kid2:\", 1);\n displayChromosome(i2, 1);\n println(\"returning from crossover\",1);\n return v;\n }", "public int sreceive (byte[] buf1, int offset1, int length1, byte[] buf2, int offset2, int length2, long timeout)\n throws IOException, IllegalArgumentException, IndexOutOfBoundsException\n {\n if (offset1 < 0) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if (length1 < 0) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if ((offset1 + length1) > buf1.length) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if (offset2 < 0) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if (length2 < 0) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if ((offset2 + length2) > buf2.length) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n return sreceive2Args(buf1, offset1, length1, buf2, offset2, length2, timeout);\n }", "private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }", "public void adjustHorizontalOffset(int offset) {\n OFFSET_HOZ += offset;\n }", "public void setTargetPosition2(int position,\n HwDevice[] motorArry)\n throws InterruptedException\n {\n motors.setTargetPosition(position,\n motorArry);\n }", "protected void slideTo(int offset) {\n\t\tsd.quickSlide(offset);\n\t}", "@Override\n\t\tpublic CompletableFuture<Void> write(byte[] buffer, long offset) {\n\t\t\t\n\t\t\tsynchronized(roleSwitcherThread) {\n\t\t\t\tif (!RockyController.role.equals(RockyControllerRoleType.Owner)) {\n\t\t\t\t\tSystem.err.println(\"ASSERT: write can be served only by the Owner\");\n\t\t\t\t\tSystem.err.println(\"currently, my role=\" + RockyController.role);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (debugPrintoutFlag) {\n\t\t\t\tSystem.out.println(\"write entered. buffer size=\" + buffer.length);\n\t\t\t\tSystem.out.println(\"offset=\" + offset);\n\t\t\t}\n\t\t\t\n\t\t\tlong firstBlock = offset / blockSize;\n\t\t\tint length = buffer.length;\n\t\t long lastBlock = 0;\n\t\t if (length % blockSize == 0) {\n\t\t \tlastBlock = (offset + length) / blockSize - 1;\n\t\t } else {\n\t\t \tlastBlock = (offset + length) / blockSize;\n\t\t }\n\t\t //long lastBlock = (offset + length) / blockSize;\n\t\t \n\t\t if (debugPrintoutFlag) {\n\t\t \tSystem.out.println(\"firstBlock=\" + firstBlock + \" lastBlock=\" + lastBlock + \" length=\" + length);\n\t\t }\n\t\t \t\n\t\t if (mutationSnapEvalFlag) {\n\t\t \tnumBlockWrites += (int) (lastBlock - firstBlock + 1);\n\t\t }\n\t\t \n//\t\t // we assume that buffer size to be blockSize when it is used\n//\t\t // as a block device properly. O.W. it can be smaller than that.\n//\t\t // To make it compatible with the original intention, when \n//\t\t // we get buffer smaller than blockSize, we increment the loastBlock\n//\t\t // by one.\n//\t\t if (firstBlock == lastBlock) {\n//\t\t \tlastBlock++; \n//\t\t }\n//\t\t for (int i = (int) firstBlock; i < (int) lastBlock; i++) {\n\t \tfor (int i = (int) firstBlock; i <= (int) lastBlock; i++) {\n\t \t\tif (debugPrintoutFlag) {\n\t \t\t\tSystem.out.println(\"setting dirtyBitmap for blockID=\" + i);\n\t \t\t}\n\t \t\tsynchronized(dirtyBitmap) {\n\t\t \t\tdirtyBitmap.set(i);\n\t\t \t}\n\t\t \tWriteRequest wr = new WriteRequest();\n\t\t \tint copySize = 0;\n\t\t \tif (i == lastBlock) {\n\t\t \t\tif (debugPrintoutFlag) {\n\t\t \t\t\tSystem.out.println(\"copySize first\");\n\t\t \t\t}\n\t\t \t\tint residual = buffer.length % blockSize;\n\t\t \t\tif (residual == 0) {\n\t\t \t\t\tcopySize = blockSize;\n\t\t \t\t} else {\n\t\t \t\t\tcopySize = residual;\n\t\t \t\t}\n\t\t \t} else {\n\t\t \t\tif (debugPrintoutFlag) {\n\t\t \t\t\tSystem.out.println(\"copySize second\");\n\t\t \t\t}\n\t\t \t\tcopySize = blockSize;\n\t\t \t}\n\t\t \tbyte[] copyBuf = new byte[copySize];\n\t\t \tif (debugPrintoutFlag) {\n\t\t \t\tSystem.out.println(\"copySize=\" + copySize);\n\t\t \t}\n\t\t \tint bufferStartOffset = (int) ((i - firstBlock) * blockSize);\n\t\t \tif (debugPrintoutFlag) {\n\t\t \t\tSystem.out.println(\"bufferStartOffset=\" + bufferStartOffset + \" i=\" + i + \" firstBlock=\" + firstBlock + \" blockSize=\" + blockSize);\n\t\t \t}\n\t\t \tSystem.arraycopy(buffer, (int) ((i - firstBlock) * blockSize), copyBuf, 0, copySize);\n\t\t \twr.buf = copyBuf;\n\t\t \t//wr.offset = offset;\n\t\t\t wr.offset = i * blockSize;\n\t\t\t try {\n\t\t\t \t//System.out.println(\"[RockyStorage] enqueuing WriteRequest for blockID=\" \n\t\t\t \t//\t\t+ ((int) wr.offset / blockSize));\n\t\t\t\t\tqueue.put(wr);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t\treturn super.write(buffer, offset);\n\t\t}", "public void sendDataToAMQ(){\n\t\t\r\n\t\tList<String> msg = new ArrayList<>();\r\n\t\tif(offsetfollower < (prototype.followerDrivingInfo.meetingLocation - 500)) {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.followerDrivingInfo.speed;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.followerDrivingInfo.speed)+\" carSpeed>\");\t\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.leaderDrivingInfo.speed ;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\t\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\r\n\t\t}\r\n for(int i = 0; i < msg.size();i++)\r\n {\r\n \tamqp.sendMessage(msg.get(i));\r\n }\r\n// \t}\r\n }", "public boolean playerThrough(int px, int py, int pw, int ph){\r\n Line2D.Double line = new Line2D.Double(p1,p2); //the gate line\r\n //check if line intersects the player's rectangle of space\r\n if(line.intersects(px, py, pw, ph)){\r\n return true; //gate triggered\r\n }\r\n return false; //gate not triggered\r\n }", "private void coins_a2W(){\n\t\tthis.cube[4] = this.cube[17]; \n\t\tthis.cube[17] = this.cube[20];\n\t\tthis.cube[20] = this.cube[36];\n\t\tthis.cube[36] = this.cube[33];\n\t\tthis.cube[33] = this.cube[4];\n\t}", "void move_couple() {\n\t\tfor(int i = 0; i < d; i++){\n\t\t\tif(dancers[i].soulmate == -1) continue;\n\t\t\tPoint curr = this.last_positions[i];\n\t\t\tPoint des = this.dancers[i].des_pos;\n\t\t\tthis.dancers[i].next_pos = findNextPosition(curr, des);\n\t\t}\n\t}" ]
[ "0.5539737", "0.5356398", "0.5100791", "0.5053806", "0.5053059", "0.50511545", "0.5044558", "0.5040648", "0.49490094", "0.4935867", "0.4924689", "0.49049005", "0.48879933", "0.4854548", "0.48059508", "0.4799655", "0.47931087", "0.47496316", "0.47268036", "0.47239336", "0.47200724", "0.4702708", "0.46818322", "0.4681308", "0.4671674", "0.46665964", "0.46644145", "0.46512467", "0.46504477", "0.46386278", "0.46355888", "0.46232444", "0.46220762", "0.45946836", "0.4593526", "0.45847705", "0.4583851", "0.45838198", "0.45824096", "0.45810774", "0.4565261", "0.4533218", "0.4529494", "0.452466", "0.45213142", "0.45117784", "0.45116338", "0.45046026", "0.45016053", "0.45001274", "0.4499797", "0.44929606", "0.44902214", "0.447769", "0.44767916", "0.4474916", "0.44733185", "0.447227", "0.44670427", "0.446661", "0.4465391", "0.44610456", "0.44565463", "0.4456518", "0.44552463", "0.4454831", "0.44507432", "0.44480938", "0.4443879", "0.4440822", "0.44388163", "0.44374794", "0.44357786", "0.4429247", "0.44234318", "0.44213656", "0.44206554", "0.4419479", "0.44189486", "0.44173154", "0.441595", "0.4414017", "0.44139546", "0.44070628", "0.44059494", "0.43999213", "0.43996873", "0.43993443", "0.43966362", "0.4394619", "0.43936276", "0.4391008", "0.43865728", "0.43821216", "0.43777633", "0.43775573", "0.43680453", "0.43595898", "0.4355089", "0.43527895" ]
0.6574691
0
TODO Autogenerated method stub
@Override public void handleMessage(Message msg) { super.handleMessage(msg); switch(msg.what){ case COMMENT_OK: String[] operatStatus = (String[]) msg.obj; if ("1".equals(operatStatus[0])) { inputView.setText(""); Toast.makeText(mContext,"发布成功", Toast.LENGTH_SHORT) .show(); if(post_comment_list!=null){ post_comment_list.refresh(); } } else { Toast.makeText(mContext, "发布失败", Toast.LENGTH_SHORT) .show(); } break; case WeibaBaseHelper.DATA_ERROR: Toast.makeText(mContext, "数据加载失败", Toast.LENGTH_SHORT) .show(); break; case WeibaBaseHelper.NET_ERROR: Toast.makeText(mContext, "网络故障", Toast.LENGTH_SHORT).show(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); View rootView = inflater.inflate(R.layout.post_detail_fragment_layout, container, false); navigation=(ImageView) rootView.findViewById(R.id.weiba_fragment_title); post_title=(TextView)rootView.findViewById(R.id.post_title); weiba_name=(TextView)rootView.findViewById(R.id.weiba_name); post_user=(TextView)rootView.findViewById(R.id.post_user); post_date=(TextView)rootView.findViewById(R.id.post_date); post_content=(WebView)rootView.findViewById(R.id.post_content); post_comment=(TextView)rootView.findViewById(R.id.post_comment); post_view=(TextView)rootView.findViewById(R.id.post_view); post_collect=(ImageView)rootView.findViewById(R.id.post_collect); ScrollView=rootView.findViewById(R.id.scrollView); inputView=(EditText) rootView.findViewById(R.id.edit_comment); sendButton=rootView.findViewById(R.id.create_post_send); detail_comment=rootView.findViewById(R.id.detail_comment); navigation.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ((MainFragmentActivity) getActivity()).getSlidingMenu() .toggle(); } }); post_title.setText(post.getTitle()); weiba_name.setText("[" + WeibaOperator.getInstance().queryWeibaNameByID( post.getWeiba_id()) + "]"); post_user.setText(post.getUname()); post_date.setText(DateUtils.getTimeInString(post.getPost_time())); //帖子内容显示设置 WebSettings contentSetting= post_content.getSettings(); contentSetting.setDefaultTextEncodingName("utf-8"); contentSetting.setSupportZoom(true); contentSetting.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); post_content.setBackgroundColor(0); post_content.loadDataWithBaseURL("http://tsimg.tsurl.cn", post.getContent(), "text/html", "utf-8", null); displayflag=1; post_content.setOnTouchListener(new OnTouchListener(){//双击实现不同的显示模式。 int count = 0; long firClick = 0; long secClick = 0; @Override public boolean onTouch(View view, MotionEvent event) { // TODO Auto-generated method stub if(MotionEvent.ACTION_DOWN == event.getAction()){ count++; if(count == 1){ firClick = System.currentTimeMillis(); } else if (count == 2){ secClick = System.currentTimeMillis(); if(secClick - firClick < 500){ if(displayflag==1){ WebSettings contentSetting= post_content.getSettings(); contentSetting.setUseWideViewPort(true); //contentSetting.setLoadWithOverviewMode(true); contentSetting.setSupportZoom(true); contentSetting.setBuiltInZoomControls(true); post_content.loadDataWithBaseURL("http://tsimg.tsurl.cn", post.getContent(), "text/html", "utf-8", null); displayflag=2; Toast.makeText(mContext,"切换到缩放模式", Toast.LENGTH_SHORT) .show(); }else{ WebSettings contentSetting= post_content.getSettings(); //contentSetting.setUseWideViewPort(false); //contentSetting.setLoadWithOverviewMode(false); contentSetting.setSupportZoom(false); contentSetting.setBuiltInZoomControls(false); contentSetting.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); post_content.loadDataWithBaseURL("http://tsimg.tsurl.cn", post.getContent(), "text/html", "utf-8", null); displayflag=1; Toast.makeText(mContext,"切换到自适应屏幕模式", Toast.LENGTH_SHORT) .show(); } } count = 0; firClick = 0; secClick = 0; } } return true; } }); post_comment.setText("(" + post.getReply_count()+ ")"); post_view.setText("(" + post.getRead_count() + ")"); post_comment.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if(flag){ ScrollView.setVisibility(View.GONE); detail_comment.setVisibility(View.VISIBLE); initCommentList(); flag=!flag; }else{ ScrollView.setVisibility(View.VISIBLE); detail_comment.setVisibility(View.GONE); //getChildFragmentManager().beginTransaction().hide(post_comment_list).commit(); flag=!flag; } } }); sendButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub String tag=(String)inputView.getTag(); String act,id,content; content=inputView.getText().toString(); if(!content.contains("@")){ tag=null; } if(tag!=null){ act=REPLY_COMMENT; id=tag; }else{ act=COMMENT_POST; id=post.getPost_id(); } final Map<String, String> reply = new HashMap<String, String>(); reply.put("app", APP); reply.put("mod", MOD); reply.put("act", act); reply.put("id", id); reply.put("content", content); reply.put("oauth_token", OAUTH_TOKEN); reply.put("oauth_token_secret", OAUTH_TOKEN_SECRECT); new Thread(new WeibaActionHelper(myHandler, mContext, reply, COMMENT_OK)).start(); } }); final boolean followState=post.getFavorite() == 1; final String post_id=post.getPost_id(); post_collect.setImageResource(followState?R.drawable.heart:R.drawable.favourite); post_collect.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub ((ImageView) v) .setImageResource(!followState ? R.drawable.heart : R.drawable.favourite); post.setFavorite(!followState?1:0); mHandler.obtainMessage(!followState?3:4, post_id) .sendToTarget(); } }); init(); return rootView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean onTouch(View view, MotionEvent event) { if(MotionEvent.ACTION_DOWN == event.getAction()){ count++; if(count == 1){ firClick = System.currentTimeMillis(); } else if (count == 2){ secClick = System.currentTimeMillis(); if(secClick - firClick < 500){ if(displayflag==1){ WebSettings contentSetting= post_content.getSettings(); contentSetting.setUseWideViewPort(true); //contentSetting.setLoadWithOverviewMode(true); contentSetting.setSupportZoom(true); contentSetting.setBuiltInZoomControls(true); post_content.loadDataWithBaseURL("http://tsimg.tsurl.cn", post.getContent(), "text/html", "utf-8", null); displayflag=2; Toast.makeText(mContext,"切换到缩放模式", Toast.LENGTH_SHORT) .show(); }else{ WebSettings contentSetting= post_content.getSettings(); //contentSetting.setUseWideViewPort(false); //contentSetting.setLoadWithOverviewMode(false); contentSetting.setSupportZoom(false); contentSetting.setBuiltInZoomControls(false); contentSetting.setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN); post_content.loadDataWithBaseURL("http://tsimg.tsurl.cn", post.getContent(), "text/html", "utf-8", null); displayflag=1; Toast.makeText(mContext,"切换到自适应屏幕模式", Toast.LENGTH_SHORT) .show(); } } count = 0; firClick = 0; secClick = 0; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { if(flag){ ScrollView.setVisibility(View.GONE); detail_comment.setVisibility(View.VISIBLE); initCommentList(); flag=!flag; }else{ ScrollView.setVisibility(View.VISIBLE); detail_comment.setVisibility(View.GONE); //getChildFragmentManager().beginTransaction().hide(post_comment_list).commit(); flag=!flag; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { String tag=(String)inputView.getTag(); String act,id,content; content=inputView.getText().toString(); if(!content.contains("@")){ tag=null; } if(tag!=null){ act=REPLY_COMMENT; id=tag; }else{ act=COMMENT_POST; id=post.getPost_id(); } final Map<String, String> reply = new HashMap<String, String>(); reply.put("app", APP); reply.put("mod", MOD); reply.put("act", act); reply.put("id", id); reply.put("content", content); reply.put("oauth_token", OAUTH_TOKEN); reply.put("oauth_token_secret", OAUTH_TOKEN_SECRECT); new Thread(new WeibaActionHelper(myHandler, mContext, reply, COMMENT_OK)).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { ((ImageView) v) .setImageResource(!followState ? R.drawable.heart : R.drawable.favourite); post.setFavorite(!followState?1:0); mHandler.obtainMessage(!followState?3:4, post_id) .sendToTarget(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
This method should traverse expression in leftmostoutermost first order.
public void accept(IVisitor visitor);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Type traverseTree(Node parsedTree) {\n Expression exp = new Expression(Type.EMPTY, Type.EMPTY, Connector.empty); // Creation of a new expression with empty fields\n\n\t\t// Determines the type from left to right of the given expression\n for (Node child : parsedTree.getChildren()) {\n \texp = evalExpressionAndSetLeft(addChildToExpression(child, exp));\n }\n return exp.getLeftExpressionType();\n }", "public Expr left() {\n\treturn this.left;\n }", "LogicExpression getLeftExp();", "LogicExpression getLeft();", "public AST getLeft() {\n\t\treturn left;\n\t}", "EObject getLeft();", "@Override\n\tpublic WhereNode getLeftChild() {\n\t\treturn null;\n\t}", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "private E[] getPreOrderLeftSubTree(E[] inOrderTraversal,E[] preOrderTraversal) {\n\t\treturn null;\n\t}", "protected void visitLeftSubtree() {\n\t\tif(tree.hasLeftNode()) {\n\t\t\ttree.moveToLeftNode();\n\t\t\ttraverse();\n\t\t\ttree.moveToParentNode();\n\t\t}\n\t}", "public final void expressionRoot() {\n ManchesterOWLSyntaxTree EXPRESSION1 = null;\n ManchesterOWLSyntaxAutoComplete.expression_return e = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:82:5:\n // ( ^( EXPRESSION e= expression ) )\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:82:9:\n // ^( EXPRESSION e= expression )\n {\n EXPRESSION1 = (ManchesterOWLSyntaxTree) match(input, EXPRESSION,\n FOLLOW_EXPRESSION_in_expressionRoot155);\n if (state.failed) {\n return;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return;\n }\n pushFollow(FOLLOW_expression_in_expressionRoot161);\n e = expression();\n state._fsp--;\n if (state.failed) {\n return;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return;\n }\n if (state.backtracking == 1) {\n EXPRESSION1.setCompletions(e.node.getCompletions());\n }\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return;\n }", "private Expression evalExpressionAndSetLeft(Expression exp) {\n Type rightExpression = exp.getRightExpressionType(); // Get the right type from the given expression\n\n\t\t// Expression not filled yet, so return unmodified expression\n\t\tif (rightExpression.equals(Type.EMPTY)) {\n \t\treturn exp;\n \t}\n \tType typeOfExpression = typeConversionRules.expressionType(exp); // Look up the given expression's type in the Type Conversion Rules\n \tif (typeOfExpression == null) {\n \t\tthrow new UndeterminableTypeException(\"Expression not found in Type Conversion Rules\");\n \t}\n\n \t// Set evaluated expression to the expression's left type and reset other fields\n \texp.setLeftExpressionType(typeOfExpression);\n \texp.setExpressionSymbol(Connector.empty);\n \texp.setRightExpressionType(Type.EMPTY);\n \treturn exp;\n }", "public static void main(String[] args) {\n \n LinkedBinaryTree expr = new LinkedBinaryTree<String>();\n // a is the root of the tree\n Position a, b, c, d, e, f, g, h, i;\n a = expr.addRoot(\"*\");\n b = expr.addLeft(a, \"+\");\n c = expr.addLeft(b, \"/\");\n d = expr.addLeft(c, \"*\");\n e = expr.addLeft(d, \"+\");\n expr.addLeft(e, \"5\");\n expr.addRight(e, \"2\");\n f = expr.addRight(d, \"-\");\n expr.addLeft(f, \"2\");\n expr.addRight(f, \"1\");\n g = expr.addRight(c, \"+\");\n expr.addLeft(g, \"2\");\n expr.addRight(g, \"9\");\n h = expr.addRight(b, \"-\");\n i = expr.addLeft(h, \"-\");\n expr.addLeft(i, \"7\");\n expr.addRight(i, \"2\");\n expr.addRight(h, \"1\");\n expr.addRight(a, \"8\");\n \n System.out.println(\"The original expression:\");\n System.out.println(\"(((5+2)*(2–1)/(2+9)+((7–2)–1))*8)\\n\");\n \n System.out.println(\"Preorder traversal:\");\n Iterable<Position<String>> preIter = expr.preorder();\n for (Position<String> s : preIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Inorder traversal:\");\n Iterable<Position<String>> inIter = expr.inorder();\n for (Position<String> s : inIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Postorder traversal:\");\n Iterable<Position<String>> postIter = expr.postorder();\n for (Position<String> s : postIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Breadth traversal:\");\n Iterable<Position<String>> breadthIter = expr.breadthfirst();\n for (Position<String> s : breadthIter) {\n System.out.print(s.getElement() + \" \");\n }\n System.out.println(\"\\n\");\n \n System.out.println(\"Parenthesized representation:\"); \n printParenthesize(expr, a);\n System.out.println();\n }", "public void inorderTraversal() \n { \n inorderTraversal(header.rightChild); \n }", "private void preorderLeftOnly(Node root) {\r\n if (this != null && !ifLeaf(root))\r\n System.out.print(root.value + \">\");\r\n if (root.left != null)\r\n preorderLeftOnly(root.left);\r\n }", "Node findLeftmost(Node R){\n Node L = R;\n if( L!= null ) for( ; L.left != null; L = L.left);\n return L;\n }", "public void preorderTraversal() \n { \n preorderTraversal(header.rightChild); \n }", "private E[] getInOrderLeftSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}", "OrExp getLeft();", "public StatementParse reconstructTree(ArrayList<StatementParse> expression){\n // an empty expression will not trigger this method\n // first element is always an integer\n StatementParse left_node = expression.get(0);\n\n for (int i = 1; i < expression.size(); i++){\n StatementParse right_node = expression.get(i);\n if (right_node instanceof IntegerParse && ((IntegerParse) right_node).getValue() == 0){\n continue;\n }\n StatementParse top;\n if (right_node.isNegative()){\n top = new StatementParse(\"-\");\n } else {\n top = new StatementParse(\"+\");\n }\n top.getChildren().add(left_node);\n top.getChildren().add(right_node);\n left_node = top;\n }\n return left_node;\n }", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }", "public final JavaliParser.expr_return expr() throws RecognitionException {\n\t\tJavaliParser.expr_return retval = new JavaliParser.expr_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tParserRuleReturnScope leftExpr =null;\n\t\tParserRuleReturnScope op =null;\n\t\tParserRuleReturnScope rightExpr =null;\n\n\t\tRewriteRuleSubtreeStream stream_simpleExpr=new RewriteRuleSubtreeStream(adaptor,\"rule simpleExpr\");\n\t\tRewriteRuleSubtreeStream stream_compOp=new RewriteRuleSubtreeStream(adaptor,\"rule compOp\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:2: (leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) ) )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:427:4: leftExpr= simpleExpr ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1531);\n\t\t\tleftExpr=simpleExpr();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_simpleExpr.add(leftExpr.getTree());\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:428:3: ( -> $leftExpr|op= compOp rightExpr= simpleExpr -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr) )\n\t\t\tint alt25=2;\n\t\t\tint LA25_0 = input.LA(1);\n\t\t\tif ( (LA25_0==70||LA25_0==73||LA25_0==77) ) {\n\t\t\t\talt25=1;\n\t\t\t}\n\t\t\telse if ( (LA25_0==66||(LA25_0 >= 78 && LA25_0 <= 79)||(LA25_0 >= 81 && LA25_0 <= 83)) ) {\n\t\t\t\talt25=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 25, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt25) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:429:4: \n\t\t\t\t\t{\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: leftExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 429:4: -> $leftExpr\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, stream_leftExpr.nextTree());\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:430:5: op= compOp rightExpr= simpleExpr\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_compOp_in_expr1552);\n\t\t\t\t\top=compOp();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_compOp.add(op.getTree());\n\t\t\t\t\tpushFollow(FOLLOW_simpleExpr_in_expr1556);\n\t\t\t\t\trightExpr=simpleExpr();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_simpleExpr.add(rightExpr.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: compOp, leftExpr, rightExpr\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: leftExpr, retval, rightExpr\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_leftExpr=new RewriteRuleSubtreeStream(adaptor,\"rule leftExpr\",leftExpr!=null?leftExpr.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\t\t\t\t\tRewriteRuleSubtreeStream stream_rightExpr=new RewriteRuleSubtreeStream(adaptor,\"rule rightExpr\",rightExpr!=null?rightExpr.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 431:4: -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:431:7: ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $leftExpr compOp $rightExpr)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(BinaryOp, (op!=null?(op.start):null), \"BinaryOp\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_leftExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_compOp.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_rightExpr.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "@Override\n public Object left(Object node) {\n return ((Node<E>) node).left;\n }", "@Override\n public Object left(Object node) {\n return ((Node<E>) node).left;\n }", "public abstract Expression getInitialExpression();", "private KeyedItem findLeftMost(BinarySearchTree tree){\r\n\t\t\r\n\t\t//return the root when we find that we reached the leftmost child\r\n\t\tif(tree.getLeftChild() == null){\r\n\t\t\treturn tree.getRoot();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//keep going. has more left children\r\n\t\t\treturn findLeftMost(tree.getLeftChild());\r\n\t\t}\r\n\t}", "public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException {\n \treturn this;\n }", "private BSTNode<E> getLeftmostNode() {\r\n\t\tif (this.left != null) {\r\n\t\t\treturn this.left.getLeftmostNode();\r\n\t\t} else {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t}", "protected Evaluable parseExpression() throws ParsingException {\n Evaluable sub = parseSubExpression();\n\n while (_token != null &&\n _token.type == TokenType.Operator &&\n \">=<==!=\".indexOf(_token.text) >= 0) {\n\n String op = _token.text;\n\n next(true);\n\n Evaluable sub2 = parseSubExpression();\n\n sub = new OperatorCallExpr(new Evaluable[] { sub, sub2 }, op);\n }\n\n return sub;\n }", "Expression relExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = addExpression();\r\n\t\twhile(isKind(OP_LT,OP_GT,OP_LE,OP_GE)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = addExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private boolean getLeftOuter() throws IOException {\n while(true) {\n if(rightTuple == nullPad) {\n found = false;\n leftTuple = leftChild.getNextTuple();\n if (leftTuple == null) {\n done = true;\n return false;\n }\n }\n rightTuple = rightChild.getNextTuple();\n if (rightTuple == null) {\n if (!found) {\n rightTuple = nullPad;\n rightChild.initialize();\n return true;\n }\n leftTuple = leftChild.getNextTuple();\n if (leftTuple == null) {\n done = true;\n return false;\n }\n found = false;\n rightChild.initialize();\n }\n else\n return true;\n }\n }", "public Node getLeftChild() {\r\n \treturn getChild(true);\r\n }", "public String preorderTraverse(){\r\n\t\t\r\n\t\t//the recursive call to the private method\r\n\t\t//StringBuffer is used because it is passed by reference\r\n\t\t//StringBuffer can be changed in recursive calls\r\n\t\treturn preorderTraverse(this, new StringBuffer(\"\"));\r\n\t}", "public Node getLeft () {\r\n\t\treturn left;\r\n\t}", "public static Node inorderSuccessor(Node x) {\n Node cursor = null;\n if (x == null) {\n return cursor;\n }\n\n if (x.right != null) {\n cursor = x.right;\n while (cursor != null) {\n cursor = cursor.left;\n }\n return cursor;\n } else {\n cursor = x.parent;\n while (cursor != null && cursor.val < x.val) {\n cursor = cursor.parent;\n }\n return cursor;\n }\n }", "@Override\n\t\tpublic PrintNode getLeft() {\n\t\t\treturn this.left;\n\t\t}", "static AST getChainParent(JavaNode node)\n {\n JavaNode parent = node.getParent();\n\n switch (parent.getType())\n {\n case JavaTokenTypes.EXPR :\n\n /**\n * @todo maybe more operators make sense?\n */\n case JavaTokenTypes.PLUS :\n //case JavaTokenTypes.NOT_EQUAL:\n //case JavaTokenTypes.EQUAL:\n return getChainParent(parent);\n\n default :\n return parent;\n }\n }", "public void preorderTraverse(){\n\t\tpreorderHelper(root);\n\t\tSystem.out.println();\n\t}", "@Override\n\tpublic void visit(OracleHierarchicalExpression arg0) {\n\t\t\n\t}", "public abstract Position<E> getLeftRoot();", "private Position<E> firstLeaf(){\n\t\tPosition<E> aux=null;\n\t\tif(tree.isEmpty())\n\t\t\treturn aux;\n\t\telse\n\t\t\taux=tree.root();\n\t\twhile(this.tree.hasLeft(aux)){\n\t\t\taux=tree.left(aux);\n\t\t}\n\t\treturn aux;\n\t}", "public BinaryTreeNode getLeftChild() { \n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic BTree<T> left() \n\t{\n\t\t\n\t\treturn root.left;\n\t}", "private Node getLeft() {\n return this.left;\n }", "private void treePreOrderTraversal(final Node currNode) {\n int numChildren = getNumChildren();\n\n // Returns if currNode is null.\n if (currNode == null) return;\n\n // Adds this Node to the stack.\n queueStackAddAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Highlights the current Node.\n queueNodeSelectAnimation(currNode, \"Current Node \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores left subtree.\n for (int i = 0; i < numChildren / 2; ++i)\n treePreOrderTraversal(currNode.children[i]);\n\n // Explores right subtree.\n for (int i = numChildren / 2; i < numChildren; ++i)\n treePreOrderTraversal(currNode.children[i]);\n\n // Removes this Node from the stack.\n queueListPopAnimation(\"Finished exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }", "private AtomExpr atomExpr() {\n Expr e = atom(), d = null;\n\n if (lexer.token == Symbol.LEFTBRACKET || lexer.token == Symbol.LEFTPAR) {\n d = details(e);\n }\n\n return new AtomExpr(e, d);\n }", "@Override\n\tpublic INode getLeft() {\n\t\treturn left;\n\t}", "CriteriaExpression<?> getLeftHandOperand();", "protected final IntervalNode getLeft() {\n\treturn(this.left);\n }", "public static void inOrderTraverse(Node root) {\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tNode node = root;\n\t\twhile (node!=null || !stack.empty()) {\n if(node!=null){\n \t stack.push(node);\n \t node = node.lchild;\n }else{\n \t node = stack.pop();\n \t node.visit();\n \t node = node.rchild;\n }\n\t\t}\n\t}", "Expr expr() throws IOException {\n\t\tExpr e = term();\n\t\twhile (look.tag == '+' || look.tag == '-') {\n\t\t\tToken tok = look;\n\t\t\tmove();\n\t\t\te = new Arith(tok, e, term());\n\t\t}\n\t\treturn e;\n\t}", "private Expr unary() {\n if(match(BANG, MINUS)) { // If this thing can be accurately considered a unary...\n Token operator = previous();\n Expr right = unary();\n return new Expr.Unary(operator, right);\n }\n\n return call(); // Otherwise, pass it up the chain of precedence\n }", "public ArrayList<StatementParse> positiveFirst(ArrayList<StatementParse> expression){\n for (int i = 0; i < expression.size(); i++){\n if (expression.get(i).isNegative()) continue;\n\n // move the first positive to the front\n StatementParse positive = expression.get(i);\n expression.remove(i);\n expression.add(0, positive);\n return expression;\n }\n // if no positive node exist, or the collapsed array is empty\n // insert a 0 in the front\n expression.add(0, new IntegerParse(0));\n return expression;\n }", "private ParseTree transformLeftHandSideExpression(ParseTree tree) {\n switch (tree.type) {\n case ARRAY_LITERAL_EXPRESSION:\n case OBJECT_LITERAL_EXPRESSION:\n resetScanner(tree);\n // If we fail to parse as an LeftHandSidePattern then\n // parseLeftHandSidePattern will take care reporting errors.\n return parseLeftHandSidePattern();\n default:\n return tree;\n }\n }", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "TreeNode<T> getLeft();", "private double expr(boolean get){\n\t\t// compute the left argument which has to be a primary value or an expression with a higher priority than sums\n\t\tdouble left = term(get);\n\t\t// add all addends until the end of the sum is reached\n\t\tfor(;;){ \n\t\t\tswitch(curr_tok){\n\t\t\t\tcase PLUS:{\n\t\t\t\t\tleft += term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase MINUS:{\n\t\t\t\t\tleft -= term(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\treturn left;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void postorderTraversal() \n { \n postorderTraversal(header.rightChild); \n }", "Expression powerExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = unaryExpression();\r\n\t\tif (isKind(OP_POWER)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = powerExpression();\r\n\t\t\treturn new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private void leftParen() {\n shift();\n getDispenser().advance();\n if (getDispenser().tokenIsLeftParen()) setState(State.LEFT_PAREN);\n else if (getDispenser().tokenIsNumber()) setState(State.NUMBER);\n else syntaxError(NUM_OR_LEFT_PAREN);\n }", "@Override\r\n\tpublic BinaryNodeInterface<E> getLeftChild() {\n\t\treturn left;\r\n\t}", "private void leftLeftCase(NodeRB<K, V> x) {\n\t\t// Swap colors of g and p\n\t\tboolean aux = x.parent.color;\n\t\tx.parent.color = x.getGrandParent().color;\n\t\tx.getGrandParent().color = aux;\n\n\t\t// Right Rotate g\n\t\tNodeRB<K, V> g = x.getGrandParent();\n\t\tif (g.parent == null) {\n\t\t\troot = rotateRight(g);\n\t\t} else {\n\t\t\trotateRight(g);\n\t\t}\n\t}", "public Node getExpression() {\r\n return expression;\r\n }", "public void expression(Node n_parent) {\r\n if(token.get(lookAheadPossition).contains(\"ident(\")||token.get(lookAheadPossition).contains(\"num(\")||token.get(lookAheadPossition).contains(\"boollit(\")||token.get(lookAheadPossition).equals(\"LP\")){\r\n System.out.println(\":: expression::if- \"+n_parent.getData());\r\n\r\n Node makeown = new Node (\"makeown\");\r\n Node n_factor = this.simpleExpression(makeown);\r\n\r\n //compNode = expressionNode.addChild(\"Compare\");\r\n //Node n_connect =\r\n this.restExpression(n_parent,n_factor);\r\n //n_parent.setNodeChild(n_connect);\r\n }\r\n }", "static void preOrderTraversalStackOptimised(Node root) {\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n\n while (curr != null) {\n System.out.print(curr.data + \" \");\n if (curr.right != null) {\n stack.push(curr.right);\n }\n curr = curr.left;\n }\n\n if (!stack.isEmpty()) {\n curr = stack.pop();\n }\n }\n }", "void inorder(Node root) {\n\t\tboolean leftdone = false;\n\n\t\t// Start traversal from root\n\t\twhile (root != null) {\n\t\t\t// If left child is not traversed, find the\n\t\t\t// leftmost child\n\t\t\tif (!leftdone) {\n\t\t\t\twhile (root.left != null) {\n\t\t\t\t\troot = root.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Print root's data\n\t\t\tSystem.out.print(root.data + \" \");\n\n\t\t\t// Mark left as done\n\t\t\tleftdone = true;\n\n\t\t\t// If right child exists\n\t\t\tif (root.right != null) {\n\t\t\t\tleftdone = false;\n\t\t\t\troot = root.right;\n\t\t\t}\n\n\t\t\t// If right child doesn't exist, move to parent\n\t\t\telse if (root.parent != null) {\n\t\t\t\t// If this node is right child of its parent,\n\t\t\t\t// visit parent's parent first\n\t\t\t\twhile (root.parent != null && root == root.parent.right)\n\t\t\t\t\troot = root.parent;\n\n\t\t\t\tif (root.parent == null)\n\t\t\t\t\tbreak;\n\t\t\t\troot = root.parent;\n\t\t\t} else\n\t\t\t\tbreak;\n\t\t}\n\t}", "public Node getLeft() {\n return left;\n }", "public Node getLeft() {\n return left;\n }", "public Node getLeft() {\n return left;\n }", "public Node getLeft() {\n return left;\n }", "private void treeInOrderTraversal(Node currNode) {\n int numChildren = getNumChildren();\n\n // Returns if currNode is null.\n if (currNode == null) return;\n\n // Adds this Node to the stack.\n queueStackAddAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores left subtree.\n for (int i = 0; i < numChildren / 2; ++i)\n treeInOrderTraversal(currNode.children[i]);\n\n // Highlights the current Node.\n queueNodeSelectAnimation(currNode, \"Current Node \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores right subtree.\n for (int i = numChildren / 2; i < numChildren; ++i)\n treeInOrderTraversal(currNode.children[i]);\n\n // Removes this Node from the stack.\n queueListPopAnimation(\"Finished exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }", "public TreeNode getLeft() {\n\t\treturn left;\n\t}", "public void preOrderTraverseTree(Node focusNode) {\n if (focusNode != null) { // recursively traverse left child nodes first than right\n\n System.out.println(focusNode); // print recursively pre-order traversal (or return!)\n\n preOrderTraverseTree(focusNode.leftChild);\n\n preOrderTraverseTree(focusNode.rightChild);\n\n }\n }", "private Object evalETree(ETreeNode node) throws FSException{\n Object lVal,rVal;\n\n if ( node == null )\n {\n parseError(\"Malformed expression\");\n // this is never reached, just for readability\n return null;\n }\n\n if (node.type==ETreeNode.E_VAL){\n return node.value;\n }\n lVal=evalETree(node.left);\n rVal=evalETree(node.right);\n\n switch (((Integer)node.value).intValue()){\n //call the various eval functions\n case LexAnn.TT_PLUS:{\n return evalPlus(lVal,rVal);\n }\n case LexAnn.TT_MINUS:{\n return evalMinus(lVal,rVal);\n }\n case LexAnn.TT_MULT:{\n return evalMult(lVal,rVal);\n }\n case LexAnn.TT_DIV:{\n return evalDiv(lVal,rVal);\n }\n case LexAnn.TT_LEQ:{\n return evalEq(lVal,rVal);\n }\n case LexAnn.TT_LNEQ:{\n return evalNEq(lVal,rVal);\n }\n case LexAnn.TT_LLS:{\n return evalLs(lVal,rVal);\n }\n case LexAnn.TT_LLSE:{\n return evalLse(lVal,rVal);\n }\n case LexAnn.TT_LGR:{\n return evalGr(lVal,rVal);\n }\n case LexAnn.TT_LGRE:{\n return evalGre(lVal,rVal);\n }\n case LexAnn.TT_MOD:{\n return evalMod(lVal,rVal);\n }\n case LexAnn.TT_LAND:{\n return evalAnd(lVal,rVal);\n }\n case LexAnn.TT_LOR:{\n return evalOr(lVal,rVal);\n }\n }\n\n return null;\n }", "public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "private void preOrdertraverse(Node root){\n System.out.println(root.value);\n for(var child : root.getChildren())\n preOrdertraverse(child); //recursively travels other childrens in current child\n }", "Expression expression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = orExpression();\r\n\t\tif (isKind(OP_QUESTION)) {\r\n\t\t\tconsume();\r\n\t\t\tExpression e1 = expression();\r\n\t\t\tmatch(OP_COLON);\r\n\t\t\tExpression e2 = expression();\r\n\t\t\te0 = new ExpressionConditional(first, e0, e1, e2);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public Binary left(Expr left) {\n\tBinary_c n = (Binary_c) copy();\n\tn.left = left;\n\treturn n;\n }", "public Expression getEndExpression() {\r\n\r\n\t\tint stack_size = 1;\r\n\t\tint end = size() - 1;\r\n\t\tfor (int n = end; n > 0; --n) {\r\n\t\t\tObject ob = elementAt(n);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t\t++stack_size;\r\n\t\t\t} else {\r\n\t\t\t\t--stack_size;\r\n\t\t\t}\r\n\r\n\t\t\tif (stack_size == 0) {\r\n\t\t\t\t// Now, n .. end represents the new expression.\r\n\t\t\t\tExpression new_exp = new Expression();\r\n\t\t\t\tfor (int i = n; i <= end; ++i) {\r\n\t\t\t\t\tnew_exp.addElement(elementAt(i));\r\n\t\t\t\t}\r\n\t\t\t\treturn new_exp;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn new Expression(this);\r\n\t}", "public MyNode getLeft()\r\n {\r\n \treturn left;\r\n }", "public E getFirst()// you finish (part of HW#4)\n\t{\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasLeftChild())\n\t\t\titeratorNode = iteratorNode.getLeftChild();\n\t\treturn iteratorNode.getData();\n\t}", "public abstract Position<E> getLeftSibling(Position<E> p);", "private void createEOG(Statement statement) {\n if (statement == null)\n return; // For null statements, and to avoid null checks in every ifelse branch\n this.intermediateNodes.add(statement);\n if (statement instanceof CallExpression) {\n CallExpression callExpression = (CallExpression) statement;\n\n // Todo add call as throwexpression to outer scope of call can throw (which is trivial to find\n // out for java, but impossible for c++)\n\n // evaluate base first, if there is one\n if (callExpression instanceof MemberCallExpression\n && ((MemberCallExpression) callExpression).getBase() instanceof Statement) {\n createEOG((Statement) ((MemberCallExpression) callExpression).getBase());\n }\n\n // first the arguments\n for (Expression arg : callExpression.getArguments()) {\n createEOG(arg);\n }\n\n // then the call itself\n pushToEOG(statement);\n\n // look, whether the function is known to us\n /*\n\n State state = State.getInstance();\n\n todo Reconsider if this is the right thing to do \"Do we want to expressionRefersToDeclaration to the call target?\n todo We might not resolve the appropriate function\". In addition the Return may better expressionRefersToDeclaration to the block\n todo root node instead of just leading to nowhere.\n functionDeclaration = state.findMethod(callExpression);\n if (functionDeclaration != null) {\n // expressionRefersToDeclaration call to function\n State.getInstance().addEOGEdge(callExpression, functionDeclaration);\n\n // expressionRefersToDeclaration all return statements of function to statement after call expression\n State.getInstance().setCurrentEOGs(functionDeclaration.getReturnStatements());\n }*/\n\n } else if (statement instanceof MemberExpression) {\n // analyze the base\n if (((MemberExpression) statement).getBase() instanceof Statement) {\n createEOG((Statement) ((MemberExpression) statement).getBase());\n }\n\n // analyze the member\n if (((MemberExpression) statement).getMember() instanceof Statement) {\n createEOG((Statement) ((MemberExpression) statement).getMember());\n }\n\n pushToEOG(statement);\n\n } else if (statement instanceof ArraySubscriptionExpression) {\n ArraySubscriptionExpression arraySubs = (ArraySubscriptionExpression) statement;\n\n // Connect according to evaluation order, first the array reference, then the contained index.\n createEOG(arraySubs.getArrayExpression());\n createEOG(arraySubs.getSubscriptExpression());\n\n pushToEOG(statement);\n\n } else if (statement instanceof ArrayCreationExpression) {\n ArrayCreationExpression arrayCreate = (ArrayCreationExpression) statement;\n\n for (Expression dimension : arrayCreate.getDimensions())\n if (dimension != null) createEOG(dimension);\n createEOG(arrayCreate.getInitializer());\n\n pushToEOG(statement);\n\n } else if (statement instanceof DeclarationStatement) {\n // loop through declarations\n for (Declaration declaration : ((DeclarationStatement) statement).getDeclarations()) {\n if (declaration instanceof VariableDeclaration) {\n // analyze the initializers if there is one\n handleDeclaration(declaration);\n }\n }\n\n // push statement itself\n pushToEOG(statement);\n } else if (statement instanceof ReturnStatement) {\n // analyze the return value\n createEOG(((ReturnStatement) statement).getReturnValue());\n\n // push the statement itself\n pushToEOG(statement);\n\n // reset the state afterwards, we're done with this function\n currentEOG.clear();\n\n } else if (statement instanceof BinaryOperator) {\n\n BinaryOperator binOp = (BinaryOperator) statement;\n createEOG(binOp.getLhs());\n createEOG(binOp.getRhs());\n\n // push the statement itself\n pushToEOG(statement);\n\n } else if (statement instanceof UnaryOperator) {\n\n Expression input = ((UnaryOperator) statement).getInput();\n createEOG(input);\n if (((UnaryOperator) statement).getOperatorCode().equals(\"throw\")) {\n Type throwType;\n Scope catchingScope =\n lang.getScopeManager()\n .getFirstScopeThat(\n scope -> scope instanceof TryScope || scope instanceof FunctionScope);\n\n if (input != null) {\n throwType = input.getType();\n } else {\n // do not check via instanceof, since we do not want to allow subclasses of\n // DeclarationScope here\n Scope decl =\n lang.getScopeManager()\n .getFirstScopeThat(scope -> scope.getClass().equals(DeclarationScope.class));\n if (decl != null\n && decl.getAstNode() instanceof CatchClause\n && ((CatchClause) decl.getAstNode()).getParameter() != null) {\n throwType = ((CatchClause) decl.getAstNode()).getParameter().getType();\n } else {\n LOGGER.info(\"Unknown throw type, potentially throw; in a method\");\n throwType = new Type(\"UKNOWN_THROW_TYPE\");\n }\n }\n\n pushToEOG(statement);\n if (catchingScope instanceof TryScope) {\n ((TryScope) catchingScope)\n .getCatchesOrRelays()\n .put(throwType, new ArrayList<>(this.currentEOG));\n } else if (catchingScope instanceof FunctionScope) {\n ((FunctionScope) catchingScope)\n .getCatchesOrRelays()\n .put(throwType, new ArrayList<>(this.currentEOG));\n }\n currentEOG.clear();\n } else {\n pushToEOG(statement);\n }\n } else if (statement instanceof CompoundStatement) {\n lang.getScopeManager().enterScope(statement);\n // analyze the contained statements\n for (Statement child : ((CompoundStatement) statement).getStatements()) {\n createEOG(child);\n }\n lang.getScopeManager().leaveScope(statement);\n pushToEOG(statement);\n } else if (statement instanceof CompoundStatementExpression) {\n createEOG(((CompoundStatementExpression) statement).getStatement());\n pushToEOG(statement);\n } else if (statement instanceof IfStatement) {\n IfStatement ifs = (IfStatement) statement;\n List<Node> openBranchNodes = new ArrayList<>();\n lang.getScopeManager().enterScope(statement);\n createEOG(ifs.getInitializerStatement());\n handleDeclaration(ifs.getConditionDeclaration());\n createEOG(ifs.getCondition());\n List<Node> openConditionEOGs = new ArrayList<>(currentEOG);\n createEOG(ifs.getThenStatement());\n openBranchNodes.addAll(currentEOG);\n\n if (ifs.getElseStatement() != null) {\n setCurrentEOGs(openConditionEOGs);\n createEOG(ifs.getElseStatement());\n openBranchNodes.addAll(currentEOG);\n } else openBranchNodes.addAll(openConditionEOGs);\n\n lang.getScopeManager().leaveScope(statement);\n\n setCurrentEOGs(openBranchNodes);\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof AssertStatement) {\n AssertStatement ifs = (AssertStatement) statement;\n createEOG(ifs.getCondition());\n List<Node> openConditionEOGs = new ArrayList<>(currentEOG);\n createEOG(ifs.getMessage());\n setCurrentEOGs(openConditionEOGs);\n pushToEOG(statement);\n } else if (statement instanceof WhileStatement) {\n\n lang.getScopeManager().enterScope(statement);\n WhileStatement whs = (WhileStatement) statement;\n\n handleDeclaration(whs.getConditionDeclaration());\n\n createEOG(whs.getCondition());\n List<Node> tmpEOGNodes = new ArrayList<>(currentEOG);\n createEOG(whs.getStatement());\n connectCurrentToLoopStart();\n\n // Replace current EOG nodes without triggering post setEOG ... processing\n currentEOG.clear();\n exitLoop(statement, (LoopScope) lang.getScopeManager().leaveScope(statement));\n\n currentEOG.addAll(tmpEOGNodes);\n\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof DoStatement) {\n lang.getScopeManager().enterScope(statement);\n DoStatement dos = (DoStatement) statement;\n\n createEOG(dos.getStatement());\n\n createEOG(dos.getCondition());\n connectCurrentToLoopStart();\n exitLoop(statement, (LoopScope) lang.getScopeManager().leaveScope(statement));\n\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof ForStatement) {\n lang.getScopeManager().enterScope(statement);\n ForStatement forStmt = (ForStatement) statement;\n\n createEOG(forStmt.getInitializerStatement());\n handleDeclaration(forStmt.getConditionDeclaration());\n createEOG(forStmt.getCondition());\n\n List<Node> tmpEOGNodes = new ArrayList<>(currentEOG);\n\n createEOG(forStmt.getStatement());\n createEOG(forStmt.getIterationExpression());\n\n connectCurrentToLoopStart();\n currentEOG.clear();\n exitLoop(statement, (LoopScope) lang.getScopeManager().leaveScope(statement));\n\n currentEOG.addAll(tmpEOGNodes);\n\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof ForEachStatement) {\n lang.getScopeManager().enterScope(statement);\n ForEachStatement forStmt = (ForEachStatement) statement;\n\n createEOG(forStmt.getIterable());\n handleDeclaration(forStmt.getVariable());\n\n List<Node> tmpEOGNodes = new ArrayList<>(currentEOG);\n\n createEOG(forStmt.getStatement());\n\n connectCurrentToLoopStart();\n currentEOG.clear();\n exitLoop(statement, (LoopScope) lang.getScopeManager().leaveScope(statement));\n\n currentEOG.addAll(tmpEOGNodes);\n\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof TryStatement) {\n lang.getScopeManager().enterScope(statement);\n TryScope tryScope = (TryScope) lang.getScopeManager().getCurrentScope();\n TryStatement tryStmt = (TryStatement) statement;\n\n if (tryStmt.getResources() != null) tryStmt.getResources().forEach(this::createEOG);\n createEOG(tryStmt.getTryBlock());\n\n List<Node> tmpEOGNodes = new ArrayList<>(currentEOG);\n\n Map<Type, List<Node>> catchesOrRelays = tryScope.getCatchesOrRelays();\n\n for (CatchClause catchClause : tryStmt.getCatchClauses()) {\n currentEOG.clear();\n // Try to catch all internally thrown exceptions under the catching clause and remove caught\n // ones\n HashSet<Type> toRemove = new HashSet<>();\n for (Map.Entry entry : catchesOrRelays.entrySet()) {\n Type throwType = (Type) entry.getKey();\n List<Node> eogEdges = (List<Node>) entry.getValue();\n if (catchClause.getParameter() == null) { // e.g. catch (...)\n currentEOG.addAll(eogEdges);\n } else if (TypeManager.getInstance()\n .isSupertypeOf(catchClause.getParameter().getType(), throwType)) {\n currentEOG.addAll(eogEdges);\n toRemove.add(throwType);\n }\n }\n toRemove.forEach(catchesOrRelays::remove);\n\n createEOG(catchClause.getBody());\n tmpEOGNodes.addAll(currentEOG);\n }\n boolean canTerminateExceptionfree =\n tmpEOGNodes.stream().anyMatch(EvaluationOrderGraphPass::reachableFromValidEOGRoot);\n\n currentEOG.clear();\n currentEOG.addAll(tmpEOGNodes);\n // connect all try-block, catch-clause and uncought throws eog points to finally start if\n // finally exists\n if (tryStmt.getFinallyBlock() != null) {\n // extends current EOG by all value EOG from open throws\n currentEOG.addAll(\n catchesOrRelays.entrySet().stream()\n .flatMap(entry -> entry.getValue().stream())\n .collect(Collectors.toList()));\n createEOG(tryStmt.getFinallyBlock());\n\n // all current-eog edges , result of finally execution as value List of uncought\n // catchesOrRelaysThrows\n for (Map.Entry entry : catchesOrRelays.entrySet()) {\n ((List) entry.getValue()).clear();\n ((List) entry.getValue()).addAll(this.currentEOG);\n }\n }\n // Forwards all open and uncought throwing nodes to the outer scope that may handle them\n Scope outerScope =\n lang.getScopeManager()\n .getFirstScopeThat(\n lang.getScopeManager().getCurrentScope().getParent(),\n scope -> scope instanceof TryScope || scope instanceof FunctionScope);\n Map outerCatchesOrRelays =\n outerScope instanceof TryScope\n ? ((TryScope) outerScope).getCatchesOrRelays()\n : ((FunctionScope) outerScope).getCatchesOrRelays();\n for (Map.Entry entry : catchesOrRelays.entrySet()) {\n List<Node> catches =\n (List<Node>) outerCatchesOrRelays.getOrDefault(entry.getKey(), new ArrayList<Node>());\n catches.addAll((List<Node>) entry.getValue());\n outerCatchesOrRelays.put(entry.getKey(), catches);\n }\n\n lang.getScopeManager().leaveScope(statement);\n // To Avoid edges out of the finally block to the next regular statement.\n if (!canTerminateExceptionfree) {\n currentEOG.clear();\n }\n\n pushToEOG(statement);\n } else if (statement instanceof ContinueStatement) {\n pushToEOG(statement);\n\n lang.getScopeManager().addContinueStatment((ContinueStatement) statement);\n\n currentEOG.clear();\n\n } else if (statement instanceof DeleteExpression) {\n\n createEOG(((DeleteExpression) statement).getOperand());\n pushToEOG(statement);\n\n } else if (statement instanceof BreakStatement) {\n pushToEOG(statement);\n\n lang.getScopeManager().addBreakStatment((BreakStatement) statement);\n\n currentEOG.clear();\n\n } else if (statement instanceof SwitchStatement) {\n\n SwitchStatement switchStatement = (SwitchStatement) statement;\n\n lang.getScopeManager().enterScope(statement);\n\n createEOG(switchStatement.getInitializerStatement());\n\n handleDeclaration(switchStatement.getSelectorDeclaration());\n\n createEOG(switchStatement.selector);\n\n CompoundStatement compound;\n List<Node> tmp = new ArrayList<>(currentEOG);\n if (switchStatement.getStatement() instanceof DoStatement) {\n createEOG(switchStatement.getStatement());\n compound =\n (CompoundStatement) ((DoStatement) switchStatement.getStatement()).getStatement();\n } else {\n compound = (CompoundStatement) switchStatement.getStatement();\n }\n currentEOG = new ArrayList<>();\n\n for (Statement subStatement : compound.getStatements()) {\n if (subStatement instanceof CaseStatement || subStatement instanceof DefaultStatement)\n currentEOG.addAll(tmp);\n createEOG(subStatement);\n }\n pushToEOG(compound);\n\n SwitchScope switchScope = (SwitchScope) lang.getScopeManager().leaveScope(switchStatement);\n this.currentEOG.addAll(switchScope.getBreakStatements());\n\n pushToEOG(statement);\n } else if (statement instanceof LabelStatement) {\n lang.getScopeManager().addLabelStatement((LabelStatement) statement);\n createEOG(((LabelStatement) statement).getSubStatement());\n } else if (statement instanceof GotoStatement) {\n GotoStatement gotoStatement = (GotoStatement) statement;\n pushToEOG(gotoStatement);\n if (gotoStatement.getTargetLabel() != null)\n lang.registerObjectListener(\n gotoStatement.getTargetLabel(), (from, to) -> addEOGEdge(gotoStatement, (Node) to));\n currentEOG.clear();\n } else if (statement instanceof CaseStatement) {\n createEOG(((CaseStatement) statement).getCaseExpression());\n pushToEOG(statement);\n } else if (statement instanceof SynchronizedStatement) {\n createEOG(((SynchronizedStatement) statement).getExpression());\n createEOG(((SynchronizedStatement) statement).getBlockStatement());\n pushToEOG(statement);\n } else if (statement instanceof EmptyStatement) {\n pushToEOG(statement);\n } else if (statement instanceof Literal) {\n pushToEOG(statement);\n } else if (statement instanceof DefaultStatement) {\n pushToEOG(statement);\n } else if (statement instanceof TypeIdExpression) {\n pushToEOG(statement);\n } else if (statement instanceof NewExpression) {\n NewExpression newStmt = (NewExpression) statement;\n createEOG(newStmt.getInitializer());\n\n pushToEOG(statement);\n } else if (statement instanceof CastExpression) {\n CastExpression castExpr = (CastExpression) statement;\n createEOG(castExpr.getExpression());\n pushToEOG(castExpr);\n } else if (statement instanceof ExpressionList) {\n ExpressionList exprList = (ExpressionList) statement;\n for (Statement expr : exprList.getExpressions()) createEOG(expr);\n\n pushToEOG(statement);\n } else if (statement instanceof ConditionalExpression) {\n ConditionalExpression condExpr = (ConditionalExpression) statement;\n\n List<Node> openBranchNodes = new ArrayList<>();\n createEOG(condExpr.getCondition());\n List<Node> openConditionEOGs = new ArrayList<>(currentEOG);\n createEOG(condExpr.getThenExpr());\n openBranchNodes.addAll(currentEOG);\n\n setCurrentEOGs(openConditionEOGs);\n createEOG(condExpr.getElseExpr());\n openBranchNodes.addAll(currentEOG);\n\n setCurrentEOGs(openBranchNodes);\n pushToEOG(statement); // Todo Remove root, if not wanted\n } else if (statement instanceof InitializerListExpression) {\n InitializerListExpression initList = (InitializerListExpression) statement;\n\n // first the arguments\n for (Expression inits : initList.getInitializers()) {\n createEOG(inits);\n }\n\n pushToEOG(statement);\n } else if (statement instanceof ConstructExpression) {\n ConstructExpression constructExpr = (ConstructExpression) statement;\n\n // first the arguments\n for (Expression arg : constructExpr.getArguments()) {\n createEOG(arg);\n }\n\n pushToEOG(statement);\n } else if (statement instanceof DeclaredReferenceExpression) {\n pushToEOG(statement);\n } else {\n // In this case the ast -> cpg translation has to implement the cpg node creation\n pushToEOG(statement);\n }\n }", "public void inorderTraverse(){\n\t\tinorderHelper(root);\n\t\tSystem.out.println();\n\t}", "public void inOrderTraverseTree(Node focusNode) {\n if(focusNode != null) { // recursively traverse left child nodes first than right\n inOrderTraverseTree(focusNode.leftChild);\n\n System.out.println(focusNode); // print recursively inorder node (or return!)\n\n inOrderTraverseTree(focusNode.rightChild);\n\n }\n }", "public void printTree() {\r\n\t if (expressionRoot == null) {\r\n\t return;\r\n\t }\r\n if (expressionRoot.right != null) {\r\n printTree(expressionRoot.right, true, \"\");\r\n }\r\n System.out.println(expressionRoot.data);\r\n if (expressionRoot.left != null) {\r\n printTree(expressionRoot.left, false, \"\");\r\n }\r\n }", "public void preOrderTraversal(){\n System.out.println(\"preOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack();\n\n if(root!=null){\n stack.push(root);\n }\n while(!stack.isEmpty()) {\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n if (node.getRight() != null) {\n stack.push(node.getRight());\n }\n if (node.getLeft() != null) {\n stack.push(node.getLeft());\n }\n }\n System.out.println();\n }", "public AVLNode<E> getLeft() {\r\n\t\treturn left;\r\n\t}", "static void inOrderWithoutRecursion(Node root) {\n if (root == null) {\n return;\n }\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n curr = stack.pop();\n System.out.print(curr.data + \" \");\n curr = curr.right;\n }\n\n }", "@Override\n public NodeType ExecuteOperation()\n {\n //if the first child is an operator\n if(this.childNodes[0].isOperator==true)\n {\n BasicOperator basicOperator=(BasicOperator)this.childNodes[0]; \n if(basicOperator.operands==1)\n {\n UnaryOperator unaryOperator=(UnaryOperator)childNodes[0];\n return unaryOperator.PerformOperation(childNodes[1]);\n }\n else if(basicOperator.operands==2)\n {\n BinaryOperator binaryOperator=(BinaryOperator)childNodes[0];\n return binaryOperator.PerformOperation(childNodes[1], childNodes[2]);\n }\n else if(basicOperator.operands==3)\n {\n TernaryOperator ternaryOperator=(TernaryOperator)childNodes[0];\n return ternaryOperator.PerformOperation(childNodes[1], childNodes[2], childNodes[3]);\n }\n }\n //if not an operator\n else\n {\n return this.childNodes[0].ExecuteOperation();\n }\n return null;\n }", "private TreeNode exprTreeHelper(String expr) {\n if (expr.charAt(0) != '(') {\n return new TreeNode(expr); // you fill this in\n } else {\n // expr is a parenthesized expression.\n // Strip off the beginning and ending parentheses,\n // find the main operator (an occurrence of + or * not nested\n // in parentheses, and construct the two subtrees.\n int nesting = 0;\n int opPos = 0;\n for (int k = 1; k < expr.length() - 1; k++) {\n // you supply the missing code\n \tif (nesting == 0) {\n \t\tif (expr.charAt(k) == '+' || expr.charAt(k) == '*') {\n \t\t\topPos = k;\n \t\t}\n \t}\n \tif (expr.charAt(k) == '(') {\n \t\tnesting++;\n \t} else if (expr.charAt(k) == ')') {\n \t\tnesting--;\n \t}\n }\n String opnd1 = expr.substring(1, opPos);\n String opnd2 = expr.substring(opPos + 1, expr.length() - 1);\n String op = expr.substring(opPos, opPos + 1);\n System.out.println(\"expression = \" + expr);\n System.out.println(\"operand 1 = \" + opnd1);\n System.out.println(\"operator = \" + op);\n System.out.println(\"operand 2 = \" + opnd2);\n System.out.println();\n return new TreeNode(op, exprTreeHelper(opnd1), exprTreeHelper(opnd2)); // you fill this in\n }\n }", "com.google.type.Expr getCelExpression();", "public Node getExpressionOrigin() {\n return element;\n }", "public void traverseLevelOrder() {\n\t\tif (root == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tLinkedList<Node> ls = new LinkedList<>();\n\t\tls.add(root);\n\t\twhile (!ls.isEmpty()) {\n\t\t\tNode node = ls.remove();\n\t\t\tSystem.out.print(\" \" + node.value);\n\t\t\tif (node.left != null) {\n\t\t\t\tls.add(node.left);\n\t\t\t}\n\t\t\tif (node.right != null) {\n\t\t\t\tls.add(node.right);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic ASTNode getLeftChild() {\n\t\treturn this.leftChild ;\n\t}", "public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }", "public XPathExpression getUnderlyingExpression() {\n return exp;\n }", "static void preOrderWithoutRecursion(Node root) {\n Stack<Node> stack = new Stack<>();\n stack.push(root);\n while (!stack.isEmpty()) {\n Node node = stack.peek();\n System.out.print(node.data + \" \");\n stack.pop();\n\n if (node.right != null) {\n stack.push(node.right);\n }\n if (node.left != null) {\n stack.push(node.left);\n }\n }\n }", "private CommonTableExpression getLast() {\n\t\tCommonTableExpression cte = !nodes.isEmpty() ? (CommonTableExpression)nodes.get(nodes.size() - 1) : null;\n\t\tif (cte == null) {\n\t\t\tthrow new IllegalStateException(\"No nodes\");\n\t\t}\n\t\treturn cte;\n\t}", "public Node<T> getLeft() {\r\n\t\treturn left;\r\n\t}" ]
[ "0.68386155", "0.6358514", "0.61419296", "0.60543466", "0.5978125", "0.5907339", "0.58234394", "0.58093244", "0.5800283", "0.57973576", "0.5788095", "0.57837945", "0.5772766", "0.57438457", "0.57067305", "0.5673285", "0.56632835", "0.56330407", "0.56295025", "0.555789", "0.5538082", "0.5520802", "0.551966", "0.5509614", "0.5509614", "0.55047923", "0.54803675", "0.54797673", "0.5473973", "0.5469367", "0.544509", "0.54413176", "0.54293245", "0.5415017", "0.540431", "0.5400165", "0.5375643", "0.5372872", "0.53475875", "0.5335427", "0.53063965", "0.5299673", "0.5298345", "0.52919835", "0.5284069", "0.52827203", "0.5279753", "0.5274752", "0.5265995", "0.5261649", "0.52570355", "0.5251258", "0.5250987", "0.5247304", "0.5245815", "0.5244554", "0.524433", "0.5241132", "0.52396375", "0.5237741", "0.5228359", "0.52261513", "0.52250785", "0.5218335", "0.521788", "0.5213821", "0.5211962", "0.52096945", "0.52096945", "0.52096945", "0.52096945", "0.5206685", "0.5204917", "0.5198348", "0.5197076", "0.5186419", "0.5180987", "0.51806414", "0.5172828", "0.5170146", "0.51699114", "0.51601964", "0.5145143", "0.51376593", "0.5137472", "0.51338536", "0.5133084", "0.51262844", "0.51213384", "0.5120433", "0.5118173", "0.5117347", "0.511021", "0.51099724", "0.510735", "0.5098926", "0.50973845", "0.5095233", "0.50922877", "0.5080666", "0.5076214" ]
0.0
-1
Determines if variable is free in this lambda expression.
boolean free(String variable);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isFreeVariable(Formula f);", "public Boolean isFree()\n\t{\n\t\treturn free;\n\t}", "public static boolean hasFreeVars(StatementPattern stmt, BindingSet bindings) {\n\t\tfor (Var var : stmt.getVarList()) {\n\t\t\tif (!var.hasValue() && !bindings.hasBinding(var.getName())) {\n\t\t\t\treturn true; // there is at least one free var\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isClosed(){\n\t\tFreeVariableSet temp=freeVariables(new HashSet<Integer>());\n\t\tif (temp.size()==0) return true;\n\t\treturn false;\n\t}", "public boolean isVariable() {\n return false;\n }", "boolean isFree(Position position);", "R visitFreeVariable(Formula f, String name);", "public Free( Node n ) {\n\t\tsuper( );\n\t\tvar = (Node_Variable) n;\n\t\tisArgument = false;\n\t\tisListed = false;\n\t}", "public Boolean getFree() {\n return free;\n }", "public boolean getIsFree(int num)\n\t{\n\t\treturn isFree[num];\n\t}", "boolean isBoundVariable(Formula f);", "@Override\n\tpublic boolean isVar() {\n\t\treturn heldObj.isVar();\n\t}", "public boolean isNotNullFns() {\n return genClient.cacheValueIsNotNull(CacheKey.fns);\n }", "boolean isDummy() {\n return var == null;\n }", "@Override\n\tpublic boolean has_lambda_term() {\n\t\treturn false;\n\t}", "protected final boolean overheadIsVariable() {\n // The overhead is variable if it is set to VARIABLE_COST.\n return (overhead == Cost.VARIABLE);\n }", "boolean isFullfilled() throws IllegalStateException;", "boolean hasPakringFree();", "boolean hasPakringFree();", "public boolean hasPakringFree() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean hasPakringFree() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "boolean isVariable(Formula f);", "public boolean getVariableRequired() {\r\n return relaxed;\r\n }", "public boolean hasPakringFree() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasPakringFree() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "private static boolean isUsedInExpression(String varName, CExpression exp) {\n return exp.accept(new VarCExpressionVisitor(varName));\n }", "public boolean isUnused() {\n return this.binderySlotNumber == -9234;\n }", "public boolean isHitFree()\n {\n // TODO: replace this line with your code\n }", "public static boolean pending(Parser parser){\n return parser.check(LexemeType.VAR);\n }", "boolean hasVarValue();", "abstract void checkWhetherVariable(SyntaxUnit use);", "public final void entryRuleFreeVariable() throws RecognitionException {\n\n \tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n\n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:208:1: ( ruleFreeVariable EOF )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:209:1: ruleFreeVariable EOF\n {\n before(grammarAccess.getFreeVariableRule()); \n pushFollow(FOLLOW_ruleFreeVariable_in_entryRuleFreeVariable342);\n ruleFreeVariable();\n\n state._fsp--;\n\n after(grammarAccess.getFreeVariableRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleFreeVariable349); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "public boolean isUnassigned() {\n return !assigned;\n }", "public final void ruleVariables() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:980:2: ( ( ruleFreeVariable ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:981:1: ( ruleFreeVariable )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:981:1: ( ruleFreeVariable )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:982:1: ruleFreeVariable\n {\n before(grammarAccess.getVariablesAccess().getFreeVariableParserRuleCall()); \n pushFollow(FOLLOW_ruleFreeVariable_in_ruleVariables1825);\n ruleFreeVariable();\n\n state._fsp--;\n\n after(grammarAccess.getVariablesAccess().getFreeVariableParserRuleCall()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "boolean hasVarSrc();", "private static boolean m23372b(C5826a aVar) {\n return aVar.f18502d.capacity() == 0 || (aVar.f18500b > 0 && aVar.f18502d.position() == aVar.f18500b);\n }", "public boolean isDead ( ) {\n\t\treturn extract ( handle -> handle.isDead ( ) );\n\t}", "@Override\n public int contains(Variable<?> variable) {\n return value.contains(variable) + (binder.equals(variable) ? 0 : body.contains(variable));\n }", "boolean available()\n {\n synchronized (m_lock)\n {\n return (null == m_runnable) && (!m_released);\n }\n }", "private static boolean isLocalVariableForFunction(String scopedVarName, String function) {\n return scopedVarName.startsWith(function + \"::\");\n }", "public final boolean tryFree() {\n return free(this);\n }", "public final boolean knowsVariable(AbstractVariable decl) {\r\n return variablesCache.containsKey(decl);\r\n }", "Boolean isDead();", "public boolean lambda27(Object x) {\n return ((Scheme.applyToArgs.apply2(this.pred, x) != Boolean.FALSE ? 1 : 0) + 1) & true;\n }", "public boolean isConstant()\n {\n return analysis.getRequiredBindings().isEmpty();\n }", "public boolean hasRangeVariableDeclaration() {\r\n\t\treturn rangeVariableDeclaration != null &&\r\n\t\t !rangeVariableDeclaration.isNull();\r\n\t}", "public final void ruleFreeVariable() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:224:2: ( ( ( rule__FreeVariable__Group__0 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:225:1: ( ( rule__FreeVariable__Group__0 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:225:1: ( ( rule__FreeVariable__Group__0 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:226:1: ( rule__FreeVariable__Group__0 )\n {\n before(grammarAccess.getFreeVariableAccess().getGroup()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:227:1: ( rule__FreeVariable__Group__0 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:227:2: rule__FreeVariable__Group__0\n {\n pushFollow(FOLLOW_rule__FreeVariable__Group__0_in_ruleFreeVariable379);\n rule__FreeVariable__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getFreeVariableAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n \tmyHiddenTokenState.restore();\n\n }\n return ;\n }", "public boolean isAllowHalfClosure()\r\n/* 284: */ {\r\n/* 285:274 */ return this.allowHalfClosure;\r\n/* 286: */ }", "public boolean lambda72(Object elt) {\n frame54 frame54;\n new frame54();\n frame54 frame542 = frame54;\n frame542.staticLink = this;\n frame54 frame543 = frame542;\n frame543.elt = elt;\n return ((srfi1.any$V(frame543.lambda$Fn56, this.lists, new Object[0]) != Boolean.FALSE ? 1 : 0) + 1) & true;\n }", "public boolean hasGravity ( ) {\n\t\treturn extract ( handle -> handle.hasGravity ( ) );\n\t}", "public boolean isSetRelease()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(RELEASE$4) != 0;\r\n }\r\n }", "public boolean isSetLocal()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(LOCAL$0) != 0;\r\n }\r\n }", "public boolean isFreezed() {\n\t\treturn this.__freezed;\n\t}", "public boolean hasPendingBindings() {\n synchronized (this) {\n long l10 = this.u;\n long l11 = 0L;\n long l12 = l10 == l11 ? 0 : (l10 < l11 ? -1 : 1);\n if (l12 == false) return false;\n return (boolean)((long)1);\n }\n }", "public boolean lambda35(Object x) {\n return ((Scheme.applyToArgs.apply2(this.pred, x) != Boolean.FALSE ? 1 : 0) + 1) & true;\n }", "public boolean canBeUsed(){\n\t\treturn !(this.isUsed);\n\t}", "public boolean hasVarValue() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }", "private boolean columnIsFree(int column){\n return this.tiles[0][column - 1] == 'O';\n }", "protected boolean isInScope() {\n if (_testValue == null) {\n return false;\n }\n return _testValue.startsWith(\"(\") && _testValue.endsWith(\")\");\n }", "public boolean isFreeMoving() {\n\t\treturn _freeMoving;\n\t}", "public boolean needsPhi(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n boolean seenLive = false;\n\n if (seenTypes.containsKey(type)) {\n \n for (ManagedParameter param : seenTypes.get(type)) { // TODO: Check all these\n if ((param.status == ValueStatus.FREE)) { // TODO: What about scopes\n return true;\n }\n\n if (param.status == ValueStatus.ALLOCATED) {\n if (seenLive) {\n return true;\n } else {\n seenLive = true;\n }\n }\n }\n } else {\n throw new IllegalArgumentException(\"Type \" + type + \" has never been seen before!\");\n }\n\n throw new IllegalStateException(\"No suitable candidate has been found\"); // TODO WRONG text\n }", "boolean hasFenced();", "public final void rule__FreeVariable__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2911:1: ( ( () ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2912:1: ( () )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2912:1: ( () )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2913:1: ()\n {\n before(grammarAccess.getFreeVariableAccess().getFreeVariableAction_0()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2914:1: ()\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2916:1: \n {\n }\n\n after(grammarAccess.getFreeVariableAccess().getFreeVariableAction_0()); \n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "boolean isAnonymous();", "public boolean lambda33(Object elt) {\n return ((Scheme.applyToArgs.apply3(this.maybe$Mn$Eq, this.key, C1259lists.car.apply1(elt)) != Boolean.FALSE ? 1 : 0) + 1) & true;\n }", "public boolean hasVar185() {\n return fieldSetFlags()[186];\n }", "public boolean hasVar42() {\n return fieldSetFlags()[43];\n }", "public boolean hasPendingBindings() {\n synchronized (this) {\n long l10 = this.m;\n long l11 = 0L;\n long l12 = l10 == l11 ? 0 : (l10 < l11 ? -1 : 1);\n if (l12 == false) return false;\n return (boolean)((long)1);\n }\n }", "public void setFree(Boolean free)\n\t{\n\t\tthis.free = free;\n\t}", "public boolean hasFainted() {\n return hp <= 0;\n }", "public boolean lambda29(Object y) {\n return ((Scheme.applyToArgs.apply3(this.maybe$Mn$Eq, this.f126x, y) != Boolean.FALSE ? 1 : 0) + 1) & true;\n }", "public boolean isFrozen ( ) {\n\t\treturn extract ( handle -> handle.isFrozen ( ) );\n\t}", "public boolean isReleasable() { return isDone(); }", "public boolean hasVar40() {\n return fieldSetFlags()[41];\n }", "public boolean lookup_var(Var3 variable) {\n Integer index = getVarIndex(variable);\n if(index == null)\n return false;\n if(memMap.get(index) || addrDescriptor.get(index).size() > 1)\n return true;\n else\n return false;\n }", "public boolean lambda59(Object lis) {\n return ((C1259lists.member(this.f130x, lis, this.staticLink.$Eq) != Boolean.FALSE ? 1 : 0) + 1) & true;\n }", "public boolean findUnifier(Term t, Term[] binding)\n {\n return ((t instanceof TermVariable) || equals(t));\n }", "private boolean isReferenceToLocal(@Nullable LighterASTNode operand, @NotNull LighterASTNode var) {\n return operand != null &&\n operand.getTokenType() == REFERENCE_EXPRESSION &&\n Objects.requireNonNull(tree.getParent(operand)).getTokenType() != METHOD_CALL_EXPRESSION &&\n findExpressionChild(tree, operand) == null && // non-qualified\n Objects.equals(getNameIdentifierText(tree, operand), getNameIdentifierText(tree, var));\n }", "boolean isUsed();", "boolean isUsed();", "public boolean hasVariableOperands(AttributeDescriptor.Operator operator)\n {\n if (operator == null)\n return false;\n OperatorImpl operImpl = (OperatorImpl) operator;\n return operImpl.getOperatorDef().hasVariableOperands();\n }", "public boolean isOccupied() {\n return !(getLease() == null);\r\n }", "private boolean assertNoFreeVars(final List<HcHeadVar> headVars, final Set<HcVar> bodyVars,\n\t\t\tfinal Term constraint) {\n\t\tfinal Set<TermVariable> auxVars = new LinkedHashSet<>();\n\t\tauxVars.addAll(Arrays.asList(constraint.getFreeVars()));\n\n\t\tif (headVars != null) {\n\t\t\tauxVars.removeAll(headVars.stream().map(hv -> hv.getTermVariable()).collect(Collectors.toList()));\n\t\t}\n\n\t\tauxVars.removeAll(bodyVars.stream().map(bv -> bv.getTermVariable()).collect(Collectors.toList()));\n\n\t\tauxVars.remove(mAssertionViolatedVar);\n\n\t\tif (!auxVars.isEmpty()) {\n\t\t\tassert false;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean isBound();", "boolean hasRef();", "@Override\r\n public final boolean isUseless() {\r\n int i;\r\n Rule[] r;\r\n\r\n r = this.m_rules;\r\n for (i = (r.length - 1); i >= 0; i--) {\r\n if (!(r[i].isUseless()))\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public boolean hasVar175() {\n return fieldSetFlags()[176];\n }", "public final boolean isReferencedAtMostOnce() {\n return this.getReferences(false, true).size() == 0 && this.getReferences(true, false).size() <= 1;\r\n }", "public int getFree(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n ManagedParameter param = new ManagedParameter();\n param.status = ValueStatus.FREE;\n param.type = type;\n param.ssa = nextLocal++;\n param.setInScope = currentScope;\n\n if (seenTypes.containsKey(type)) {\n seenTypes.get(type).add(param);\n } else {\n List<ManagedParameter> aParam = new ArrayList<>();\n aParam.add(param);\n\n seenTypes.put(type, aParam);\n }\n\n \n return param.ssa;\n }", "default Optional<Boolean> isPubliclyReleasable() {\n return Optional.empty();\n }", "boolean hasReference();", "private boolean isVariable(String refWord){\n\t\tif(refWord.charAt(0) == 'i' && Character.isDigit(refWord.charAt(1)))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean hasVarSrc() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public Object lambda50(Object x) {\n return this.staticLink.$Eq.apply2(x, this.elt);\n }", "public boolean removeMemberVariable(String memberName) {\n Optional<Variable.Builder<?>> want = vbuilders.stream().filter(v -> v.shortName.equals(memberName)).findFirst();\n want.ifPresent(v -> vbuilders.remove(v));\n return want.isPresent();\n }", "public Object lambda53(Object x) {\n return this.staticLink.$Eq.apply2(x, this.elt);\n }", "public boolean mightBeDeadEnd() {\n // TODO check if it's a real-optimisation - fuses.size() remains low (I would say less than 10), so the stream\n // API might be sufficiently efficient\n if(fuses.size() == 1) {\n return true;\n }\n\n return fuses.stream()\n .map(Fuse::getOpposite)\n .map(Fuse::getOwner)\n .distinct()\n .count() == 1;\n }", "public boolean isFinalized() {\n\t\tif (this.owner_ != null)\n\t\t\treturn this.owner_.isFinalized();\n\t\treturn false;\n\t}", "default public boolean dead() {\n return life().dead();\n }", "protected boolean isBound(){\n\t\treturn !listeners.isEmpty();\n\t}" ]
[ "0.6924958", "0.63364947", "0.6086836", "0.6075045", "0.57437164", "0.5666685", "0.56488925", "0.56185335", "0.5615829", "0.5556549", "0.5438214", "0.54099417", "0.5384763", "0.5383879", "0.526297", "0.5248909", "0.5248058", "0.5242884", "0.5242884", "0.5239941", "0.52370244", "0.5229074", "0.52219784", "0.52091324", "0.5198261", "0.5186683", "0.5172802", "0.51681656", "0.5160084", "0.5132145", "0.50957584", "0.50269336", "0.49988294", "0.49687016", "0.49584845", "0.49468857", "0.49419543", "0.49410516", "0.493983", "0.4939798", "0.49299502", "0.4924313", "0.49185884", "0.49070823", "0.49062514", "0.48991606", "0.48965198", "0.48934835", "0.48761207", "0.48568952", "0.48566604", "0.48430508", "0.4839934", "0.48380232", "0.4833162", "0.48258013", "0.4818598", "0.48071408", "0.48023063", "0.48003164", "0.47984296", "0.47980613", "0.4794829", "0.4783862", "0.47764003", "0.4774159", "0.47710702", "0.47681075", "0.47660023", "0.47574943", "0.47552955", "0.4749145", "0.47487774", "0.473628", "0.47228798", "0.47185218", "0.47180384", "0.47173387", "0.4717205", "0.4717205", "0.47157747", "0.4714548", "0.47145116", "0.47083998", "0.4706914", "0.47051167", "0.4704567", "0.469759", "0.46894827", "0.46828172", "0.46827242", "0.46815404", "0.4678034", "0.46758753", "0.46750998", "0.46747142", "0.46684438", "0.4660102", "0.46597874", "0.46574908" ]
0.6000137
4
gets the two's complement int of a given binary string
public static int getTwosComplement(String binaryInt) { // Check if the number is negative. // We know it's negative if it starts with a 1 if (binaryInt.charAt(0) == '1') { // Call our invert digits method String invertedInt = invertDigits(binaryInt); // Change this to decimal format. int decimalValue = Integer.parseInt(invertedInt, 2); // Add 1 to the current decimal and multiply it by -1 // because we know it's a negative number decimalValue = (decimalValue + 1) * -1; // return the final result return decimalValue; } else { // Else we know it's a positive number, so just convert // the number to decimal base. return Integer.parseInt(binaryInt, 2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int negativeBinaryToInt(String binary) {\n int n = binary.length() - 1;\n int w = -bitToInt(binary.charAt(0)) * (int) Math.pow(2, n);\n for (int i = n, j = 0; i > 0; i--, j++) {\n w += (int) Math.pow(2, j) * (binary.charAt(i) == '1' ? 1 : 0);\n }\n return w;\n }", "private int toInt(String binary){\n if (bitToInt(binary.charAt(0)) == 0){\n return positiveBinToInt(binary);\n }\n else{\n return negativeBinaryToInt(binary);\n }\n }", "public int binaryToInt(String binary){\n return Integer.parseInt(binary, 2);\n }", "private int positiveBinToInt(String binary) {\n int w = 0;\n for (int i = binary.length() - 1, j = 0; i > 0; i--, j++) {\n w += (int) Math.pow(2, j) * bitToInt(binary.charAt(i));\n }\n return w;\n }", "static int beautifulBinaryString(String b) {\n int index = b.indexOf(\"010\", 0) ;\n int change = 0;\n while (index != -1) {\n change++;\n index = b.indexOf(\"010\", index + 3) ;\n }\n return change;\n }", "public static int bin2dec(String bri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "int decodeInt();", "public static int binaryToDecimal(String text)\r\n {\n int sign = 1;\r\n if (text.charAt(0) == '-')\r\n {\r\n sign = -1;\r\n text = text.substring(1);\r\n }\r\n int result = 0;\r\n String digits = \"01\";\r\n for (int i = 0; i < text.length(); i++)\r\n {\r\n String c = text.substring(i, i+1);\r\n int digit = digits.indexOf(c);\r\n if (digit == -1)\r\n {\r\n System.out.printf(\"Error: invalid binary number %s, exiting...\\n\", text);\r\n System.exit(0);\r\n }\r\n int power = (int) (Math.pow(2, text.length() - i - 1));\r\n result = result + digit * power;\r\n }\r\n \r\n // if the first character of text was a minus, then negate the result.\r\n result = sign * result;\r\n return result;\r\n }", "public int stringBinaryToInteger(String str)\n\t{\n\t\tif(str!=null)\n\t\t{\n\t\t\tint result = 0;\n\t\t\tint power = 0;\n\t\t\tfor(int i=str.length()-1; i>=0;i--)//Decrementing since we need to go from right to left\n\t\t\t{\n\t\t\t\t//\t\t\tSystem.out.println(\"str.charAt(i):\"+str.charAt(i));\n\t\t\t\tresult += Integer.parseInt(\"\"+str.charAt(i))*Math.pow(2, power++);\n\t\t\t}\n\t\t\tSystem.out.println(\"Result:\"+result);\n\t\t\treturn result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Empty String\");\n\t\t\treturn 0;\n\t\t}\n\t}", "private int binaryToDecimal(String revStr){\n String tempStr ;\n int tempInt;\n int result = 0;\n \n for(int i =0; i < revStr.length(); i++)\n {\n tempStr = String.valueOf(revStr.charAt(i));\n tempInt = Integer.parseInt(tempStr);\n \n //if the integer number is not 1 or 0, the number inputed by user is not a bianry number \n //so return -1;\n if(tempInt != 1 && tempInt != 0)\n {\n return -1;\n }\n \n //if the integer number is 0, skip this number\n if(tempInt == 0)\n {\n continue;\n }\n \n //if the integer number is 1 (tempInt = 1), calculate the power\n result = result + (int)(tempInt * Math.pow(2.0, (double)i));\n }\n \n return result;\n }", "@Test\n public void test2(){\n\n String s =\"1000000000000001\";\n //s = BinaryCalculate.BinaryArithmeticalRightShift(s,1);\n s = BinaryCalculate.BinaryLogicRightShift(s,1);\n int a = BitConversion.fromBinaryStringToInt(s);\n System.out.println(a);\n }", "private int byteToInt(byte b) { int i = b & 0xFF; return i; }", "public static int negative(int b) {\n return (b >> 8) & 1;\n }", "@Test\n public void decodeStringNegative()\n {\n final BinaryEncoder encoder = new BinaryEncoder(-8, 8, 1.0);\n assertThat(encoder.decode(\"0011\"), is(-5.0));\n }", "private static int getIntValue(String s) {\n try {\n return Integer.parseInt(s, 16);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n return -1;\n }\n }", "public int getInteger(int index)\r\n\t{\r\n\t\tint i = 0;\r\n\r\n\t\t// Calculate the needed size and offset of the int within the binary string.\r\n\t\tint size = intSize - (signedInt ? 1 : 0);\r\n\t\tint offset = intSize * index;\r\n\r\n\t\t// This loop uses simple bit operations to turn the boolean array into an int.\r\n\t\tfor (int a = 0; a < size; a++)\r\n\t\t\ti |= (binary[a + offset] ? 1 : 0) << a;\r\n\r\n\t\t// If the int is signed, flip the value based on the state of the last binary\r\n\t\t// bit.\r\n\t\tif (signedInt)\r\n\t\t\tif (binary[intSize - 1 + offset])\r\n\t\t\t\ti = -i;\r\n\r\n\t\treturn i;\r\n\t}", "public static int stringToInt(String numb) {\r\n\t\tint temp = 0;\r\n\t\t\r\n\t\t//Convert the string to an int. Set it to a value of zero if not a number.\r\n\t\ttry {\r\n\t\t\ttemp = Integer.parseInt(numb);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\ttemp = 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn temp;\r\n\t}", "public int stringToInt(String bytesStr) {\r\n int result = 0;\r\n for(char b : bytesStr.toCharArray())\r\n result = (result << 8) + (int)b;\r\n return result;\r\n }", "public String get2sComplement(String binaryVal) {\r\n\t\tString onesComp = new String();\r\n\t\tString twosComp = new String();\r\n\t\tchar carry = '0';\r\n\t\tint i;\r\n\t\t// finding one's complement--------------------------------\r\n\t\tfor (i = 0; i < binaryVal.length(); i++) {\r\n\t\t\tif (binaryVal.charAt(i) == '0')\r\n\t\t\t\tonesComp = onesComp + \"1\";\r\n\t\t\telse\r\n\t\t\t\tonesComp = onesComp + \"0\";\r\n\t\t} \r\n\t\t\r\n\t\t//finding the 2's complement. adding '1' to the binary(which is 1's complement)\r\n\t\tchar lsb = onesComp.charAt(onesComp.length() - 1);\r\n\t\tif (lsb == '1') {\r\n\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\tcarry = '1';\r\n\t\t} else\r\n\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\tfor (i = onesComp.length() - 2; i >= 0; i--) {\r\n\t\t\tchar digit = onesComp.charAt(i);\r\n\t\t\tif (carry == '0' && digit == '0')\r\n\t\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\telse if (carry == '0' && digit == '1')\r\n\t\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\t\telse if (carry == '1' && digit == '0') {\r\n\t\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\t\t\tcarry = '0';\r\n\t\t\t} else {\r\n\t\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\t\tcarry = '1';\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn twosComp;\r\n\t\t }", "public String negBase2(int n) throws Exception {\r\n\t\t String binaryStr=\"\";\r\n\r\n\t\t int minValue = -256;//allowed min decimal\r\n\t\t// donot allow positive numbers and make sure the \r\n\t\t// input number is > allowed min value for 8 bit representation\r\n\t\t if (n>0 || n < minValue) \r\n\t\t\t throw new Exception (\"the input number exceeds the allowable limits\");\r\n\t\t\t \r\n\t\t binaryStr = Integer.toBinaryString((-1)*n);\r\n\t \t\r\n\t \tbinaryStr= String.format(\"%8s\", binaryStr).replace(' ', '0');\r\n\t \tbinaryStr = get2sComplement(binaryStr);\r\n\t\t return binaryStr;\r\n\t }", "public int bitAt(int i) {\n return Integer.parseInt(String.valueOf(lfsr1.charAt(i)));\n }", "String getIndexBits();", "public static int getInt(String str){\n int num=0;\n int count = 0;\n if (str.length() == 7)\n return 0;\n for (int i = str.length()-8; i >= 0; i --){\n if (str.charAt(i) == '1') {\n num += Math.pow(2, count);\n }\n count ++;\n }\n return num;\n }", "public static String binaryToDec(String binary) {\n boolean isnegative = false;\n if (binary.startsWith(\"1\")) {\n isnegative = true;\n char[] c = binary.toCharArray();\n for (int i = 0; i < binary.length(); i++) {\n if (Character.getNumericValue(c[i]) == 0) {\n c[i] = '1';\n } else {\n c[i] = '0';\n }\n }\n\n boolean finded = false;\n for (int i = binary.length() - 1; i >= 0 && !finded; i--) {\n if (Character.getNumericValue(c[i]) == 0) {\n c[i] = '1';\n finded = true;\n } else {\n c[i] = '0';\n }\n }\n binary = String.valueOf(c);\n }\n String dec = \"\";\n if (binary.equals(\"10000000000000000000000000000000\")) {\n dec = Integer.toString(Integer.MIN_VALUE);\n isnegative = false;\n } else {\n dec = Integer.toString(Integer.parseInt(binary, 2));\n }\n\n if (isnegative) {\n dec = \"-\" + dec;\n }\n return dec;\n }", "public static int binary_to_int(String chars){\n\t\tint decimal_number=0,i,j=1;\n\t\tfor(i=(chars.length()-1);i>=0;i--){\n\t\t\tdecimal_number+=(j*char_to_int(chars.charAt(i)));\n\t\t\tj=j*2;\n\t\t}\n\t\treturn decimal_number;\n\t}", "static int isolateBit(int n){\n return n & (-n);\n }", "public int hexToBin(String input) {\r\n\t\treturn Integer.valueOf(new BigInteger(input, 16).toString(2));\t\t\r\n\t}", "public static String getCheckNumber(String paramString){\n int i =paramString.substring(0, 1).getBytes()[0];\n for(int j=1;;j++){\n if(j>=paramString.length())\n return intToHex(Integer.valueOf(i));\n i=(byte)(i^paramString.substring(j, j+1).getBytes()[0]);\n\n }\n }", "private int bitToInt(char bit) {\n return bit == '0' ? 0 : 1;\n }", "public static int numDecodings2(String s) {\r\n\t\tif(s == null || s.length() == 0)\r\n\t\t\treturn 0;\r\n\t\tint len = s.length();\r\n\t\tint prev1 = 1;\r\n\t\tint prev2 = s.charAt(0) == '0' ? 0 : 1;\r\n\t\t\r\n\t\tfor(int i = 2; i <= len; i++) {\r\n\t\t\tint code1 = Integer.valueOf(s.substring(i - 1, i)); // 1 digit\r\n\t\t\tint code2 = Integer.valueOf(s.substring(i - 2, i)); // 2 digit\r\n\t\t\tint temp = prev2;\r\n\t\t\tprev2 = (code1 != 0 ? prev2 : 0) + (code2 <= 26 && code2 > 9 ? prev1 : 0);\r\n\t\t\tprev1 = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn prev2;\r\n\t}", "public int binaryToDecimal(String binaryCode){\n int decimalNumber = 0;\n String sign = binaryCode.substring(0,1);\n binaryCode = binaryCode.substring(1);\n \n decimalNumber = Integer.parseInt(binaryCode, 2);\n \n if(sign.equals(\"1\")) decimalNumber = decimalNumber * -1;\n \n return decimalNumber;\n }", "public int utf8ToInt(byte bval) {\n\t\t\treturn utf8_map[ByteUtil.byteToUint(bval)];\n\t\t}", "public static int stringBinaryToDecimal(String s) {\n int sum = 0;\n for (int i = s.length(); i > 0; i--) {\n int num = new Integer(s.substring(i-1,i)).intValue();\n sum += num*Math.pow(2, s.length()-i);\n }\n return sum;\n }", "public static int stringToBits(String s) {\n if (s.length() > 32) throw new RuntimeException(\"Cannot handle more than 32 bits. input='\" + s + \"'\");\n\n int retVal = 0;\n for (int i = 0; i <= (s.length() - 1); i++) {\n if (s.charAt(i) == '1') {\n retVal = retVal + 1;\n }\n if (i < (s.length() - 1))\n retVal <<= 1;\n }\n return retVal;\n }", "public static final int signedToInt(byte b) {\n \t\treturn (b & 0xff);\n \t}", "public static String binConvertInt(long num) {\n\t\tString binString = \"\";\n\n\t\t// ORIGINAL CODE FOR INT BINCONVERT\n\n\t\tlong binary = 0;\n\t\tint count = 0;\n\n\t\tif (num >= 0) {\n\t\t\twhile (num > 0) {\n\t\t\t\tbinary = num % 2;\n\t\t\t\tif (binary == 1) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tbinString = binary + \"\" + binString;\n\t\t\t\tnum = num / 2;\n\t\t\t}\n\n\t\t}\n\n\t\telse {\n\n\t\t\tnum = -1 * num;\n\n\t\t\twhile (num > 0) {\n\t\t\t\tbinary = num % 2;\n\t\t\t\tif (binary == 1) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\n\t\t\t\tbinString = binary + \"\" + binString;\n\t\t\t\tnum = num / 2;\n\t\t\t}\n\n\t\t\t// flip the binary to negative conversion\n\n\t\t\tchar ch[] = binString.toCharArray();\n\t\t\tboolean addedOne = false;\n\n\t\t\tfor (int i = binString.length() - 1; i >= 0; i--) {\n\t\t\t\tif (ch[i] == '0') {\n\t\t\t\t\tch[i] = '1';\n\t\t\t\t} else {\n\t\t\t\t\tch[i] = '0';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (ch[binString.length() - 1] == '0') {\n\n\t\t\t\tch[binString.length() - 1] = '1';\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tch[binString.length() - 1] = '0';\n\t\t\t\tfor (int i = binString.length() - 1; i >= 0; i--) {\n\t\t\t\t\tif(ch[i] == '1') {\n\t\t\t\t\t\tch[i] = '0';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tch[i] = '1';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\tbinString = new String(ch);\n\t\t}\n\n\t\t\n\t\treturn binString;\n\t}", "public static String binaryCode(String n)\n\t{\n\t\tString retValue = \"\";\n\n\t\tint num = Integer.parseInt(n);\t//convert the input string into int\n\n\t\twhile(num>0)\n\t\t{\n\t\t\tif(num==1)\n\t\t\t\tretValue += num;\n\t\t\telse\n\t\t\t\tretValue += Integer.toString(num%2);\t//resto della divisione\n\t\t\t\tnum = num/2;\t\t\t\t\t\t\t//divide the number by 2\n\t\t}\n\n\t\treturn new StringBuilder(retValue).reverse().toString();\n\t}", "public int decToBin(int input) {\r\n\t String Binary = Integer.toBinaryString(input);\t\r\n\t\treturn Integer.valueOf(Binary);\t\t\r\n\t}", "public static int twosComplement8Bit( final int i ) {\n\t\tif ( i < -128 || i > 127) {\n\t\t\tthrow new IllegalArgumentException( \"8 bit value out of range: \" + Integer.toString(i));\n\t\t}\n\t\tint ui = 0;\n\t\tif ( i < 0) {\n\t\t\tui = (0x80 | (hciTxPower & 0x7F)) & 0xFF;\n\t\t} else {\n\t\t\tui = hciTxPower & 0x7F;\n\t\t}\n\t\t// unsigned 8 bit value...\n\t\tassert( ui >= 0 && ui <= 0xFF);\n\t\t\n\t\treturn ui;\n\t}", "public int findComplement(int num) {\n for (int i = Integer.SIZE - 1; i >= 0; i--) {\n if ((num >>> i & 1) == 1) {\n int move = Integer.SIZE - 1 - i;\n return (~(num << move)) >>> move;\n }\n }\n return 1;\n }", "int bv(byte b) {\n\t\tint out = b;\n\t\tif (b < 0)\n\t\t\tout = out + 256;\n\t\treturn out;\n\t}", "public int getIntValue2(String b) {\n int c = Integer.parseInt(b);\n return c;\n }", "public static int binToDec(String bin) {\n\t\tint len = bin.length();\n\t\tif (len == 0)\n\t\t\treturn 0;\n\t\tString now = bin.substring(0, 1);\n\t\tString later = bin.substring(1);\n\t\treturn Integer.parseInt(now) * (int) Math.pow(2, len - 1) + binToDec(later);\n\t}", "public static int\n gsmBcdByteToInt(byte b) {\n int ret = 0;\n\n // treat out-of-range BCD values as 0\n if ((b & 0xf0) <= 0x90) {\n ret = (b >> 4) & 0xf;\n }\n\n if ((b & 0x0f) <= 0x09) {\n ret += (b & 0xf) * 10;\n }\n\n return ret;\n }", "public static int unsignedByteToInt(byte b) {\n return b & 0xFF;\n }", "private static int batoi(byte[] inp) {\n int len = inp.length>4?4:inp.length;\n int total = 0;\n for (int i = 0; i < len; i++) {\n total += (inp[i]<0?256+inp[i]:(int)inp[i]) << (((len - 1) - i) * 8);\n }\n return total;\n }", "public int stringIntegerEncoding(String str) {\n if (!str.matches(\"[0-9-]+\"))\n return -1;\n\n char[] strArr = str.toCharArray();\n int number = (strArr[0] != '-') ? Character.getNumericValue(strArr[0]) : 0;\n for (int i =1; i < strArr.length; i++) {\n number = 10*number + Character.getNumericValue(strArr[i]);\n }\n return (strArr[0] == '-')? -number : number;\n }", "static void resta(){\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"Ingrese el primer numero binario: \");\n String bin1 = scanner.nextLine();\n\n System.out.print(\"Ingrese el segundo numero binario: \");\n String bin2 = scanner.nextLine();\n\n int A = Integer.parseInt(bin1,2);\n int B = Integer.parseInt(bin2,2);\n\n Long suma = (long) A + (~B + 1);\n\n System.out.println(\"\\nLa resta es: \" + Long.toBinaryString(suma)); \n \n scanner.close();\n }", "private long getUnsigned(byte b) {\n\t\tif(b>=0)\n\t\t\treturn b;\n\t\treturn 256+b;\n\t\t\n\t}", "private int convertstringtobyte(String string) {\n return Integer.parseInt(string, 16);\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tString s = \"9123401\";\r\n\tint a =\tInteger.parseInt(String.valueOf(s.charAt(0)));\r\n\t\r\n\tint b = s.charAt(0) -'0';\r\n//\tSystem.out.println((int)'0');\r\n\tSystem.out.println(b);\r\n//\tSystem.out.println(a);\r\n\r\n\t}", "public int binToDec (String input) {\r\n\t int decimal = Integer.parseInt(input,2);\t\r\n\t\treturn decimal;\t\t\r\n\t}", "public BinaryNumber(String str) {\n\t\tint length = str.length();\n\t\tdata = new int[length];\n\t\tfor(int i = 0;i < str.length();i++) {\n\t\t\tint number = Character.getNumericValue(str.charAt(i));\n\t\t\tif (number == 0||number == 1) {\n\t\t\t\tdata[i] = number;\n\t\t\t}\n\t\t}\n\t}", "public char[] twosComplementNegate(char[] binaryStr) {\n\t\t// TODO: Implement this method.\n\t\treturn null;\n\t}", "public static int toInt(byte b) {\n return b & 0xFF;\n }", "public static int signedByte2unsignedInteger(byte in) {\n int a;\n\n a = (int)in;\n if ( a < 0 ) a += 256;\n return a;\n\n }", "int getBitAsInt(int index);", "static Integer stringToInt(String s){\n int result = 0;\n for(int i = 0; i < s.length(); i++){\n //If the character is not a digit\n if(!Character.isDigit(s.charAt(i))){\n return null;\n }\n //Otherwise convert the digit to a number and add it to result\n result += (s.charAt(i) - '0') * Math.pow(10, s.length()-1-i);\n }\n return result;\n }", "public int numDecodings(String s) {\n if(s==null||s.length()==0){\n return 0;\n }\n\n int n=s.length();\n int[] mem=new int[n+1];\n\n mem[n]=1;\n if(Integer.parseInt(s.substring(n-1))!=0){\n mem[n-1]=1;\n }\n\n for(int i=n-2;i>=0;i--){\n if(Integer.parseInt(s.substring(i,i+1))==0){\n continue;\n }\n if(Integer.parseInt(s.substring(i,i+2))<26){\n mem[i]=mem[i+1]+mem[i+2];\n }else{\n mem[i]=mem[i+1];\n }\n }\n\n return mem[0];\n }", "public static int BinaryToNumber(String numberInput) {\r\n\r\n\t\t//Varibales are given values.\r\n\t\tdouble temp = 0, binary_number = 0;\r\n\t\tint j = numberInput.length();\r\n\t\tint i = 0;\r\n\t\t\r\n\t\t//Every Char is cycled through\r\n\t\twhile (i < numberInput.length()) {\r\n\t\t\tint z = Character.digit(numberInput.charAt(i), 10);\r\n\r\n\t\t\t//If there is a 1 it is translated into a base 10 value\r\n\t\t\tif (z == 1) {\r\n\t\t\t\ttemp = Math.pow(2, j - 1.0);\r\n\t\t\t\tbinary_number += temp;\r\n\t\t\t}\r\n\r\n\t\t\ti++;\r\n\t\t\tj--;\r\n\t\t}\r\n\t\t//the final base 10 value is passed into x and returned. \r\n\t\tint x = (int) binary_number;\r\n\t\treturn x;\r\n\t}", "static String hexToBin(String s) {\n\t\treturn new BigInteger(s, 16).toString(2);\n\t}", "public static int strToInt(String str) {\n\t\tint i = 0;\r\n\t\tint num = 0;\r\n\t\tboolean isNeg = false;\r\n\r\n\t\t//Check for negative sign; if it's there, set the isNeg flag \r\n\t\tif (str.charAt(0) == '-') {\r\n\t\t\tisNeg = true;\r\n\t\t\ti = 1;\r\n\t\t}\r\n\r\n\t\t//Process each character of the string; \r\n\t\twhile (i < str.length()) {\r\n\t\t\tnum *= 10;\r\n\t\t\tnum += str.charAt(i++) - '0'; //Minus the ASCII code of '0' to get the value of the charAt(i++).\r\n\t\t}\r\n\r\n\t\tif (isNeg) num = -num;\r\n\t\treturn num;\r\n\t}", "public static int m2197ao(String str) {\n try {\n return Integer.valueOf(str).intValue();\n } catch (Exception e) {\n return -1;\n }\n }", "static int convertToInt(String s){\n\n int value = -1;\n\n try{\n value = Integer.parseInt(s);\n return value;\n }\n catch(NumberFormatException e) {\n return value;\n }\n catch(NullPointerException e) {\n return value;\n }\n }", "public static final int parseInt(String string, int original, int min, int max) {\n\t\ttry {\n\t\t\tint i = 0;\n\t\t\t\n\t\t\tif(string.startsWith(\"0x\"))\n\t\t\t\ti = Integer.parseInt(string.toLowerCase(), 16);\n\t\t\tif(string.startsWith(\"0b\"))\n\t\t\t\ti = Integer.parseInt(string.toLowerCase(), 2);\n\t\t\telse\n\t\t\t\ti = Integer.parseInt(string);\n\t\t\t\n\t\t\tif(i < min)\n\t\t\t\tthrow new NumberFormatException(i+\" is smaller than \"+min+\".\");\n\t\t\tif(i > max)\n\t\t\t\tthrow new NumberFormatException(i+\" is bigger than \"+max+\".\");\n\t\t\t\n\t\t\treturn i;\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn original;\n\t\t}\n\t}", "public static int decimalToBinary(int s){\n\t\tString result=\"\";\n\t\tif (s<=0){\n\t\t\treturn 0;\n\t\t}\n\t\tfor (int i = 2; s> 0; s/=2){\n\t\t\tresult=result + s%2; \n\t\t}\n\t\tString p1= \"\";\n\t\tfor (int i=0; i<result.length(); i++){\n\t\t\tString l=result.substring(i, i+1);\n\t\t\tp1=p1+l;\n\t\t}\n\t\t\n\t\treturn lib.Change.StringToInt(p1, -1);\n\t\n\t}", "public static byte str2byte(String s) {\r\n byte b = (byte) 0;\r\n int i;\r\n if (s.length() == 8 && s.matches(regex)) {\r\n i = Integer.parseInt(s, 2);\r\n if (i >= 0 && i <= 255) {\r\n b = (byte) i;\r\n } else {\r\n System.out.println(\"string out of range\");\r\n }\r\n }\r\n return b;\r\n }", "public static int getInt(byte bc[], int index) {\n int i, bhh, bhl, blh, bll;\n bhh = (((bc[index])) << 24) & 0xff000000;\n bhl = (((bc[index + 1])) << 16) & 0xff0000;\n blh = (((bc[index + 2])) << 8) & 0xff00;\n bll = ((bc[index + 3])) & 0xff;\n i = bhh | bhl | blh | bll;\n return i;\n }", "int getInt(boolean reverse, IntsRef ref);", "public int mo33889nt(String str) {\n return -1;\n }", "org.apache.xmlbeans.XmlInteger xgetNcbi8Aa();", "public static int byteArrayToInt(byte[] b) {\n\n\t\tint aux = 0;\n\t\tif ((b!=null) && (b.length !=0)) {\n\t\t\tif (b.length>2 ) {\n\t\t\t\tthrow new NumberFormatException(\"To Much Digits to convert (max 2): \"+b.length);\n\t\t\t} else if (b.length==2){\n\t\t\t\tshort aux1 = (short) (b[1] & 0xff);\n\t\t\t\tshort aux2 = (short) (b[0] & 0xff);\n\t\t\t\taux = (int) ((aux2 << 8) | aux1);\n\t\t\t} else if (b.length==1) {\n\t\t\t\tshort aux1 = (short) (b[0] & 0xff);\n\t\t\t\tshort aux2 = (short) (0x00 & 0xff);\n\t\t\t\taux = (int) ((aux2 << 8) | aux1);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new NumberFormatException(\"No Bytes to convert.\");\n\t\t}\n\n\t\treturn aux;\n\t}", "public static int convertIntCharToInteger(String input) {\n\t\tint convertedInt = \tinput.charAt(0)-'0';\n\t\tSystem.out.println(convertedInt);\n\t\treturn convertedInt;\n\t}", "private static int toDecimal(String binary) {\n\t\tint decimal = 0;\n\n\t\tfor(int i = binary.length()-1; i >= 0; i--) {\n\t\t\tif(i == 4) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 1;}\n\t\t\t}\n\t\t\telse if(i == 3) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 2;}\n\t\t\t}\n\t\t\telse if(i == 2) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 4;}\n\t\t\t}\n\t\t\telse if(i == 1) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 8;}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 16;}\n\t\t\t}\n\t\t}\n\n\t\treturn decimal;\n\t}", "public static int atoiRightToLeft(String str) {\n int digitCounter = 1;\n int result = 0;\n\n for (int i = str.length() - 1; i >= 0; i--) {\n if (i == 0 && str.charAt(i) == '-') {\n return result * - 1;\n }\n result += (int) str.charAt(i) - '0' * digitCounter;\n digitCounter *= 10;\n }\n return result;\n }", "public static BigInteger binaryToBI(String binStr) throws UnsignedBigIntUtilsException {\n BigInteger biResult = new BigInteger(UnsignedBigIntUtils.validateBinaryStr(binStr), 2);\n return biResult;\n }", "public static int parseHexInt(CharSequence seq) {\n int result = 0;\n int last = seq.length() - 1;\n if (last > 7) {\n throw new NumberFormatException(\"Too many characters (> 8) for an \"\n + \"int in '\" + seq + \"'\");\n }\n if (Strings.startsWith(seq, \"0x\")) {\n seq = seq.subSequence(2, seq.length());\n }\n for (int i = last, j = 0; i >= 0; i--, j += 4) {\n int val = charToNybbl(seq.charAt(i));\n val <<= j;\n result |= val;\n }\n return result;\n }", "public static int toUnsignedInt(byte x)\n {\n return (int)(x) & 0xff;\n }", "private static String bigIntDecode(String in){\n\n\t BigInteger largeNum = new BigInteger(in); // declare and initialize the largenum\n\t\t//\n\t BigInteger smallNum = largeNum.divide(key); // reverse math done in encryption\n\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\");\n\tSystem.out.println( \"Char Value *Must subtract shift now*: \" + smallNum.toString());\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\\n\\n\");\n\t in = smallNum.toString(); //updates in to the small original big int\n\n\n\t String r = \"\"; // empty result string\n\n\t for(int i = 0; i < in.length();i += 3){ // for loop to extract each 3 nums and get ascii value\n\n\t char add; // declars the char to be added\n\n\t if(in.length() < 2){ //if to determine and handle short encryption\n\t add = (char)(Integer.parseInt(in.substring(i, i + 3)) - shift);\n\n\t }else{ // else, countine as normal, substring each 2 numbers and convert to ascii letter\n\t add = (char)(Integer.parseInt(in.substring(i, i + 3)) - shift );\n\n\t }\n\n\t r+= add; // updates result string\n\t }\n\t\t\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\" Decrypted Message Found: \" + r);\n\t\t\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\\n\\n\");\n\t return r; // returns result string\n\t }", "static int getNumberFromString(String s) {\n if (s == null) {\n throw new NumberFormatException(\"null\");\n }\n int result = 0;\n int startIndex = 0;\n int length = s.length();\n boolean negative = false;\n char firstChar = s.charAt(0);\n if (firstChar == '-') {\n negative = true;\n startIndex = 1;\n }\n\n for (int i = startIndex; i < length; i++) {\n char num = s.charAt(i);\n result = result * 10 + num - '0';\n }\n\n return negative ? -result : result;\n }", "public static int intFromHexString(CharSequence str) {\n\t\tint n = 0;\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tchar c = str.charAt(i);\n\t\t\tint v = c <= '9' ? c - '0' : c - 'a' + 10;\n\t\t\tn <<= 4;\n\t\t\tn |= (v & 0x0f);\n\t\t}\n\t\treturn n;\n\t}", "public static String TextToBinary(String input){\n\t\tString output = \"\";\n\t\tfor(int i = 0; i < input.length(); i++){\n\t\t\toutput += Integer.toBinaryString(0x100 | input.charAt(i)).substring(1);\n\t\t}\n\t\treturn output;\n\t}", "private static final int decodeBEInt(byte[] paramArrayOfByte, int paramInt)\r\n/* 145: */ {\r\n/* 146:225 */ return (paramArrayOfByte[paramInt] & 0xFF) << 24 | (paramArrayOfByte[(paramInt + 1)] & 0xFF) << 16 | (paramArrayOfByte[(paramInt + 2)] & 0xFF) << 8 | paramArrayOfByte[(paramInt + 3)] & 0xFF;\r\n/* 147: */ }", "@VisibleForTesting\n public static ArrayList<Integer> getTwosComplementArray(final String hexString) {\n ArrayList<Integer> result = new ArrayList<>();\n for (int i = 0; i < hexString.length(); i += 2) {\n result.add((int) getTwosComplement(hexToBin(hexString.substring(i, i + 2), 8)));\n }\n return result;\n }", "public int numDecodings(String s) {\r\n\t\tif ((s==null)||(s.length()<1)||(s.charAt(0)=='0')){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint index = 0;\r\n\t\tMap<Integer,Integer> c = new HashMap<Integer,Integer>();\r\n\t\tc.put(index, 1);\r\n\t\tindex++;\r\n\t\twhile(index <s.length()) {\r\n\t\t\tint value = 0;\r\n\t\t\tchar pre = s.charAt(index-1);\r\n\t\t\tchar cur = s.charAt(index);\r\n\t\t\tint preprevalue = 0;\r\n\t\t\tif(index==1) {\r\n\t\t\t\tpreprevalue = 1;\r\n\t\t\t}else {\r\n\t\t\t\tpreprevalue = c.get(index- 2);\r\n\t\t\t}\r\n\t\t\tif (cur=='0') {\r\n\t\t\t\tif((pre!='1')&&(pre!='2')) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tvalue = preprevalue;\t\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\tif(((pre!='1')&&(pre!='2')) || ((cur-'0')>6)&& (pre!='1') ) {\r\n\t\t\t\t\tvalue = c.get(index-1);\t\r\n\t\t\t\t}else {\r\n\t\t\t\t\tvalue = c.get(index-1) + preprevalue;\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tc.put(index, value);\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\treturn c.get(s.length()-1);\r\n\t}", "public static int numDecodings(String s) {\r\n\t\tif(s == null || s.length() == 0)\r\n\t\t\treturn 0;\r\n\t\tint len = s.length();\r\n\t\tint[] ways = new int[len + 1];\r\n\t\tways[0] = 1;\r\n\t\tways[1] = s.charAt(0) == '0' ? 0 : 1;\r\n\t\t\r\n\t\tfor(int i = 2; i <= len; i++) {\r\n\t\t\tint code1 = Integer.valueOf(s.substring(i - 1, i)); // 1 digit\r\n\t\t\t//System.out.println(\"c1: \" + code1);\r\n\t\t\tint code2 = Integer.valueOf(s.substring(i - 2, i)); // 2 digit\r\n\t\t\t//System.out.println(\"c2: \" + code2);\r\n\t\t\t\r\n\t\t\t//ways[i] = (code1 != 0 ? ways[i - 1] : 0) + (code2 <= 26 && code2 > 9 ? ways[i - 2] : 0);\r\n\t\t\tif(code1 >= 1 && code1 <= 9)\r\n\t\t\t\tways[i] = ways[i - 1];\r\n\t\t\tif(code2 >= 10 && code2 <= 26)\r\n\t\t\t\tways[i] += ways[i - 2];\r\n\t\t\t//System.out.println(\"ways[\" + i + \"]: \" + ways[i]);\r\n\t\t}\r\n\t\t\r\n\t\treturn ways[len];\r\n\t}", "public int convert(String str) {\n if(str == null || str.length() == 0)\n return 0;\n// Integer pre = null;\n int i = str.length() - 1;\n int res = 0; // assume there will not be overflow\n while(i >= 0) {\n Character cur = str.charAt(i);\n Character pre = i - 1 > 0 ? str.charAt(i-1) : null;\n if(pre != null && pre <= cur) {\n res += map.get(cur) - map.get(pre);\n i--;\n }\n else {\n res += map.get(cur);\n }\n i--;\n }\n return res;\n }", "public static int getSum(int a, int b) {\n// Integer.toBinaryString(a) ^ Integer.toBinaryString(b);\n return a ^ b;\n }", "@Test\n public void decodeString()\n {\n final BinaryEncoder encoder = new BinaryEncoder(16);\n assertThat(encoder.decode(\"0011\"), is(3.0));\n }", "private int getNumberBase(String n1){\n return Integer.parseUnsignedInt(n1, base);\n }", "protected static final int getDecFromHex(String inputHex) {\r\n\t\t// msb should be leftmost but for parsing , we use it like lsb per gsv's protocol specification\r\n\t\tString lsb = inputHex.substring(0, 2);\r\n\t\tString msb = inputHex.substring(2, 4);\r\n\r\n\t\tint val = ( Integer.parseInt(msb, 16) * 256 ) + ( Integer.parseInt(lsb, 16) * 1 );\r\n//\t\tGQDKPMConstants.logger.debug(\"incoming lsb = \" + lsb +\" lsb hex-dec = \"+Integer.parseInt(lsb, 16) * 1 +\r\n//\t\t\t\t\" , msb = \"+ msb + \" msb hex-dec = \"+Integer.parseInt(msb, 16) * 256 + \" , val = \" + val );\r\n\t\treturn val;\r\n\t}", "public static void main(String[] args) {\n System.out.println(-14>>>1);\n String bin = \"01111111111111111111111111111001\";\n double res = binToDec(bin);\n System.out.println(res);\n }", "private static int convertByteToPositiveInt(byte value) {\n return value >= 0 ? value : value + INTEGER_COMPLEMENT;\n }", "private static int createBitVector(String str) {\n\t\tint bitVector = 0;\n\t\tfor(char c : str.toCharArray()) {\n\t\t\tint x = getCharNum(c);\n\t\t\tbitVector = toggle(bitVector, x);\n\t\t}\n\t\treturn bitVector;\n\t}", "public static int reverseBits(int n) {\n String binary = Integer.toBinaryString(n);\n while (binary.length() < 32) {\n binary = \"0\" + binary;\n }\n\n String reverse = \"\";\n for (int i = binary.length() - 1; i >= 0; i--) {\n reverse += binary.charAt(i);\n }\n\n return (int) Long.parseLong(reverse, 2);\n }", "private static int parseInt(String sn) {\n\t\treturn Integer.parseInt(sn.substring(2), 16);\n\t}", "public static int getUnsignedByte(byte value) {\n return value >= 0 ? value : Byte.MAX_VALUE - value;\n }", "private int convertBinaryToDecimal(int binaryValueOfBitMap){\r\n\t\r\n\tint decimalValue = 0;\r\n\ttry {\r\n\t\t int num = binaryValueOfBitMap; \r\n\t\t int dec_value = 0; \t\t \r\n\t\t // Initializing base \r\n\t\t // value to 1, i.e 2^0 \r\n\t\t int base = 1; \r\n\t\t \r\n\t\t int temp = num; \r\n\t\t while (temp > 0) \r\n\t\t { \r\n\t\t int last_digit = temp % 10; \r\n\t\t temp = temp / 10; \r\n\t\t \r\n\t\t dec_value += last_digit * base; \r\n\t\t \r\n\t\t base = base * 2; \r\n\t\t } \r\n\t\t decimalValue = dec_value;\r\n\t}\r\n\tcatch(Exception e) {\r\n\t\tSystem.out.println(\"Exception occurred \"+e);\r\n\r\n\t}\r\n\treturn decimalValue;\r\n\t\t\r\n}", "private static int i(String s) {\n return Integer.parseInt(s);\n }", "public static int toInt(String str){\r\n\t\tInteger i = toInteger(str);\r\n\t\treturn i==null?0:i;\r\n\t}" ]
[ "0.7370482", "0.72173554", "0.69572455", "0.69222116", "0.6892749", "0.66008407", "0.65200996", "0.6451709", "0.64361495", "0.63966894", "0.63541263", "0.6347679", "0.6197225", "0.6182058", "0.61279136", "0.6109087", "0.60838723", "0.6064184", "0.6048475", "0.60385036", "0.60268635", "0.60239476", "0.6012607", "0.5967124", "0.59415007", "0.59387624", "0.59258956", "0.59223", "0.59217995", "0.58903605", "0.588685", "0.5885805", "0.58838946", "0.587414", "0.5803337", "0.5799891", "0.5785681", "0.577889", "0.57487273", "0.5746056", "0.57443756", "0.5729754", "0.56701", "0.5668409", "0.56404376", "0.56336063", "0.56328684", "0.5632346", "0.5628259", "0.56165886", "0.5606016", "0.56034654", "0.5597093", "0.55937046", "0.5593153", "0.5588517", "0.55826205", "0.5560536", "0.5551858", "0.5542178", "0.5535716", "0.55256456", "0.5521444", "0.54905474", "0.54896003", "0.5480092", "0.5479564", "0.5477499", "0.54757416", "0.54628766", "0.54566306", "0.54489416", "0.5435456", "0.5434579", "0.5433931", "0.5432053", "0.5431675", "0.54291946", "0.5427618", "0.5402989", "0.539551", "0.539382", "0.5376469", "0.53684807", "0.536662", "0.536522", "0.5362296", "0.53605586", "0.5356542", "0.5356459", "0.535513", "0.5345707", "0.5344661", "0.53429276", "0.5325598", "0.5318628", "0.5313435", "0.5309882", "0.5308101", "0.5305171" ]
0.75239253
0
Manually OR 3 strings together.
public static String artificialOR(int func, int rD, String imm) { String substring = Integer.toBinaryString(rD | func); while (substring.length() != 16) { substring = "0" + substring; } substring = substring.substring(0, substring.length() - 8) + imm; return substring; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAndOr();", "public static String punctuateOr(List<String> elements)\r\n/* 48: */ {\r\n/* 49: 47 */ return punctuateSequence(elements, \"or\");\r\n/* 50: */ }", "private static String or(String s, String t)\r\n\t{\r\n\t\tchar[] out = s.toCharArray();\r\n\t\tfor (int i = 0; i < out.length; i++)\r\n\t\t{\r\n\t\t\tif(out[i] == '0' && t.charAt(i) == '1')\r\n\t\t\t\tout[i] = '1';\r\n\t\t}\r\n\t\treturn new String(out);\r\n\t}", "public void setAndOr (String AndOr);", "String getOr_op();", "private void or() {\n // PROGRAM 1: Student must complete this method\n //loop through output array\n for (int i = 0; i < output.length; i++) {\n //take the or of index i of inputA and inputB and place result in output[i]\n output[i] = (inputA[i] | inputB[i]);\n }\n }", "@Test\n\tpublic void testBuildExpressionWithThreeArguments() {\n\t\t\n\t\tWord wordA = new Word(\"apple\", 1);\n\t\tWord wordB = new Word(\"car\", 1);\n\t\tWord wordC = new Word(\"roof\", 2);\n\t\t\n\t\tExpressionBuilder<Word> builder = new ExpressionBuilder<>();\n\t\tbuilder.append(null, wordA);\n\t\tbuilder.append(new AndOperator<Word>(), wordB);\n\t\tbuilder.append(new OrOperator<Word>(), wordC);\n\t\t\n\t\tExpression<Word> resultExpression = builder.getExpression();\n\t\t\n\t\tString expectedResult = \"((apple [1] AND car [1]) OR roof [2])\";\n\t\t\n\t\tSystem.out.println(resultExpression.evaluate());\n\t\tassertEquals(expectedResult, resultExpression.toString());\n\t\t\n\t}", "public static\n\tString anyOf(Iterable<String> strings)\n\t{\n\t\tboolean first=true;\n\t\tStringBuffer sb=new StringBuffer(\"(\");\n\t\tfor (String str : strings)\n\t\t{\n\t\t\tif (!first)\n\t\t\t{\n\t\t\t\tsb.append('|');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfirst=false;\n\t\t\t}\n\t\t\tsb.append(Pattern.quote(str));\n\t\t}\n\t\tsb.append(')');\n\t\treturn sb.toString();\n\t}", "public Object visitLogicalOrExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a | (Long) b;\n }\n else {\n return parens(a) + \" || \" + parens(b);\n }\n }\n else {\n BDD a, b, bdd;\n \n a = ensureBDD(dispatch(n.getGeneric(0)));\n b = ensureBDD(dispatch(n.getGeneric(1)));\n \n bdd = a.orWith(b);\n \n return bdd;\n }\n }", "public void testToString_OR() {\n assertEquals(\"Returns an incorrect string\", \"OR\", BinaryOperation.OR.toString());\n }", "public static boolean interweavingStrings(String one, String two, String three) {\n if(three.length() != one.length()+two.length()) return false ;\n return interweavingStringsRec(one,two,three,0,0,0);\n\n }", "private Expr or() { // This uses the same recursive matching structure as other binary operators.\n Expr expr = and(); // OR takes precedence over AND.\n while(match(OR)) {\n Token operator = previous();\n Expr right = and();\n expr = new Expr.Logical(expr, operator, right);\n }\n return expr;\n }", "private Term parseLogicalOr(final boolean required) throws ParseException {\n Term t1 = parseLogicalAnd(required);\n while (t1 != null) {\n /*int tt =*/ _tokenizer.next();\n if (isSpecial(\"||\") || isKeyword(\"or\")) {\n Term t2 = parseLogicalAnd(true);\n if ((t1.isB() && t2.isB()) || !isTypeChecking()) {\n t1 = new Term.OrB(t1, t2);\n } else {\n reportTypeErrorB2(\"'||' or 'or'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public void orWhere(String dbsel)\n {\n this._appendWhere(dbsel, WHERE_OR);\n }", "@Test\n public void testGroups() {\n assertThat(regex(or(e(\"0\"), e(\"1\"), e(\"2\")))).isEqualTo(\"0|1|2\");\n // Optional groups always need parentheses.\n assertThat(regex(opt(e(\"0\"), e(\"1\"), e(\"2\")))).isEqualTo(\"(?:0|1|2)?\");\n // Once a group has prefix or suffix, parentheses are needed.\n assertThat(regex(\n seq(\n or(e(\"0\"), e(\"1\")),\n e(\"2\"))))\n .isEqualTo(\"(?:0|1)2\");\n }", "public static StringFilterDTO orExact(String value) {\r\n\t\treturn toOr(exact(value));\r\n\t}", "String combine(String pattern1, String pattern2);", "private String unionTypes(Set<String> types) {\n Set<String> splitTypes = new HashSet<>();\n\n for (String type : types) {\n for (String s : MentionTypeUtils.splitToMultipleTypes(type)) {\n splitTypes.add(MentionTypeUtils.canonicalize(s));\n }\n }\n return MentionTypeUtils.joinMultipleTypes(splitTypes);\n }", "public static void main(String[] args) {\n\n String word1 = \"abc\";\n String word2 = \"trv\";\n int length1=word1.length();\n int length2=word2.length();\n if (length1==3&&length2==3){\n System.out.println(word1.charAt(0)+\"\"+word2.charAt(0)+\n word1.charAt(1)+\"\"+word2.charAt(1)+\n word1.charAt(2)+\"\"+word2.charAt(2)); }\n else if (length1!=3||length2!=3){\n System.out.println(\"cannot merge\");\n }\n }", "public static By Or(By first, By ...others) {\n\t\treturn new OrBy(first, others);\n\t}", "@Test\n\tvoid attributeGroupDisjunction2() {\n\t\tassertEquals(\n\t\t\t\"Match procedure with left OR right foot (grouped)\",\n\t\t\tSets.newHashSet(AMPUTATION_FOOT_LEFT, AMPUTATION_FOOT_RIGHT, AMPUTATION_FOOT_BILATERAL),\n\t\t\tstrings(selectConceptIds(\"< 71388002 |Procedure|: { 363704007 |Procedure site| = 22335008 |Left Foot| } OR { 363704007 |Procedure site| = 7769000 |Right Foot| }\")));\n\n\t}", "private static String m19460a(String str, String str2, String str3) {\n if (TextUtils.isEmpty(str3)) {\n str3 = \"\";\n }\n return str.replaceAll(str2, str3);\n }", "OrExpr createOrExpr();", "String getOne_or_more();", "public void setOR(boolean value) {\n this.OR = value;\n }", "public boolean getOR() {\n return OR;\n }", "public SingleRuleBuilder or(String predicate, String... variables) { return or(false, predicate, variables); }", "void mo8715r(String str, String str2, String str3);", "private Term parseBitwiseOr(final boolean required) throws ParseException {\n Term t1 = parseBtwiseXOr(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '|') {\n Term t2 = parseBtwiseXOr(true);\n if ((t1.isI() && t2.isI()) || !isTypeChecking()) {\n t1 = new Term.OrI(t1, t2);\n } else {\n reportTypeErrorI2(\"'|'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public static Predicate or(Predicate... predicates)\n {\n return new LogicPredicate(Type.OR, predicates);\n }", "public static String combineStrings(String... strings) {\n if(CMAppGlobals.DEBUG)Logger.i(TAG, \":: StringHelper.combineStrings \");\n\n StringBuilder stringBuilder = new StringBuilder();\n if(strings != null && strings.length > 0) {\n for (String itemString :\n strings) {\n stringBuilder.append(itemString);\n }\n }\n\n return stringBuilder.toString();\n\n }", "@Test\n\tpublic void explicitANDTest() {\n\t\tString query = \"hello goodbye\";\n\t\tString query2 = \"hello goodbye hello\";\n\t\tString query3 = \"( hello ( goodbye | hello bye ) )\";\n\t\t\n\t\tString queryResults = \"hello & goodbye\";\n\t\tString query2Results = \"hello & goodbye & hello\";\n\t\tString query3Results = \"( hello & ( goodbye | hello & bye ) )\";\n\n\t\tassertEquals(queryResults, String.join(\" \", queryTest.addExplicitAND(query.split(\" \"))));\n\t\tassertEquals(query2Results, String.join(\" \", queryTest.addExplicitAND(query2.split(\" \"))));\n\t\tassertEquals(query3Results, String.join(\" \", queryTest.addExplicitAND(query3.split(\" \"))));\n\t}", "public boolean getOR() {\n return OR;\n }", "private boolean conditionAndOr( String condition, String[] ligne )\r\n {\n if( !condition.contains(\"AND\") || !condition.contains(\"OR\") )\r\n return this.conditionSimple(condition, ligne);\r\n \r\n // on suppose que cette fonction ne peut être utilisée que si\r\n // la condition ne contient pas des ( ou )\r\n // dans le cas d'une succession de AND et OR\r\n // on donne la priorité pour le AND\r\n boolean resultat = false;\r\n boolean resAnd = true;\r\n boolean resOr = false;\r\n \r\n // pour supprimer tous les espaces\r\n condition = condition.replaceAll(\" \", \"\");\r\n String[] conditionsAnd = condition.split(\"AND\");\r\n for( String cdsAnd : conditionsAnd ) // cds abréviation de conditions\r\n {\r\n String[] conditionsOr = cdsAnd.split(\"OR\");\r\n for( String cdsOr : conditionsOr )\r\n {\r\n resOr |= this.conditionSimple(cdsOr, ligne);\r\n }\r\n resAnd &= resOr;\r\n }\r\n resultat = resAnd;\r\n return resultat;\r\n }", "public static boolean isEqual(String str1, String str2, String str3) {\n\treturn isEqual(str1, str2) || isEqual(str1, str3);\n }", "public static final int[] get_OR_OR(){\n\t\treturn get_AND_AND();\n\t}", "@SafeVarargs\n public static OrSpecification or( Specification<Composite>... specs )\n {\n return new OrSpecification( Arrays.asList( specs ) );\n }", "public String getOrConcatenator() {\n\t\treturn \"|\";\n\t}", "private static Edge or(Edge... edges) {\n List<Edge> e = Arrays.asList(edges);\n Preconditions.checkArgument(!e.contains(Edge.epsilon()), \"use 'opt()' for optional groups\");\n return Edge.disjunction(e);\n }", "StatementChain or(ProfileStatement... statements);", "private static boolean checkOrOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"or\")) {\n\t\t\tString[] arr = expression.split(\"or\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkEqualsToOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// check if the current word is a variable\n\t\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"or\");\n\t\t\t\t\t} else if (expression.endsWith(\"or\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"or\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkEqualsToOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "public Object visitBitwiseOrExpression(GNode n) {\n Object a, b, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(1));\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n result = (Long) a | (Long) b;\n }\n else {\n result = parens(a) + \" | \" + parens(b);\n }\n \n return result;\n }", "public static BinaryExpression exclusiveOr(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static Disjunction or(Criterion... criteria) {\n return new Disjunction(criteria);\n }", "private static void orify(Collection<ExternalizedStateComponent> inputs, ExternalizedStateComponent output, ExternalizedStateConstant falseProp) {\n\t\t//TODO: Look for already-existing ors with the same inputs?\n\t\t//Or can this be handled with a GDL transformation?\n\n\t\t//Special case: An input is the true constant\n\t\tfor(ExternalizedStateComponent in : inputs) {\n\t\t\tif(in instanceof ExternalizedStateConstant && ((ExternalizedStateConstant) in).getValue()) {\n\t\t\t\t//True constant: connect that to the component, done\n\t\t\t\tin.addOutput(output);\n\t\t\t\toutput.addInput(in);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//Special case: An input is \"or\"\n\t\t//I'm honestly not sure how to handle special cases here...\n\t\t//What if that \"or\" gate has multiple outputs? Could that happen?\n\n\t\t//For reals... just skip over any false constants\n\t\tExternalizedStateOr or = new ExternalizedStateOr();\n\t\tfor(ExternalizedStateComponent in : inputs) {\n\t\t\tif(!(in instanceof ExternalizedStateConstant)) {\n\t\t\t\tin.addOutput(or);\n\t\t\t\tor.addInput(in);\n\t\t\t}\n\t\t}\n\t\t//What if they're all false? (Or inputs is empty?) Then no inputs at this point...\n\t\tif(or.getInputs().isEmpty()) {\n\t\t\t//Hook up to \"false\"\n\t\t\tfalseProp.addOutput(output);\n\t\t\toutput.addInput(falseProp);\n\t\t\treturn;\n\t\t}\n\t\t//If there's just one, on the other hand, don't use the or gate\n\t\tif(or.getInputs().size() == 1) {\n\t\t\tExternalizedStateComponent in = or.getSingleInput();\n\t\t\tin.removeOutput(or);\n\t\t\tor.removeInput(in);\n\t\t\tin.addOutput(output);\n\t\t\toutput.addInput(in);\n\t\t\treturn;\n\t\t}\n\t\tor.addOutput(output);\n\t\toutput.addInput(or);\n\t}", "Expression orExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = andExpression();\r\n\t\twhile(isKind(OP_OR)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = andExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0, op, e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public Filter getStandardOrFilter(String filterText, String[] caseInsensitivePropertyNames, String[] otherPropertyNames) {\n\t\tif (StringUtils.isBlank(filterText)) {\n\t\t\treturn null;\n\t\t}\n\t\tString[] filterTextElements = StringUtils.split(filterText, ' ');\n\t\tOr[] ors = new Or[filterTextElements.length];\n\t\tfor (int f = 0; f < filterTextElements.length; f++) {\n\t\t\tLike[] likes = new Like[caseInsensitivePropertyNames.length + otherPropertyNames.length];\n\t\t\tfor (int l = 0; l < likes.length; l++) {\n\t\t\t\tif (l < caseInsensitivePropertyNames.length) {\n\t\t\t\t\tlikes[l] = new Like(caseInsensitivePropertyNames[l], filterTextElements[f], false);\n\t\t\t\t} else {\n\t\t\t\t\t// Note: for non-string properties we can't specify case-insensitive filtering (causes error)\n\t\t\t\t\tlikes[l] = new Like(otherPropertyNames[l-caseInsensitivePropertyNames.length], filterTextElements[f]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tors[f] = new Or(likes);\n\t\t}\n\t\tif (ors.length == 1) {\n\t\t\treturn ors[0];\n\t\t} else {\n\t\t\treturn new And(ors);\n\t\t}\n\t}", "public String comboString(String a, String b) {\r\n return a.length() > b.length() ? b + a + b : a + b + a;\r\n }", "public void addOrClause(List<FilterCriterion> orFilters)\n {\n orClauses.add(orFilters);\n }", "public ConditionItem or(ConditionItem...constraints) {\n\t\treturn blockCondition(ConditionType.OR, constraints);\n\t}", "public Criteria or() {\n Criteria criteria = createCriteriaInternal();\n oredCriteria.add(criteria);\n return criteria;\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }", "public void or(Criteria criteria) {\n oredCriteria.add(criteria);\n }", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public Criteria or() {\r\n\t\tCriteria criteria = createCriteriaInternal();\r\n\t\toredCriteria.add(criteria);\r\n\t\treturn criteria;\r\n\t}", "public String stringJoin(Collection<? extends CharSequence> strings) {\n return EasonString.join(strings);\n }", "public ExpressionSearch or(Search srch)\n\t{\n\t\treturn new ExpressionSearch(false).addOps(this, srch);\n\t}", "public static Condition anyOf(Condition... conditions)\n {\n return new OrCondition(conditions);\n }", "@Test\n\tpublic void orGrepTest() throws Exception {\n\t\t// | for 'insane' and 'mistress'\n\t\tHashSet<String> grep1 = loadGrepResults(\"mistress\");\n\t\tHashSet<String> grepFound = loadGrepResults(\"insane\");\n\t\tgrepFound.addAll(grep1);\n\n\t\tCollection<Page> index = queryTest.query(\"mistress | insane\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\n\t\tassertEquals(indexFound, grepFound);\n\n\t}", "public static void main(String[] args) {\n\t\tStringJoiner joiner=new StringJoiner(\" and \",\"{\",\"}\");\n\t\tjoiner.add(\"python\");\n\t\tjoiner.add(\"java\");\n\t\tjoiner.add(\"c\");\n\t\tjoiner.add(\"c++\").add(\"html\").add(\"css\").add(\"js\");\n\t\tString s=joiner.toString();\n\t\tSystem.out.println(s);\n\t\tString s1=\"asd ad ad vxczvz\";\n\t\tSystem.out.println(s1.lastIndexOf(\" \"));\n\t\tSystem.out.println(s1.substring(s1.lastIndexOf(\" \")));\n\t\t\n\t\tStringJoiner joiner1=new StringJoiner(\" and \",\"[\",\"]\");\n\t\tjoiner1.add(\"asdsa\").add(\"rgrg\").add(\"grger\");\n\t\tSystem.out.println(joiner1);\n\t\tjoiner.merge(joiner1);\n\t\tSystem.out.println(joiner);\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public Criteria or() {\n\t\tCriteria criteria = createCriteriaInternal();\n\t\toredCriteria.add(criteria);\n\t\treturn criteria;\n\t}", "public StringUnionFunc() {\n\t super.addLinkableParameter(\"str1\"); \n\t\t super.addLinkableParameter(\"str2\"); \n }", "@ZenCodeType.Operator(ZenCodeType.OperatorType.OR)\n default IData or(IData other) {\n \n return notSupportedOperator(OperatorType.OR);\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void or(Criteria criteria) {\r\n oredCriteria.add(criteria);\r\n }", "public void setOr(boolean or) {\n this.or = or;\n }", "private boolean anyOfSetInString(String inputStr, Set<String> items) {\n\n for (String s : items) {\n if (inputStr.contains(s)) {\n // Didn't use String.equals() as user can have the number saved with or without country code\n\n return true;\n }\n }\n\n return false;\n }" ]
[ "0.6512018", "0.64272636", "0.62889177", "0.6099329", "0.5988236", "0.57927257", "0.579181", "0.5714817", "0.5685525", "0.56276584", "0.5535283", "0.5526158", "0.5472799", "0.5472418", "0.546936", "0.5452226", "0.53687954", "0.533866", "0.53223205", "0.53179437", "0.52435565", "0.52089125", "0.51972187", "0.51959556", "0.51940185", "0.519043", "0.5174763", "0.5165915", "0.5164711", "0.51644176", "0.5164043", "0.5157363", "0.5140711", "0.5098279", "0.50966436", "0.5091143", "0.5071786", "0.50681", "0.50427353", "0.5040166", "0.50394493", "0.50385314", "0.5035236", "0.5028642", "0.49987286", "0.49774045", "0.49615365", "0.49602956", "0.49579933", "0.49420047", "0.4941399", "0.4940789", "0.49382916", "0.49382916", "0.49287298", "0.49287298", "0.49287298", "0.49287298", "0.49287298", "0.4927004", "0.49238813", "0.4923663", "0.49236518", "0.49212873", "0.4917483", "0.4917483", "0.4917483", "0.4917483", "0.4917483", "0.4917483", "0.4917483", "0.4917483", "0.4917483", "0.4917483", "0.4917483", "0.48917282", "0.48786962", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48701462", "0.48679176", "0.4862869" ]
0.0
-1
gets the two's complement string of a given int
public static String toBinaryString(int number) { String result = ""; int origin = Math.abs(number); while (origin > 0) { if (origin % 2 == 0) result = "0" + result; else result = "1" + result; origin = origin / 2; } while (result.length() < 16) result = "0" + result; if (number > 0) return result; else { String result2 = ""; for (int i = 0; i < result.length(); i++) result2 += result.charAt(i) == '1' ? "0" : "1"; char[] result2Array = result2.toCharArray(); for (int i = result2Array.length - 1; i >= 0; i--) if (result2Array[i] == '0') { result2Array[i] = '1'; break; } else result2Array[i] = '0'; result2 = ""; for (int i = 0; i < result2Array.length; i++) result2 += String.valueOf(result2Array[i]); return result2; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toBitString (int i) {\n\tint[] result = new int[64];\n\tint counter = 0;\n\twhile (i > 0) {\n\t\tresult[counter] = i % 2;\n\t\ti /= 2;\n\t\tcounter++;\n\t}\n\tString answer = \"\";\n\tfor (int j = 0; j < counter; j++)\n\t\tanswer += \"\" + result[j];\n\treturn answer;\t\n}", "public String negBase2(int n) throws Exception {\r\n\t\t String binaryStr=\"\";\r\n\r\n\t\t int minValue = -256;//allowed min decimal\r\n\t\t// donot allow positive numbers and make sure the \r\n\t\t// input number is > allowed min value for 8 bit representation\r\n\t\t if (n>0 || n < minValue) \r\n\t\t\t throw new Exception (\"the input number exceeds the allowable limits\");\r\n\t\t\t \r\n\t\t binaryStr = Integer.toBinaryString((-1)*n);\r\n\t \t\r\n\t \tbinaryStr= String.format(\"%8s\", binaryStr).replace(' ', '0');\r\n\t \tbinaryStr = get2sComplement(binaryStr);\r\n\t\t return binaryStr;\r\n\t }", "public static String intToString(int n) { \n\t if (n == 0) return \"0\";\n\t StringBuilder sb = new StringBuilder();\n\t while (n > 0) { \n\t int curr = n % 10;\n\t n = n/10;\n\t sb.append(curr);\n\t }\n\t String s = sb.substring(0);\n\t sb = new StringBuilder();\n\t for (int i = s.length() -1; i >= 0; i--) { \n\t sb.append(s.charAt(i));\n\t }\n\t return sb.substring(0);\n\t}", "public static int getTwosComplement(String binaryInt) {\r\n\t\t// Check if the number is negative.\r\n\t\t// We know it's negative if it starts with a 1\r\n\t\tif (binaryInt.charAt(0) == '1') {\r\n\t\t\t// Call our invert digits method\r\n\t\t\tString invertedInt = invertDigits(binaryInt);\r\n\t\t\t// Change this to decimal format.\r\n\t\t\tint decimalValue = Integer.parseInt(invertedInt, 2);\r\n\t\t\t// Add 1 to the current decimal and multiply it by -1\r\n\t\t\t// because we know it's a negative number\r\n\t\t\tdecimalValue = (decimalValue + 1) * -1;\r\n\t\t\t// return the final result\r\n\t\t\treturn decimalValue;\r\n\t\t} else {\r\n\t\t\t// Else we know it's a positive number, so just convert\r\n\t\t\t// the number to decimal base.\r\n\t\t\treturn Integer.parseInt(binaryInt, 2);\r\n\t\t}\r\n\t}", "public static String binConvertInt(long num) {\n\t\tString binString = \"\";\n\n\t\t// ORIGINAL CODE FOR INT BINCONVERT\n\n\t\tlong binary = 0;\n\t\tint count = 0;\n\n\t\tif (num >= 0) {\n\t\t\twhile (num > 0) {\n\t\t\t\tbinary = num % 2;\n\t\t\t\tif (binary == 1) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tbinString = binary + \"\" + binString;\n\t\t\t\tnum = num / 2;\n\t\t\t}\n\n\t\t}\n\n\t\telse {\n\n\t\t\tnum = -1 * num;\n\n\t\t\twhile (num > 0) {\n\t\t\t\tbinary = num % 2;\n\t\t\t\tif (binary == 1) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\n\t\t\t\tbinString = binary + \"\" + binString;\n\t\t\t\tnum = num / 2;\n\t\t\t}\n\n\t\t\t// flip the binary to negative conversion\n\n\t\t\tchar ch[] = binString.toCharArray();\n\t\t\tboolean addedOne = false;\n\n\t\t\tfor (int i = binString.length() - 1; i >= 0; i--) {\n\t\t\t\tif (ch[i] == '0') {\n\t\t\t\t\tch[i] = '1';\n\t\t\t\t} else {\n\t\t\t\t\tch[i] = '0';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (ch[binString.length() - 1] == '0') {\n\n\t\t\t\tch[binString.length() - 1] = '1';\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tch[binString.length() - 1] = '0';\n\t\t\t\tfor (int i = binString.length() - 1; i >= 0; i--) {\n\t\t\t\t\tif(ch[i] == '1') {\n\t\t\t\t\t\tch[i] = '0';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tch[i] = '1';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\tbinString = new String(ch);\n\t\t}\n\n\t\t\n\t\treturn binString;\n\t}", "public static String decToBin( int n ) {\n\tString x = \"\";\n\twhile(n != 0){\n\t x = n % 2 + x;\n\t n /= 2;\n\t}\n\treturn x;\n }", "public static String reverseComplement(final CharSequence seq)\n\t{\n\tfinal StringBuilder b=new StringBuilder(seq.length());\n\tfor(int i=0;i< seq.length();++i)\n\t\t{\n\t\tb.append(complement(seq.charAt((seq.length()-1)-i)));\n\t\t}\n\treturn b.toString();\n\t}", "public static String intToBinaryString(int value) {\r\n String bin = \"00000000000000000000000000000000\" + Integer.toBinaryString(value);\r\n\r\n return bin.substring(bin.length() - 32, bin.length() - 24)\r\n + \" \"\r\n + bin.substring(bin.length() - 24, bin.length() - 16)\r\n + \" \"\r\n + bin.substring(bin.length() - 16, bin.length() - 8)\r\n + \" \"\r\n + bin.substring(bin.length() - 8, bin.length());\r\n }", "public String get2sComplement(String binaryVal) {\r\n\t\tString onesComp = new String();\r\n\t\tString twosComp = new String();\r\n\t\tchar carry = '0';\r\n\t\tint i;\r\n\t\t// finding one's complement--------------------------------\r\n\t\tfor (i = 0; i < binaryVal.length(); i++) {\r\n\t\t\tif (binaryVal.charAt(i) == '0')\r\n\t\t\t\tonesComp = onesComp + \"1\";\r\n\t\t\telse\r\n\t\t\t\tonesComp = onesComp + \"0\";\r\n\t\t} \r\n\t\t\r\n\t\t//finding the 2's complement. adding '1' to the binary(which is 1's complement)\r\n\t\tchar lsb = onesComp.charAt(onesComp.length() - 1);\r\n\t\tif (lsb == '1') {\r\n\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\tcarry = '1';\r\n\t\t} else\r\n\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\tfor (i = onesComp.length() - 2; i >= 0; i--) {\r\n\t\t\tchar digit = onesComp.charAt(i);\r\n\t\t\tif (carry == '0' && digit == '0')\r\n\t\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\telse if (carry == '0' && digit == '1')\r\n\t\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\t\telse if (carry == '1' && digit == '0') {\r\n\t\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\t\t\tcarry = '0';\r\n\t\t\t} else {\r\n\t\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\t\tcarry = '1';\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn twosComp;\r\n\t\t }", "public String covertIng(int num) {\n\t\tchar[] digits = new char[10];\r\n\t\t\r\n\t\tboolean sign = num >= 0 ? true : false;\r\n\t\tint idx = 0;\r\n\t\t\r\n\t\twhile(idx <digits.length){\r\n\t\t\tdigits[idx] = toChar(num % 10);\r\n\t\t\tnum = num /10;\r\n\t\t\tif(num== 0)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tidx++;\r\n\t\t}\r\n\t\t\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tif(!sign)\r\n\t\t\tsb.append('-');\r\n\t\t\r\n\t\twhile(idx>=0){\r\n\t\t\tsb.append(digits[idx--]);\r\n\t\t}\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t\t\r\n\t}", "public String base10to2(int n) throws Exception {\r\n\r\n\t\t // int n = Integer.valueOf(base10);\r\n\t\t \r\n\t\t if (n < 0 || n > maxValue)\r\n\t\t\t throw new Exception (\"the input number exceeds the allowable limits\");\r\n\t \r\n\t\t String binaryStr = Integer.toBinaryString(n);\r\n\t \r\n\t //pad the above string to make it to 8 bits representation\r\n\t //if positive number, the most significant bit is 0, else 1\r\n\t if (n>0)\r\n\t \tbinaryStr= String.format(\"%8s\", binaryStr).replace(' ', '0');\r\n\t else{\r\n\t \tbinaryStr = Integer.toBinaryString((-1)*n);\r\n\t \t\r\n\t \tbinaryStr= String.format(\"%8s\", binaryStr).replace(' ', '0');\r\n\t \tbinaryStr = get2sComplement(binaryStr);\r\n\t }\r\n\t return binaryStr;\r\n\t }", "private String intString(int n){\r\n String s=\"\";\r\n if(n>9){\r\n s+=(char)(Math.min(n/10,9)+'0');\r\n }\r\n s+=(char)(n%10+'0');\r\n return s; \r\n }", "public static String decimalToBinary(int number)\r\n {\n String start = \"\";\r\n if (number < 0)\r\n {\r\n start = \"-\";\r\n number = -number;\r\n }\r\n \r\n String result = \"\";\r\n while(true)\r\n {\r\n int remainder = number % 2;\r\n String digit = Integer.toString(remainder);\r\n result = digit + result;\r\n number = number / 2;\r\n if (number == 0)\r\n {\r\n break;\r\n }\r\n }\r\n \r\n // if number is negative, put a minus sign in front of the result.\r\n result = start + result;\r\n return result;\r\n }", "private static String twoDigitString(long number) {\n if (number == 0) {\n return \"00\";\n }\n if (number / 10 == 0) {\n return \"0\" + number;\n }\n return String.valueOf(number);\n }", "String toStringBackwards();", "public String formatAs32BitString(int i) {\r\n\t\tString retVal = Integer.toBinaryString(i);\r\n\t\tif(i >= 0) {\r\n\t\t\tretVal = \"00000000000000000000000000000000\" + retVal;\r\n\t\t\tretVal = retVal.substring(retVal.length()-32);\r\n\t\t}\r\n\t\treturn retVal;\r\n\t}", "public String NumberToString(int number){return \"\"+number;}", "public static void main(String args[]){\nSystem.out.println(Integer.toOctalString(8)); \nSystem.out.println(Integer.toOctalString(19)); \nSystem.out.println(Integer.toOctalString(81)); \n}", "@Test\n public void encodeAsStringNegative()\n {\n final int value = -5;\n final BinaryEncoder encoder = new BinaryEncoder(-8, 8, 1.0);\n final String result = encoder.encodeAsString(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n assertEquals(\"0011\", result);\n }", "public static char complement(char c)\n\t{\n\tswitch(c)\n\t\t{\n case 'A': return 'T';\n case 'T': case 'U': return 'A';\n case 'G': return 'C';\n case 'C': return 'G';\n\n case 'a': return 't';\n case 't': case 'u': return 'a';\n case 'g': return 'c';\n case 'c': return 'g';\n\n case 'w': return 'w';\n case 'W': return 'W';\n\n case 's': return 's';\n case 'S': return 'S';\n\n case 'y': return 'r';\n case 'Y': return 'R';\n\n case 'r': return 'y';\n case 'R': return 'Y';\n\n case 'k': return 'm';\n case 'K': return 'M';\n\n case 'm': return 'k';\n case 'M': return 'K';\n\n case 'b': return 'v';\n case 'd': return 'h';\n case 'h': return 'd';\n case 'v': return 'b';\n\n\n case 'B': return 'V';\n case 'D': return 'H';\n case 'H': return 'D';\n case 'V': return 'B';\n\n case 'N': return 'N';\n case 'n': return 'n';\n\t\tdefault: return 'N';\n\t\t}\n\t}", "public static String toBinary(int number)\n\t{\n\t\tString total = \"\";\n\t\tint a;\n\t\twhile (number > 0) {\n\n\t\t\ta = number % 2;\n\n\t\t\ttotal = total + \"\" + a;\n// divide number by 2 \n\t\t\tnumber = number / 2;\n\n\t\t\t}\n\n// return value \n\t\treturn (new StringBuilder(total)).reverse().toString();\n\t\t\n\t}", "public static String binaryCode(String n)\n\t{\n\t\tString retValue = \"\";\n\n\t\tint num = Integer.parseInt(n);\t//convert the input string into int\n\n\t\twhile(num>0)\n\t\t{\n\t\t\tif(num==1)\n\t\t\t\tretValue += num;\n\t\t\telse\n\t\t\t\tretValue += Integer.toString(num%2);\t//resto della divisione\n\t\t\t\tnum = num/2;\t\t\t\t\t\t\t//divide the number by 2\n\t\t}\n\n\t\treturn new StringBuilder(retValue).reverse().toString();\n\t}", "public String transferTo2(int zahl) {\n\n return Integer.toBinaryString(zahl);\n\n }", "String toStringAsInt();", "private static String zeroPaddedBitString(int value) {\n String bitString = Integer.toBinaryString(value);\n return String.format(\"%32s\", bitString).replace(\" \", \"0\");\n }", "public String convertToString(int i) {\n\t\tswitch (i) {\n\t\t\tcase 0: return \"\";\n\t\t\tcase 1: return \"1\";\n\t\t\tcase 2: return \"2\";\n\t\t\tcase 3: return \"3\";\n\t\t\tcase 4: return \"4\";\n\t\t\tcase 5: return \"5\";\n\t\t\tcase 6: return \"6\";\n\t\t\tcase 7: return \"7\";\n\t\t\tcase 8: return \"8\";\n\t\t\tcase 9: return \"9\";\n\t\t\tcase 10: return \"A\";\n\t\t\tcase 11: return \"B\";\n\t\t\tcase 12: return \"C\";\n\t\t\tcase 13: return \"D\";\n\t\t\tcase 14: return \"E\";\n\t\t\tcase 15: return \"F\";\n\t\t\tcase 16: return \"G\";\n\t\t\tcase 17: return \"H\";\n\t\t\tcase 18: return \"I\";\n\t\t\tcase 19: return \"J\";\n\t\t\tcase 20: return \"K\";\n\t\t\tcase 21: return \"L\";\n\t\t\tcase 22: return \"M\";\n\t\t\tcase 23: return \"N\";\n\t\t\tcase 24: return \"O\";\n\t\t\tcase 25: return \"P\";\n\t\t\tcase 26: return \"Q\";\n\t\t\tcase 27: return \"R\";\n\t\t\tcase 28: return \"S\";\n\t\t\tcase 29: return \"T\";\n\t\t\tcase 30: return \"U\";\n\t\t\tcase 31: return \"V\";\n\t\t\tcase 32: return \"W\";\n\t\t\tcase 33: return \"X\";\n\t\t\tcase 34: return \"Y\";\n\t\t\tcase 35: return \"Z\";\n\t\t\tdefault: System.out.println(\"The number is too high.\");\n\t\t return \"0\";\n\t\t}\n }", "public String covertToAscii(int num){\n\t\t\n\t\tString result=\"\";\n\t\t//int i=result.length -1;\n\t\tint rem;\n\t\tif(num==0){\n\t\t\treturn \"0\";\n\t\t}\n\t\tboolean negative=(num<0);\n\t\tif(negative){\n\t\t\tnum=0-num;\n\t\t}\n\t\t//works for integers with base 10\n\t\twhile(num>0){\n\t\t\trem=num%10;\n\t\t\tnum=num/10;\n\t\t\tresult=(char)(rem+'0')+result;\n\t\t}\n\t\tif(negative){\n\t\t\tresult=\"-\"+result;\n\t\t}\n\t\treturn result;\n\t}", "private static String str(long i) {\n return String.valueOf(i);\n }", "private static String str(long i) {\n return String.valueOf(i);\n }", "public static String toHex(int num) {\n if(num==0) return \"0\";\n StringBuilder sb=new StringBuilder();\n while(num!=0){\n sb.append(intToHex(num&15));\n num >>>= 4; //Its not >> but >>>. >> will copy the sign bit. 10000 will become 11000 with >>, and 01000 with >>>.\n } //>> is called arithmetic shift. >>> is logical shift.\n return sb.reverse().toString();\n }", "public static String decToBinR( int n ) { \n\tif (n == 0)\n\t return \"0\";\n\telse if (n == 1)\n\t return \"1\";\n\telse\n\t return n % 2 + decToBin(n / 2);\n }", "public String intToString(String s) {\r\n int x = s.length();\r\n char[] bytes = new char[4];\r\n for(int i = 3; i > -1; --i) {\r\n bytes[3 - i] = (char) (x >> (i * 8) & 0xff);\r\n }\r\n return new String(bytes);\r\n }", "public String convert(int num) {\n if (num == 0)\n return ZERO_STRINGS;\n\n long tmpNum = num;\n StringBuilder buffer = new StringBuilder();\n if (tmpNum < 0) { // Negative number\n tmpNum *= -1;\n buffer.append(\"minus \");\n }\n\n for (int i : NUMERIC_INDEXES) {\n long pow = (int)Math.pow(10, i);\n if (tmpNum >= pow) {\n long numberAtIndex = tmpNum/pow; // The number at position 3\n tmpNum -= numberAtIndex*pow;\n buffer.append(convert((int)numberAtIndex)).append(\" \");\n buffer.append(NUMERIC_STRINGS.get(pow)).append(\" \");\n }\n }\n if (tmpNum >= 20) { // second number in the integer\n long numberAtIndex = ((tmpNum % 100)/10)*10; // The number at position 2\n tmpNum -= numberAtIndex;\n buffer.append(NUMERIC_STRINGS.get(numberAtIndex)).append(\" \");\n }\n if (NUMERIC_STRINGS.containsKey(tmpNum))\n buffer.append(NUMERIC_STRINGS.get(tmpNum));\n return buffer.toString().trim();\n }", "private char complement(char c) {\n switch (c) {\n case 'A': c = 'T'; break;\n case 'T': c = 'A'; break;\n case 'G': c = 'C'; break;\n case 'C': c = 'G'; break;\n case 'a': c = 't'; break;\n case 't': c = 'a'; break;\n case 'g': c = 'c'; break;\n case 'c': c = 'g'; break;\n default: c = 'N'; break;\n }\n return c;\n }", "private String getStringBase(int n1){\n return Integer.toString(n1, base).toUpperCase();\n }", "static String invert (String s) {return power(s,-1);}", "String intToBinaryNumber(int n){\n return Integer.toBinaryString(n);\n }", "public String m21274OooO00o(int i) {\n char[] cArr = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n String[] strArr = {\"0000\", \"0001\", \"0010\", \"0011\", \"0100\", \"0101\", \"0110\", \"0111\", \"1000\", \"1001\", \"1010\", \"1011\", \"1100\", \"1101\", \"1110\", \"1111\"};\n String str = new String();\n if (i == 16) {\n for (int i2 = this.f22760OooO0O0 - 1; i2 >= 0; i2--) {\n str = ((((((((str + cArr[(this.f22759OooO00o[i2] >>> 28) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 24) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 20) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 16) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 12) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 8) & 15]) + cArr[(this.f22759OooO00o[i2] >>> 4) & 15]) + cArr[this.f22759OooO00o[i2] & 15]) + \" \";\n }\n } else {\n for (int i3 = this.f22760OooO0O0 - 1; i3 >= 0; i3--) {\n str = ((((((((str + strArr[(this.f22759OooO00o[i3] >>> 28) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 24) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 20) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 16) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 12) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 8) & 15]) + strArr[(this.f22759OooO00o[i3] >>> 4) & 15]) + strArr[this.f22759OooO00o[i3] & 15]) + \" \";\n }\n }\n return str;\n }", "public static void main(String[] args) {\n\t\tint x = 5;\n\t\tint y = -5;\n\n\t\t// this will give a binary number with one's complement\n\t\tSystem.out.println(\"+5 in 1's complement is \" + Integer.toBinaryString(x));\n\n\t\t// this will give two's complement of a negative number\n\t\tSystem.out.println(\"-5 in 2's complement is \" + Integer.toBinaryString(y));\n\n\t\t// remember :- 2's complement always ends with 011\n\t}", "public String toString() {\n \t\tint bn = 0;\n \t\tString s = String.valueOf(bn);\n\t\t\treturn s;\n\t\t}", "public static String IntToString(int IntValue){\n Integer integer = new Integer(IntValue);\n return integer.toString(); \n }", "private static String convertP(int value)\n {\n String output = Integer.toBinaryString(value);\n\n for(int i = output.length(); i < 6; i++) // pad zeros\n output = \"0\" + output;\n\n return output;\n }", "public static String toHexString(int v) {\n v &= 0xFF;\n // Will return either \"x\" or \"xx\" as v is bounded to 0-255.\n String res = Integer.toHexString(v);\n if (res.length() == 1)\n return \"0\" + res;\n return res;\n }", "public static void main(String[] args) {\nint t = 101010101;\n// koden begynner her\nString s = \"\";\nwhile ( t % 10 > 0 ) {\ns = t % 10 + s;\nt = t / 10;\n}\ns = \"s = \" + s;\nout.println(s);\n\n }", "public static int reverse(int number) {\n\t\tString numb = Integer.toString(number);\n\t\tString rev = \"\";\n\t\t//create a for loop in order to reverse the String\n\t\tfor (int i = (numb.length()-1); i >= 0; i--) {\n\t\t\trev += numb.charAt(i);\n\t\t}//closing for loop\n\n\t\treturn Integer.parseInt(rev);\n\t}", "public String baseConversion(int num, int base) {\n\n if (base > 16 || base < 2)\n return null;\n\n StringBuilder sb = new StringBuilder();\n char[] hexaMapping = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};\n\n int numPositive = (num < 0)? -num: num;\n while (numPositive > 0) {\n sb.append(hexaMapping[numPositive % base]);\n numPositive /=base;\n }\n\n return sb.append((num < 0)? \"-\" : \"\").reverse().toString();\n }", "private String asnat(int n) {\n char ch;\n\n if (n == 0) {\n return \"IP\";\n }\n\n // Encode the number as binary, least significant digit first, with I for 0's\n // and C for 1's. Terminates with a P\n // i.e. 6 => ICCP\n int bitCount = 0;\n for (int tmp = 1; tmp <= n; tmp <<= 1) {\n bitCount += 1;\n }\n\n // This whole thing is memory intensive, so try to use as little as possible.\n // This could be done with a StringBuilder, but don't want to risk the memory\n // usage. Ergo, create a buffer with enough slots for all the digits and fill\n // that buffer as we go.\n char[] buffer = new char[bitCount + 1];\n int ndx = 0;\n while (n > 0) {\n ch = ((n & 1) == 1) ? 'C' : 'I';\n\n buffer[ndx] = ch;\n ndx += 1;\n\n n /= 2;\n }\n buffer[ndx] = 'P';\n\n String nat = new String(buffer);\n return nat;\n }", "static long flippingBits(long n) {\n\n String strBinary = String.format(\"%32s\", Long.toBinaryString(n)).replace(' ', '0');\n String strBinaryFlip = \"\";\n\n for (int i = 0; i < strBinary.length(); i++) {\n if (strBinary.charAt(i) == '0') {\n strBinaryFlip = strBinaryFlip + '1';\n } else {\n strBinaryFlip = strBinaryFlip + '0';\n }\n }\n\n String result = String.format(\"%32s\", strBinaryFlip).replace(' ', '0');\n long base10 = parseLong(result,2);\n return base10;\n }", "private String feelZero(Integer i){\n if( i < 10 ){\n return \"0\"+i;\n }else{\n return Integer.toString(i);\n }\n }", "@Override\n\tpublic String str(int number) {\n\t\treturn \"C3(\"+number+\")\";\n\t}", "private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }", "public static String toString(int n, int base) {\n\t // special case\n\t if (n == 0) return \"0\";\n\n\t String digits = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t String s = \"\";\n\t while (n > 0) {\n\t int d = n % base;\n\t s = digits.charAt(d) + s;\n\t n = n / base;\n\t }\n\t return s;\n\t }", "static int isolateBit(int n){\n return n & (-n);\n }", "private String zxt (long inp, int length) {\n String result = Long.toString(inp);\n int dist = (length - result.length());\n for (int i = 0; i < dist; i++) {\n result = \"0\" + result;\n }\n return result;\n }", "public static String num2Bin(int a) {\n StringBuilder sb = new StringBuilder();\n for (int bitPow2 = 1, i = 0; i < Integer.SIZE; bitPow2 <<= 1,\n ++i) {\n if ((a & bitPow2) == bitPow2) {\n sb.append(\"1\");\n } else {\n sb.append(\"0\");\n }\n }\n return sb.reverse().toString();\n }", "public String convertToString(int anInt)\n \t{\n \t\treturn Integer.toString(anInt); // return String version of the portnumber.\n \t}", "public static String binaryRepresentation(int n){\n\t\tint[] arr = new int[32]; \n\t\tArrays.fill(arr,0); //Filling the entire arrays with a default value of 0.\n\t\tint len = arr.length-1;\n\t\twhile(n > 0){\n\t\t\tint temp = n % 2;\n\t\t\tarr[len] = temp;\n \tlen--;\n\t\t\tn = n/2;\n\t\t}\n\t\tString ans = arrayToString(arr);\n\t\treturn ans;\n\n\t}", "private String convert999(int num) {\r\n \t//return a number which is in 100th position\r\n \tStringBuilder str1= new StringBuilder(lowNames[num / ONE_HUNDRED]);\r\n \tstr1.append(SPACE);\r\n \tstr1.append(bigNames[0]);\r\n \tstr1.append(AND);\r\n \t\r\n \tStringBuilder str2=new StringBuilder(convert99(num % ONE_HUNDRED));\r\n \t\r\n\t\tif(num <= TWO_DIGIT_MAX_VALUE) {//check if number is lessthan or equal 99\r\n\t\t\treturn str2.toString();\r\n\t\t}else if(num % ONE_HUNDRED == ZERO) { //check if number is divisible by 100 and remainder is zero\r\n\t\t\treturn str1.toString();\r\n\t\t}\r\n\t\t\r\n\t\treturn str1.append(str2).toString();\r\n\t\t\r\n\t}", "public static String octalEquivalent(int num) {\n\t\tString octal = Integer.toOctalString(num);\n\t\treturn octal;\n\t}", "public static String findBinary(int decimalNumber) {\r\n\t\tint mod;\r\n\r\n\t\tString x = \"\";\r\n\t\tif (decimalNumber > 255) {\r\n\t\t\tSystem.out.println(\"Enter Number between 1 to 255\");\r\n\t\t} else {\r\n\r\n\t\t\twhile (decimalNumber > 0) {\r\n\t\t\t\tmod = decimalNumber % 2;\r\n\t\t\t\tx = mod + \"\" + x;\r\n\t\t\t\tdecimalNumber = decimalNumber / 2;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn x;\r\n\t}", "private static String addMinusSign(final String number) {\n\t\treturn \"-\" + number;\n\t}", "private String toImmediate(int val) {\n\t\tString field = \"\";\n\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tfield = (val % 2) + field;\n\t\t\tval /= 2;\n\t\t}\n\t\treturn field;\n\t}", "private String Hexa(int num) {\n if (num < 0)\n {\n return Integer.toHexString(num).substring(4);\n }\n String str = Integer.toHexString(num);\n while (str.length()<4)\n {\n str = \"0\" + str;\n }\n return str;\n }", "private String decimalToBinary(int num) {\n String result = \"\";\n \n while(num > 0 ) \n {\n \n \n //get the remainder\n result = num % 2 + result;\n \n // Divide the positive decimal number by two( then divide the quotient by two)\n num = num /2;\n }\n \n return result;\n }", "public static String integerToString(Integer i) {\n String ret = \"\";\n if (i!=null)\n ret = i.toString();\n\n return ret;\n }", "public String long_ip(long numero_ip){\n String str_num_ip=\"\";\n for(int i=3; i>=0; i--){\n str_num_ip += (0b1111_1111 & (numero_ip >> (i*8) )) + (i!=0? \".\": \"\");\n }\n return str_num_ip;\n }", "@Test\n public void reverseComplement() {\n ReverseComplementor r = new ReverseComplementor();\n String x = r.reverseComplement(\"AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT\");\n assertEquals(\"AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT\", x);\n }", "public String toHex(int num) {\n if (num == 0) {\n return \"0\";\n }\n\n StringBuilder sb = new StringBuilder();\n\n // IMPORtANT: I had written while(num > 0) which will not work for -ve numbers\n while (num != 0) {\n\n int last4 = num & 15;\n sb.insert(0, HEX[last4]);\n\n // IMPORTANT: >>> is logical shift and does not preserve negative number sign\n // And >> is numerical shift and preserves the sign. We need logical shift here!!\n num = num >>> 4;\n }\n\n return sb.toString();\n }", "private static int invertirNumero(int num) {\n\t\tint cifra, inverso = 0;\n\t\twhile (num > 0) {\n\t\t\tcifra = num % 10;\n\t\t\tinverso = cifra + inverso * 10;\n\t\t\tnum /= 10;\n\t\t}\n\t\treturn inverso;\n\t}", "private static String bigIntDecode(String in){\n\n\t BigInteger largeNum = new BigInteger(in); // declare and initialize the largenum\n\t\t//\n\t BigInteger smallNum = largeNum.divide(key); // reverse math done in encryption\n\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\");\n\tSystem.out.println( \"Char Value *Must subtract shift now*: \" + smallNum.toString());\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\\n\\n\");\n\t in = smallNum.toString(); //updates in to the small original big int\n\n\n\t String r = \"\"; // empty result string\n\n\t for(int i = 0; i < in.length();i += 3){ // for loop to extract each 3 nums and get ascii value\n\n\t char add; // declars the char to be added\n\n\t if(in.length() < 2){ //if to determine and handle short encryption\n\t add = (char)(Integer.parseInt(in.substring(i, i + 3)) - shift);\n\n\t }else{ // else, countine as normal, substring each 2 numbers and convert to ascii letter\n\t add = (char)(Integer.parseInt(in.substring(i, i + 3)) - shift );\n\n\t }\n\n\t r+= add; // updates result string\n\t }\n\t\t\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\" Decrypted Message Found: \" + r);\n\t\t\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\\n\\n\");\n\t return r; // returns result string\n\t }", "private String checkString(int n) {\n if (n == 0) {\n return \" .\";\n } else {\n return String.valueOf(n);\n }\n }", "public String generateTheString(int n) {\n return \"b\" + \"ab\".substring(n % 2, 1 + n % 2).repeat(n - 1);\n }", "public static String unmakeID(int id) {\r\n byte[] bytes = new byte[] {\r\n (byte) id,\r\n (byte) (id >>> 8),\r\n (byte) (id >>> 16),\r\n (byte) (id >>> 24)\r\n };\r\n return new String(bytes);\r\n }", "public static String toBinary(int n){\n int length = (int)Math.ceil(Math.log(n)/Math.log(2));\n int[] bits = new int[length];\n for(int x = 0; x < length; x++){\n double val = Math.pow(2, length - x);\n if(n >= val){\n bits[x] = 1;\n n -= val;\n }\n else{\n bits[x] = 0;\n }\n }\n String convert = \"\";\n for(int x = 0; x < length; x++){\n convert += bits[x];\n }\n return convert;\n }", "public static String toString(final int id, final StringBuffer result) {\n\t\tresult.append((char) ((id >> 24) & 0xFF));\n\t\tresult.append((char) ((id >> 16) & 0xFF));\n\t\tresult.append((char) ((id >> 8) & 0xFF));\n\t\tresult.append((char) ((id >> 0) & 0xFF));\n\n\t\treturn result.toString();\n\t}", "public static String adaptarNroComprobante(int nroComprobante) {\n\t\tString puntoDeVentaFormateado = String.valueOf(nroComprobante);\n\t\twhile(puntoDeVentaFormateado.length()<8){\n\t\t\tpuntoDeVentaFormateado = \"0\"+puntoDeVentaFormateado;\n\t\t}\n\t\treturn puntoDeVentaFormateado;\n\t}", "public static String BitStringToText(String s) {\n StringBuffer sb = new StringBuffer();\n int begIndex = 0;\n int endIndex = 8;\n for (int i = 0; i < s.length() / 8; i++) {\n String chunk = s.substring(begIndex, endIndex);\n int charCode = Integer.parseInt(chunk, 2);\n String y = new Character((char) charCode).toString();\n sb.append(y);\n begIndex += 8;\n endIndex += 8;\n }\n return sb.toString();\n }", "public String getString(int paramInt) {\n }", "public static BigInteger getHex(int i)\n {\n\tBigInteger bii = new BigInteger(\"\"+i);\n\tBigInteger tmp = bii;\n\ttmp = tmp.multiply(bi2);\n\ttmp = tmp.add(bim1);\n\ttmp = tmp.multiply(bii); //i*(2*i - 1)\n\treturn tmp;\n }", "private String cacViTri(int i) {\n\t\tString gio = \"\";\n\t\tfor (int j = 0; j < arrInt.length; j++) {\n\t\t\tif (this.arrInt[j] == i) {\n\t\t\t\tgio += j + \" \";\n\t\t\t}\n\t\t}\n\t\treturn gio;\n\t}", "public static void main(String[] args) {\n System.out.println(\"Enter the number\");\n try (Scanner scanner = new Scanner(System.in)) {\n long theNumber = scanner.nextLong();\n\n //Using inBuilt method from the Integer class\n String x = Long.toBinaryString(theNumber);\n System.out.println(x);\n\n System.out.println(x.concat(\"0\".repeat(5)));\n new String(new char[10]);\n\n\n }\n }", "public static String excludeSignBitMinus(String value)\n\t{\n\t\treturn excludeSignBit(value, SIGN_MINUS);\n\t}", "public static String dexToBin(int value) {\n\tString binVal = Integer.toBinaryString(value);\n\t\treturn binVal;\n\t\t\n\t}", "public static String ipIntegerToString(int ip) {\n final String[] parts2 = new String[4];\n\n for (int i = 0; i < 4; i++) {\n parts2[3 - i] = Integer.toString (ip & 0xff);\n ip >>= 8;\n }\n\n return parts2[0] + '.' + parts2[1] + '.' + parts2[2] + '.' + parts2[3];\n }", "public String toString()\n\t{\n\t\t// TO DO\t\n\t\t\n\t\tString s = new String();\n\t\tfor(int i=0; i<infNumber.length; i++)\n\t\t{\n\t\t\ts = s +(Integer.toString(infNumber[i]));\n\t\t}\n\t\t\t\t\n\t\t\n\t\tif(isNeg)\n\t\t{\n\t\t\ts = \"-\" + s;\n\t\t}\n\t\t\n\t\treturn s;\n\t}", "public static String negate(String s){\n if(s.isEmpty()){\n return \"\";\n }else if(s.length() == 1){\n if(s.charAt(0) == '1'){\n return \"0\";\n }else if(s.charAt(0) == '0'){\n return \"1\";\n }else{\n return s;\n }\n }else{\n return negate(\"\" + s.charAt(0)) + negate( s.substring(1, s.length()));\n }\n }", "String getZeroString()\n {\n return \"\"+0;\n }", "public String hex(int number) {\n if(number == 0) {\n return \"0x0\";\n }\n StringBuilder result = new StringBuilder();\n int curr = 0;\n char ch = ' ';\n while(number > 0) {\n curr = number % 16;\n number = number / 16;\n if(curr < 10) {\n ch = (char)(curr + '0');\n }\n else {\n curr = curr % 10;\n ch = (char)(curr + 'A');\n }\n result.append(ch);\n }\n result.append(\"x0\");\n result.reverse();\n return result.toString();\n }", "public static int reverse1(int x) {\n\n if (x == 0) {\n return 0;\n }\n int abs = Math.abs(x);\n boolean hasZore = true;\n while (true){\n int temp = abs / 10;\n if (temp * 10 != abs)\n break;\n abs = temp;\n }\n String str = Integer.toString(abs);\n String str2 = new StringBuffer(str).reverse().toString();\n try {\n return x < 0 ? -Integer.parseInt(str2) :Integer.parseInt(str2);\n } catch (Exception e) {\n return 0;\n }\n\n }", "String convert(int number) {\n final Supplier<IntStream> factors = () -> IntStream.of(3, 5, 7)\n .filter(factor -> number % factor == 0);\n\n if (factors.get().count() == 0) {\n return Integer.toString(number);\n }\n\n return factors.get().mapToObj(factor -> {\n switch (factor) {\n case 3:\n return \"Pling\";\n case 5:\n return \"Plang\";\n case 7:\n return \"Plong\";\n default:\n return \"\";\n }\n }).collect(Collectors.joining());\n }", "public static void Rev_Str_Fn(){\r\n\t\r\n\tString x=\"ashu TATA\";\r\n\t\r\n\tStringBuilder stb=new StringBuilder();\r\n\tstb.append(x);\r\n\tstb.reverse();\r\n\tSystem.out.println(stb);\r\n}", "public static String formString(int n)\n {\n String temp=\"\";\n for(int i=0;i<n;i++)\n {\n temp=temp+'c';\n }\n return temp;\n }", "public static String part2(int n)\r\n {\r\n String result;\r\n if(n==0) \r\n {result=\"0\";}\r\n \r\n else if (n==1)\r\n {result=\"1\";}\r\n \r\n else\r\n \r\n //recursive statment to make the convertion \r\n {result=part2(n/2);\r\n \r\n //compare the remainder \r\n if(n%2==0 || n==1000 || n==2000)\r\n {result=result+\"0\";}\r\n \r\n else\r\n {result=result+\"1\";}\r\n }\r\n \r\n for(int beta=0;beta<=10;beta++){\r\n String dummy1=\"yosho\";\r\n if(beta==1)\r\n {dumm1=\"yoshard\";}\r\n if(beta==8)\r\n {\r\n int counter=1;\r\n while(counter<=3)\r\n {\r\n dummy1 = dummy1;\r\n counter++;\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n \r\n }", "String bsToStr(BitSet bs){\n String s = \"\";\n for(int i=0; i<bitsetLen; i++){\n if(bs.get(i) == true)\n s += '1';\n else\n s += '0';\n }\n \n return new StringBuilder(s).reverse().toString();\n }", "public static String binValue(byte b) {\n StringBuilder sb = new StringBuilder(8);\n for (int i = 0; i < 8; i++) {\n if ((b & 0x01) == 0x01) {\n sb.append('1');\n } else {\n sb.append('0');\n }\n b >>>= 1;\n }\n return sb.reverse().toString();\n }", "public static void reverse(int number)\n\t{\n\t\tString reversed = \"\";\n\t\twhile(number != 0)\n\t\t{\n\t\t\treversed = reversed + String.valueOf(number % 10);\n\t\t\tnumber /= 10;\n\t\t}\n\t\tSystem.out.print(reversed);\n\t}", "public static String intToHex(int i) {\n\n return Integer.toHexString(i);\n\n }", "protected String parseIntToString(int value) {\n return String.valueOf(value);\n }", "private static String getBinaryDigit(int iter, int seed)\r\n {\r\n if(iter == 0) {return \"\";}\r\n String result = seed % 2 == 0 ? \"0\" : \"1\";\r\n return result + getBinaryDigit(iter - 1, (int)Math.pow(seed,2) % (p * q));\r\n }", "public String intToString(int nums[]) {\n\t\tString empty = \"\";\n\t\tfor(int i = nums.length-1; i >= 0; i--) {\n\t\t\tempty += Integer.toString(nums[(nums.length-1) - i]);\n\t\t}\n\t\treturn empty;\n\t}" ]
[ "0.67201227", "0.6247039", "0.62263703", "0.62135327", "0.6139098", "0.61088634", "0.6034841", "0.6027375", "0.6017641", "0.5973213", "0.5939729", "0.5927123", "0.5908688", "0.5897315", "0.5880919", "0.588077", "0.5796744", "0.5793332", "0.5778971", "0.5755033", "0.573316", "0.5698058", "0.56912726", "0.56891006", "0.5688311", "0.5684971", "0.5666171", "0.5639438", "0.5639438", "0.5632164", "0.5625471", "0.5587656", "0.55741537", "0.5549948", "0.5521917", "0.5505657", "0.5483601", "0.54834753", "0.54709333", "0.5461767", "0.5449642", "0.54346913", "0.5432756", "0.5414551", "0.54032594", "0.5397472", "0.5389153", "0.5387838", "0.5378775", "0.53716075", "0.53695846", "0.536418", "0.5362066", "0.5355572", "0.53496164", "0.53469807", "0.53353155", "0.5335224", "0.5322206", "0.5317152", "0.53145015", "0.529768", "0.52639407", "0.5262205", "0.52543765", "0.524581", "0.5236694", "0.5227336", "0.5226936", "0.52185845", "0.52143794", "0.52099884", "0.52063596", "0.5202154", "0.5200215", "0.5198585", "0.5193304", "0.51901066", "0.51835686", "0.5183352", "0.5177774", "0.5169699", "0.515699", "0.51539177", "0.5153202", "0.5152786", "0.51410836", "0.51395184", "0.5120103", "0.51109415", "0.51081413", "0.5106781", "0.51051617", "0.5102475", "0.5102308", "0.510223", "0.5097421", "0.50964564", "0.5082825", "0.5080105" ]
0.614706
4
If the employee with the current rank cannot handle the call
void cannotHandle(Call call) { // escalate the call to a higher rank call.rank = rank + 1; callHandler.dispatchCall(call); free = true; callHandler.getNextCall(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidRank(int rank) {\r\n if (rank < 1 || rank > 13) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean assignCall(Employee emp) {\n\t\treturn true;\n\t}", "@Override\n public void onFailure(Call<GetPotentialEarn> call, Throwable t) {\n }", "@Override\n\tpublic void resSubmitJobEmployee(int je_id, String caller) {\n\n\t}", "@Override\n public Employee process(Employee employee) throws Exception {\n try {\n if (employee.getId() % 13 == 0) {\n throw new Exception(\"unable to create account for employee with id \" + employee.getId());\n }\n employee.setUserId(\"userId\" + employee.getId());\n } catch (Exception e) {\n // otherwise the job halts!\n LOG.error(\"error \", e);\n }\n return employee;\n }", "void askLeaderCardThrowing();", "@Override\n\t\t\tpublic void onFail() {\n\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t}", "private void checkResult() {\n if (parent != -1 && (numOfAck == (outgoingLinks.size() - 1))) {\n if (setOfAck.add(this.maxId)) {\n Message message = new Message(this.uid, this.maxId, \"ack\");\n sendTo(message, this.parent);\n }\n if (!termination) {\n marker.addNumOfTerminatedProc();\n termination = true;\n }\n } else if (parent == -1 && (numOfAck == outgoingLinks.size())) {\n System.out.println(this.uid + \" is the leader.\");\n marker.addNumOfTerminatedProc();\n }\n }", "@Override\n\tpublic void resAuditJobEmployee(int je_id, String caller) {\n\n\t}", "public Employeedetails checkEmployee(String uid);", "@Override\n\tpublic void submitJobEmployee(int je_id, String caller) {\n\n\t}", "public static Result ensureRank(UserRank rank, Database db, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\t\ttry {\r\n\t\t\tSession session = new Session(db, request);\r\n\t\t\t\r\n\t\t\tif(!session.restore(request)) {\r\n\t\t\t\treturn Result.NEEDSLOGIN;\r\n\t\t\t} else {\r\n\t\t\t\tint userID = db.getUserID(session.getEmail());\r\n\t\t\t\tDatabase.User user = db.getUser(userID);\r\n\t\t\t\t\r\n\t\t\t\tif(!hasRank(db, user, rank)) {\r\n\t\t\t\t\treturn Result.NEEDSRIGHTS;\r\n\t\t\t\t} else {\r\n\t\t\t\t\trequest.setAttribute(\"hasAccess\", new Boolean(true));\r\n\t\t\t\t\treturn Result.SUCCESS;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t } catch (SQLException e) {\r\n\t \tSystem.out.println(\"[ERROR] Database: \" + e.getMessage());\r\n\t \treturn Result.DBERROR;\r\n\t } catch(Exception e) {\r\n\t \treturn Result.ERROR;\r\n\t }\r\n\t}", "@Override\r\n\tpublic int updateEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "public void inquiryError() {\n\t\t\n\t}", "protected abstract void onMaxAttempts(final Exception exception);", "private boolean askForSuperviser(Person p) throws Exception {\n\n\t\treturn p.isResearcher() && (p.getInstitutionalRoleId() > 1);\n\t}", "public void tryRehearse() {\n if (currentPlayer.isEmployed() == true) {\n if(!currentPlayer.getHasPlayed()){\n currentPlayer.rehearse();\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end your turn.\");\n }\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"You're not employed, so you need to take a role before you can rehearse.\");\n }\n view.updateSidePanel(playerArray);\n }", "@Override\n public void onResourceLimitExceeded(MatrixError e) {\n listener.onUsernameAvailabilityChecked(true);\n }", "public void dispatchCall() {\n\tCall nextCall = callQueue.dequeue();\n\tif (!respondentQueue.isEmpty()) {\n\t Employee employee = respondentQueue.dequeue();\n\t // assign call\n\t employee.setCurrentCall(nextCall);\n\t employee.setFree(false);\n\t int currentLevel = employee.getEmType().getValue();\n\t while (employee.getCurrentCall().getProblemLevel().getValue() != currentLevel) {\n\t\t// dispatch to higher level\n\t\tcurrentLevel++;\n\t\tswitch (currentLevel) {\n\t\tcase 1:\n\t\t if (!managerQueue.isEmpty()) {\n\t\t\temployee = setNextEmployee(managerQueue.dequeue(), employee);\n\t\t\temployee.setCurrentCall(nextCall);\n\t\t\temployee.setFree(false);\n\t\t }\n\t\t break;\n\t\tcase 2:\n\t\t if (!directorQueue.isEmpty()) {\n\t\t\temployee = setNextEmployee(directorQueue.dequeue(), employee);\n\t\t\temployee.setCurrentCall(nextCall);\n\t\t\temployee.setFree(false);\n\t\t }\n\t\t break;\n\t\t}\n\t }\n\t}\n }", "protected boolean processAdjournOffered(boolean toUser, int offerIndex, String oppName){\n return false;\n }", "@Override\n\t\tpublic void onFailed(HttpResponseResult responseResult) {\n\t\t\tdismiss();\n\t\t\tMyToast.show(AccountForgetPSWActivity.this,\n\t\t\t\t\tR.string.phone_number_not_exist, Toast.LENGTH_SHORT);\n\t\t}", "@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }", "@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "@Override\n public void onFailure(retrofit2.Call<Reason> call, Throwable t) {\n Log.e(\"TAG\", t.toString());\n EmpowerApplication.alertdialog(t.getMessage(), CompoffActivity.this);\n\n\n }", "public void isEmployee(String username) throws ValidationException {\n\t\ttry {\n\t\t\temployeeService.getEmployeeId(username);\n\t\t} catch (ServiceException e) {\n\t\t\tthrow new ValidationException(INVALIDEMPLOYEE);\n\t\t}\n\t}", "boolean hasRank();", "public abstract void onError(Call call, Exception e);", "public void sameNameError(String nickname) {\n notifyNicknameNotValid(nickname);\n }", "protected boolean processPlayerDeclined(int gameNum, String playerName, String offer){\n return false;\n }", "public void setRank(int num)\r\n {\r\n //Check if the new rank is less than 0 before setting the new rank \r\n if(num < 0)\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING:You cannot assign a negative time\");\r\n }\r\n else \r\n {\r\n this.rank = num;\r\n }//end if\r\n }", "private Function<RejectedExecutionException, Throwable> handleRejectedExecution() {\n return ex -> {\n log.error(\"The executor cannot handle this request\");\n return new OutOfEmployeeException(ex);\n };\n }", "private void validateEmployee(final TimeEntryDto timeEntryDto, final BindingResult result) {\n\t\tif (timeEntryDto.getEmployeeId() == null) {\n\t\t\tresult.addError(new ObjectError(\"employee\", \"Employee not informed.\"));\n\t\t\treturn;\n\t\t}\n\n\t\tLOGGER.info(\"Validating employee id {}: \", timeEntryDto.getEmployeeId());\n\t\tfinal Optional<Employee> employee = this.employeeService.findById(timeEntryDto.getEmployeeId());\n\t\tif (!employee.isPresent()) {\n\t\t\tresult.addError(new ObjectError(\"employee\", \"Employee not found. Nonexistent ID.\"));\n\t\t}\n\t}", "public boolean approveCheckIn(SoftwareEngineer e){\n int i;\n\n for(i=0;i<this.curHeadCount;i++){\n if(employee[i].equals(e)) break;\n }\n\n return (i<this.curHeadCount && e.access);\n }", "@Override\n\tpublic boolean onJobError(ApiJob job) {\n\t\treturn false;\n\t}", "protected boolean processPlayerOffered(int gameNum, String playerName, String offer){\n return false;\n }", "public void scemess() {\n\t\tUserExcep ue = new UserExcep();\n\t\t\n\t\ttry {\n\t\t\t\tthrow new UserExcep(\"Try different ID\");\n\t\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public void dispatchCall(Call call) {\n\t\t/*\n\t\t * Try to route call to an employee with minimal rank\n\t\t */\n\t\tEmployee emp = getHandlerForCall(call);\n\t\tif(emp != null) {\n\t\t\temp.receiveCall(call);\n\t\t\tcall.setHandler(emp);\n\t\t}else {\n\t\t\t/*\n\t\t\t * Place the call into corresponding call\n\t\t\t * queue according to it's rank\n\t\t\t */\n\t\t\tcall.reply(\"Please wait for free employee to reply\");\n\t\t\tcallQueues.get(call.getRank().getValue()).add(call);\n\t\t}\n\t}", "private boolean amIleader() {\n \t\treturn vs.getRank(myEndpt) == 0;\n \t}", "@Override\n @Test\n public void testQuery_invalidAdvancedRankingWithChildrenRankingSignals() throws Exception { }", "@Override\n\tpublic void getAwardPointsResponseFailed(String arg0) {\n\t\t\n\t}", "private void checkPendingCalls(Employee callee) {\n pushCallee(callee);\n logger.debug(\"Employee {} is free\", callee.getName());\n\n if (!pendingCalls.isEmpty()) {\n Call pendingCall = pendingCalls.poll();\n logger.debug(\"Dispatching pending call {}\", pendingCall.getId());\n dispatchCall(pendingCall);\n }\n }", "@Override\n\tpublic long countMemberExcep() {\n\t\treturn 0;\n\t}", "@Override\n public void onFailure(retrofit2.Call<CompOffDetails> call, Throwable t) {\n Log.e(\"TAG\", t.toString());\n EmpowerApplication.alertdialog(t.getMessage(), CompoffActivity.this);\n\n\n }", "public void onFailure(Throwable caught) {\n\t\t\t\tcaught.printStackTrace();\n\t\t\t\tSystem.out.println(\"Remote Procedure Call - Failure\");\n\t\t\t\tPlanner.hideActivityIndicator();\n\t\t\t}", "public void onFailure(Throwable caught) {\n\t\t\t\tcaught.printStackTrace();\n\t\t\t\tSystem.out.println(\"Remote Procedure Call - Failure\");\n\t\t\t\tPlanner.hideActivityIndicator();\n\t\t\t}", "public boolean employeeExists() {\n\t\tResultSet r = super.query(\"SELECT \" + C.COLUMN_ID + \" FROM \" + C.TABLE_EMPLOYEE\n\t\t\t\t+ \" WHERE \" + C.COLUMN_ID + \"=\" + this.getID() + \" LIMIT 1\");\n\t\tif (r == null)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tsuper.setRecentError(null);\n\t\t\treturn r.first();\n\t\t} catch (SQLException e) {\n\t\t\tsuper.setRecentError(e);\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\n //of the api calling got failed then it will go for onFailure,inside this we have added one alertDialog\n public void onFailure(Call call, IOException e) {\n\n }", "public int validateEmployeePackageResult() {\n\t\tif (this.validateEmployeePackage())\n\t\t\treturn EmployeeConnection.VALID;\n\t\tif (!this.validateID())\n\t\t\treturn EmployeeConnection.INVALID_ID;\n\t\tif (!this.validateFirstName())\n\t\t\treturn EmployeeConnection.INVALID_FIRST_NAME;\n\t\tif (!this.validateLastName())\n\t\t\treturn EmployeeConnection.INVALID_LAST_NAME;\n\t\treturn EmployeeConnection.INVALID_UNKNOWN;\n\t}", "@Override\n\tpublic void doBusiness() throws Exception {\n\t\tif(client.getSession() != null) {\n\t\t\tList<Player> list = new ArrayList<>();\n\t\t\tfor(Player player : client.getSession().getRankings()) {\n\t\t\t\tif(player != null)\n\t\t\t\t\tlist.add(player);\n\t\t\t}\n\t\t\tresponseRankings.setRankings(list);\n\t\t} else {\n\t\t\tresponseRankings.setRankings(new ArrayList<Player>());\n\t\t\tSystem.out.println(\"Client is not in game session: \"+this.getClass().getName());\n\t\t}\n\t}", "@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}", "@Override\r\n public void notLeader() {\n }", "@Override\n\tpublic Integer insertEmp(Employee e) {\n\t\treturn null;\n\t}", "private void checkAnnoRateo() {\n\t\tif(req.getRateo().getAnno()>=primaNota.getBilancio().getAnno()){\n\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"L'anno del Rateo deve essere minore dell'anno della prima nota di partenza.\"));\n\t\t}\n\t}", "private boolean employeeDataIsOk(RoleAndSeniority ras, EmployeeDto newEmpDto) {\n\t\tif(employeeSalaryInTheCorrectRange(ras, newEmpDto.getSalary()) && employeeSsnValid(newEmpDto)\n\t\t\t\t&& employeeNameValid(newEmpDto) && employeeDobValid(newEmpDto)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public Boolean call() throws Exception {\n return this.state22();\n }", "@Override\n\n //of the api calling got failed then it will go for onFailure,inside this we have added one alertDialog\n public void onFailure(Call call, IOException e) {\n Log.d(TAG,\"Get Bank: Failure \\nIOEx\"+e);\n }", "@Override\n public boolean callCheck() {\n return last == null;\n }", "public void testInexistentNumber() {\n\t\t// Arrange\n\t\tString exceptionNumber = null;\n\t\tPhoneNumberDTO dto = new PhoneNumberDTO(NON_EXISTING_NUMBER);\n\t\tGetLastMadeCommunicationService service\n\t\t\t= new GetLastMadeCommunicationService(dto);\n\t\t\n\t\t// Act\n\t\ttry {\n\t\t\tservice.execute();\n\t\t\tfail(\"Should have thrown PhoneNotExists\");\n\t\t} catch(PhoneNotExists pne) {\n\t\t\texceptionNumber = pne.getNumber();\n\t\t}\n\t\t\n\t\t// Assert\n\t\tassertEquals(\"The number in the exception should be \"\n\t\t\t\t+ NON_EXISTING_NUMBER + \" but it was \" + exceptionNumber,\n\t\t\t\tNON_EXISTING_NUMBER, exceptionNumber);\n\t}", "public void test00200_ValidateNonExistingCall() throws Exception\n\t{\n\t\tSystem.out.println(\"test00200_ValidateNonExistingCall()\");\n\t\tString pvName;\n\t\tString className = this.getClass().getSimpleName();\n\t\tint _position = className.indexOf('_');\n\t\tif (_position == -1)\n\t\t{\n\t\t\tpvName = className;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpvName = className.substring(0, _position);\n\t\t}\n\t\tEquationData data = getEQData(pvName, invalidCCN, decode, \"N\");\n\t\tString error = data.getErrorMessage().trim();\n\t\tSystem.out.println(\"Validate Non-Existing Call\");\n\t\tif (!error.equals(\"\"))\n\t\t{\n\t\t\tSystem.out.println(\"Error: \" + error);\n\t\t}\n\t\tSystem.out.println(\"Data Returned: \" + data.getData());\n\t\tassertEquals(false, error.equals(\"\"));\n\t}", "@Override\n public void onFailure(Throwable throwable) {\n\n if (throwable instanceof PersonaError) {\n PersonaError error = (PersonaError) throwable;\n int errorCode = error.getErrorCode();\n String message = error.getMessage();\n // Do something with errorCode if it needed\n }\n }", "public int getRank() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn rank;\r\n\t}", "@Override\r\n\tpublic int insertEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "@Override public final boolean onExceptionalCompletion(Throwable ex, CountedCompleter caller ) {\n //if( _nleft != null ) _nleft.cancel(true); _nleft = null;\n //if( _nrite != null ) _nrite.cancel(true); _nrite = null;\n //if( _left != null ) _left.cancel(true); _left = null;\n //if( _rite != null ) _rite.cancel(true); _rite = null;\n _nleft = _nrite = null;\n _left = _rite = null;\n return super.onExceptionalCompletion(ex, caller);\n }", "@Override\n\tpublic void getSpendPointsResponseFailed(String arg0) {\n\t\t\n\t}", "@Override\n public void onFailure(Call<Business> call, Throwable t) {\n\n }", "@Override\r\n\tpublic void run() {\n\t\tNoEmployeeHandler endHandler = new NoEmployeeHandler();\r\n\t\tDirectorHandler dirhandler = new DirectorHandler(endHandler);\r\n\t\tSupervisorHandler supHandler = new SupervisorHandler(dirhandler);\r\n\t\tOperatorHandler opHandler = new OperatorHandler(supHandler);\r\n\t\t\r\n\t\tboolean findEmployee = true;\r\n\t\tfor (EmployeeType type : EmployeeType.values()) {\r\n\t\t\ttry {\r\n\t\t\t\tfindEmployee = opHandler.handleCall(call, type);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (findEmployee) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void dispatchCall() {\r\n try {\r\n /**\r\n * Se disminuye el contador del semáforo para marcar un empleado\r\n * como ocupado\r\n */\r\n semaphore.acquire();\r\n\r\n /**\r\n * Obtenemos el índice del empleado disponible\r\n */\r\n int assignedEmployee = getFreeEmployee();\r\n if (assignedEmployee != -1) {\r\n\r\n /**\r\n * Se simula el tiempo requerido para la llamada telefónica\r\n * (entre 5 y 10 segundos)\r\n */\r\n long duration = ThreadLocalRandom.current().nextLong(5, 10);\r\n System.out.printf(\"%s atendiendo %s Duracion llamada %s\\n\",\r\n employees.get(assignedEmployee),\r\n Thread.currentThread().getName(),\r\n duration);\r\n\r\n Thread.sleep(TimeUnit.SECONDS.toMillis(duration));\r\n\r\n /**\r\n * Una vez terminada la llamada se libera el empleado para que\r\n * pueda ser accedidos por las llamadas pendientes.\r\n */\r\n releaseEmployee(assignedEmployee);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } finally {\r\n System.out.printf(\"%s: Finalizada\\n\", Thread\r\n .currentThread().getName());\r\n\r\n /**\r\n * Incrementamos el contador de nuevo\r\n */\r\n semaphore.release();\r\n }\r\n }", "@Override\n public void onFailure(retrofit2.Call<ShiftType> call, Throwable t) {\n Log.e(\"TAG\", t.toString());\n //pd.dismiss();\n\n EmpowerApplication.alertdialog(t.getMessage(),Attend_Regularization.this);\n\n }", "public abstract int addEmployee(Employee emp) throws DatabaseExeption;", "@Override\n\tpublic Integer update(Employee e) {\n\t\tString sql = \"update Staff set Emp_name = ?, Emp_psword = ?, Emp_rank = ? where Emp_usrnme = ?\";\n\t\tint a = -1;\n\t\t//if errors occur revert to three column method as illustrated in project notes.\n\t\ttry(Connection con = ConnectDB.getHardCodedConnection()){\n\t\t\tPreparedStatement ps = con.prepareStatement(sql);\n\t\t\tps.setString(1, e.getEmployeeName());\n\t\t\tps.setString(2, e.getEPassword());\n\t\t\tps.setInt(3, e.getRank());\n\t\t\tps.setString(4,e.getEUserName());\n\t\t\t\n\t\t\ta = ps.executeUpdate();\n\t\t} catch (SQLException E) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tE.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}", "protected void notify(Employee e) {\n\t}", "private void whichPlayerHasTurn() throws PlayerOutOfTurn {\n if (test.equals(lastPicked)) {\n throw (new PlayerOutOfTurn());\n }\n }", "@Override\n public void onFailure(Call<ClubPlayersResponse> call, Throwable t) {\n }", "@Override\n public void onFailure(Call<PlayersResponse> call, Throwable t) {\n }", "public boolean considerExit() {\n\t\tboolean testing=false; \n//\t\ttesting=world.gui.retailerDetail_table2c.retailer==this;\n\t\tdouble aSumPayRate=0; // the sum of the earnings per effective labor unit, calculated for all the retailer's friends\n\t\tint aFriends=0; // the total number of the agent's friends who are non-retailers\n\t\tfor (Agent friend: owner.friends) {\n\t\t\tif (friend.enterprises.size()==0) {\n\t\t\t\taFriends++;\n\t\t\t\tDouble earnings=0.0;\n\t\t\t\tDouble marketLabor=0.0;\n\t\t\t\tif (friend.earned!=null) {\n\t\t\t\t\tfor (int i=0; i<friend.earned.length; i++) {\n\t\t\t\t\t\tif (friend.earned[i]>0) {\n\t\t\t\t\t\t\tearnings=earnings+friend.earned[i]; // Add up everything the friend earned\n\t\t\t\t\t\t\tmarketLabor=marketLabor+Math.max(0, friend.labor.labor[i]-friend.cons.used[i]); // Add up market labor, i.e., labor on goods he sold, minus the amounts he consumed\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (marketLabor>0) aSumPayRate=aSumPayRate+earnings/marketLabor;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tDouble aAvgPayRate=aSumPayRate/aFriends;\n\t\tif (testing==true) System.out.println(\"TESTING Retailer.considerExit(). Retailer id=\"+id+\". aAvgPayRate=\"+aAvgPayRate);\n\t\tif (dividendHistory.size()>3) {\n\t\t\tdouble ownEarnings3Turns=0;\n\t\t\tfor (int i=0; i<3; i++) {\n\t\t\t\tint turn=dividendHistory.size()-1-i;\n\t\t\t\tdouble dividend=dividendHistory.get(turn);\n\t\t\t\tdouble capValue=cashHistory.get(turn)+basePrice*inventoryHistory.get(turn);\n\t\t\t\tdouble prevCapValue=cashHistory.get(turn-1)+basePrice*inventoryHistory.get(turn-1);\n\t\t\t\tdouble earnings=dividend+capValue-prevCapValue;\n\t\t\t\townEarnings3Turns=ownEarnings3Turns+earnings;\n\t\t\t}\n\t\t\tDouble ownPayRate=ownEarnings3Turns/3;\n\t\t\tDouble logOwnPayRate=Double.NEGATIVE_INFINITY;\n\t\t\tif (ownPayRate>0) logOwnPayRate=Math.log(ownPayRate);\n\t\t\tDouble logAvgPayRate=Math.log(aAvgPayRate);\n\t\t\tDouble increment=0.5+0.5*logAvgPayRate-0.5*logOwnPayRate;\n\t\t\tif (increment.isNaN()) increment=0.0;\n\t\t\tif (increment>world.MAX_RETAILER_EXIT_PROB_INCREMENT_DUE_TO_LOW_PAY) \n\t\t\t\tincrement=world.MAX_RETAILER_EXIT_PROB_INCREMENT_DUE_TO_LOW_PAY;\n\t\t\tif (increment<world.MIN_RETAILER_EXIT_PROB_INCREMENT_DUE_TO_HIGH_PAY) \n\t\t\t\tincrement=world.MIN_RETAILER_EXIT_PROB_INCREMENT_DUE_TO_HIGH_PAY;\n\t\t\toddsOfExit=oddsOfExit+increment;\n\t\t\tif (testing==true) System.out.println(\"TESTING Retailer.considerExit(). Retailer id=\"+id+\". ownPayRate=\"+ownPayRate);\n\t\t}\n\t\t// If the retailer has been out of inventory for three turns or more, \n\t\t// the likelihood of the retailer quitting rises by RETAILER_EXIT_PROB_INCREMENT_DUE_TO_NO_SALES\n\t\tif (incomeHistory.size()>3) {\n\t\t\tboolean threeTurnsNegligibleSales=true;\n\t\t\tfor (int i=0; i<3; i++) {\n\t\t\t\tDouble income=incomeHistory.get(incomeHistory.size()-1-i);\n\t\t\t\tif (income>0.0001) threeTurnsNegligibleSales=false;\n\t\t\t}\n\t\t\tif (threeTurnsNegligibleSales) oddsOfExit=oddsOfExit+world.RETAILER_EXIT_PROB_INCREMENT_DUE_TO_NO_SALES;\t\t\t\n\t\t}\n\t\tif (testing) System.out.println(\"oddsOfExit=\"+oddsOfExit);\n\t\tif (oddsOfExit<world.MIN_RETAILER_EXIT_PROB) oddsOfExit=world.MIN_RETAILER_EXIT_PROB;\n\t\tif (oddsOfExit>world.MAX_RETAILER_EXIT_PROB) oddsOfExit=world.MAX_RETAILER_EXIT_PROB; // Maximum 50% odds of exit based on lower earnings\n\t\tboolean exit=Math.random()<oddsOfExit;\n\t\tif (exit) exit();\n\t\treturn exit;\n\t}", "public int handleImpossibleMoveException(Player player, Board board) {\n System.out.println(\"Erreur : mouvement impossible, veuillez recommencer !\");\n int marblesOut = 0;\n while(true){\n try {\n marblesOut = composeMove(player,board).performMove();\n break;\n } catch (ImpossibleMoveException e) {\n System.out.println(\"Erreur : mouvement impossible, veuillez recommencer !\");\n }\n }\n return marblesOut;\n }", "@Override\n public void youLose(Map<String, Integer> rankingMap) {\n try {\n if (getClientInterface() != null)\n getClientInterface().gameEnded(\" YOU LOSE, SORRY \", rankingMap);\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending you lose error\");\n }\n }", "boolean hasEmployee();", "boolean hasEmployee();", "public int pushEmployee(boolean override) {\n\t\t// Can't push invalid data\n\t\tif (!this.validateEmployeePackage())\n\t\t\treturn this.validateEmployeePackageResult();\n\t\t// Manual if's are easier\n\t\tif (this.employeeExists()) {\n\t\t\tif (override) {\n\t\t\t\tint e = super.update(\"UPDATE \" + C.TABLE_EMPLOYEE + \" SET \"\n\t\t\t\t\t\t+ C.COLUMN_FIRST_NAME + \"='\" + this.getFirstName() + \"'\"\n\t\t\t\t\t\t+ C.COLUMN_LAST_NAME + \"='\" + this.getLastName() + \"' WHERE \"\n\t\t\t\t\t\t+ C.COLUMN_ID + \"=\" + this.getID());\n\t\t\t\treturn e > 0 ? EmployeeConnection.SUCCESS :\n\t\t\t\t\t\te < 0 ? EmployeeConnection.SQL_ERROR :\n\t\t\t\t\t\t\t\tEmployeeConnection.DRIVER_ERROR;\n\t\t\t} else\n\t\t\t\treturn EmployeeConnection.DUPLICATE_EMPLOYEE;\n\t\t} else {\n\t\t\tint e = super.update(\"INSERT INTO \" + C.TABLE_EMPLOYEE + \" (\" + C.COLUMN_ID\n\t\t\t\t\t+ \", \" + C.COLUMN_FIRST_NAME + \", \" + C.COLUMN_LAST_NAME\n\t\t\t\t\t+ \") VALUES (\" + this.getID() + \", '\" + this.getFirstName()\n\t\t\t\t\t+ \"', '\" + this.getLastName() + \"'\");\n\t\t\treturn e > 0 ? EmployeeConnection.SUCCESS :\n\t\t\t\t\te < 0 ? EmployeeConnection.SQL_ERROR :\n\t\t\t\t\t\t\tEmployeeConnection.DRIVER_ERROR;\n\t\t}\n\t}", "@Override\r\n public void onFailure(Call call, IOException e) {\n closeNetworkCacheCardView();\r\n showErrorCardView(ACCESS_TIMEOUT);\r\n lockPayNowOrHavePayButton(ACCESS_TIMEOUT);\r\n }", "@Override\n boolean isFailed() {\n return false;\n }", "public boolean emprunter() {\n // TODO: implement\n return false;\n }", "@Override\n public void onFailure(retrofit2.Call<AttendanceDetails> call, Throwable t) {\n pd.dismiss();\n EmpowerApplication.alertdialog(t.getMessage(), AttendanceDetailsActivity.this);\n // Log.e(\"TAG\", t.toString());\n\n }", "@Test\n public void userRankingFailure2() {\n List<ATrip> trips = new ArrayList<ATrip>();\n ATrip trip = new ATrip();\n trip.setDriverid(DRIVER_ID);\n trip.setPassengerid(\"\");\n trip.setTripid(TRIP_ID);\n trip.setStatus(1);\n trip.setStartdate(4);\n trip.setEnddate(5);\n trips.add(trip);\n\n List<ATripRepository.userTripRanking> response = repo.getUserRankings(1, 10, trips, \"Passenger\");\n\n assertTrue(response.isEmpty());\n }", "@Override\n\tpublic boolean ifEmp(int eid, String passwd) {\n\t\treturn eb.ifEmp(eid, passwd);\n\t}", "public void pendingRecordFailed() {\n pendingRecordFailed(0);\n }", "public boolean doesRankExist(String rankName) {\n\t\treturn moves.get(0).getStartPositions().containsKey(rankName);\n\t}", "@Override\r\n\tfinal public void onFailure(Throwable throwable) {\r\n Log.error(\"Error caught while performing an action on the server: \"+throwable.getMessage(), throwable);\r\n if (throwable instanceof OpenXDataSessionExpiredException) {\r\n // allow the user to login again (show a login popup so they can continue where they left off)\r\n //Window.alert(appMessages.sessionExpired());\r\n Dispatcher.get().dispatch(LoginController.LOGIN);\r\n } else if (throwable instanceof OpenXDataSecurityException) {\r\n // access denied\r\n Window.alert(appMessages.accessDeniedError());\r\n } else {\r\n // all other errors\r\n Window.alert(appMessages.pleaseTryAgainLater(throwable.getMessage()));\r\n }\r\n }", "private boolean isExitsPhone() throws Exception{\n String query = \"SELECT COUNT(*) FROM \" + tableName + \" WHERE phone=?\";\n PreparedStatement pstm = this.con.prepareStatement(query);\n pstm.setObject(1, Phone.getText());\n\n ResultSet result = pstm.executeQuery();\n\n result.next();\n return (result.getInt(1) > 0);\n }", "@Override\n public void onFailure(Call<PontoApiRepostaServidor> call, Throwable t) {\n msgErroServidor();\n retrofitPegarEndComp(ender);\n }", "public void endUserException() {\n if (upcallReturn_ != null) {\n Assert._OB_assert(userEx_);\n upcallReturn_.upcallEndUserException(this);\n }\n }", "@Override\n public void onFailure(retrofit2.Call<CompOffDetails> call, Throwable t) {\n pd.dismiss();\n Log.e(\"TAG\", t.toString());\n EmpowerApplication.alertdialog(t.getMessage(), CompoffActivity.this);\n\n\n }", "private boolean isProblemData(Employee employee) {\n return (employee.getName().isEmpty()) ||\n employee.getPensionId().isEmpty() ||\n employee.getRole().isEmpty() ||\n Character.isLowerCase(employee.getName().charAt(0));\n }", "@Override\r\n\t\t\t\t\t\tpublic void onPayFailed(CPOrderInfo arg0, ErrorInfoBean arg1) {\n\t\t\t\t\t\t\tTypeSDKLogger.e( \"return Error\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "@Test\r\n public void findUserInvalidUserId() {\r\n\r\n assertThatThrownBy(() -> {\r\n this.usermanagement.findUserRole(-1L);\r\n }).isInstanceOf(Exception.class);\r\n }", "public int addEmployee(String name, String employeeRole, String address, String email, String phone){\n char first;\n int businessID;\n\n /* Capitalize first char */\n first = Character.toUpperCase(name.charAt(0));\n name = first + name.substring(1);\n\n log.debug(\"Inside addEmployee Method.\");\n log.info(\"Adding employee details: \" + name + \" \" + employeeRole + \" \" + email + \" \" + phone);\n\n businessID = session.getLoggedInUserId();\n\n if(!nameValidation(name)){\n log.debug(\"Failed to add employee because of failed name validation, returning to controller\");\n return -1;\n }\n if(!emailValidation(email)){\n log.debug(\"Failed to add employee because of failed email validation, returning to controller\");\n return -2;\n }\n if(!phoneValidation(phone)){\n log.debug(\"Failed to add employee by phone validation, returning to controller\");\n return -3;\n }\n /*\n if(!roleLimitCheck(employeeRole)){\n log.debug(\"Failed to add employee: too many assigned to one role\");\n return -4;\n }\n */\n\n\n String employeeDetailsSQL = \"INSERT INTO employeeDetails(businessID, name, \" +\n \"employeeRole, address, email, phone) values(\"\n + businessID + \",\" +\n \"'\" + name + \"',\" +\n \"'\" + employeeRole + \"',\" +\n \"'\" + address + \"',\" +\n \"'\" + email + \"',\" +\n \"'\" + phone +\"')\";\n if(database.updateDatabase(employeeDetailsSQL)){\n log.debug(\"Successfully added employee\");\n if(createEmployeeAvailability(name)){\n return 1;\n }\n return 0;\n }\n log.debug(\"Failed to added employee\");\n return 0;\n }", "public String addEmployee(EmployeeDetails employeeDetails) throws NullPointerException;", "public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}" ]
[ "0.5734105", "0.56546116", "0.5552287", "0.55281353", "0.54679805", "0.54252464", "0.5360911", "0.5326838", "0.52079695", "0.5199206", "0.51574993", "0.51467603", "0.5137067", "0.5124514", "0.5123869", "0.5109453", "0.5106248", "0.50754195", "0.5065686", "0.5058141", "0.5050342", "0.50447595", "0.50447595", "0.5032475", "0.50291634", "0.5021709", "0.50209755", "0.50154173", "0.5007819", "0.50005466", "0.4997154", "0.49869975", "0.49866924", "0.49859908", "0.4981065", "0.49776247", "0.49706507", "0.4966705", "0.49660277", "0.49628586", "0.49616015", "0.4961159", "0.49561217", "0.49559528", "0.49339092", "0.49339092", "0.49245954", "0.49072874", "0.48892164", "0.4888328", "0.48862973", "0.48849958", "0.48704335", "0.48698482", "0.48682854", "0.4866231", "0.48599523", "0.48556998", "0.48537263", "0.48518565", "0.48514676", "0.4849494", "0.4847353", "0.48406434", "0.48358524", "0.4829228", "0.48241827", "0.48207518", "0.4816611", "0.48092917", "0.4808536", "0.48074436", "0.48015448", "0.47927123", "0.47920287", "0.47901532", "0.47847474", "0.4782632", "0.47813252", "0.47813252", "0.47799957", "0.47786006", "0.47699717", "0.47668067", "0.4765799", "0.47629818", "0.47628307", "0.4757218", "0.47568083", "0.47560418", "0.47558564", "0.47547922", "0.4753811", "0.47521165", "0.47475392", "0.47471222", "0.47462565", "0.47458747", "0.47455326", "0.4742618" ]
0.56400365
2
Returns the ClassDef for the return type of this method.
public IClass getType() { IClass result = null; if (_javaMethod.getReturnType().isArray()) { result = new ArrayDef(new ExternalClass(_javaMethod.getReturnType().getComponentType())); } else { result = new ExternalClass(_javaMethod.getReturnType()); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Class returnedClass();", "public Class<?> getReturnType() {\r\n\t\treturn returnType;\r\n\t}", "public Class<?> getTargetReturnType() {\n return targetReturnType;\n }", "public Class<?> getSourceReturnType() {\n return returnType;\n }", "Type getReturnType();", "TypeDescription getReturnType();", "public BCClass getReturnBC() {\n return getProject().loadClass(getReturnName(), getClassLoader());\n }", "Type getReturnType () { return return_type; }", "public TypeConstraint getReturnType() {\n return new TypeConstraint(executable.getReturnType());\n }", "public Class typeClass() {\n if (myClass == null) myClass = AST.globalSymbolTable.classForName(name);\n return myClass;\n }", "public abstract Class<?> getVTLReturnTypeFor(Class<?> clazz);", "public Type getReturnType() {\n/* 227 */ return Type.getReturnType(this.desc);\n/* */ }", "public Class getTypeClass() {\r\n\t\treturn (typeClass);\r\n\t}", "String getReturnType();", "@Override\n public HxType getReturnType() {\n return toMethod().getReturnType();\n }", "@NotNull\n @Contract(pure = true)\n public Class<?> getType() {\n return clazz;\n }", "Class<?> getImplementationClass();", "public String getReturnType() {\n String type;\r\n if (this.getTypeIdentifier() != null) { //Collection<Entity> , Collection<String>\r\n type = this.getTypeIdentifier().getVariableType();\r\n } else {\r\n type = classHelper.getClassName();\r\n }\r\n\r\n if ((this.getTypeIdentifier() == null\r\n || getRelation() instanceof SingleRelationAttributeSnippet)\r\n && functionalType) {\r\n if (isArray(type)) {\r\n type = \"Optional<\" + type + '>';\r\n } else {\r\n type = \"Optional<\" + getWrapperType(type) + '>';\r\n }\r\n }\r\n return type;\r\n }", "public abstract Class<?> getImplementation();", "@Deprecated public TypeRef getReturnType(){\n return this.returnType!=null?this.returnType.build():null;\n }", "String getResultClass();", "public abstract Class<Response> getResponseClass();", "public ITypeInfo getReturnType();", "public TypeToken<?> returnType() {\n return this.modelType;\n }", "public String getReturnType() {\n return returnType;\n }", "public Class<?> getJavaClass() {\n return clazz;\n }", "public Class<?> getTheActualClass() {\n\n if (actualClass != null) {\n return actualClass;\n } else {\n return method.getDeclaringClass();\n }\n }", "public Class getJavaClass() {\n return _class;\n }", "@Override\n\t/**\n\t * returns a String \"no\" because a class does not have a data or return type\n\t * \n\t * @return \"no\"\n\t */\n\tpublic String getReturnType() {\n\t\treturn \"no\";\n\t}", "public final Class getFactoryClass() {\n\treturn factoryMethod.getDeclaringClass();\n }", "public String getReturnTypeName() {\n return returnTypeName;\n }", "public String getReturnType() {\n return returnType;\n }", "public String getClassType() {\n return classType;\n }", "public abstract Class getExpectedClass ();", "Class<A> getImplClass();", "com.google.protobuf.ByteString\n getReturnTypeBytes();", "public String getFunctionReturnWatcherClass()\n {\n return functionReturnWatcherClass;\n }", "public String getReturnType() {\n\t\treturn returnType;\n\t}", "public String getType() {\n\t\treturn \"class\";\n\t}", "Class<H> getMethodClass();", "public String getClazz();", "public org.apache.xmlbeans.XmlNMTOKEN xgetJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNMTOKEN target = null;\r\n target = (org.apache.xmlbeans.XmlNMTOKEN)get_store().find_attribute_user(JAVACLASS$24);\r\n return target;\r\n }\r\n }", "public Class<RES> getResponseClass() {\n return responseClass;\n }", "public Class getDefiningType() {\n return _class;\n }", "public Class<? extends Type> getValueClass() {\n return valueClass;\n }", "@Override\r\n public MetadataClass getReferenceClass() {\r\n if (m_referenceClass == null) {\r\n m_referenceClass = getTargetClass();\r\n \r\n if (m_referenceClass == null || m_referenceClass.isVoid()) {\r\n // This call will attempt to extract the reference class from generics.\r\n m_referenceClass = getReferenceClassFromGeneric();\r\n \r\n if (m_referenceClass == null) {\r\n // 266912: We do not handle the resolution of parameterized \r\n // generic types when the accessor is a MappedSuperclasses.\r\n // the validation exception is relaxed in this case and\r\n // void metadata class is returned.\r\n if (getClassAccessor().isMappedSuperclass()) {\r\n return getMetadataClass(Void.class);\r\n }\r\n \r\n // Throw an exception. An element collection accessor must \r\n // have a reference class either through generics or a \r\n // specified target class on the mapping metadata.\r\n throw ValidationException.unableToDetermineTargetClass(getAttributeName(), getJavaClass());\r\n }\r\n }\r\n }\r\n \r\n return m_referenceClass;\r\n }", "public abstract Class getDescriptedClass();", "public Class<?> getParameterClass()\n\t{\n\t\treturn parameterClass;\n\t}", "public Class<DATA> getHandledClass() ;", "public Class<?> getClazz() {\n return clazz;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate Class<T> getClassType() {\r\n\t\tParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass();\r\n\t\treturn (Class<T>) parameterizedType.getActualTypeArguments()[0];\r\n\t}", "@Override\n public com.google.protobuf.ByteString\n getReturnTypeBytes() {\n Object ref = returnType_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n returnType_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public final PythonParser.classdef_return classdef() throws RecognitionException {\n PythonParser.classdef_return retval = new PythonParser.classdef_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token CLASS271=null;\n Token NAME272=null;\n Token LPAREN273=null;\n Token RPAREN275=null;\n Token COLON276=null;\n PythonParser.decorators_return decorators270 = null;\n\n PythonParser.testlist_return testlist274 = null;\n\n PythonParser.suite_return suite277 = null;\n\n\n PythonTree CLASS271_tree=null;\n PythonTree NAME272_tree=null;\n PythonTree LPAREN273_tree=null;\n PythonTree RPAREN275_tree=null;\n PythonTree COLON276_tree=null;\n\n\n stmt stype = null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:5: ( ( decorators )? CLASS NAME ( LPAREN ( testlist[expr_contextType.Load] )? RPAREN )? COLON suite[false] )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:7: ( decorators )? CLASS NAME ( LPAREN ( testlist[expr_contextType.Load] )? RPAREN )? COLON suite[false]\n {\n root_0 = (PythonTree)adaptor.nil();\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:7: ( decorators )?\n int alt139=2;\n int LA139_0 = input.LA(1);\n\n if ( (LA139_0==AT) ) {\n alt139=1;\n }\n switch (alt139) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:7: decorators\n {\n pushFollow(FOLLOW_decorators_in_classdef7334);\n decorators270=decorators();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, decorators270.getTree());\n\n }\n break;\n\n }\n\n CLASS271=(Token)match(input,CLASS,FOLLOW_CLASS_in_classdef7337); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n CLASS271_tree = (PythonTree)adaptor.create(CLASS271);\n adaptor.addChild(root_0, CLASS271_tree);\n }\n NAME272=(Token)match(input,NAME,FOLLOW_NAME_in_classdef7339); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n NAME272_tree = (PythonTree)adaptor.create(NAME272);\n adaptor.addChild(root_0, NAME272_tree);\n }\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:30: ( LPAREN ( testlist[expr_contextType.Load] )? RPAREN )?\n int alt141=2;\n int LA141_0 = input.LA(1);\n\n if ( (LA141_0==LPAREN) ) {\n alt141=1;\n }\n switch (alt141) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:31: LPAREN ( testlist[expr_contextType.Load] )? RPAREN\n {\n LPAREN273=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_classdef7342); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n LPAREN273_tree = (PythonTree)adaptor.create(LPAREN273);\n adaptor.addChild(root_0, LPAREN273_tree);\n }\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:38: ( testlist[expr_contextType.Load] )?\n int alt140=2;\n int LA140_0 = input.LA(1);\n\n if ( (LA140_0==NAME||(LA140_0>=LAMBDA && LA140_0<=NOT)||LA140_0==LPAREN||(LA140_0>=PLUS && LA140_0<=MINUS)||(LA140_0>=TILDE && LA140_0<=LBRACK)||LA140_0==LCURLY||(LA140_0>=BACKQUOTE && LA140_0<=STRING)) ) {\n alt140=1;\n }\n switch (alt140) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:38: testlist[expr_contextType.Load]\n {\n pushFollow(FOLLOW_testlist_in_classdef7344);\n testlist274=testlist(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, testlist274.getTree());\n\n }\n break;\n\n }\n\n RPAREN275=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_classdef7348); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n RPAREN275_tree = (PythonTree)adaptor.create(RPAREN275);\n adaptor.addChild(root_0, RPAREN275_tree);\n }\n\n }\n break;\n\n }\n\n COLON276=(Token)match(input,COLON,FOLLOW_COLON_in_classdef7352); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COLON276_tree = (PythonTree)adaptor.create(COLON276);\n adaptor.addChild(root_0, COLON276_tree);\n }\n pushFollow(FOLLOW_suite_in_classdef7354);\n suite277=suite(false);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, suite277.getTree());\n if ( state.backtracking==0 ) {\n\n Token t = CLASS271;\n if ((decorators270!=null?((Token)decorators270.start):null) != null) {\n t = (decorators270!=null?((Token)decorators270.start):null);\n }\n stype = new ClassDef(t, actions.cantBeNone(NAME272),\n actions.makeBases(actions.castExpr((testlist274!=null?((PythonTree)testlist274.tree):null))),\n actions.castStmts((suite277!=null?suite277.stypes:null)),\n actions.castExprs((decorators270!=null?decorators270.etypes:null)));\n \n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = stype;\n\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public String returnType() {\n return this.data.returnType();\n }", "public Class<X> getJavaClass() {\n\t\treturn javaClass;\n\t}", "public Coding classValue() {\n return getObject(Coding.class, FhirPropertyNames.PROPERTY_CLASS);\n }", "String getClazz();", "public Class<?> clazz()\n {\n return clazz;\n }", "public abstract Class<? extends HateaosController<T, Identifier>> getClazz();", "public Class<?> getFileClass()\r\n {\r\n return sFileClass;\r\n }", "default String getClassName() {\n return declaringType().getClassName();\n }", "public Coding classValue() {\n return getObject(Coding.class, FhirPropertyNames.PROPERTY_CLASS);\n }", "public Class getBaseClass();", "@Nullable\n @Override\n public PyType getGenericType(@NotNull PyClass cls, @NotNull TypeEvalContext context) {\n final PyFunction init = cls.findInitOrNew(true, context);\n if (init != null) {\n final PyCallableType callableType = PyUtil.as(context.getType(init), PyCallableType.class);\n if (callableType != null) {\n final PyType returnType = PyUtil.as(callableType.getReturnType(context), PyCollectionType.class);\n if (returnType != null) {\n return returnType;\n }\n }\n }\n\n return null;\n }", "public java.lang.String getJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public char[] getReturnTypeName() {\n return returnTypeName;\n }", "public ClassInfo declaringClass();", "public Class<T> getBaseClass()\n {\n return underlyingClass;\n }", "@Value.Default default ClassKind classKind() {\n return ClassKind.Generated;\n }", "public Class getDataClass();", "protected MetadataClass getTargetClass() {\r\n return m_targetClass;\r\n }", "Class createClass();", "public Name getFunctionReturnWatcherClassName()\n {\n assert functionReturnWatcherClassName != null;\n return functionReturnWatcherClassName;\n }", "protected Class<?> getGenericClass() {\n\t\treturn (Class<?>)((ParameterizedType)getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n\t}", "public String getFClass() {\n\t\t\treturn this.fClass ;\n\t\t}", "public com.google.protobuf.ByteString\n getReturnTypeBytes() {\n Object ref = returnType_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n returnType_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "ClassInstanceCreationExpression getClass_();", "public Class<? extends Geometry> getTargetClass() {\n\n\t\tint index = comboGeometryList.getSelectionIndex();\n\t\tString geomName;\n\t\tClass<? extends Geometry> geomClass;\n\n\t\tif (index != -1) {\n\t\t\tgeomName = comboGeometryList.getItem(index);\n\t\t\tgeomClass = (Class<? extends Geometry>) comboGeometryList.getData(geomName);\n\t\t\treturn geomClass;\n\t\t}\n\n\t\treturn null;\n\t}", "String getGeneratedClassName();", "String getGeneratedClassName();", "String getGeneratedClassName();", "public Class<?> getCreatureClass()\r\n/* 19: */ {\r\n/* 20:37 */ return this.e;\r\n/* 21: */ }", "public Class<?> getWrappedClass() {\r\n return clazz;\r\n }", "public ClassElement getDeclaringClass() {\n return patternAnalyser.getClassElement();\n }", "@Transient\n\tpublic Class<?> getClassType() {\n\t\treturn Book.class;\n\t}", "public MoC getContentClass() {\r\n \t\tMoC clasz = null;\r\n \r\n \t\tif (isActor()) {\r\n \t\t\tclasz = actor.getMoC();\r\n \t\t} else {\r\n \t\t\tclasz = network.getMoC();\r\n \t\t}\r\n \r\n \t\treturn clasz;\r\n \t}", "public Class getObjectClass() {\n return objectFactory.getClassForPath(Collections.emptyList());\n }", "public com.walgreens.rxit.ch.cda.EntityClass xgetClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.EntityClass target = null;\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_default_attribute_value(CLASSCODE$30);\n }\n return target;\n }\n }", "public StrColumn getClazz() {\n return delegate.getColumn(\"class\", DelegatingStrColumn::new);\n }", "public Class getType();", "public abstract Class<T> targetType();", "protected abstract Class<C> getConfigClass();", "public Class<T> getTypeClass() {\n return (Class<T>) defaultValue.getClass();\n }", "Class<T> getClazzT();", "@Override\n public String getReturnType() {\n Object ref = returnType_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n returnType_ = s;\n return s;\n }\n }", "public static String classDecl()\n {\n read_if_needed_();\n \n return _class_decl;\n }", "Class<?> type();", "public Class getResultType() {\n return _res;\n }", "public Class getRecyclerClass() \n\t{\n\treturn fClass;\n\t}", "protected abstract Class<T> getEntityClass();" ]
[ "0.7758015", "0.72589034", "0.67639613", "0.6716204", "0.6700428", "0.6606117", "0.6596705", "0.6455723", "0.6431016", "0.64288825", "0.6417008", "0.6394488", "0.63441736", "0.62733734", "0.62708586", "0.6236068", "0.6198702", "0.6167832", "0.61654", "0.6158277", "0.6151392", "0.61280125", "0.6097728", "0.6088402", "0.60703623", "0.60293365", "0.60073626", "0.6000538", "0.60002834", "0.5991803", "0.5979779", "0.5959565", "0.5956745", "0.5953718", "0.5948614", "0.5915975", "0.5910179", "0.58939654", "0.58644694", "0.58544415", "0.5821689", "0.5818665", "0.58162206", "0.5781932", "0.57765126", "0.5766416", "0.5761723", "0.57141596", "0.57135224", "0.5703615", "0.56921005", "0.5691298", "0.5689242", "0.56814605", "0.56786996", "0.5672669", "0.5668898", "0.5668592", "0.5667673", "0.5663625", "0.5654015", "0.5645808", "0.5645397", "0.56426334", "0.56362003", "0.56350523", "0.5632243", "0.5631819", "0.5628727", "0.5621938", "0.5619577", "0.56132776", "0.5609866", "0.56036526", "0.5589233", "0.55848175", "0.55748045", "0.55703384", "0.55690676", "0.55690676", "0.55690676", "0.556707", "0.55612797", "0.55542976", "0.5550551", "0.5548532", "0.5542132", "0.55312604", "0.5530101", "0.5528462", "0.5528151", "0.55278283", "0.55249864", "0.55234975", "0.5522261", "0.55197567", "0.5508004", "0.5504694", "0.55037564", "0.55014884" ]
0.709764
2